Toyomasa Watarai
/
Mbed-example-WS-W27
Mbed Cloud example program for workshop in W27 2018.
Embed:
(wiki syntax)
Show/hide line numbers
pal_test_main.h
00001 #ifndef MBED_CLIENT_PAL_TEST_MAINTEST_H_ 00002 #define MBED_CLIENT_PAL_TEST_MAINTEST_H_ 00003 #include "pal.h" 00004 #include "pal_rtos.h" 00005 00006 00007 00008 #ifndef PAL_TEST_RTOS 00009 #define PAL_TEST_RTOS 0 00010 #endif // PAL_TEST_RTOS 00011 00012 #ifndef PAL_TEST_NETWORK 00013 #define PAL_TEST_NETWORK 0 00014 #endif // PAL_TEST_NETWORK 00015 00016 #ifndef PAL_TEST_TLS 00017 #define PAL_TEST_TLS 0 00018 #endif // PAL_TEST_TLS 00019 00020 #ifndef PAL_TEST_CRYPTO 00021 #define PAL_TEST_CRYPTO 0 00022 #endif // PAL_TEST_CRYPTO 00023 00024 #ifndef PAL_TEST_FS 00025 #define PAL_TEST_FS 0 00026 #endif // PAL_TEST_FS 00027 00028 #ifndef PAL_TEST_UPDATE 00029 #define PAL_TEST_UPDATE 0 00030 #endif // PAL_TEST_UPDATE 00031 00032 #ifndef PAL_TEST_FLASH 00033 #define PAL_TEST_FLASH 1 00034 #endif // PAL_TEST_FLASH 00035 00036 #define TEST_PRINTF(ARGS...) PAL_PRINTF(ARGS) 00037 00038 #ifdef PAL_LINUX 00039 #define PAL_TEST_THREAD_STACK_SIZE 16*1024*sizeof(uint32_t) 00040 #else 00041 #define PAL_TEST_THREAD_STACK_SIZE 512*sizeof(uint32_t) 00042 #endif 00043 00044 00045 typedef struct { 00046 int argc; 00047 char **argv; 00048 } pal_args_t; 00049 00050 00051 #ifdef __cplusplus 00052 extern "C" { 00053 #endif 00054 00055 00056 typedef void (*testMain_t)(pal_args_t *); 00057 void palTestMain(pal_args_t * args); 00058 00059 /*! \brief This function initialized the platform (BSP , file system ....) 00060 * 00061 * @param None 00062 * 00063 * \return void 00064 * 00065 */ 00066 bool initPlatform(void); 00067 00068 00069 /*! \brief This function is called from the main function 00070 * and calls the startup sequence for the board tests 00071 * 00072 * @param[in] mainTestFunc - callback function for the main test runner 00073 * @param[in] args - structure the contains argv and argc received from the main function 00074 * 00075 * \return void 00076 * 00077 */ 00078 bool runProgram(testMain_t mainTestFunc, pal_args_t * args); 00079 00080 00081 #if 1 00082 void TEST_pal_rtos_GROUP_RUNNER(void); 00083 #endif 00084 00085 #if PAL_TEST_NETWORK 00086 void TEST_pal_socket_GROUP_RUNNER(void); 00087 #endif 00088 00089 #if PAL_TEST_TLS 00090 void TEST_pal_tls_GROUP_RUNNER(void); 00091 #endif 00092 00093 #if PAL_TEST_CRYPTO 00094 void TEST_pal_crypto_GROUP_RUNNER(void); 00095 #endif 00096 00097 #if PAL_TEST_FS 00098 void TEST_pal_fileSystem_GROUP_RUNNER(void); 00099 #endif 00100 00101 #if PAL_TEST_UPDATE 00102 void TEST_pal_update_GROUP_RUNNER(void); 00103 #endif 00104 00105 #if PAL_TEST_FLASH 00106 void TEST_pal_internalFlash_GROUP_RUNNER(void); 00107 #endif 00108 00109 00110 #ifdef __cplusplus 00111 } 00112 #endif 00113 00114 #endif /* MBED_CLIENT_PAL_TEST_MAINTEST_H_ */
Generated on Tue Jul 12 2022 16:22:10 by 1.7.2