|
Plant Monitor SAM3X8E
|
HAL interface for TWI peripheral of SAM3X8E. More...
Go to the source code of this file.
Functions | |
| void | twi_configure (const twi_cfg_t *cfg) |
| Configures TWI0 peripheral of SAM3X8E. | |
| void | twi_init () |
| Initializes TWI0 peripheral of SAM3X8E. | |
| void | twi_read (uint8_t *buffer, size_t len) |
| Reads from TWI target device. | |
| void | twi_write (const uint8_t *buffer, size_t len) |
| Writes to TWI target device. | |
HAL interface for TWI peripheral of SAM3X8E.
Function implementations for TWI HAL of SAM3X8E.
Definition in file twi.c.
| void twi_configure | ( | const twi_cfg_t * | cfg | ) |
Configures TWI0 peripheral of SAM3X8E.
Sets target device address and internal address configuration.
| cfg | Pointer to TWI configuration parameters. |
Definition at line 13 of file twi.c.
| void twi_init | ( | ) |
Initializes TWI0 peripheral of SAM3X8E.
Enables peripheral clock & configures TWI0 pins.
Definition at line 44 of file twi.c.
| void twi_read | ( | uint8_t * | buffer, |
| size_t | len ) |
Reads from TWI target device.
| buffer | Buffer to store reading. |
| len | Number of bytes to read into buffer. |
Definition at line 62 of file twi.c.
| void twi_write | ( | const uint8_t * | buffer, |
| size_t | len ) |
Writes to TWI target device.
| buffer | Buffer to write to target device. |
| len | Number of bytes to write. |
Definition at line 82 of file twi.c.