|
MAV'RIC
|

Public Member Functions | |
| virtual bool | init (void)=0 |
| Hardware initialization. | |
| virtual bool | probe (uint32_t address)=0 |
| Test if a chip answers for a given I2C address. | |
| virtual bool | write (const uint8_t *buffer, uint32_t nbytes, uint32_t address)=0 |
| Write multiple bytes to a I2C slave device. | |
| virtual bool | read (uint8_t *buffer, uint32_t nbytes, uint32_t address)=0 |
| Read multiple bytes to a I2C slave device. | |
| virtual bool | transfer (uint8_t *out_buffer, uint32_t ntxbytes, uint8_t *in_buffer, uint32_t nrxbytes, uint32_t address) |
| Write then Read data to/from an I2C device. | |
| virtual bool I2c::init | ( | void | ) | [pure virtual] |
Hardware initialization.
Implemented in I2c_stm32, I2c_avr32, I2c_chibios, and I2c_dummy.
| virtual bool I2c::probe | ( | uint32_t | address | ) | [pure virtual] |
Test if a chip answers for a given I2C address.
| address | Slave adress |
Implemented in I2c_stm32, I2c_avr32, I2c_chibios, and I2c_dummy.

| virtual bool I2c::read | ( | uint8_t * | buffer, |
| uint32_t | nbytes, | ||
| uint32_t | address | ||
| ) | [pure virtual] |
Read multiple bytes to a I2C slave device.
| buffer | Data buffer |
| nbytes | Number of bytes to read |
| address | Slave adress |
Implemented in I2c_stm32, I2c_avr32, I2c_chibios, and I2c_dummy.

| virtual bool I2c::transfer | ( | uint8_t * | out_buffer, |
| uint32_t | ntxbytes, | ||
| uint8_t * | in_buffer, | ||
| uint32_t | nrxbytes, | ||
| uint32_t | address | ||
| ) | [inline, virtual] |
Write then Read data to/from an I2C device.
| out_buffer | Data buffer (output) |
| ntxbytes | Number of bytes to write |
| in_buffer | Data buffer (input) |
| nrxbytes | Number of bytes to read |
| address | Slave adress |
Reimplemented in I2c_chibios.

| virtual bool I2c::write | ( | const uint8_t * | buffer, |
| uint32_t | nbytes, | ||
| uint32_t | address | ||
| ) | [pure virtual] |
Write multiple bytes to a I2C slave device.
| buffer | Data buffer |
| nbytes | Number of bytes to write |
| address | Slave adress |
Implemented in I2c_stm32, I2c_avr32, I2c_chibios, and I2c_dummy.

1.7.6.1