Files
wolfssl/IDE/MDK5-ARM/Projects/CryptBenchmark/main.c

88 lines
2.5 KiB
C
Raw Normal View History

2013-11-07 10:29:01 +09:00
/* main.c
*
2016-03-17 16:02:13 -06:00
* Copyright (C) 2006-2016 wolfSSL Inc.
2013-11-07 10:29:01 +09:00
*
2016-03-17 16:02:13 -06:00
* This file is part of wolfSSL.
2013-11-07 10:29:01 +09:00
*
2015-01-06 12:14:15 -07:00
* wolfSSL is free software; you can redistribute it and/or modify
2013-11-07 10:29:01 +09:00
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
2015-01-06 12:14:15 -07:00
* wolfSSL is distributed in the hope that it will be useful,
2013-11-07 10:29:01 +09:00
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
2016-03-17 16:02:13 -06:00
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
2013-11-07 10:29:01 +09:00
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <wolfssl/wolfcrypt/settings.h>
#include "wolfcrypt/test/test.h"
2013-11-07 10:29:01 +09:00
#include <stdio.h>
#include "stm32f2xx_hal.h"
#include "cmsis_os.h"
/*-----------------------------------------------------------------------------
* System Clock Configuration
*----------------------------------------------------------------------------*/
void SystemClock_Config(void) {
#warning "write MPU specific System Clock Set up\n"
}
2013-11-07 10:29:01 +09:00
/*-----------------------------------------------------------------------------
* Initialize a Flash Memory Card
*----------------------------------------------------------------------------*/
#if !defined(NO_FILESYSTEM)
#include "rl_fs.h" /* FileSystem definitions */
2013-11-07 10:29:01 +09:00
static void init_filesystem (void) {
int32_t retv;
retv = finit ("M0:");
if (retv == 0) {
retv = fmount ("M0:");
if (retv == 0) {
printf ("Drive M0 ready!\n");
}
else {
printf ("Drive M0 mount failed!\n");
}
}
else {
printf ("Drive M0 initialization failed!\n");
}
}
#endif
2013-11-07 10:29:01 +09:00
/*-----------------------------------------------------------------------------
* mian entry
*----------------------------------------------------------------------------*/
void benchmark_test(void *arg) ;
2013-11-07 10:29:01 +09:00
int main()
{
void * arg = NULL ;
HAL_Init(); /* Initialize the HAL Library */
SystemClock_Config(); /* Configure the System Clock */
#if !defined(NO_FILESYSTEM)
init_filesystem ();
#endif
osDelay(300) ;
2013-11-07 10:29:01 +09:00
printf("=== Start: Crypt Benchmark ===\n") ;
benchmark_test(arg) ;
printf("=== End: Crypt Benchmark ===\n") ;
2014-04-11 16:20:12 +09:00
2013-11-07 10:29:01 +09:00
}