blob: d63b9dc670056a7ae731035dac70b544a4eeedfc [file] [log] [blame]
Daniel Pettid6ff3d52014-01-02 11:24:39 -08001#ifndef BBB_CAPE_SRC_BBB_GPI_H_
2#define BBB_CAPE_SRC_BBB_GPI_H_
3
4#include "gpios.h"
5
6// Subclass of Pin for input pins.
7
8namespace bbb {
9
10class Gpi : public Pin {
11 public:
12 // See the base class for what these args mean.
13 Gpi(int bank, int pin);
14
15 // Read the current value of the pin.
16 // Returns 1 if it reads high, 0 for low.
17 // Returns -1 if fails to read the pin for some reason.
18 int Read();
19};
20
21} // namespace bbb
22
23#endif