]> git.sur5r.net Git - freertos/blob - FreeRTOS-Plus/Source/CyaSSL/IDE/MDK5-ARM/Projects/CryptTest/main.c
Update CyaSSL to latest version.
[freertos] / FreeRTOS-Plus / Source / CyaSSL / IDE / MDK5-ARM / Projects / CryptTest / main.c
1 /* main.c
2  *
3  * Copyright (C) 2006-2014 wolfSSL Inc.
4  *
5  * This file is part of CyaSSL.
6  *
7  * CyaSSL is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * CyaSSL is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
20  */
21  
22 #ifdef HAVE_CONFIG_H
23     #include <config.h>
24 #endif
25
26 #include <cyassl/ctaocrypt/visibility.h>
27 #include <cyassl/ctaocrypt/logging.h>
28
29 #include "cmsis_os.h"
30
31 #include <stdio.h>
32
33 /*-----------------------------------------------------------------------------
34  *        Initialize a Flash Memory Card
35  *----------------------------------------------------------------------------*/
36 #if !defined(NO_FILESYSTEM)
37 #include "rl_fs.h" 
38
39 static void init_filesystem (void) {
40   int32_t retv;
41
42   retv = finit ("M0:");
43   if (retv == 0) {
44     retv = fmount ("M0:");
45     if (retv == 0) {
46       printf ("Drive M0 ready!\n");
47     }
48     else {
49       printf ("Drive M0 mount failed!\n");
50     }
51   }
52   else {
53     printf ("Drive M0 initialization failed!\n");
54   }
55 }
56 #endif
57
58 extern void ctaocrypt_test(void * arg) ;
59
60 /*-----------------------------------------------------------------------------
61  *       mian entry 
62  *----------------------------------------------------------------------------*/
63
64 int main() 
65 {
66     void * arg = NULL ;
67
68         #if !defined(NO_FILESYSTEM)
69     init_filesystem ();
70         #endif
71         
72     printf("=== Start: Crypt test ===\n") ;
73         ctaocrypt_test(arg) ;
74     printf("=== End: Crypt test  ===\n") ;    
75     
76 }