Remove redundant CONFIG_NUM_LED_PINS
This commit is contained in:
@@ -24,11 +24,6 @@ config HAS_USB_PWR_OUTPUT
|
||||
help
|
||||
PCB has a USB power output.
|
||||
|
||||
config NUM_LED_PINS
|
||||
int
|
||||
help
|
||||
Number of LED pins for charlieplexing.
|
||||
|
||||
config CONTROL_FREQUENCY
|
||||
int
|
||||
default 10
|
||||
|
||||
@@ -12,9 +12,6 @@ config HAS_LOAD_OUTPUT
|
||||
config HAS_USB_PWR_OUTPUT
|
||||
default y
|
||||
|
||||
config NUM_LED_PINS
|
||||
default 5
|
||||
|
||||
if UART_CONSOLE
|
||||
|
||||
config UART_2
|
||||
|
||||
@@ -44,8 +44,8 @@ enum pin_state_t { PIN_HIGH, PIN_LOW, PIN_FLOAT };
|
||||
#define NUM_LED_PINS 5
|
||||
|
||||
// defined in board definition pinmux.c
|
||||
extern const char *led_ports[CONFIG_NUM_LED_PINS];
|
||||
extern const int led_pins[CONFIG_NUM_LED_PINS];
|
||||
extern const char *led_ports[NUM_LED_PINS];
|
||||
extern const int led_pins[NUM_LED_PINS];
|
||||
|
||||
const enum pin_state_t led_pin_setup[NUM_LEDS][NUM_LED_PINS] = {
|
||||
{ PIN_HIGH, PIN_LOW, PIN_LOW, PIN_LOW, PIN_LOW }, // LED1
|
||||
|
||||
@@ -62,14 +62,14 @@ static int pinmux_stm32_init(struct device *port)
|
||||
SYS_INIT(pinmux_stm32_init, PRE_KERNEL_1,
|
||||
CONFIG_PINMUX_STM32_DEVICE_INITIALIZATION_PRIORITY);
|
||||
|
||||
const char *led_ports[CONFIG_NUM_LED_PINS] = {
|
||||
const char *led_ports[] = {
|
||||
DT_GPIO_LEDS_GND_GPIOS_CONTROLLER,
|
||||
DT_GPIO_LEDS_SOC12_GPIOS_CONTROLLER,
|
||||
DT_GPIO_LEDS_SOC3_GPIOS_CONTROLLER,
|
||||
DT_GPIO_LEDS_RXTX_GPIOS_CONTROLLER,
|
||||
DT_GPIO_LEDS_LOAD_GPIOS_CONTROLLER
|
||||
};
|
||||
const int led_pins[CONFIG_NUM_LED_PINS] = {
|
||||
const int led_pins[] = {
|
||||
DT_GPIO_LEDS_GND_GPIOS_PIN,
|
||||
DT_GPIO_LEDS_SOC12_GPIOS_PIN,
|
||||
DT_GPIO_LEDS_SOC3_GPIOS_PIN,
|
||||
|
||||
@@ -12,9 +12,6 @@ config HAS_LOAD_OUTPUT
|
||||
config HAS_USB_PWR_OUTPUT
|
||||
default y
|
||||
|
||||
config NUM_LED_PINS
|
||||
default 3
|
||||
|
||||
if UART_CONSOLE
|
||||
|
||||
config UART_2
|
||||
|
||||
@@ -53,8 +53,8 @@ enum pin_state_t { PIN_HIGH, PIN_LOW, PIN_FLOAT };
|
||||
#define NUM_LED_PINS 3
|
||||
|
||||
// defined in board definition pinmux.c
|
||||
extern const char *led_ports[CONFIG_NUM_LED_PINS];
|
||||
extern const int led_pins[CONFIG_NUM_LED_PINS];
|
||||
extern const char *led_ports[NUM_LED_PINS];
|
||||
extern const int led_pins[NUM_LED_PINS];
|
||||
|
||||
static const enum pin_state_t led_pin_setup[NUM_LEDS][NUM_LED_PINS] = {
|
||||
{ PIN_HIGH, PIN_LOW, PIN_FLOAT }, // LED1
|
||||
|
||||
@@ -62,13 +62,13 @@ static int pinmux_stm32_init(struct device *port)
|
||||
SYS_INIT(pinmux_stm32_init, PRE_KERNEL_1,
|
||||
CONFIG_PINMUX_STM32_DEVICE_INITIALIZATION_PRIORITY);
|
||||
|
||||
const char *led_ports[CONFIG_NUM_LED_PINS] = {
|
||||
const char *led_ports[] = {
|
||||
DT_GPIO_LEDS_A_GPIOS_CONTROLLER,
|
||||
DT_GPIO_LEDS_C_GPIOS_CONTROLLER,
|
||||
DT_GPIO_LEDS_B_GPIOS_CONTROLLER,
|
||||
};
|
||||
const int led_pins[CONFIG_NUM_LED_PINS] = {
|
||||
const int led_pins[] = {
|
||||
DT_GPIO_LEDS_A_GPIOS_PIN,
|
||||
DT_GPIO_LEDS_C_GPIOS_PIN,
|
||||
DT_GPIO_LEDS_B_GPIOS_PIN,
|
||||
};
|
||||
};
|
||||
|
||||
@@ -9,9 +9,6 @@ config BOARD
|
||||
config HAS_LOAD_OUTPUT
|
||||
default y
|
||||
|
||||
config NUM_LED_PINS
|
||||
default 1
|
||||
|
||||
if UART_CONSOLE
|
||||
|
||||
config UART_1
|
||||
|
||||
@@ -42,8 +42,8 @@ enum pin_state_t { PIN_HIGH, PIN_LOW, PIN_FLOAT };
|
||||
#define NUM_LED_PINS 1
|
||||
|
||||
// defined in board definition pinmux.c
|
||||
extern const char *led_ports[CONFIG_NUM_LED_PINS];
|
||||
extern const int led_pins[CONFIG_NUM_LED_PINS];
|
||||
extern const char *led_ports[NUM_LED_PINS];
|
||||
extern const int led_pins[NUM_LED_PINS];
|
||||
|
||||
const enum pin_state_t led_pin_setup[NUM_LEDS][NUM_LED_PINS] = {
|
||||
{ PIN_HIGH }, // LED1
|
||||
|
||||
@@ -91,9 +91,9 @@ SYS_INIT(pinmux_stm32_init, PRE_KERNEL_1,
|
||||
CONFIG_PINMUX_STM32_DEVICE_INITIALIZATION_PRIORITY);
|
||||
|
||||
|
||||
const char *led_ports[CONFIG_NUM_LED_PINS] = {
|
||||
const char *led_ports[] = {
|
||||
DT_GPIO_LEDS_PWR_GPIOS_CONTROLLER,
|
||||
};
|
||||
const int led_pins[CONFIG_NUM_LED_PINS] = {
|
||||
const int led_pins[] = {
|
||||
DT_GPIO_LEDS_PWR_GPIOS_PIN,
|
||||
};
|
||||
|
||||
@@ -9,9 +9,6 @@ config BOARD
|
||||
config HAS_LOAD_OUTPUT
|
||||
default y
|
||||
|
||||
config NUM_LED_PINS
|
||||
default 2
|
||||
|
||||
if UART_CONSOLE
|
||||
|
||||
config UART_2
|
||||
|
||||
@@ -57,8 +57,8 @@ enum pin_state_t { PIN_HIGH, PIN_LOW, PIN_FLOAT };
|
||||
#define NUM_LED_PINS 2
|
||||
|
||||
// defined in board definition pinmux.c
|
||||
extern const char *led_ports[CONFIG_NUM_LED_PINS];
|
||||
extern const int led_pins[CONFIG_NUM_LED_PINS];
|
||||
extern const char *led_ports[NUM_LED_PINS];
|
||||
extern const int led_pins[NUM_LED_PINS];
|
||||
|
||||
static const enum pin_state_t led_pin_setup[NUM_LEDS][NUM_LED_PINS] = {
|
||||
{ PIN_HIGH, PIN_LOW }, // LED1
|
||||
|
||||
@@ -68,11 +68,11 @@ static int pinmux_stm32_init(struct device *port)
|
||||
SYS_INIT(pinmux_stm32_init, PRE_KERNEL_1,
|
||||
CONFIG_PINMUX_STM32_DEVICE_INITIALIZATION_PRIORITY);
|
||||
|
||||
const char *led_ports[CONFIG_NUM_LED_PINS] = {
|
||||
const char *led_ports[] = {
|
||||
DT_GPIO_LEDS_PWR_GPIOS_CONTROLLER,
|
||||
DT_GPIO_LEDS_LOAD_GPIOS_CONTROLLER
|
||||
};
|
||||
const int led_pins[CONFIG_NUM_LED_PINS] = {
|
||||
const int led_pins[] = {
|
||||
DT_GPIO_LEDS_PWR_GPIOS_PIN,
|
||||
DT_GPIO_LEDS_LOAD_GPIOS_PIN
|
||||
};
|
||||
|
||||
@@ -12,9 +12,6 @@ config HAS_LOAD_OUTPUT
|
||||
config HAS_USB_PWR_OUTPUT
|
||||
default y
|
||||
|
||||
config NUM_LED_PINS
|
||||
default 3
|
||||
|
||||
if UART_CONSOLE
|
||||
|
||||
config UART_2
|
||||
|
||||
@@ -63,8 +63,8 @@ enum pin_state_t { PIN_HIGH, PIN_LOW, PIN_FLOAT };
|
||||
#define NUM_LED_PINS 3
|
||||
|
||||
// defined in board definition pinmux.c
|
||||
extern const char *led_ports[CONFIG_NUM_LED_PINS];
|
||||
extern const int led_pins[CONFIG_NUM_LED_PINS];
|
||||
extern const char *led_ports[NUM_LED_PINS];
|
||||
extern const int led_pins[NUM_LED_PINS];
|
||||
|
||||
#ifndef LEDS_WRONG_POLARITY
|
||||
static const enum pin_state_t led_pin_setup[NUM_LEDS][NUM_LED_PINS] = {
|
||||
|
||||
@@ -55,12 +55,12 @@ static int pinmux_stm32_init(struct device *port)
|
||||
SYS_INIT(pinmux_stm32_init, PRE_KERNEL_1,
|
||||
CONFIG_PINMUX_STM32_DEVICE_INITIALIZATION_PRIORITY);
|
||||
|
||||
const char *led_ports[CONFIG_NUM_LED_PINS] = {
|
||||
const char *led_ports[] = {
|
||||
DT_GPIO_LEDS_A_GPIOS_CONTROLLER,
|
||||
DT_GPIO_LEDS_B_GPIOS_CONTROLLER,
|
||||
DT_GPIO_LEDS_C_GPIOS_CONTROLLER,
|
||||
};
|
||||
const int led_pins[CONFIG_NUM_LED_PINS] = {
|
||||
const int led_pins[] = {
|
||||
DT_GPIO_LEDS_A_GPIOS_PIN,
|
||||
DT_GPIO_LEDS_B_GPIOS_PIN,
|
||||
DT_GPIO_LEDS_C_GPIOS_PIN,
|
||||
|
||||
Reference in New Issue
Block a user