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