drivers: gpio_esp32: update to use new GPIO API

- Updates gpio driver and device tree files to the new GPIO Config flags
- Implements the new port_* APIs
- Update I2C and PWM Drivers to use new GPIO config
- Add esp32.overlay to gpio_basic_api test
- refactor convert_int_type, regs struct
- remove config_polarity
- add kConfig notes

Tests:
- samples/basic/blinky
- samples/basic/button
- tests/drivers/gpio/gpio_basic_api
- tests/drivers/gpio/gpio_api_1pin

Board:
- esp32 DevKitC V4

Note about interrupts:
The ESP32 requires specifying a CPU interrupt to be used for GPIO
interrupt signals.  CPU interrupts can be either level or edge (or
special) triggered, but not both.
Please check gpio/Kconfig.esp32 for more info.

Signed-off-by: Mohamed ElShahawi <ExtremeGTX@hotmail.com>
This commit is contained in:
Mohamed ElShahawi 2019-10-24 15:30:08 +02:00 committed by Carles Cufí
commit fef3ebaa69
6 changed files with 269 additions and 164 deletions

View file

@ -208,7 +208,7 @@ static void pwm_led_esp32_bind_channel_timer(int speed_mode,
static int pwm_led_esp32_channel_set(int pin, bool speed_mode, int channel,
int duty, int timer)
{
const int pin_mode = GPIO_DIR_OUT;
const int pin_mode = GPIO_OUTPUT;
const char *device_name;
struct device *gpio;