blob: 3d7b2cefb3d5fa00929b6971979c5c8435565749 [file] [log] [blame]
Daniel Pettid6ff3d52014-01-02 11:24:39 -08001#ifndef BBB_CAPE_SRC_BBB_GPO_H_
2#define BBB_CAPE_SRC_BBB_GPO_H_
3
4#include "gpios.h"
5
6namespace bbb {
7
8// Gpios subclass for output pins.
9class Gpo : public Pin {
10 public:
11 // See the base class for what these args mean.
12 Gpo(int bank, int pin);
13
14 // Methods set the pin to read either high or low.
15 inline bool SetHigh() {
16 return DoSet(1);
17 }
18 inline bool SetLow() {
19 return DoSet(0);
20 }
21
22 private:
23 // Does the actual pin setting.
24 bool DoSet(const int value);
25};
26
27} // namespace bbb
28
29#endif