From 0ff4f20cfcd3fdc31e455ec5efbee61d1a27bd9a Mon Sep 17 00:00:00 2001 From: Bart Van Der Meerssche Date: Sat, 22 Jan 2011 00:07:01 +0100 Subject: [PATCH] [fluksod] put an advisory lock on spidev --- mote/v2/openwrt/package/flukso/luasrc/fluksod.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/mote/v2/openwrt/package/flukso/luasrc/fluksod.lua b/mote/v2/openwrt/package/flukso/luasrc/fluksod.lua index 0e2f68c..2fab932 100755 --- a/mote/v2/openwrt/package/flukso/luasrc/fluksod.lua +++ b/mote/v2/openwrt/package/flukso/luasrc/fluksod.lua @@ -67,6 +67,7 @@ local fds = { uart, ctrl, delta } local spidev = nixio.open(SPI_DEV, O_RDWR_NONBLOCK) nixio.spi.setspeed(spidev, SPI_MAX_CLK_SPEED_HZ, SPI_MIN_BYTE_DELAY_US) +spidev:lock('lock') while true do local msg