Functions | |
s32 | MIOS32_IIC_BS_Init (u32 mode) |
s32 | MIOS32_IIC_BS_ScanBankSticks (void) |
s32 | MIOS32_IIC_BS_CheckAvailable (u8 bs) |
s32 | MIOS32_IIC_BS_Read (u8 bs, u16 address, u8 *buffer, u8 len) |
s32 | MIOS32_IIC_BS_Write (u8 bs, u16 address, u8 *buffer, u8 len) |
s32 | MIOS32_IIC_BS_CheckWriteFinished (u8 bs) |
IIC BankStick layer for MIOS32
This function checks the availability of a BankStick taken from the last results of MIOS32_IIC_BS_ScanBankSticks
[in] | bs | BankStick number (0-7) |
Has to be used after MIOS32_IIC_BS_Write (during write operation) to poll the device state
[in] | bs | BankStick number (0-7) |
Initializes BankSticks
[in] | mode | currently only mode 0 supported |
Reads one or more bytes into a buffer
[in] | bs | BankStick number (0-7) |
[in] | address | BankStick address (depends on size) |
[out] | buffer | destination buffer |
[in] | len | number of bytes which should be read (1..64) |
s32 MIOS32_IIC_BS_ScanBankSticks | ( | void | ) |
Scans all BankSticks to check the availablility by sending dummy requests and checking the ACK response.
Per module, this procedure takes at least ca. 25 uS, if no module is connected ca. 75 uS (3 retries), or even more if we have to wait for completion of the previous IIC transfer. Therefore this function should only be rarely used (e.g. once per second), and the state should be saved somewhere in the application
Writes one or more bytes into the BankStick
[in] | bs | BankStick number (0-7) |
[in] | address | BankStick address (depends on size) |
[in] | buffer | source buffer |
[in] | len | number of bytes which should be written (1..64) |