First release
Dependencies: CreaBotLib LED_WS2812 MotorLib X_NUCLEO_6180XA1 mbed
Crealab.h
00001 #include "mbed.h" 00002 #include "CreaBot.h" 00003 #include "LED_WS2812.h" 00004 00005 // --- USB Debug Port ----------- 00006 00007 /* #define DEBUG_BT_PC 3 00008 #define DEBUG_PC 2 00009 #define DEBUG_BT 1 00010 #define NO_DEBUG 0 00011 00012 #ifndef DEBUG_MODE 00013 #define DEBUG_MODE NO_DEBUG 00014 #endif 00015 00016 #if (DEBUG_MODE == DEBUG_PC) 00017 #define DEBUG(...) { pc_uart.printf(__VA_ARGS__); } 00018 #elif (DEBUG_MODE == DEBUG_BT) 00019 #define DEBUG(...) { bt_uart.printf(__VA_ARGS__); } 00020 #elif (DEBUG_MODE == DEBUG_BT_PC) 00021 DEBUG("Debug Mode: NT & PC \n\r"); 00022 #define DEBUG(...) { bt_uart.printf(__VA_ARGS__); pc_uart.printf(__VA_ARGS__);} 00023 #else 00024 #define DEBUG(...) 00025 #endif */ 00026 00027 00028 // #define DEBUG(...) { pc_uart.printf(__VA_ARGS__); bt_uart.printf(__VA_ARGS__);} 00029 #define DEBUG(...) { __disable_irq(); pc_uart.printf(__VA_ARGS__);__enable_irq();} 00030 // #define DEBUG(...) { bt_uart.printf(__VA_ARGS__); } 00031 00032 #define CATCH_BUTTON(button, func) button.fall(&func) 00033 00034 #define CASE(letter, text, commands) case letter: if(flaghelp) DEBUG("\t%c : %s\n\r", letter,text);if(!flaghelp) {commands;break;}; 00035 00036
Generated on Thu Jul 14 2022 22:01:30 by 1.7.2