XBee Firmware Library  1.6.0
Data Structures | Functions
ds1904.h File Reference

Data Structures

struct  tm_rtc_t
 

Functions

ssize_t ds1904_check_family_code (uint8_t *rom)
 Verifies that the family code stored in rom first byte belongs to the driver supported device. Data read is CRC8 checked before a success is reported. More...
 
uint32_t ds1904_date_convert (tm_rtc_t date)
 Converts a date to epoch time. More...
 
ssize_t ds1904_date_update (uint8_t *rom)
 Reads the RTC time-register and updates global time. More...
 
void ds1904_get_date (tm_rtc_t *date)
 Returns current date and time from RTC. More...
 
ssize_t ds1904_read (uint8_t *rom, uint8_t *config, uint32_t *time)
 Reads configuration and time registers. More...
 
ssize_t ds1904_set (uint8_t *rom, bool_t enable)
 Enables or disables RTC's oscillator maintaining current time value. More...
 
ssize_t ds1904_write (uint8_t *rom, uint8_t config, uint32_t time)
 Writes configuration and time registers. More...