Daniel Petti | d6ff3d5 | 2014-01-02 11:24:39 -0800 | [diff] [blame] | 1 | #ifndef BBB_CAPE_SRC_BBB_GPO_H_ |
| 2 | #define BBB_CAPE_SRC_BBB_GPO_H_ |
| 3 | |
Brian Silverman | 04fac62 | 2014-01-26 18:32:15 -0800 | [diff] [blame] | 4 | #include "bbb/gpios.h" |
Daniel Petti | d6ff3d5 | 2014-01-02 11:24:39 -0800 | [diff] [blame] | 5 | |
| 6 | namespace bbb { |
| 7 | |
| 8 | // Gpios subclass for output pins. |
Brian Silverman | 0aa48a9 | 2014-01-25 17:10:17 -0800 | [diff] [blame] | 9 | class Gpo : public GpioPin { |
Daniel Petti | d6ff3d5 | 2014-01-02 11:24:39 -0800 | [diff] [blame] | 10 | public: |
Brian Silverman | 0aa48a9 | 2014-01-25 17:10:17 -0800 | [diff] [blame] | 11 | Gpo(int bank, int pin, bool initial_value = false); |
| 12 | // Sets the pin to either high (true) or low (false). |
| 13 | void Set(bool high); |
Daniel Petti | d6ff3d5 | 2014-01-02 11:24:39 -0800 | [diff] [blame] | 14 | }; |
| 15 | |
Daniel Petti | fe47525 | 2014-01-05 14:15:16 -0800 | [diff] [blame] | 16 | } // namespace bbb |
Daniel Petti | d6ff3d5 | 2014-01-02 11:24:39 -0800 | [diff] [blame] | 17 | |
| 18 | #endif |