Weather casting with Machine Learning (SVM and SRNN).
Dependencies: EthernetInterface GraphicHandler NTPClient SRNN SVM SensorModule mbed-rtos mbed
debug.hpp
00001 #ifndef DEBUG_H_INCLUDED 00002 #define DEBUG_H_INCLUDED 00003 00004 #include "mbed.h" 00005 #include <new> 00006 00007 #include "../ml_util/ml_util.hpp" 00008 00009 // Debug Macros 00010 #define DBG(...) printf("" __VA_ARGS__) 00011 #define PRINT_INT(x) (printf(#x " : %d \r\n", x)) 00012 #define PRINT_FLT(x) (printf(#x " : %f \r\n", x)) 00013 00014 #define PRINT_VEC(vec,dim) (printf("FILE[%s] LINE %d, %s: \r\n", __FILE__, __LINE__, (#vec)) \ 00015 (print_vec_func((vec),(dim))) 00016 #define PRINT_MAT(mat,row,col) (printf("FILE[%s] LINE %d, %s: \r\n", __FILE__, __LINE__, (#mat)) \ 00017 (print_vec_func((vec),(row),(col))) 00018 #define PRINT_P(name) (printf("%s : %p \r\n", (#name), (name))) 00019 00020 // Debug Modules 00021 00022 void print_vec_func(float* vec, int dim); 00023 00024 void print_mat_func(float* mat, int row, int col); 00025 00026 void write_log(char* name, ...); 00027 00028 void no_memory(void); // error handler for memory allocate failing 00029 00030 /* 00031 extern void HardFault_Handler(void); 00032 extern void MemManage_Handler(void); 00033 extern void BusFault_Handler(void); 00034 extern void UsageFault_Handler(void); 00035 */ 00036 00037 #endif /* DEBUG_H_INCLUDED */ 00038
Generated on Wed Jul 13 2022 17:43:04 by 1.7.2