summaryrefslogtreecommitdiff
path: root/include/pin.h
blob: e673b563a3a915fe21b26a89bb6f676b453acbf6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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 */