The GPIO hardware abstraction layer's control class.
More...
#include <gpio.h>
|
| | Controller (const Controller &)=delete |
| Controller & | operator= (const Controller &)=delete |
| void | enable_interrupts () const |
| | Installs the ETS_GPIO_INTR_SOURCE ISR service to enable per-pin interrupts.
|
| void | shutdown () |
| | Resets all pins and shuts down the controller.
|
| void | add (const pin_config_t &entry) |
| | Configures a new GPIO pin using the given config.
|
| void | set_level (gpio_num_t gpio_pin, level_t level) const |
| | Sets the level of the given GPIO pin.
|
| level_t | get_level (gpio_num_t gpio_pin) const |
| | Gets the level of the given GPIO pin.
|
| fast_gpio_path_t | get_fast_path_data (gpio_num_t gpio_pin) const |
| | Gets data like the pin bit mask and necessary register addresses to address a pin directly for things like bit-banging.
|
|
| static Controller & | get_instance () |
| | Gets the controller instance.
|
The GPIO hardware abstraction layer's control class.
◆ Controller()
| HAL::GPIO::Controller::Controller |
( |
const Controller & | | ) |
|
|
delete |
◆ add()
| void HAL::GPIO::Controller::add |
( |
const pin_config_t & | entry | ) |
|
Configures a new GPIO pin using the given config.
- Parameters
-
| entry | The GPIO config entry to configure |
◆ enable_interrupts()
| void HAL::GPIO::Controller::enable_interrupts |
( |
| ) |
const |
Installs the ETS_GPIO_INTR_SOURCE ISR service to enable per-pin interrupts.
◆ get_fast_path_data()
| fast_gpio_path_t HAL::GPIO::Controller::get_fast_path_data |
( |
gpio_num_t | gpio_pin | ) |
const |
|
nodiscard |
Gets data like the pin bit mask and necessary register addresses to address a pin directly for things like bit-banging.
- Returns
- A struct with pin bit mask and the set and clear registers
- Parameters
-
| gpio_pin | The pin of which to get the information |
◆ get_instance()
| Controller & HAL::GPIO::Controller::get_instance |
( |
| ) |
|
|
inlinestatic |
Gets the controller instance.
- Note
- The instance will be created on the first call of this function
- Returns
- Reference to the controller object
◆ get_level()
| level_t HAL::GPIO::Controller::get_level |
( |
gpio_num_t | gpio_pin | ) |
const |
|
nodiscard |
Gets the level of the given GPIO pin.
- Returns
- The current level of the given pin
- Parameters
-
| gpio_pin | The pin of which to get the level |
◆ operator=()
| Controller & HAL::GPIO::Controller::operator= |
( |
const Controller & | | ) |
|
|
delete |
◆ set_level()
| void HAL::GPIO::Controller::set_level |
( |
gpio_num_t | gpio_pin, |
|
|
level_t | level ) const |
Sets the level of the given GPIO pin.
- Parameters
-
| gpio_pin | The pin of which to set the level |
| level | The level to set the given pin to |
◆ shutdown()
| void HAL::GPIO::Controller::shutdown |
( |
| ) |
|
Resets all pins and shuts down the controller.
The documentation for this class was generated from the following files: