blob: 0583f0b6ecbe68fe69b03bea772579031a11d4b6 [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
Brian Silverman0aa48a92014-01-25 17:10:17 -08004#include "bbb/gpios.h"
Daniel Pettid6ff3d52014-01-02 11:24:39 -08005
6namespace bbb {
7
Brian Silverman0aa48a92014-01-25 17:10:17 -08008// Subclass of Pin for input pins.
9class Gpi : public GpioPin {
Daniel Pettid6ff3d52014-01-02 11:24:39 -080010 public:
Daniel Pettid6ff3d52014-01-02 11:24:39 -080011 Gpi(int bank, int pin);
12
13 // Read the current value of the pin.
Brian Silverman0aa48a92014-01-25 17:10:17 -080014 // Returns true if it's high and false if it's low.
15 bool Read();
Daniel Pettid6ff3d52014-01-02 11:24:39 -080016};
17
Daniel Pettife475252014-01-05 14:15:16 -080018} // namespace bbb
Daniel Pettid6ff3d52014-01-02 11:24:39 -080019
20#endif