X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/7eecbdacec66226ebc3959411883aeaebcf9791d..6dbf5891f52b1e06f8448e2b0526214bc882c6ec:/include/common.h?ds=inline diff --git a/include/common.h b/include/common.h index eb38853..e89b91f 100644 --- a/include/common.h +++ b/include/common.h @@ -10,8 +10,10 @@ #include #include #include +#include #include #include +#include "errnum.h" #define GCC_VERSION (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__) @@ -46,6 +48,8 @@ struct bits { #define GCC_BUG_61443 1 #endif /* PR61443 */ +#define DEVICE_NAME __AVR_DEVICE_NAME__ + #else // TODO: stm32 #endif /* __AVR__ */ @@ -77,23 +81,24 @@ 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_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__ */ }