Functions | |
| s32 | MIOS32_DIN_Init (u32 mode) |
| s32 | MIOS32_DIN_PinGet (u32 pin) |
| s32 | MIOS32_DIN_SRGet (u32 sr) |
| u8 | MIOS32_DIN_SRChangedGetAndClear (u32 sr, u8 mask) |
| s32 | MIOS32_DIN_Handler (void *_callback) |
| s32 MIOS32_DIN_Handler | ( | void * | _callback | ) |
Initializes DIN driver
| [in] | mode | currently only mode 0 supported |
Returns state of a DIN pin
| [in] | pin | number (0..127) |
0 if pin is 0V
-1 if pin not available
Returns the DIN pin toggle notifications after a SRIO scan. Should be used to check and clear these flags when processed by a DIN handler for exclusive access (avoid propagation of already handled DIN pin changes)
Examples:
1) if a scan matrix handler processes the DIN pins of the first SR, it should call
changed = MIOS32_DIN_SRChangedGetAndClear(0, 0xff)
2) it's also possible, to check and clear only dedicated pins of the DIN register by applying a different pin mask. E.g.
changed = MIOS32_DIN_SRChangedGetAndClear(0, 0xc0)
| [in] | sr | shift register number (0..15) |
| [in] | mask | pin mask (8bit value) |
no error status (-1)! - if unavailable SR selected, 0x00 will be returned
Returns state of a DIN shift register
| [in] | sr | shift register number (0..15) |
-1 if shift register not available
1.4.7