NetBurner 3.1
_PinVector Class Reference

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...
 

Detailed Description

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.

Member Function Documentation

◆ config() [1/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
idxThe bit position to be configured.
cfgThe PinIO that bit position will represent.

◆ config() [2/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
pinCfgsThe configuration to be used.
countThe number of PinIOs in the configuration array to be used.

◆ operator uint32_t()

_PinVector::operator uint32_t ( ) const

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)

Assign a value to the _PinVector Bus.

Parameters
valThe 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
idxThe bit index to access in the _PinVector.
Returns
The PinIO for the given bit position.

The documentation for this class was generated from the following file: