[fluksod] put an advisory lock on spidev

This commit is contained in:
Bart Van Der Meerssche 2011-01-22 00:07:01 +01:00
parent 2fa9a53766
commit 0ff4f20cfc
1 changed files with 1 additions and 0 deletions

View File

@ -67,6 +67,7 @@ local fds = { uart, ctrl, delta }
local spidev = nixio.open(SPI_DEV, O_RDWR_NONBLOCK) local spidev = nixio.open(SPI_DEV, O_RDWR_NONBLOCK)
nixio.spi.setspeed(spidev, SPI_MAX_CLK_SPEED_HZ, SPI_MIN_BYTE_DELAY_US) nixio.spi.setspeed(spidev, SPI_MAX_CLK_SPEED_HZ, SPI_MIN_BYTE_DELAY_US)
spidev:lock('lock')
while true do while true do
local msg local msg