Architecture specific GPIO functions for ESP32. More...
Architecture specific GPIO functions for ESP32.
Definition in file gpio_arch.h.
#include "gpio_arch_common.h"
#include "periph/gpio.h"
#include "soc/io_mux_reg.h"
#include "soc/gpio_sig_map.h"
Go to the source code of this file.
Enumerations | |
enum | gpio_drive_strength_t { GPIO_DRIVE_5 = 0, GPIO_DRIVE_10 = 1, GPIO_DRIVE_20 = 2, GPIO_DRIVE_30 = 2 } |
Current an output pin can drive in active and sleep modes. More... | |
Functions | |
int | gpio_set_drive_capability (gpio_t pin, gpio_drive_strength_t drive) |
Set the drive-strength of an output-capable pin. More... | |
void | gpio_pm_sleep_enter (unsigned mode) |
Called before the power management enters a light or deep sleep mode. More... | |
void | gpio_pm_sleep_exit (uint32_t cause) |
Called after the power management left light sleep mode. More... | |
Current an output pin can drive in active and sleep modes.
Enumerator | |
---|---|
GPIO_DRIVE_5 | 5 mA |
GPIO_DRIVE_10 | 10 mA |
GPIO_DRIVE_20 | 20 mA (default) |
GPIO_DRIVE_30 | 30 mA |
Definition at line 35 of file gpio_arch.h.
void gpio_pm_sleep_enter | ( | unsigned | mode | ) |
Called before the power management enters a light or deep sleep mode.
mode | sleep mode that is entered |
void gpio_pm_sleep_exit | ( | uint32_t | cause | ) |
Called after the power management left light sleep mode.
cause | wake-up cause |
int gpio_set_drive_capability | ( | gpio_t | pin, |
gpio_drive_strength_t | drive | ||
) |
Set the drive-strength of an output-capable pin.
Sets the drive-strength for an output-capable pin in active and sleep modes. The default drive-strength is GPIO_DRIVE_20 (20 mA).
pin | GPIO pin |
drive | drive-strength GPIO_DRIVE_5 for 5 mA GPIO_DRIVE_10 for 10 mA GPIO_DRIVE_20 for 20 mA (default) GPIO_DRIVE_30 for 30 mA |