|
|
|
@ -30,17 +30,24 @@
|
|
|
|
|
#include "native_internal.h"
|
|
|
|
|
|
|
|
|
|
static int native_rtc_enabled;
|
|
|
|
|
static int native_rtc_initialized;
|
|
|
|
|
|
|
|
|
|
void rtc_init(void)
|
|
|
|
|
{
|
|
|
|
|
native_rtc_enabled = 0;
|
|
|
|
|
native_rtc_initialized = 1;
|
|
|
|
|
printf("native rtc initialized\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void rtc_enable(void)
|
|
|
|
|
{
|
|
|
|
|
DEBUG("rtc_enable\n");
|
|
|
|
|
native_rtc_enabled = 1;
|
|
|
|
|
if (native_rtc_initialized == 1) {
|
|
|
|
|
native_rtc_enabled = 1;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
DEBUG("rtc not initialized, not enabling\n");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void rtc_disable(void)
|
|
|
|
|