GPIO Pin Vector Base Class.
More...
#include <cpu_pins.h>
Inherited by PinVector< 4 >, PinVector< 4 >, PinVector< 4 >, PinVector< n >, PinVector< n >, and PinVector< n >.
GPIO Pin Vector Base Class.
This class is for building semi-parallel buses using GPIO pins. It facilitates driving a numeric value across a parallel bus of GPIO pins. It should not be confused with a true parallel bus, as each individual pin in the bus is modified sequentially/independently during a bus assignment.
◆ config() [1/2]
| void _PinVector::config |
( |
PinIO * | pinCfgs, |
|
|
uint32_t | count ) |
Configure the _PinVector based on an array of PinIOs. The index of the PinIO in the configuration array will determine the bit position within the _PinVector that that PinIO represents.
- Parameters
-
| pinCfgs | The configuration to be used. |
| count | The number of PinIOs in the configuration array to be used. |
◆ config() [2/2]
| void _PinVector::config |
( |
uint32_t | idx, |
|
|
PinIO | cfg ) |
Set the PinIO that will be used for a given bit position in the _PinVector.
- Parameters
-
| idx | The bit position to be configured. |
| cfg | The PinIO that bit position will represent. |
◆ operator uint32_t()
| _PinVector::operator uint32_t |
( |
| ) |
|
|
inline |
Read the line state of the _PinVector bus.
- Returns
- The current bus value as read from the line state.
◆ operator=()
| uint32_t _PinVector::operator= |
( |
uint32_t | val | ) |
|
|
inline |
Assign a value to the _PinVector Bus.
- Parameters
-
| val | The value to assign to the bus. |
- Returns
- The value driven on the bus.
◆ operator[]()
| PinIO _PinVector::operator[] |
( |
int | idx | ) |
|
Access the PinIO for a specific bit position in the _PinVector.
- Parameters
-
- Returns
- The PinIO for the given bit position.
◆ read()
| uint32_t _PinVector::read |
( |
| ) |
|
Read the line state of the _PinVector bus.
- Returns
- The current bus value as read from the line state.
◆ write()
| uint32_t _PinVector::write |
( |
uint32_t | val | ) |
|
Drive a value onto the _PinVector bus.
- Parameters
-
| val | The value to assign to the bus. |
- Returns
- The value driven on the bus.
The documentation for this class was generated from the following files: