I’m feeling like my brain is out to lunch, but I don’t see anything in the api or the Open AT Basic Development Guide, or the API from the ADL User Guide, regarding date and time. Is there no API call for this? Does anyone have any example code for this, or some code they are willing to distribute?
I get the feeling this may require a call to an AT command.
/* This will continually show the compiled date and time */
//standard stuff
#include "adl_global.h"
const u16 wm_apmCustomStackSize = 1024;
const u32 wm_apmIRQLowLevelStackSize = 1024;
const u32 wm_apmIRQHighLevelStackSize = 1024;
bool repeat = TRUE;
#define TIME 2 //in 100ms or 1/10 of second
void timer_function(u8);
void adl_main ( adl_InitType_e InitType )
{
TRACE (( 1, "Timer: Main" ));
adl_tmr_t * timer = adl_tmrSubscribe( repeat, TIME, ADL_TMR_TYPE_100MS, timer_function );
}
void timer_function(u8 p)
{
adl_atSendResponse(ADL_AT_RSP, "Timer\r\n");
adl_atSendResponse(ADL_AT_RSP, __DATE__);
adl_atSendResponse(ADL_AT_RSP, "\r\n");
adl_atSendResponse(ADL_AT_RSP, __TIME__);
adl_atSendResponse(ADL_AT_RSP, "\r\n");
}
“3.24.1 Required Header File
The header file for the RTC functions is:
adl_rtc.h”
I really really don’t know how I overlooked that section. I knew my brain was out to lunch, and I swear when I searched for rtc in the api file it didn’t find it. I apologize for wasting your time and feel like an idiot right now.