diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/getopt-min.h | 12 | ||||
-rw-r--r-- | include/pin.h | 17 | ||||
-rw-r--r-- | include/z80-if.h | 2 |
3 files changed, 29 insertions, 2 deletions
diff --git a/include/getopt-min.h b/include/getopt-min.h new file mode 100644 index 0000000..9f7729e --- /dev/null +++ b/include/getopt-min.h @@ -0,0 +1,12 @@ +#ifndef GETOPT_MIN_H +#define GETOPT_MIN_H + +int getopt( /* returns letter, '?', EOF */ + int argc, /* argument count from main */ + char *const argv[], /* argument vector from main */ + const FLASH char * optstring ); /* allowed args, e.g. "ab:c" */ + +extern int optind; + +#endif /* GETOPT_MIN_H */ + diff --git a/include/pin.h b/include/pin.h new file mode 100644 index 0000000..e673b56 --- /dev/null +++ b/include/pin.h @@ -0,0 +1,17 @@ +#ifndef PIN_H +#define PIN_H + +/* Number of user configurable I/O pins */ +#define PIN_MAX 11 + +typedef enum {INPUT, INPUT_PULLUP, OUTPUT, OUTPUT_TIMER} pinmode_t; + +int pin_config(int pin, pinmode_t mode); +pinmode_t pin_config_get(int pin); +int pin_read(int pin); +void pin_write(int pin, uint8_t val); +int pin_clockdiv_set(int pin, unsigned long divider); +long pin_clockdiv_get(int pin); + +#endif /* PIN_H */ + diff --git a/include/z80-if.h b/include/z80-if.h index 5153f37..6f6f6fa 100644 --- a/include/z80-if.h +++ b/include/z80-if.h @@ -26,8 +26,6 @@ void z80_setup_bus(void); int z80_stat_reset(void); //void z80_busreq(level_t level); int z80_stat_halt(void); -uint32_t z80_clock_get(void); -int z80_clock_set(unsigned long freq); void z80_write(uint32_t addr, uint8_t data); |