/**************************************************************************** Copyright(c) 2019 by Aerospace C.Power (Chongqing) Microelectronics. ALL RIGHTS RESERVED. This Information is proprietary to Aerospace C.Power (Chongqing) Microelectronics and MAY NOT be copied by any method or incorporated into another program without the express written consent of Aerospace C.Power. This Information or any portion thereof remains the property of Aerospace C.Power. The Information contained herein is believed to be accurate and Aerospace C.Power assumes no responsibility or liability for its use in any way and conveys no license or title under any patent or copyright and makes no representation or warranty that this Information is free from patent or copyright infringement. ****************************************************************************/ #include "iot_app_api.h" #include "iot_config_api.h" #include "iot_version_api.h" #include "iot_plc_led_api.h" int main() { iot_build_info_t info; #if IOT_SMART_GRID_ENABLE #if IOT_APP_SELECTION == 5 /* cus-app must start before sg app. */ extern uint32_t app_cusapp_entry(); iot_app_add_entry(app_cusapp_entry); #endif #if IOT_BRM_ENABLE extern uint32_t app_brm_entry(); iot_app_add_entry(app_brm_entry); #endif #if IOT_APP_SELECTION == 6 extern uint32_t app_smart_meter_entry(); iot_app_add_entry(app_smart_meter_entry); #endif extern uint32_t app_smart_grid_entry(); /* add smart grid application into start list */ iot_app_add_entry(app_smart_grid_entry); #if IOT_TPUT_APP_ENABLE extern uint32_t app_tput_entry(); /* add tput application into start list*/ iot_app_add_entry(app_tput_entry); #endif #endif /* IOT_SMART_GRID_ENABLE */ #if IOT_PING_APP_ENABLE extern uint32_t app_ping_entry(); /* add ping application into start list */ iot_app_add_entry(app_ping_entry); #endif /* IOT_PING_APP_ENABLE */ #if IOT_PLCUART_APP_ENABLE extern uint32_t app_plcuart_entry(); /* add plcuart application into start list */ iot_app_add_entry(app_plcuart_entry); #endif #if IOT_DEMO_APP_ENABLE #if (IOT_APPCTRL_LED == 0) iot_plc_led_scheme_set(IOT_PLC_LED_SCHEME_SH); #endif extern uint32_t app_demo_entry(); iot_app_add_entry(app_demo_entry); #endif /* IOT_DEMO_APP_ENABLE */ #if IOT_GE_EXT_TASK_ENABLE iot_plc_led_scheme_set(IOT_PLC_LED_SCHEME_SH); extern uint32_t app_cus_task_entry(); iot_app_add_entry(app_cus_task_entry); #endif #if IOT_MICRO_CCTT_TASK_ENABLE iot_plc_led_scheme_set(IOT_PLC_LED_SCHEME_SH); extern uint32_t app_micro_cctt_task_entry(); iot_app_add_entry(app_micro_cctt_task_entry); #endif #if IOT_GE_MODBUS_TASK_ENABLE iot_plc_led_scheme_set(IOT_PLC_LED_SCHEME_SH); extern uint32_t app_modbus_task_entry(); iot_app_add_entry(app_modbus_task_entry); #endif #if IOT_CP_TASK_ENABLE extern uint32_t app_cp_task_entry(); iot_app_add_entry(app_cp_task_entry); #endif #if IOT_GR_APP_ENABLE iot_plc_led_scheme_set(IOT_PLC_LED_SCHEME_SH); extern uint32_t app_gr_app_entry(void); iot_app_add_entry(app_gr_app_entry); #endif #if (IOT_SG_CONTROLLER_ENABLE) extern uint32_t app_sg_ctrl_entry(); iot_app_add_entry(app_sg_ctrl_entry); #endif #if (IOT_STA_CONTROL_MODE == 2) || (IOT_DEV_TEST_CCO_MODE) extern uint32_t app_dev_test_entry(); iot_app_add_entry(app_dev_test_entry); #endif #if (IOT_STA_CONTROL_MODE == IOT_STA_CONTROL_TYPE_PPM_DETECT) extern uint32_t app_ppm_detect_entry(); iot_app_add_entry(app_ppm_detect_entry); #endif #if ((IOT_STA_CONTROL_MODE == 1) && (IOT_SG_CONTROLLER_ENABLE == 0)) extern uint32_t app_ckb_entry(); iot_app_add_entry(app_ckb_entry); #endif #if IOT_BSRM_MODE extern uint32_t app_bsrm_entry(); iot_app_add_entry(app_bsrm_entry); #endif #if (IOT_APP_SELECTION == IOT_APP_DEF_15_SNIFFER) #if (IOT_STA_CONTROL_MODE == 1) extern uint32_t app_ckb_sniffer_entry(); iot_app_add_entry(app_ckb_sniffer_entry); #else extern uint32_t app_sniffer_entry(); iot_app_add_entry(app_sniffer_entry); #endif /* (IOT_STA_CONTROL_MODE == 1) */ #endif /* (IOT_APP_SELECTION == IOT_APP_DEF_15_SNIFFER) */ #if (IOT_APP_SELECTION == IOT_APP_DEF_17_CUST_DEMO_APP) extern uint32_t app_cust_demo_entry(); iot_app_add_entry(app_cust_demo_entry); #endif #if (IOT_APP_SELECTION == IOT_APP_DEF_19_IOT_SNIFFER) extern uint32_t app_iot_sniffer_entry(); iot_app_add_entry(app_iot_sniffer_entry); #endif #if IOT_AT_APP_ENABLE #if (IOT_APPCTRL_LED == 0) iot_plc_led_scheme_set(IOT_PLC_LED_SCHEME_SH); #endif extern uint32_t app_at_entry(); iot_app_add_entry(app_at_entry); #endif /* end IOT_AT_APP_ENABLE */ #if IOT_SUNSOLAR_APP_ENABLE extern uint32_t app_sunsolar_task_entry(); iot_app_add_entry(app_sunsolar_task_entry); #endif #if (IOT_APP_SELECTION == IOT_APP_DEF_23_CUST_AT_APP) extern uint32_t app_cust_at_entry(); iot_app_add_entry(app_cust_at_entry); #endif #if (IOT_APP_SELECTION == IOT_APP_DEF_26_IOT_DL645_APP) extern uint32_t app_iot_dl645_entry(void); iot_app_add_entry(app_iot_dl645_entry); #endif info.sw_ver = BUILD_EXTERN_SW_VER; info.app_ver = 0; info.year = BUILD_TIME_YEAR; info.month = BUILD_TIME_MONTH; info.day = BUILD_TIME_DATE; info.hour = BUILD_TIME_HOUR; info.min = BUILD_TIME_MIN; info.sec = BUILD_TIME_SEC; /* start simulator */ iot_plc_entry(&info); }