X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Ftypes%2FTinyError.h;h=c2ed2bfab8c9b13f2ed60d9465def147a1f56e34;hb=fbbb63b166ebae5e25402e979498acd65c3039ac;hp=02249bc2db5ca56d6f537598becec9de4dbd50e5;hpb=681199f1eee24b52ddd0142782925bffc39b6936;p=tinyos-2.x.git diff --git a/tos/types/TinyError.h b/tos/types/TinyError.h index 02249bc2..c2ed2bfa 100644 --- a/tos/types/TinyError.h +++ b/tos/types/TinyError.h @@ -31,6 +31,12 @@ #ifndef TINY_ERROR_H_INCLUDED #define TINY_ERROR_H_INCLUDED +#ifdef NESC +#define NESC_COMBINE(x) @combine(x) +#else +#define NESC_COMBINE(x) +#endif + enum { SUCCESS = 0, FAIL = 1, // Generic condition: backwards compatible @@ -44,7 +50,7 @@ enum { EALREADY = 9, // The device state you are requesting is already set }; -typedef uint8_t error_t @combine("ecombine"); +typedef uint8_t error_t NESC_COMBINE("ecombine"); error_t ecombine(error_t r1, error_t r2) /* Returns: r1 if r1 == r2, FAIL otherwise. This is the standard error