#include <util/twi.h>#include "../twi_basics/twi_basics.h"#include "ds1338.h"Go to the source code of this file.
Functions | |
| void | ds1338_setup () |
| ds1338_status | ds1338_readTimeDateControl (ds1338TDC *data) |
| ds1338_status | ds1338_writeTimeDateControl (ds1338TDC *data) |
| ds1338_status | ds1338_writeBufferToNVRAM (uint8_t location, uint8_t lenght, uint8_t *data) |
| ds1338_status | ds1338_readBufferFromNVRAM (uint8_t location, uint8_t lenght, uint8_t *data) |
| ds1338_status | ds1338_writeByteToNVRAM (uint8_t location, uint8_t data) |
| ds1338_status | ds1338_readByteFromNVRAM (uint8_t location, uint8_t *data) |
Definition in file ds1338.c.
| ds1338_status ds1338_readBufferFromNVRAM | ( | uint8_t | location, | |
| uint8_t | lenght, | |||
| uint8_t * | data | |||
| ) |
Read data from RTC NVRAM
| location | Starting location of readed data | |
| lenght | Lenght of read data | |
| data | Pointer where data we'll be stored |
Definition at line 138 of file ds1338.c.
References NO_ERROR, RANGE_OUTOFBOUNDS, twi_receive(), and twi_stop().
Referenced by ds1338_readTimeDateControl().
| ds1338_status ds1338_readByteFromNVRAM | ( | uint8_t | location, | |
| uint8_t * | data | |||
| ) |
Read single byte from RTC NVRAM
| location | location of data in RTC | |
| data | Pointer where data we'll be stored |
Definition at line 184 of file ds1338.c.
References NO_ERROR, twi_receive(), and twi_stop().
| ds1338_status ds1338_readTimeDateControl | ( | ds1338TDC * | data | ) |
Retrieves Time/Data data from RTC
| data | Pointer to target memory buffer |
Definition at line 92 of file ds1338.c.
References ds1338_readBufferFromNVRAM().
| void ds1338_setup | ( | ) |
Initiates uC to work with DS1338 twi interface.
Definition at line 15 of file ds1338.c.
References TWI_BITRATE.
| ds1338_status ds1338_writeBufferToNVRAM | ( | uint8_t | location, | |
| uint8_t | lenght, | |||
| uint8_t * | data | |||
| ) |
Writes specified data to RTC NVRAM
| location | Target starting location | |
| lenght | Data lenght | |
| data | Pointer to data |
Definition at line 114 of file ds1338.c.
References DEVICE_BUSY, NO_ERROR, RANGE_OUTOFBOUNDS, twi_send(), and twi_stop().
Referenced by ds1338_writeTimeDateControl().
| ds1338_status ds1338_writeByteToNVRAM | ( | uint8_t | location, | |
| uint8_t | data | |||
| ) |
Writes signle byte to RTC NVRAM
| location | Target location | |
| data | Data to be stored |
Definition at line 165 of file ds1338.c.
References DEVICE_BUSY, NO_ERROR, twi_send(), and twi_stop().
| ds1338_status ds1338_writeTimeDateControl | ( | ds1338TDC * | data | ) |
Stores data in RTC - sets Time/Date
| data | Pointer to ds1338TDC structure |
Definition at line 102 of file ds1338.c.
References ds1338_writeBufferToNVRAM().
1.6.1