/** * @brief Main program. * @param None * @retval None */ void main(void) { if(rtl_cryptoEngine_init() != 0) { DiagPrintf("crypto engine init failed\r\n"); } /* Initialize log uart and at command service */ console_init(); // Setup init sequence for test setup_init_sequence(); /* wlan intialization */ #if defined(CONFIG_WIFI_NORMAL) && defined(CONFIG_NETWORK) wlan_network(); #endif /*Enable Schedule, Start Kernel*/ #if defined(CONFIG_KERNEL) && !TASK_SCHEDULER_DISABLED #ifdef PLATFORM_FREERTOS vTaskStartScheduler(); #endif #else RtlConsolTaskRom(NULL); #endif }
void main(void) { // sample text char rc; // int ret; int loop=0; // DiagPrintf("sleep 10 sec. to wait for UART console\n"); //RtlMsleepOS(10000); DiagPrintf("CRYPTO API Demo...\r\n"); if ( rtl_cryptoEngine_init() != 0 ) { DiagPrintf("crypto engine init failed\r\n"); } test_md5(); test_aes_cbc(); for(;;); }
/** * @brief Main program. * @param None * @retval None */ void main(void) { if ( rtl_cryptoEngine_init() != 0 ) { DiagPrintf("crypto engine init failed\r\n"); } /* Initialize log uart and at command service */ console_init(); /* pre-processor of application example */ pre_example_entry(); /* wlan intialization */ #if defined(CONFIG_WIFI_NORMAL) && defined(CONFIG_NETWORK) wlan_network(); #endif // setup uart with capability of wakeup system config_uart(); // setup log uart with capability of wakeup system config_loguart(); // By default tickless is disabled because WAKELOCK_OS is locked. // Release this wakelock to enable tickless release_wakelock(WAKELOCK_OS); // Register pre/post sleep callback. They are called when system automatically enter/leave sleep. register_pre_sleep_callback(pre_sleep_process_callback); register_post_sleep_callback(post_sleep_process_callback); /* Execute application example */ example_entry(); /*Enable Schedule, Start Kernel*/ #if defined(CONFIG_KERNEL) && !TASK_SCHEDULER_DISABLED #ifdef PLATFORM_FREERTOS vTaskStartScheduler(); #endif #else RtlConsolTaskRom(NULL); #endif }