#include <stdint.h>#include <avr/io.h>Go to the source code of this file.
Typedefs | |
| typedef uint8_t | twi_status |
Functions | |
| twi_status | twi_start () |
| twi_status | twi_send (uint8_t data) |
| twi_status | twi_receive (uint8_t *where, uint8_t ack) |
| void | twi_stop () |
Definition in file twi_basics.h.
| typedef uint8_t twi_status |
twi related functions exept twi_stop() return this status
Definition at line 16 of file twi_basics.h.
| twi_status twi_receive | ( | uint8_t * | where, | |
| uint8_t | ack | |||
| ) |
Receive one byte over TWI interface
| where | Pointer to location where received data we'll be stored | |
| ack | Set to nonzero to send ACK after receiving. Usually it continues transfer. |
Definition at line 54 of file twi_basics.c.
References TW_SEND_CMD, and wait().
Referenced by ds1338_readBufferFromNVRAM(), and ds1338_readByteFromNVRAM().
| twi_status twi_send | ( | uint8_t | data | ) |
Sends one byte over TWI interface
| data | Data to be send |
Definition at line 40 of file twi_basics.c.
References TW_SEND_CMD, and wait().
Referenced by ds1338_writeBufferToNVRAM(), and ds1338_writeByteToNVRAM().
| twi_status twi_start | ( | ) |
Sends start condition
Definition at line 28 of file twi_basics.c.
References TW_SEND_CMD, and wait().
| void twi_stop | ( | ) |
Sends STOP condition. Take a look at unusual busy-wait loop (Stop doesn't affect TWINT)
Definition at line 68 of file twi_basics.c.
References TW_SEND_CMD.
Referenced by ds1338_readBufferFromNVRAM(), ds1338_readByteFromNVRAM(), ds1338_writeBufferToNVRAM(), and ds1338_writeByteToNVRAM().
1.6.1