MAV'RIC
Public Member Functions
I2c_avr32 Class Reference

I2C peripheral driver for AVR32. More...

#include <i2c_avr32.hpp>

Inheritance diagram for I2c_avr32:
Inheritance graph
[legend]
Collaboration diagram for I2c_avr32:
Collaboration graph
[legend]

List of all members.

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.

Detailed Description

I2C peripheral driver for AVR32.


Constructor & Destructor Documentation

Initialises the peripheral.

Parameters:
configDevice configuration

Member Function Documentation

bool I2c_avr32::init ( void  ) [virtual]

Hardware initialization.

Returns:
true Success
false Error

< Register PDCA IRQ interrupt.

< Register PDCA IRQ interrupt.

< invalid device ID

Implements I2c.

Here is the caller graph for this function:

bool I2c_avr32::probe ( uint32_t  address) [virtual]

Test if a chip answers for a given I2C address.

Parameters:
addressSlave adress
Returns:
True Slave found
False Slave not found

Implements I2c.

bool I2c_avr32::read ( uint8_t *  buffer,
uint32_t  nbytes,
uint32_t  address 
) [virtual]

Read multiple bytes to a I2C slave device.

Parameters:
bufferData buffer
nbytesNumber of bytes to read
addressSlave adress
Returns:
True Data successfully read
False Data not read

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.

Parameters:
bufferData buffer
nbytesNumber of bytes to write
addressSlave adress
Returns:
True Data successfully written
False Data not written

Implements I2c.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines