Contiki-NG
|
Files | |
file | rtcc-config.h |
RTCC configuration file. | |
file | rtcc.c |
Driver for the RE-Mote RF Real Time Clock Calendar (RTCC) | |
file | rtcc.h |
Header file for the RE-Mote RF antenna switch. | |
RTCC User functions | |
int8_t | rtcc_set_time_date (simple_td_map *data) |
Set the time and date. | |
int8_t | rtcc_get_time_date (simple_td_map *data) |
Get the current time and date. | |
int8_t | rtcc_set_alarm_time_date (simple_td_map *data, uint8_t state, uint8_t repeat, uint8_t trigger) |
Configure the RTCC to match an alarm counter. | |
int8_t | rtcc_date_increment_seconds (simple_td_map *data, uint16_t seconds) |
Increments the current date by a number of seconds. | |
int8_t | rtcc_print (uint8_t value) |
Print data from the RTCC module, either from the memory map (values in BCD) or actual readable data (decimal). | |
int8_t | rtcc_set_autocalibration (uint8_t period) |
Set the autocallibration period. | |
int8_t | rtcc_set_calibration (uint8_t mode, int32_t adjust) |
Manually calibrate the RTCC. | |
int8_t | rtcc_init (void) |
Initialize the RTCC, configures the I2C bus, interrupts and registers. | |
Driver for the RE-Mote on-board ultra-low power RTCC (Real Time Clock Calendar)
Driver for the RE-Mote RTCC (Real Time Clock Calendar)
int8_t rtcc_date_increment_seconds | ( | simple_td_map * | data, |
uint16_t | seconds ) |
Increments the current date by a number of seconds.
data | structure to store the date |
seconds | the numberof seconds to increment the date |
Definition at line 568 of file rtcc.c.
References rtcc_get_time_date().
int8_t rtcc_get_time_date | ( | simple_td_map * | data | ) |
Get the current time and date.
*data | buffer to store the results |
Definition at line 368 of file rtcc.c.
Referenced by rtcc_date_increment_seconds().
int8_t rtcc_init | ( | void | ) |
Initialize the RTCC, configures the I2C bus, interrupts and registers.
Definition at line 922 of file rtcc.c.
References GPIO_DETECT_EDGE, GPIO_DETECT_FALLING, gpio_hal_register_handler(), GPIO_SET_INPUT, GPIO_SOFTWARE_CONTROL, GPIO_TRIGGER_SINGLE_EDGE, i2c_init(), process_start(), and rtcc_set_autocalibration().
int8_t rtcc_print | ( | uint8_t | value | ) |
Print data from the RTCC module, either from the memory map (values in BCD) or actual readable data (decimal).
value | value to print, see RTCC_PRINT_* options available |
int8_t rtcc_set_alarm_time_date | ( | simple_td_map * | data, |
uint8_t | state, | ||
uint8_t | repeat, | ||
uint8_t | trigger ) |
Configure the RTCC to match an alarm counter.
data | date and time values (in decimal) to match against |
state | set on/off the alarm interruption |
repeat | set the frequency of the alarm (minute, hourly, daily, etc.) |
trigger | interrupt trigger (INT1, INT2 or both) |
Definition at line 391 of file rtcc.c.
References GPIO_ENABLE_INTERRUPT, IOC_OVERRIDE_PUE, and ioc_set_over().
int8_t rtcc_set_autocalibration | ( | uint8_t | period | ) |
Set the autocallibration period.
period | autocalibration configuration |
Definition at line 744 of file rtcc.c.
References clock_delay_usec().
Referenced by rtcc_init().
int8_t rtcc_set_calibration | ( | uint8_t | mode, |
int32_t | adjust ) |