]>
cloudbase.mooo.com Git - z180-stamp.git/blob - include/common.h
2 * (C) Copyright 2014 Leo C. <erbl259-lmu@yahoo.de>
4 * SPDX-License-Identifier: GPL-2.0
15 #include <avr/pgmspace.h>
16 #include <util/delay.h>
18 #define udelay(n) _delay_us(n)
29 } __attribute__((__packed__
));
31 #define SBIT(port,pin) ((*(volatile struct bits*)&port).b##pin)
34 // Known to work: 4.8.4, 4.9.1
35 // Known to fail: 4.8.3, 4.9.0
36 #define GCC_BUG_61443 1
50 #define stringify(s) tostring(s)
51 #define tostring(s) #s
53 #define FSTR(X) ((const FLASH char[]) { X } )
54 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
56 #define MIN(a,b) ({ typeof (a) _a = (a); \
57 typeof (b) _b = (b); \
59 #define MAX(a,b) ({ typeof (a) _a = (a); \
60 typeof (b) _b = (b); \
66 extern volatile uint_least8_t Stat
;
69 #define S_10MS_TO (1<<0)
70 #define S_MSG_PENDING (1<<1)
71 #define S_CON_PENDING (1<<2)
74 void my_puts(const char *s
)
80 void my_puts_P(const char *s
)