MAV'RIC
|
I2C peripheral driver for AVR32. More...
#include <i2c_avr32.hpp>
Public Member Functions | |
I2c_avr32 (i2c_avr32_conf_t config) | |
Initialises the peripheral. | |
bool | init (void) |
Hardware initialization. | |
bool | probe (uint32_t address) |
Test if a chip answers for a given I2C address. | |
bool | write (const uint8_t *buffer, uint32_t nbytes, uint32_t address) |
Write multiple bytes to a I2C slave device. | |
bool | read (uint8_t *buffer, uint32_t nbytes, uint32_t address) |
Read multiple bytes to a I2C slave device. |
I2C peripheral driver for AVR32.
I2c_avr32::I2c_avr32 | ( | i2c_avr32_conf_t | config | ) |
Initialises the peripheral.
config | Device configuration |
bool I2c_avr32::init | ( | void | ) | [virtual] |
Hardware initialization.
< Register PDCA IRQ interrupt.
< Register PDCA IRQ interrupt.
< invalid device ID
Implements I2c.
bool I2c_avr32::probe | ( | uint32_t | address | ) | [virtual] |
Test if a chip answers for a given I2C address.
address | Slave adress |
Implements I2c.
bool I2c_avr32::read | ( | uint8_t * | buffer, |
uint32_t | nbytes, | ||
uint32_t | address | ||
) | [virtual] |
Read multiple bytes to a I2C slave device.
buffer | Data buffer |
nbytes | Number of bytes to read |
address | Slave adress |
Implements I2c.
bool I2c_avr32::write | ( | const uint8_t * | buffer, |
uint32_t | nbytes, | ||
uint32_t | address | ||
) | [virtual] |
Write multiple bytes to a I2C slave device.
buffer | Data buffer |
nbytes | Number of bytes to write |
address | Slave adress |
Implements I2c.