Closed kuelomisli closed 8 years ago
All of the registers are defined in mcp23s17.h
. If you include this into your program you can use them - as you have correctly stated - with the pifacedigital_write_reg
function.
I hope this helps.
https://github.com/piface/libmcp23s17/blob/master/src/mcp23s17.h#L48-L49
Thanks a lot for responding so quickly! That does indeed help. Will close the issue.
In the C Library there is no function to directly enable/disable the Pull Up Resistors.
For the Input, I found out their hardware address as 0x0d, so if you just add the macro, for example
[code]#define PULL_UPS 0x0d [/code]
you could set/unset them with the pifacedigital_write_reg(val, PULL_UPS, piface_hardw_addr).