Fix preprocessor define statements in matrix scan driver. Was originally written using the
Zephyr macros, when a simple #if !defined() would have sufficed.
This commit is contained in:
parent
7ec7102db2
commit
812dd39edd
1 changed files with 11 additions and 10 deletions
|
@ -31,7 +31,7 @@ struct kscan_gpio_item_config {
|
||||||
#define _KSCAN_GPIO_ROW_CFG_INIT(idx, n) _KSCAN_GPIO_ITEM_CFG_INIT(n, row_gpios, idx)
|
#define _KSCAN_GPIO_ROW_CFG_INIT(idx, n) _KSCAN_GPIO_ITEM_CFG_INIT(n, row_gpios, idx)
|
||||||
#define _KSCAN_GPIO_COL_CFG_INIT(idx, n) _KSCAN_GPIO_ITEM_CFG_INIT(n, col_gpios, idx)
|
#define _KSCAN_GPIO_COL_CFG_INIT(idx, n) _KSCAN_GPIO_ITEM_CFG_INIT(n, col_gpios, idx)
|
||||||
|
|
||||||
#ifdef CONFIG_ZMK_KSCAN_MATRIX_POLLING
|
#if !defined(CONFIG_ZMK_KSCAN_MATRIX_POLLING)
|
||||||
static int kscan_gpio_config_interrupts(struct device **devices,
|
static int kscan_gpio_config_interrupts(struct device **devices,
|
||||||
const struct kscan_gpio_item_config *configs, size_t len,
|
const struct kscan_gpio_item_config *configs, size_t len,
|
||||||
gpio_flags_t flags) {
|
gpio_flags_t flags) {
|
||||||
|
@ -51,6 +51,7 @@ static int kscan_gpio_config_interrupts(struct device **devices,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define INST_MATRIX_ROWS(n) DT_INST_PROP_LEN(n, row_gpios)
|
#define INST_MATRIX_ROWS(n) DT_INST_PROP_LEN(n, row_gpios)
|
||||||
#define INST_MATRIX_COLS(n) DT_INST_PROP_LEN(n, col_gpios)
|
#define INST_MATRIX_COLS(n) DT_INST_PROP_LEN(n, col_gpios)
|
||||||
#define INST_OUTPUT_LEN(n) \
|
#define INST_OUTPUT_LEN(n) \
|
||||||
|
|
Loading…
Add table
Reference in a new issue