void Main_task(uint32_t initial_data) { int ret = 0; func_args args; char filesystem_name[] = "a:"; char partman_name[] = "pm:"; MQX_FILE_PTR com_handle, sdcard_handle, filesystem_handle, partman_handle; ret = sdcard_open(&com_handle, &sdcard_handle, &partman_handle, &filesystem_handle, partman_name, filesystem_name); if (ret != 0) { printf("error: sdcard_open(), ret = %d\n", ret); _mqx_exit(1); } printf("SD card installed to %s\n", filesystem_name); benchmark_test(&args); ret = sdcard_close(&sdcard_handle, &partman_handle, &filesystem_handle, partman_name, filesystem_name); if (ret != 0) { printf("error: sdcard_close(), ret = %d\n", ret); _mqx_exit(1); } printf("SD card uninstalled.\n"); _mqx_exit(0); }
static void wolfTask(void) { printf("Begin Benchmark Tests\n"); benchmark_test(NULL); printf("Benchmark Tests Complete\n"); while (1) { BSP_ToggleLED(1); OS_Delay(200); } }
int main() { void * arg = NULL ; init_filesystem (); printf("=== Start: Crypt Benchmark ===\n") ; benchmark_test(arg) ; printf("=== End: Crypt Benchmark ===\n") ; }
/* * ======== runBenchmarks ======== * Run the CyaSSL benchmark application */ void runBenchmarks(UArg arg0, UArg arg1) { void *args = NULL; msTimer_init(); System_printf("Running benchmarks...\n"); System_flush(); benchmark_test(args); System_printf("Benchmarks completed.\n"); BIOS_exit(0); }
/***************************************************************************** * Public functions ****************************************************************************/ void wolfCryptDemo(void const * argument) { uint8_t buffer[1] = {'t'}; func_args args; /* init code for LWIP */ MX_LWIP_Init(); while (1) { printf("\r\n\t\t\t\tMENU\r\n"); printf(menu1); printf("Please select one of the above options: "); HAL_UART_Receive(&huart4, buffer, sizeof(buffer), 1000); switch (buffer[0]) { case 't': memset(&args, 0, sizeof(args)); printf("\nCrypt Test\n"); wolfcrypt_test(&args); printf("Crypt Test: Return code %d\n", args.return_code); break; case 'b': memset(&args, 0, sizeof(args)); printf("\nBenchmark Test\n"); benchmark_test(&args); printf("Benchmark Test: Return code %d\n", args.return_code); break; // All other cases go here default: printf("\r\nSelection out of range\r\n"); break; } } }
main(void) { benchmark_test(&args) ; return 0; }