X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/0f3b947bda5f34662a611272b9f12199e0da9aca..bb497e9d2ea1437c570e179e99f024d2bc456d6f:/include/common.h?ds=sidebyside diff --git a/include/common.h b/include/common.h index e22b7a1..53e3276 100644 --- a/include/common.h +++ b/include/common.h @@ -9,9 +9,16 @@ #include #include +#include +#include +#include +#include "errnum.h" #define GCC_VERSION (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__) +#define USED __attribute__((used)) +#define UNUSED __attribute__((unused)) + #ifdef __AVR__ #include #include @@ -71,23 +78,25 @@ struct bits { extern volatile uint_least8_t Stat; #endif /* __AVR__ */ -#define S_10MS_TO (1<<0) -#define S_MSG_PENDING (1<<1) -#define S_CON_PENDING (1<<2) +#define S_10MS_TO (1<<0) +#define S_MSG_PENDING (1<<1) +#define S_IO_0X40 (1<<2) +#define S_CON_PENDING (1<<3) +#define S_RESET_POLARITY (1<<4) static inline -void my_puts(const char *s) +int my_puts(const char *s) { - fputs(s, stdout); + return fputs(s, stdout); } static inline -void my_puts_P(const char *s) +int my_puts_P(const char *s) { #ifdef __AVR__ - fputs_P(s, stdout); + return fputs_P(s, stdout); #else - fputs(s, stdout); + return fputs(s, stdout); #endif /* __AVR__ */ }