|
NetBurner 3.5.6
PDF Version |
GPIO Pin Class. More...
#include <cpu_pins.h>
Public Types | |
| enum | pin_fn_t { PIN_FN_0 = 0 , PIN_FN_1 = 1 , PIN_FN_2 = 2 , PIN_FN_3 = 3 , PIN_FN_IN = 4 , PIN_FN_OUT = 8 , PIN_FN_IN = 4 , PIN_FN_OUT = 8 , PIN_FN_A , PIN_FN_B , PIN_FN_C , PIN_FN_D , PIN_FN_IN = 4 , PIN_FN_OUT = 8 , PIN_FN_0 = 0 , PIN_FN_1 = 1 , PIN_FN_2 = 2 , PIN_FN_3 = 3 , PIN_FN_4 = 6 , PIN_FN_5 = 7 , PIN_FN_6 = 8 , PIN_FN_7 = 9 , PIN_FN_8 = 10 , PIN_FN_9 = 11 , PIN_FN_10 = 12 , PIN_FN_11 = 13 , PIN_FN_12 = 14 , PIN_FN_13 = 15 , PIN_FN_14 = 16 , PIN_FN_15 = 17 , PIN_FN_16 = 18 , PIN_FN_17 = 19 , PIN_FN_18 = 20 , PIN_FN_19 = 21 , PIN_FN_20 = 22 , PIN_FN_21 = 23 , PIN_FN_22 = 24 , PIN_FN_23 = 25 , PIN_FN_24 = 26 , PIN_FN_25 = 27 , PIN_FN_26 = 28 , PIN_FN_27 = 29 , PIN_FN_28 = 30 , PIN_FN_29 = 31 , PIN_FN_30 = 32 , PIN_FN_31 = 33 , PIN_FN_32 = 34 } |
| enum | pull_t |
| enum | pin_fn_t { PIN_FN_0 = 0 , PIN_FN_1 = 1 , PIN_FN_2 = 2 , PIN_FN_3 = 3 , PIN_FN_IN = 4 , PIN_FN_OUT = 8 , PIN_FN_IN = 4 , PIN_FN_OUT = 8 , PIN_FN_A , PIN_FN_B , PIN_FN_C , PIN_FN_D , PIN_FN_IN = 4 , PIN_FN_OUT = 8 , PIN_FN_0 = 0 , PIN_FN_1 = 1 , PIN_FN_2 = 2 , PIN_FN_3 = 3 , PIN_FN_4 = 6 , PIN_FN_5 = 7 , PIN_FN_6 = 8 , PIN_FN_7 = 9 , PIN_FN_8 = 10 , PIN_FN_9 = 11 , PIN_FN_10 = 12 , PIN_FN_11 = 13 , PIN_FN_12 = 14 , PIN_FN_13 = 15 , PIN_FN_14 = 16 , PIN_FN_15 = 17 , PIN_FN_16 = 18 , PIN_FN_17 = 19 , PIN_FN_18 = 20 , PIN_FN_19 = 21 , PIN_FN_20 = 22 , PIN_FN_21 = 23 , PIN_FN_22 = 24 , PIN_FN_23 = 25 , PIN_FN_24 = 26 , PIN_FN_25 = 27 , PIN_FN_26 = 28 , PIN_FN_27 = 29 , PIN_FN_28 = 30 , PIN_FN_29 = 31 , PIN_FN_30 = 32 , PIN_FN_31 = 33 , PIN_FN_32 = 34 } |
| Pin Function modes to configure the managed pin(s). More... | |
| enum | pull_t |
| Pin pullup and pulldown modes to configure the managed pin(s). | |
| enum | pin_fn_t { PIN_FN_0 = 0 , PIN_FN_1 = 1 , PIN_FN_2 = 2 , PIN_FN_3 = 3 , PIN_FN_IN = 4 , PIN_FN_OUT = 8 , PIN_FN_IN = 4 , PIN_FN_OUT = 8 , PIN_FN_A , PIN_FN_B , PIN_FN_C , PIN_FN_D , PIN_FN_IN = 4 , PIN_FN_OUT = 8 , PIN_FN_0 = 0 , PIN_FN_1 = 1 , PIN_FN_2 = 2 , PIN_FN_3 = 3 , PIN_FN_4 = 6 , PIN_FN_5 = 7 , PIN_FN_6 = 8 , PIN_FN_7 = 9 , PIN_FN_8 = 10 , PIN_FN_9 = 11 , PIN_FN_10 = 12 , PIN_FN_11 = 13 , PIN_FN_12 = 14 , PIN_FN_13 = 15 , PIN_FN_14 = 16 , PIN_FN_15 = 17 , PIN_FN_16 = 18 , PIN_FN_17 = 19 , PIN_FN_18 = 20 , PIN_FN_19 = 21 , PIN_FN_20 = 22 , PIN_FN_21 = 23 , PIN_FN_22 = 24 , PIN_FN_23 = 25 , PIN_FN_24 = 26 , PIN_FN_25 = 27 , PIN_FN_26 = 28 , PIN_FN_27 = 29 , PIN_FN_28 = 30 , PIN_FN_29 = 31 , PIN_FN_30 = 32 , PIN_FN_31 = 33 , PIN_FN_32 = 34 } |
| Pin Function modes to configure the managed pin(s). More... | |
| enum | pull_t |
| Pin pullup and pulldown modes to configure the managed pin(s). | |
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 | setPull (pull_t pull) |
| Configure the pad Pull resistor 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 |
Friends | |
| class | _PinVector |
GPIO Pin Class.
| enum PinIO::pin_fn_t |
pin_fn_t
| enum PinIO::pin_fn_t |
Pin Function modes to configure the managed pin(s).
| enum PinIO::pin_fn_t |
Pin Function modes to configure the managed pin(s).
| enum PinIO::pull_t |
pull_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.
| void PinIO::setFn | ( | pin_fn_t | fn | ) | const |
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. |
| void PinIO::setPull | ( | pull_t | pull | ) |
Configure the pad Pull resistor for the pin(s).
| pull | direction and strength (if available) for the given pin |
|
inline |
Toggle the driven value for the pin(s).
|
inline |
Toggle the driven value for the pin(s).