![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
voltando a versao de n aberturas e fechamentos de sockets
Dependencies: EthernetInterface NTPClient mbed-rtos_old mbed
Fork of header_main_public 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);