General Purpose Output specialization of a PWM Bit.
More...
#include <PWM.hxx>
|
| | PWMGPO (PWM *instance, uint32_t on_counts, uint32_t off_counts) |
| | 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.
|
| |
| uint32_t | get_on_counts () const |
| |
| uint32_t | get_off_counts () const |
| |
| 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.
|
| |
|
|
| DISALLOW_COPY_AND_ASSIGN (PWMGPO) |
| |
|
| 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...
|
| |
General Purpose Output specialization of a PWM Bit.
Definition at line 100 of file PWM.hxx.
◆ PWMGPO()
| PWMGPO::PWMGPO |
( |
PWM * |
instance, |
|
|
uint32_t |
on_counts, |
|
|
uint32_t |
off_counts |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
| instance | reference to the chip |
| on_counts | PWM count for the "on" state |
| off_counts | PWM count for the "off" state |
Definition at line 107 of file PWM.hxx.
◆ ~PWMGPO()
| virtual PWMGPO::~PWMGPO |
( |
| ) |
|
|
inlinevirtual |
◆ clr()
| void PWMGPO::clr |
( |
| ) |
const |
|
inlineoverridevirtual |
Clears the GPO pin to low.
Implements Gpio.
Definition at line 140 of file PWM.hxx.
◆ direction()
Gets the GPO direction.
- Returns
- always returns OUTPUT
Implements Gpio.
Definition at line 154 of file PWM.hxx.
◆ get_off_counts()
| uint32_t PWMGPO::get_off_counts |
( |
| ) |
const |
|
inline |
◆ get_on_counts()
| uint32_t PWMGPO::get_on_counts |
( |
| ) |
const |
|
inline |
◆ read()
| Value PWMGPO::read |
( |
| ) |
const |
|
inlineoverridevirtual |
Retrieves the current Value of a GPO output sate (requested).
- Returns
- SET if currently high, CLR if currently low
Implements Gpio.
Definition at line 128 of file PWM.hxx.
◆ set()
| void PWMGPO::set |
( |
| ) |
const |
|
inlineoverridevirtual |
Sets the GPO pin to high.
Implements Gpio.
Definition at line 134 of file PWM.hxx.
◆ set_direction()
Sets the GPO direction (does nothing).
- Parameters
-
Implements Gpio.
Definition at line 147 of file PWM.hxx.
◆ write()
| void PWMGPO::write |
( |
Value |
new_state | ) |
const |
|
inlineoverridevirtual |
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 121 of file PWM.hxx.
◆ instance_
◆ offCounts_
| uint32_t PWMGPO::offCounts_ |
|
private |
PWM counts for when the GPO is "off".
Definition at line 177 of file PWM.hxx.
◆ onCounts_
| uint32_t PWMGPO::onCounts_ |
|
private |
PWM counts for when the GPO is "on".
Definition at line 174 of file PWM.hxx.
The documentation for this class was generated from the following file: