BeRTOS
|
Driver for the AT91 ARM TWI (implementation) More...
#include <cfg/compiler.h>
Go to the source code of this file.
Functions | |
void | twi_init (void) |
Init the (broken) sam7 twi driver. | |
bool | twi_read (uint8_t id, twi_iaddr_t byte1, twi_iaddr_t byte2, twi_iaddr_t byte3, void *_buf, size_t len) |
Read size bytes from the twi line from slave id. | |
bool | twi_write (uint8_t id, twi_iaddr_t byte1, twi_iaddr_t byte2, twi_iaddr_t byte3, const void *_buf, size_t len) |
Send size bytes over the twi line to slave id. |
Driver for the AT91 ARM TWI (implementation)
Definition in file twi_at91.h.
bool twi_read | ( | uint8_t | id, |
twi_iaddr_t | byte1, | ||
twi_iaddr_t | byte2, | ||
twi_iaddr_t | byte3, | ||
void * | _buf, | ||
size_t | size | ||
) |
Read size bytes from the twi line from slave id.
If the device requires internal addressing before reading, byte1 byte2 and byte3 must be specified. Internal addressign bytes not used *must* be set to TWI_NO_IADDR. If 1 or 2 bytes are required for internal addressing you *must* first use byte1 and than byte2.
Definition at line 140 of file twi_at91.c.
bool twi_write | ( | uint8_t | id, |
twi_iaddr_t | byte1, | ||
twi_iaddr_t | byte2, | ||
twi_iaddr_t | byte3, | ||
const void * | _buf, | ||
size_t | size | ||
) |
Send size bytes over the twi line to slave id.
If the device requires internal addressing before writing, byte1 byte2 and byte3 can be specified. Internal addressign bytes not used *must* be set to TWI_NO_IADDR. If 1 or 2 bytes are required for internal addressing you *must* first use byte1 and than byte2.
Definition at line 66 of file twi_at91.c.