mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
* changed rtc interface
This commit is contained in:
parent
63117ed5a4
commit
14e2a4718f
@ -81,7 +81,7 @@ enum rtc_alarm_mask {
|
||||
* @internal
|
||||
* During reboots only alarms are reset.
|
||||
*/
|
||||
void _rtc_init(void);
|
||||
void rtc_init(void);
|
||||
|
||||
void _rtc_reset(void);
|
||||
|
||||
|
@ -169,7 +169,7 @@ void rtc_enable(void)
|
||||
epoch = now - (now % 3600);
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void _rtc_init(void)
|
||||
void rtc_init(void)
|
||||
{
|
||||
PCONP |= BIT9;
|
||||
RTC_AMR = 0xff; // disable alarm irq
|
||||
|
@ -2,6 +2,7 @@
|
||||
#include <stdio.h>
|
||||
#include <board_uart0.h>
|
||||
#include <auto_init.h>
|
||||
#include <lpc2387-rtc.h>
|
||||
|
||||
#define ENABLE_DEBUG
|
||||
#include <debug.h>
|
||||
@ -21,6 +22,11 @@ void auto_init(void) {
|
||||
DEBUG("Auto init uart0 module.\n");
|
||||
board_uart0_init();
|
||||
#endif
|
||||
#ifdef MODULE_RTC
|
||||
DEBUG("Auto init rtc module.\n");
|
||||
rtc_init();
|
||||
rtc_enable();
|
||||
#endif
|
||||
#ifdef MODULE_SHT11
|
||||
DEBUG("Auto init SHT11 module.\n");
|
||||
sht11_init();
|
||||
|
Loading…
Reference in New Issue
Block a user