gpio: Update cc13x2/cc26x2 gpio driver to use new gpio api

Updates the cc13x2/cc26x2 gpio driver and all associated boards to use
new device tree compatible gpio configuration flags. Implements new port
get/set/clear/toggle and pin_interrupt_configure functions recently
added to the gpio api.

Tested with:

samples/basic/blinky
samples/basic/button
tests/drivers/gpio/gpio_api_1pin
tests/drivers/gpio/gpio_basic_api

On board:

cc1352r1_launchxl

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
This commit is contained in:
Vincent Wan 2019-10-07 13:29:50 -07:00 committed by Carles Cufí
commit 4fce4749a2
3 changed files with 125 additions and 39 deletions

View file

@ -9,7 +9,7 @@
#include <ti/cc1352r.dtsi>
#include "boosterpack_connector.dtsi"
#define BTN_GPIO_FLAGS (GPIO_INT_ACTIVE_LOW | GPIO_PUD_PULL_UP)
#define BTN_GPIO_FLAGS (GPIO_ACTIVE_LOW | GPIO_PULL_UP)
/ {
model = "TI CC1352R1 LaunchXL";
@ -32,11 +32,11 @@
leds {
compatible = "gpio-leds";
led0: led_0 {
gpios = <&gpio0 7 0>;
gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
label = "Green LED";
};
led1: led_1 {
gpios = <&gpio0 6 0>;
gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
label = "Red LED";
};
};