|
USB EPROM/Flash Programmer
|
Pico GPIO Class. More...
#include <gpio.hpp>
Public Member Functions | |
| Gpio () | |
| Constructor. More... | |
| void | setPin (uint pin, bool value=true) |
| Sets the pin value. More... | |
| void | resetPin (uint pin) |
| Resets the pin value. More... | |
| void | togglePin (uint pin) |
| Toggles the pin value. More... | |
| bool | getPin (uint pin) |
| Gets the pin value. More... | |
| void | pullUp (uint pin, bool enable=true) |
| Enables (or disables) the pullup of the pin. More... | |
| void | pullDown (uint pin, bool enable=true) |
| Enables (or disables) the pulldown of the pin. More... | |
| void | disablePulls (uint pin) |
| Disables both the pullup and the pulldown of the pin. More... | |
| bool | isPulledUp (uint pin) |
| Returns if pin is pulled up. More... | |
| bool | isPulledDown (uint pin) |
| Returns if pin is pulled down. More... | |
Pico GPIO Class.
The purpose of this class is to manipulate the GPIO pins on the board.
| Gpio | ( | ) |
Constructor.
| void setPin | ( | uint | pin, |
| bool | value = true |
||
| ) |
Sets the pin value.
| pin | The pin number. |
| value | Value to set (default = true). |
| void resetPin | ( | uint | pin | ) |
Resets the pin value.
| pin | The pin number. |
| void togglePin | ( | uint | pin | ) |
Toggles the pin value.
| pin | The pin number. |
| bool getPin | ( | uint | pin | ) |
Gets the pin value.
| pin | The pin number. |
| void pullUp | ( | uint | pin, |
| bool | enable = true |
||
| ) |
Enables (or disables) the pullup of the pin.
| pin | The pin number. |
| enable | True to enable pullup (default), or false to disable. |
| void pullDown | ( | uint | pin, |
| bool | enable = true |
||
| ) |
Enables (or disables) the pulldown of the pin.
| pin | The pin number. |
| enable | True to enable pulldown (default), or false to disable. |
| void disablePulls | ( | uint | pin | ) |
Disables both the pullup and the pulldown of the pin.
| pin | The pin number. |
| bool isPulledUp | ( | uint | pin | ) |
Returns if pin is pulled up.
| pin | The pin number. |
| bool isPulledDown | ( | uint | pin | ) |
Returns if pin is pulled down.
| pin | The pin number. |