mcu方案中如何调用获取网络时间的接口
int8_t gizwitsEventProcess(eventInfo_t *info, uint8_t *data, uint32_t len){
uint8_t i = 0;
dataPoint_t *dataPointPtr = (dataPoint_t *)data;
moduleStatusInfo_t *wifiData = (moduleStatusInfo_t *)data;
protocolTime_t *ptime = (protocolTime_t *)data;
if((NULL == info) || (NULL == data))
{
return -1;
}
for(i=0; i<info->num; i++)
{
switch(info->event)
{
case WIFI_SOFTAP:
break;
case WIFI_AIRLINK:
break;
case WIFI_STATION:
break;
case WIFI_CON_ROUTER:
break;
case WIFI_DISCON_ROUTER:
break;
case WIFI_CON_M2M:
break;
case WIFI_DISCON_M2M:
break;
case WIFI_RSSI:
GIZWITS_LOG("RSSI %d\n", wifiData->rssi);
break;
case TRANSPARENT_DATA:
GIZWITS_LOG("TRANSPARENT_DATA \n");
//user handle , Fetch data from , size is
break;
case WIFI_NTP:
GIZWITS_LOG("WIFI_NTP : [%d-%d-%d %02d:%02d:%02d][%d] \n",ptime->year,ptime->month,ptime->day,ptime->hour,ptime->minute,ptime->second,ptime->ntp);
break;
default:
break;
}
}
return 0;
}
/**@} */
/**
* @brief MCU复位函数
* @param none
* @return none
*/
void mcuRestart(void)
{
__set_FAULTMASK(1);
NVIC_SystemReset();
}
/**@} */
/**
* @brief 定时器TIM3中断处理函数
* @param none
* @return none
*/
void TIMER_IRQ_FUN(void)
{
if (TIM_GetITStatus(TIMER, TIM_IT_Update) != RESET)
{
TIM_ClearITPendingBit(TIMER, TIM_IT_Update);
gizTimerMs();
}
}在这里具体怎么实现呢
int main(void)
{
SystemInit();
userInit();
keyInit();
gizwitsInit();
printf("MCU Init Success \n");
while(1)
{
watchdogFeed();
userHandle();
gizwitsHandle((dataPoint_t *)¤tDataPoint);
}
}在主函数中怎么修改,就是初始化一下吗。
看看我发过的例程 bigfanofloT 发表于 2017-2-8 17:00
看看我发过的例程
是哪个例程 yigererenren 发表于 2017-2-9 09:58
是哪个例程
这个http://club.gizwits.com/thread-4088-1-1.html
页:
[1]