void test_run(void) { initialize(); #if TEST_CASE == LOGIC_TEST logic_test(); #elif TEST_CASE == TIMER_TEST timer_test(); #elif TEST_CASE == COMPONENT_TEST component_test(); #elif TEST_CASE == PROTOCOL_TEST protocol_test(); #elif TEST_CASE == POWER_TEST power_test(); #elif TEST_CASE == IDLE_TEST idle_test(); #elif TEST_CASE == STATE_TEST state_test(); #elif TEST_CASE == WORK_TEST work_test(); #elif TEST_CASE == FILE_TEST file_test(); #elif TEST_CASE == PICTURE_TEST picture_test(); #elif TEST_CASE == CONSUME_POWER consume_power(); #elif TEST_CASE == INIT_FILE init_file(); #elif TEST_CASE == FACTORY_TEST factory_test(); #elif TEST_CASE == MOBILE_STATE_TEST mobile_state_test(); #elif TEST_CASE == MESSAGE_REPLY_TEST message_reply_test(); #elif TEST_CASE == TF_TEST tf_test(); #elif TEST_CASE == SCREEN_TEST screen_test(); #elif TEST_CASE == UPGRADE_TEST upgrade_test(); #elif TEST_CASE == MOBILE_TEST mobile_test(); #endif }
/* * main() - Application main entry * * INPUT * none * OUTPUT * 0 when complete */ int main(void) { /* Init for safeguard against stack overflow (-fstack-protector-all) */ __stack_chk_guard = (uintptr_t)random32(); /* Init board */ board_init(); led_func(SET_RED_LED); dbg_print("Application Version %d.%d.%d\n\r", MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION); /* Init storage */ storage_init(); /* Init protcol buffer message map and usb msg callback */ fsm_init(); led_func(SET_GREEN_LED); screen_test(); /* Enable interrupt for timer */ cm_enable_interrupts(); usb_init(); led_func(CLR_RED_LED); reset_idle_time(); while(1) { delay_ms_with_callback(ONE_SEC, &exec, 1); increment_idle_time(ONE_SEC); toggle_screensaver(); } return(0); }