gpio_arch.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 Gunar Schorcht
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
20 #ifndef GPIO_ARCH_H
21 #define GPIO_ARCH_H
22 
23 #include "gpio_arch_common.h"
24 #include "periph/gpio.h"
25 #include "soc/io_mux_reg.h"
26 #include "soc/gpio_sig_map.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
35 typedef enum {
41 
42 #ifndef DOXYGEN
43 
46 extern const uint32_t _gpio_to_iomux_reg[];
47 #define GPIO_PIN_MUX_REG _gpio_to_iomux_reg
48 
52 void gpio_pullup_dis (gpio_t pin);
53 
57 int8_t gpio_is_rtcio (gpio_t pin);
58 
66 int gpio_set_direction(gpio_t pin, gpio_mode_t mode);
67 
71 void gpio_matrix_in (uint32_t gpio, uint32_t signal_idx, bool inv);
72 void gpio_matrix_out(uint32_t gpio, uint32_t signal_idx, bool out_inv, bool oen_inv);
73 
74 #endif /* DOXYGEN */
75 
94 
99 void gpio_pm_sleep_enter(unsigned mode);
100 
105 void gpio_pm_sleep_exit(uint32_t cause);
106 
107 #ifdef __cplusplus
108 }
109 #endif
110 
111 #endif /* GPIO_ARCH_H */
gpio_pm_sleep_enter
void gpio_pm_sleep_enter(unsigned mode)
Called before the power management enters a light or deep sleep mode.
GPIO_DRIVE_10
@ GPIO_DRIVE_10
10 mA
Definition: gpio_arch.h:37
GPIO_DRIVE_5
@ GPIO_DRIVE_5
5 mA
Definition: gpio_arch.h:36
gpio_arch_common.h
Architecture specific GPIO functions for ESP SoCs.
GPIO_DRIVE_30
@ GPIO_DRIVE_30
30 mA
Definition: gpio_arch.h:39
gpio.h
Low-level GPIO peripheral driver interface definitions.
GPIO_DRIVE_20
@ GPIO_DRIVE_20
20 mA (default)
Definition: gpio_arch.h:38
gpio_mode_t
gpio_mode_t
Available pin modes.
Definition: periph_cpu.h:70
gpio_pm_sleep_exit
void gpio_pm_sleep_exit(uint32_t cause)
Called after the power management left light sleep mode.
gpio_drive_strength_t
gpio_drive_strength_t
Current an output pin can drive in active and sleep modes.
Definition: gpio_arch.h:35
gpio_set_drive_capability
int gpio_set_drive_capability(gpio_t pin, gpio_drive_strength_t drive)
Set the drive-strength of an output-capable pin.