esp_rom: extract common GPIO apis into esp_rom_gpio.h

This commit is contained in:
morris
2020-06-19 12:00:58 +08:00
parent 59f5e9af37
commit a4d0033c03
89 changed files with 440 additions and 595 deletions

View File

@@ -61,7 +61,7 @@ void app_main(void)
{
gpio_config_t io_conf;
//disable interrupt
io_conf.intr_type = GPIO_PIN_INTR_DISABLE;
io_conf.intr_type = GPIO_INTR_DISABLE;
//set as output mode
io_conf.mode = GPIO_MODE_OUTPUT;
//bit mask of the pins that you want to set,e.g.GPIO18/19
@@ -74,7 +74,7 @@ void app_main(void)
gpio_config(&io_conf);
//interrupt of rising edge
io_conf.intr_type = GPIO_PIN_INTR_POSEDGE;
io_conf.intr_type = GPIO_INTR_POSEDGE;
//bit mask of the pins, use GPIO4/5 here
io_conf.pin_bit_mask = GPIO_INPUT_PIN_SEL;
//set as input mode