MAV'RIC
Public Member Functions
I2c_dummy Class Reference
Inheritance diagram for I2c_dummy:
Inheritance graph
[legend]
Collaboration diagram for I2c_dummy:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 I2c_dummy (i2c_dummy_conf_t config=i2c_dummy_default_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.

Constructor & Destructor Documentation

I2c_dummy::I2c_dummy ( i2c_dummy_conf_t  config = i2c_dummy_default_config())

Initialises the peripheral.

Parameters:
configDevice configuration

Member Function Documentation

bool I2c_dummy::init ( void  ) [virtual]

Hardware initialization.

Returns:
true Success
false Error

Implements I2c.

bool I2c_dummy::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_dummy::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_dummy::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