NetBurner 3.5.0
PDF Version |
|
GPIO Pin Class. More...
#include <cpu_pins.h>
Public Types | |
enum | pin_fn_t { } |
enum | pin_fn_t { } |
Pin Function modes to configure the managed pin(s). More... | |
Public Member Functions | |
PinIO () | |
Construct an empty PinIO. Exists for bootstrap compatibility; not intended for general use. | |
constexpr | PinIO (uint32_t port, uint32_t pin) |
Construct a PinIO for a specific cpu pin. | |
constexpr | PinIO (const PinIO &rhs) |
Construct a copy of another PinIO. | |
void | setFn (pin_fn_t fn) const |
Set the pin function for the managed pin(s). | |
int8_t | getFn () |
Get the pin function for the managed pin(s). | |
void | function (pin_fn_t fn) const |
Set the pin function for the managed pin(s). | |
void | hiz () const |
Configure the pin(s) to Input. | |
void | drive () const |
Configure the pin(s) to Output, without modifying the driven value. | |
void | set () const |
Drive the pin(s) High. | |
void | clr () const |
Drive the pin(s) Low. | |
bool | tgl () const |
Toggle the driven value for the pin(s). | |
bool | toggle () const |
Toggle the driven value for the pin(s). | |
bool | readBack () const |
Read the state of the pin(s) line state without changing the pin function or direction. | |
bool | read () const |
Configure the pin as an input then return the line state. | |
bool | operator= (bool val) |
Assign a driven value to the pin(s). | |
PinIO & | operator= (const PinIO &rhs) |
Assign a driven value to the pin(s) based on the line state of another pin(s). | |
operator bool () const | |
Read the line state of the pin(s). | |
bool | operator! () const |
Return the opposite of the driven value of the pin(s). | |
void | multidrv (bool enable) const |
Configure the multidrive/open-drain driver for the pin(s). | |
void | setHighStrength (bool bHighDrive) |
Configure the drive strength of the output driver for the pin(s). | |
void | PullUp (bool enable) const |
Configure the pad Pull Up resistor for the pin(s). | |
void | PullDown (bool enable) const |
Configure the pad Pull Down resistor for the pin(s). | |
uint16_t | analogRead () const |
Read an analog voltage on the given Pin. Only available for pins connected to the ADC. | |
Public Attributes | |
volatile Pio & | pio |
uint32_t | mask |
GPIO Pin Class.
enum PinIO::pin_fn_t |
enum PinIO::pin_fn_t |
|
inlineconstexpr |
|
inlineconstexpr |
|
inline |
Set the pin function for the managed pin(s).
fn | The pin function to be assigned to the managed pin(s). |
|
inline |
Get the pin function for the managed pin(s).
|
inline |
Configure the multidrive/open-drain driver for the pin(s).
enable | True: configure the output driver as Open Drain. False: configure the output driver as Push-Pull. |
|
inline |
Read the line state of the pin(s).
|
inline |
Return the opposite of the driven value of the pin(s).
|
inline |
Assign a driven value to the pin(s).
val | The value to be driven on the pin(s): true = High, false = Low |
Assign a driven value to the pin(s) based on the line state of another pin(s).
rhs | The pin(s) who's line state will be assigned to this pin. |
|
inline |
Configure the pad Pull Down resistor for the pin(s).
enable | True: enable the pad Pull Down. False: disable the pad Pull Down. |
|
inline |
Configure the pad Pull Up resistor for the pin(s).
enable | True: enable the pad Pull Up. False: disable the pad Pull Up. |
|
inline |
Configure the pin as an input then return the line state.
|
inline |
Read the state of the pin(s) line state without changing the pin function or direction.
|
inline |
Set the pin function for the managed pin(s).
fn | The pin function to be assigned to the managed pin(s). |
|
inline |
Configure the drive strength of the output driver for the pin(s).
bHighDrive | True: configure the output driver for High Drive strength. False: configure the output driver for Low Drive strength. |
|
inline |
Toggle the driven value for the pin(s).
|
inline |
Toggle the driven value for the pin(s).