General Purpose Output (GPO) instance on the MCP2515.
More...
#include <MCP2515Can.hxx>
|
| | MCP2515GPO (MCP2515Can *instance, 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.
|
| |
|
| 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 (GPO) instance on the MCP2515.
Definition at line 692 of file MCP2515Can.hxx.
◆ MCP2515GPO()
| MCP2515GPO::MCP2515GPO |
( |
MCP2515Can * |
instance, |
|
|
uint8_t |
bit |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
| instance | parrent MCP2515Can instance that "owns" the interface. |
| bit | bit index (0 through 1) of the output. |
Definition at line 699 of file MCP2515Can.hxx.
◆ clr()
| void MCP2515GPO::clr |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ direction()
Gets the GPO direction.
- Returns
- always returns OUTPUT
Implements Gpio.
Definition at line 760 of file MCP2515Can.hxx.
◆ read()
| Value MCP2515GPO::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 718 of file MCP2515Can.hxx.
◆ set()
| void MCP2515GPO::set |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ set_direction()
Sets the GPO direction (does nothing).
- Parameters
-
Implements Gpio.
Definition at line 752 of file MCP2515Can.hxx.
◆ write()
| void MCP2515GPO::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 710 of file MCP2515Can.hxx.
◆ bit_
◆ instance_
The documentation for this class was generated from the following file: