22 #include "soc/gpio_reg.h" 
   38     if (GPIO_PORT_NUMOF == 1) {
 
   48     volatile uword_t *in = (uint32_t *)GPIO_IN_REG;
 
   52         in = (uint32_t *)GPIO_IN1_REG;
 
   62     volatile uword_t *out = (uint32_t *)GPIO_OUT_REG;
 
   65         out = (uint32_t *)GPIO_OUT1_REG;
 
   75     volatile uword_t *out_w1ts = (uint32_t *)GPIO_OUT_W1TS_REG;
 
   78         out_w1ts = (uint32_t)GPIO_OUT1_W1TS;
 
   88     volatile uword_t *out_w1tc = (uint32_t *)GPIO_OUT_W1TC_REG;
 
   91         out_w1tc = (uint32_t)GPIO_OUT1_W1TC;
 
  101     volatile uword_t *out = (uint32_t *)GPIO_OUT_REG;
 
  102 #if GPIO_PORT_NUM > 1 
  104         out = (uint32_t *)GPIO_OUT1_REG;
 
  115     volatile uword_t *out = (uint32_t *)GPIO_OUT_REG;
 
  116 #if GPIO_PORT_NUM > 1 
  118         out = (uint32_t *)GPIO_OUT1_REG;
 
  150     return (num < GPIO_PORT_NUMOF);
 
#define static_assert(cond,...)
static_assert for c-version < c11
 
Architecture specific GPIO functions for ESP8266.
 
MAYBE_INLINE void irq_restore(unsigned state)
This function restores the IRQ disable bit in the status register to the value contained within passe...
 
MAYBE_INLINE unsigned irq_disable(void)
This function sets the IRQ disable bit in the status register.
 
static uint8_t gpio_get_pin_num(gpio_t pin)
Extract the pin number from a gpio_t
 
static void * gpio_port_unpack_addr(gpio_port_t port)
Extract a data pointer that was packed by gpio_port_pack_addr.
 
static void gpio_ll_set(gpio_port_t port, uword_t mask)
Perform an reg |= mask operation on the I/O register of the port.
 
gpio_port_t gpio_port(uword_t num)
Get the gpio_port_t value of the port number num.
 
static gpio_port_t gpio_port_pack_addr(void *addr)
Pack a pointer into a gpio_port_t.
 
static uword_t gpio_ll_read(gpio_port_t port)
Get the current input value of all GPIO pins of the given port as bitmask.
 
static gpio_port_t gpio_get_port(gpio_t pin)
Extract the gpio_port_t from a gpio_t
 
uword_t gpio_port_num(gpio_port_t port)
Get the number of the GPIO port port refers to.
 
static bool is_gpio_port_num_valid(uint_fast8_t num)
Check if the given number is a valid argument for gpio_port.
 
static uword_t gpio_ll_read_output(gpio_port_t port)
Get the current output value of all GPIO pins of the given port as bitmask.
 
static void gpio_ll_clear(gpio_port_t port, uword_t mask)
Perform an reg &= ~mask operation on the I/O register of the port.
 
static void gpio_ll_toggle(gpio_port_t port, uword_t mask)
Perform an reg ^= mask operation on the I/O register of the port.
 
static void gpio_ll_write(gpio_port_t port, uword_t state)
Perform a masked write operation on the I/O register of the port.
 
uintptr_t gpio_port_t
GPIO port type.
 
uint< NUM > _t uword_t
Word sized unsigned integer.