General Purpose Output (GPO) instance on the 74HC595.
More...
#include <SN74HC595GPO.hxx>
|
| constexpr | SN74HC595GPO (SN74HC595< N > *instance, uint8_t chip_index, uint8_t bit) |
| | Constructor.
|
| |
| void | write (Value new_state) const override |
| | Writes a GPO pin (set or clear to a specific state).
|
| |
| Value | read () const override |
| | Retrieves the current Value of a GPO output sate (requested).
|
| |
| void | set () const override |
| | Sets the GPO pin to high.
|
| |
| void | clr () const override |
| | Clears the GPO pin to low.
|
| |
| void | set_direction (Gpio::Direction dir) const override |
| | Sets the GPO direction (does nothing).
|
| |
| Direction | direction () const override |
| | Gets the GPO direction.
|
| |
| constexpr | Gpio () |
| | Constructor.
|
| |
| void | write (bool new_state) const |
| | Writes a GPIO output pin (set or clear to a specific state).
|
| |
| bool | is_set () const |
| | Tests the GPIO input pin to see if it is set.
|
| |
| bool | is_clr () const |
| | Tests the GPIO input pin to see if it is clear.
|
| |
|
| SN74HC595< N > *const | instance_ |
| | reference to chip instance
|
| |
| const uint8_t | chipIndex_ |
| | index on the bus for the chip
|
| |
| const uint8_t | bit_ |
| | bit number representative of the bit
|
| |
|
| enum | Value : bool { CLR = false
, SET = true
, VLOW = CLR
, VHIGH = SET
} |
| | Defines the options for GPIO level. More...
|
| |
| enum class | Direction { DINPUT
, DOUTPUT
} |
| | Defines the options for GPIO direction. More...
|
| |
template<uint8_t N>
class SN74HC595GPO< N >
General Purpose Output (GPO) instance on the 74HC595.
- Template Parameters
-
| N | number of chips on the bus, starting at 1 |
Definition at line 164 of file SN74HC595GPO.hxx.
◆ SN74HC595GPO()
Constructor.
- Parameters
-
| instance | parrent 74HC595 instance that "owns" the interface. |
| chip_index | index on the bus for the chip, starting at 0. |
| bit | bit index (0 through 7) of the output. |
Definition at line 171 of file SN74HC595GPO.hxx.
◆ clr()
◆ direction()
Gets the GPO direction.
- Returns
- always returns DOUTPUT
Implements Gpio.
Definition at line 228 of file SN74HC595GPO.hxx.
◆ read()
Retrieves the current Value of a GPO output sate (requested).
- Returns
- SET if currently high, CLR if currently low
Implements Gpio.
Definition at line 193 of file SN74HC595GPO.hxx.
◆ set()
◆ set_direction()
Sets the GPO direction (does nothing).
- Parameters
-
Implements Gpio.
Definition at line 221 of file SN74HC595GPO.hxx.
◆ write()
Writes a GPO pin (set or clear to a specific state).
- Parameters
-
| new_state | the desired output state. See Value. |
Implements Gpio.
Definition at line 186 of file SN74HC595GPO.hxx.
◆ bit_
◆ chipIndex_
◆ instance_
The documentation for this class was generated from the following file: