Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
I2cconfig
Functions | |
| uint32_t | I2CInit () |
| I2CInit. | |
| int32_t | I2CBufferRead (int32_t ucDevAddr, uint8_t *ucBuffer, int32_t ulSize, unsigned char ucFlags) |
| Invokes the I2C driver APIs to read from the device. | |
| int32_t | I2CBufferWrite (int32_t ucDevAddr, uint8_t *ucBuffer, int32_t ulSize, unsigned char ucFlags) |
| Invokes the I2C driver APIs to write to the specified address. | |
Function Documentation
| int32_t I2CBufferRead | ( | int32_t | ucDevAddr, |
| uint8_t * | ucBuffer, | ||
| int32_t | ulSize, | ||
| unsigned char | ucFlags | ||
| ) |
Invokes the I2C driver APIs to read from the device.
This assumes the device local address to read from is set using the I2CWrite API.
- Parameters:
-
ucDevAddr is the device I2C slave address ucBuffer is the pointer to the read data to be placed ulSize is the length of data to be read ucFlags Flag
This function works in a polling mode, 1. Writes the device register address to be written to. 2. In a loop, reads all the bytes over I2C
- Returns:
- 0: Success, < 0: Failure.
Definition at line 94 of file i2cconfig.cpp.
| int32_t I2CBufferWrite | ( | int32_t | ucDevAddr, |
| uint8_t * | ucBuffer, | ||
| int32_t | ulSize, | ||
| unsigned char | ucFlags | ||
| ) |
Invokes the I2C driver APIs to write to the specified address.
- Parameters:
-
ucDevAddr is the device I2C slave address ucBuffer is the pointer to the data to be written ulSize is the length of data to be written ucFlags This function works in a polling mode, 1. Writes the device register address to be written to. 2. In a loop, writes all the bytes over I2C
- Returns:
- 0: Success, < 0: Failure.
Definition at line 144 of file i2cconfig.cpp.
| uint32_t I2CInit | ( | void | ) |
Generated on Tue Jul 12 2022 22:22:39 by
1.7.2