eLab Team / Mbed 2 deprecated myRobot

Dependencies:   mbed WS2812

Crealab.h

Committer:
elab
Date:
2020-02-08
Revision:
0:0e577ce96b2f

File content as of revision 0:0e577ce96b2f:

#include "mbed.h"
#include "CreaBot.h"

// --- USB Debug Port -----------

// #define DEBUG(...) { pc_uart.printf(__VA_ARGS__); bt_uart.printf(__VA_ARGS__);}
#define DEBUG(...) {   __disable_irq();bt_uart.printf(__VA_ARGS__); pc_uart.printf(__VA_ARGS__);__enable_irq();}

//#define DEBUG(...) { pc_uart.printf(__VA_ARGS__); }
//#define DEBUG(...) { bt_uart.printf(__VA_ARGS__); }

#define CATCH_BUTTON(button, func) button.fall(&func)

#define CASE(letter, text, commands) case letter: DEBUG("\t%c : %s\n\r", letter,text);if(!flaghelp) {commands;break;};