diff options
author | Leo C | 2014-11-22 17:30:41 +0100 |
---|---|---|
committer | Leo C | 2014-11-22 17:30:41 +0100 |
commit | 26331e248f87b8d640054c91b581f482cd89bede (patch) | |
tree | b1019be76108cee256ed90c136702bd646c0232c /avr | |
parent | 289c32526f98d9637df35ad95ed0b65223cf6770 (diff) | |
download | z180-stamp-26331e248f87b8d640054c91b581f482cd89bede.zip |
Move macro SBIT to common.h
Diffstat (limited to 'avr')
-rw-r--r-- | avr/z80-if.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/avr/z80-if.c b/avr/z80-if.c index 9492c28..4544997 100644 --- a/avr/z80-if.c +++ b/avr/z80-if.c @@ -53,31 +53,12 @@ */ -#include <avr/io.h> +#include "common.h" #include <util/atomic.h> -#include <stdio.h> #include "debug.h" #include "z80-if.h" -/* Number of array elements */ -#define NELEMS(x) (sizeof x/sizeof *x) - -struct bits { - uint8_t b0:1; - uint8_t b1:1; - uint8_t b2:1; - uint8_t b3:1; - uint8_t b4:1; - uint8_t b5:1; - uint8_t b6:1; - uint8_t b7:1; -} __attribute__((__packed__)); - -typedef struct bits pbit_t; - -#define SBIT(port,pin) ((*(volatile struct bits*)&port).b##pin) - //#define P_ZCLK PORTB //#define ZCLK 5 |