/* CBM_DEACTIVATED = 0x01, deactivated CBM_ACTIVATING = 0x02, activating CBM_ACTIVATED = 0x04, activated CBM_DEACTIVATING = 0x08, deactivating CBM_CSD_AUTO_DISC_TIMEOUT = 0x10, csd auto disconnection timeout CBM_GPRS_AUTO_DISC_TIMEOUT = 0x20, gprs auto disconnection timeout CBM_NWK_NEG_QOS_MODIFY = 0x040, negotiated network qos modify notification CBM_WIFI_STA_INFO_MODIFY */ static char* getStateDescription(cbm_bearer_state_enum state) { switch (state) { #ifdef APP_DEBUG DESC_DEF(CBM_DEACTIVATED); DESC_DEF(CBM_ACTIVATING); DESC_DEF(CBM_ACTIVATED); DESC_DEF(CBM_DEACTIVATING); DESC_DEF(CBM_CSD_AUTO_DISC_TIMEOUT); DESC_DEF(CBM_GPRS_AUTO_DISC_TIMEOUT); DESC_DEF(CBM_NWK_NEG_QOS_MODIFY); DESC_DEF(CBM_WIFI_STA_INFO_MODIFY); #endif default: { static char bearer_state[10] = {0}; snprintf(bearer_state, 10, "%d", state); return bearer_state; } } }
/* SOC_READ = 0x01, Notify for read SOC_WRITE = 0x02, Notify for write SOC_ACCEPT = 0x04, Notify for accept SOC_CONNECT = 0x08, Notify for connect SOC_CLOSE = 0x10, Notify for close SOC_ACKED = 0x20, Notify for acked */ static char* getEventDescription(soc_event_enum event) { switch (event) { #ifdef APP_DEBUG DESC_DEF(SOC_READ); DESC_DEF(SOC_WRITE); DESC_DEF(SOC_ACCEPT); DESC_DEF(SOC_CONNECT); DESC_DEF(SOC_CLOSE); DESC_DEF(SOC_ACKED); #endif default: { static char soc_event[10] = {0}; snprintf(soc_event, 10, "%d", event); return soc_event; } } }
static char* getEventDescription(EatEvent_enum event) { switch (event) { DESC_DEF(EAT_EVENT_TIMER); DESC_DEF(EAT_EVENT_KEY); DESC_DEF(EAT_EVENT_INT); DESC_DEF(EAT_EVENT_MDM_READY_RD); DESC_DEF(EAT_EVENT_MDM_READY_WR); DESC_DEF(EAT_EVENT_MDM_RI); DESC_DEF(EAT_EVENT_UART_READY_RD); DESC_DEF(EAT_EVENT_UART_READY_WR); DESC_DEF(EAT_EVENT_ADC); DESC_DEF(EAT_EVENT_UART_SEND_COMPLETE); DESC_DEF(EAT_EVENT_USER_MSG); DESC_DEF(EAT_EVENT_IME_KEY); default: { static char soc_event[10] = {0}; sprintf(soc_event, "%d", event); return soc_event; } } }