]> cloudbase.mooo.com Git - z180-stamp.git/blobdiff - include/common.h
z80_toggle_reset(), z80_toggle_busreq()
[z180-stamp.git] / include / common.h
index eb38853cbe96ad0f8870df023a1bd32691079949..9bd34181e78f0524d89ad31be828aca6ea55a567 100644 (file)
@@ -12,6 +12,7 @@
 #include <stdbool.h>
 #include <string.h>
 #include <stdlib.h>
+#include "errnum.h"
 
 #define GCC_VERSION (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__)
 
@@ -77,23 +78,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<<2)
+#define S_RESET_POLARITY       (1<<3)
 
 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__ */
 }