GPIO Pin Vector Base Class. More...
#include <cpu_pins.h>
Inherited by PinVector< n >.
Public Member Functions | |
uint32_t | operator= (uint32_t val) |
Assign a value to the _PinVector Bus. More... | |
PinIO | operator[] (int idx) |
Access the PinIO for a specific bit position in the _PinVector. More... | |
void | config (uint32_t idx, PinIO cfg) |
Set the PinIO that will be used for a given bit position in the _PinVector. More... | |
void | 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. More... | |
operator uint32_t () const | |
Read the line state of the _PinVector bus. More... | |
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.
void _PinVector::config | ( | uint32_t | idx, |
PinIO | cfg | ||
) |
Set the PinIO that will be used for a given bit position in the _PinVector.
idx | The bit position to be configured. |
cfg | The PinIO that bit position will represent. |
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.
pinCfgs | The configuration to be used. |
count | The number of PinIOs in the configuration array to be used. |
_PinVector::operator uint32_t | ( | ) | const |
Read the line state of the _PinVector bus.
uint32_t _PinVector::operator= | ( | uint32_t | val | ) |
Assign a value to the _PinVector Bus.
val | The value to assign to the bus. |
PinIO _PinVector::operator[] | ( | int | idx | ) |
Access the PinIO for a specific bit position in the _PinVector.
idx | The bit index to access in the _PinVector. |