#include <lua/gpio.lh>
- ans = gpio.read(group, addr, len)
- gpio.write(group, addr, data)
- gpio.writeAnd(group, addr, data)
- gpio.writeOr(group, addr, data)
Perform a read or write access on a MUPP device. group indicates the registered group ID used with the gpio.register() command.
addr is the starting address on the device. Bits 8..15 specify the MUPP-object and bits 0..7 specify the MUPP-address inside the object.
For read accesses, len indicates the number of bytes to transfer. The command returns the data that was read on success.
For write accesses, data holds the data to be written. The command returns true on success. Instead of a plain write, bit-wise AND and OR operations are possible, the accessed device permitting.