Modularizando o src
Dependencies: EALib EthernetInterface_vz mbed-rtos mbed
Fork of header_main_colinas_V0-20-09-14 by
Diff: utils.h
- Revision:
- 14:22a35f575502
- Parent:
- 8:e3bfe62a477e
- Child:
- 17:67a6b557eda5
diff -r ae278302dffe -r 22a35f575502 utils.h --- a/utils.h Tue Sep 16 15:09:11 2014 +0000 +++ b/utils.h Tue Sep 16 21:02:37 2014 +0000 @@ -3,6 +3,7 @@ #include <iostream> #include <string.h> +#include "debug.h" #include "mbed.h" #include "EthernetInterface.h" #include "vz_protocol.h" @@ -21,8 +22,12 @@ extern DigitalOut led2; extern DigitalOut led3; extern DigitalOut led4; - -#define set_status(a,b) a = b +#define set_status(a,b) _set_status(a,b) +#define _set_status(a,b){ \ + if( a != b ) debug_msg("Anterior %d -- Atual %d", a, b ); \ + if( a != NULL || b != NULL ) a = b; \ + else debug_msg("Paramento sip null"); \ +} void reverse( char str[], int length ); char* itoa(int num, char* str, int base);