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
Initialises the peripheral.
- Parameters:
-
config | Device configuration |
Member Function Documentation
Hardware initialization.
- Returns:
- true Success
-
false Error
Implements I2c.
Test if a chip answers for a given I2C address.
- Parameters:
-
- 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:
-
buffer | Data buffer |
nbytes | Number of bytes to read |
address | Slave 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:
-
buffer | Data buffer |
nbytes | Number of bytes to write |
address | Slave adress |
- Returns:
- True Data successfully written
-
False Data not written
Implements I2c.
The documentation for this class was generated from the following files:
- /home/travis/build/lis-epfl/MAVRIC_Library/hal/dummy/i2c_dummy.hpp
- /home/travis/build/lis-epfl/MAVRIC_Library/hal/dummy/i2c_dummy.cpp