LEDs: Use GPIO flags from dts properly

The flags were always assumed to be ACTIVE_HIGH, which is now fixed.
This commit is contained in:
Martin Jäger
2020-11-18 21:05:04 +01:00
parent 47c1614ed0
commit cb4d4ea1d9
3 changed files with 34 additions and 4 deletions
+1
View File
@@ -89,6 +89,7 @@
#define DT_N_S_leds_P_gpios_IDX_0_PH DT_N_S_soc_S_pin_controller_48000000_S_gpio_48000800
#define DT_N_S_leds_P_gpios_IDX_0_VAL_pin 15
#define DT_N_S_leds_P_gpios_IDX_0_VAL_flags 0
#define DT_N_S_leds_P_gpios_LEN 1
#define DT_N_S_soc_S_pin_controller_48000000_S_gpio_48000800_P_label "GPIOC"
+8
View File
@@ -14,6 +14,7 @@
#include "devicetree.h"
#include "devicetree_unfixed.h"
#include "autoconf.h"
#include "stdint.h"
#ifndef __deprecated
#define __deprecated __attribute__((deprecated))
@@ -42,6 +43,13 @@
#define LOG_MODULE_REGISTER(a, b)
/* from gpio.h */
typedef uint8_t gpio_pin_t;
typedef uint32_t gpio_flags_t;
/* crazy functions from Zephyr's util.h */
/**