Functions | |
s32 | AINSER_Init (u32 mode) |
s32 | AINSER_NumModulesGet (void) |
s32 | AINSER_NumModulesSet (u8 num_modules) |
s32 | AINSER_EnabledGet (u8 module) |
s32 | AINSER_EnabledSet (u8 module, u8 enabled) |
s32 | AINSER_MuxedGet (u8 module) |
s32 | AINSER_MuxedSet (u8 module, u8 muxed) |
s32 | AINSER_NumPinsGet (u8 module) |
s32 | AINSER_NumPinsSet (u8 module, u8 num_pins) |
s32 | AINSER_DeadbandGet (u8 module) |
s32 | AINSER_DeadbandSet (u8 module, u8 deadband) |
s32 | AINSER_PinGet (u8 module, u8 pin) |
s32 | AINSER_PreviousPinValueGet (void) |
s32 | AINSER_Handler (void(*_callback)(u32 module, u32 pin, u32 value)) |
AINSER module driver
Sets the difference between last and current pot value which has to be achieved to trigger the callback function passed to AINSER_Handler()
Sets the enable mask for modules which should be scanned
This function should be periodically called to scan AIN pin changes.
A scan of a single multiplexer selection takes ca. 50 uS on a LPC1769 with MIOS32_SPI_PRESCALER_8
Whenever a pin has changed, the given callback function will be called.
Example:
[in] | _callback | pointer to callback function |
Initializes AINSER driver Should be called from Init() during startup
[in] | mode | currently only mode 0 supported |
0 | if 1-to-8 multiplexers disabled for the given module | |
1 | if 1-to-8 multiplexers enabled for the given module (default) |
Enables/disables the 1-to-8 multiplexer handling.
Use muxed=0 for AINSER8 module, and muxed=1 for AINSER64 module (default)
s32 AINSER_NumModulesGet | ( | void | ) |
Sets the number of modules which should be scanned
Sets the number of AIN pins per module which should be scanned
s32 AINSER_PreviousPinValueGet | ( | void | ) |