]> git.sur5r.net Git - freertos/blob - FreeRTOS-Plus/Source/FreeRTOS-Plus-FAT-SL/psp/target/fat_sl/psp_test.c
e54321420262fbfe98affc53adcf6b83520a8b12
[freertos] / FreeRTOS-Plus / Source / FreeRTOS-Plus-FAT-SL / psp / target / fat_sl / psp_test.c
1 /*\r
2  * FreeRTOS+FAT FS V1.0.0 (C) 2013 HCC Embedded\r
3  *\r
4  * The FreeRTOS+FAT SL license terms are different to the FreeRTOS license \r
5  * terms.\r
6  * \r
7  * FreeRTOS+FAT SL uses a dual license model that allows the software to be used\r
8  * under a pure GPL open source license (as opposed to the modified GPL licence\r
9  * under which FreeRTOS is distributed) or a commercial license.  Details of \r
10  * both license options follow:\r
11  * \r
12  * - Open source licensing -\r
13  * FreeRTOS+FAT SL is a free download and may be used, modified, evaluated and\r
14  * distributed without charge provided the user adheres to version two of the \r
15  * GNU General Public License (GPL) and does not remove the copyright notice or \r
16  * this text.  The GPL V2 text is available on the gnu.org web site, and on the\r
17  * following URL: http://www.FreeRTOS.org/gpl-2.0.txt.\r
18  * \r
19  * - Commercial licensing -\r
20  * Businesses and individuals who for commercial or other reasons cannot comply\r
21  * with the terms of the GPL V2 license must obtain a commercial license before \r
22  * incorporating FreeRTOS+FAT SL into proprietary software for distribution in \r
23  * any form.  Commercial licenses can be purchased from \r
24  * http://shop.freertos.org/fat_sl and do not require any source files to be \r
25  * changed.\r
26  *\r
27  * FreeRTOS+FAT SL is distributed in the hope that it will be useful.  You\r
28  * cannot use FreeRTOS+FAT SL unless you agree that you use the software 'as\r
29  * is'.  FreeRTOS+FAT SL is provided WITHOUT ANY WARRANTY; without even the\r
30  * implied warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A\r
31  * PARTICULAR PURPOSE. Real Time Engineers Ltd. and HCC Embedded disclaims all\r
32  * conditions and terms, be they implied, expressed, or statutory.\r
33  *\r
34  * http://www.FreeRTOS.org\r
35  * http://www.FreeRTOS.org/FreeRTOS-Plus\r
36  *\r
37  */\r
38 \r
39 #include <stdio.h>\r
40 #include "psp_test.h"\r
41 #include "config_fat_sl.h"\r
42 #include "config_mdriver_ram.h"\r
43 #include "../../../api/fat_sl.h"\r
44 #include "../../../api/api_mdriver_ram.h"\r
45 \r
46 #include "../../../version/ver_fat_sl.h"\r
47 #if VER_FAT_SL_MAJOR != 3\r
48  #error Incompatible FAT_SL version number!\r
49 #endif\r
50 #include "../../../version/ver_psp_fat_sl.h"\r
51 #if VER_PSP_FAT_FAT_SL_MAJOR != 1 || VER_PSP_FAT_FAT_SL_MINOR != 1\r
52  #error Incompatible PSP_FAT_FAT_SL version number!\r
53 #endif\r
54 \r
55 uint8_t  all_tests_passed = 1u;\r
56 \r
57 /* Use to display text (printf). */\r
58 void _f_dump ( char * s )\r
59 {\r
60   printf( "%s\r\n", s );\r
61 }\r
62 \r
63 /* Use to display test result (printf). */\r
64 uint8_t _f_result ( uint8_t testnum, uint32_t result )\r
65 {\r
66   (void)testnum;\r
67   if ( result == 0 )\r
68   {\r
69     printf( "Passed\r\n" );\r
70   }\r
71   else\r
72   {\r
73     printf( "FAILED! Error code: %u\r\n", ( unsigned int ) result );\r
74     all_tests_passed = 0u;\r
75   }\r
76 \r
77   return 0;\r
78 }\r
79 \r
80 /* Use to build file system (mount). */\r
81 uint8_t _f_poweron ( void )\r
82 {\r
83   f_delvolume();\r
84   return f_initvolume( ram_initfunc );\r
85 }\r
86 \r