]> cloudbase.mooo.com Git - z180-stamp.git/blob - include/pin.h
5b37587c54a803ed3755e63f1fcfa295c1d6cb3e
[z180-stamp.git] / include / pin.h
1 #ifndef PIN_H
2 #define PIN_H
3
4 /* Number of user configurable I/O pins */
5 #define PIN_MAX 11
6
7 typedef enum {NONE, INPUT, INPUT_PULLUP, OUTPUT, OUTPUT_TIMER} pinmode_t;
8
9 int pin_config(int pin, pinmode_t mode);
10 pinmode_t pin_config_get(int pin);
11 int pin_read(int pin);
12 void pin_write(int pin, uint8_t val);
13 int pin_clockdiv_set(int pin, unsigned long divider);
14 long pin_clockdiv_get(int pin);
15
16 #endif /* PIN_H */
17