My git repository(4.3.1 and 4.4) is up to date. but even this example is not working below is the error message.
/components/matrix_keyboard/src/matrix_keyboard.c:39:5: error: unknown type name 'dedic_gpio_bundle_handle_t'
dedic_gpio_bundle_handle_t row_bundle;
^~~~~~~~~~~~~~~~~~~~~~~~~~
../components/matrix_keyboard/src/matrix_keyboard.c:40:5: error: unknown type name 'dedic_gpio_bundle_handle_t'
dedic_gpio_bundle_handle_t col_bundle;
^~~~~~~~~~~~~~~~~~~~~~~~~~
../components/matrix_keyboard/src/matrix_keyboard.c:49:51: error: unknown type name 'dedic_gpio_bundle_handle_t'; did you mean 'gpio_isr_handle_t'?
static IRAM_ATTR bool matrix_kbd_row_isr_callback(dedic_gpio_bundle_handle_t row_bundle, uint32_t row_index, void *args)
^~~~~~~~~~~~~~~~~~~~~~~~~~
gpio_isr_handle_t
../components/matrix_keyboard/src/matrix_keyboard.c: In function 'matrix_kbd_debounce_timer_callback':
../components/matrix_keyboard/src/matrix_keyboard.c:67:24: error: implicit declaration of function 'dedic_gpio_bundle_read_out' [-Werror=implicit-function-declaration]
uint32_t row_out = dedic_gpio_bundle_read_out(mkbd->row_bundle);
^~~~~~~~~~~~~~~~~~~~~~~~~~
../components/matrix_keyboard/src/matrix_keyboard.c:68:23: error: implicit declaration of function 'dedic_gpio_bundle_read_in' [-Werror=implicit-function-declaration]
uint32_t col_in = dedic_gpio_bundle_read_in(mkbd->col_bundle);
^~~~~~~~~~~~~~~~~~~~~~~~~
../components/matrix_keyboard/src/matrix_keyboard.c:93:5: error: implicit declaration of function 'dedic_gpio_bundle_write' [-Werror=implicit-function-declaration]
dedic_gpio_bundle_write(mkbd->row_bundle, (1 << mkbd->nr_row_gpios) - 1, (1 << mkbd->nr_row_gpios) - 1);
^~~~~~~~~~~~~~~~~~~~~~~
../components/matrix_keyboard/src/matrix_keyboard.c:96:5: error: implicit declaration of function 'dedic_gpio_bundle_set_interrupt_and_callback' [-Werror=implicit-function-declaration]
dedic_gpio_bundle_set_interrupt_and_callback(mkbd->row_bundle, (1 << mkbd->nr_row_gpios) - 1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../components/matrix_keyboard/src/matrix_keyboard.c:97:13: error: 'DEDIC_GPIO_INTR_BOTH_EDGE' undeclared (first use in this function); did you mean 'GPIO_PIN_INTR_POSEDGE'?
DEDIC_GPIO_INTR_BOTH_EDGE, matrix_kbd_row_isr_callback, mkbd);
^~~~~~~~~~~~~~~~~~~~~~~~~
GPIO_PIN_INTR_POSEDGE
../components/matrix_keyboard/src/matrix_keyboard.c:97:13: note: each undeclared identifier is reported only once for each function it appears in
../components/matrix_keyboard/src/matrix_keyboard.c:97:40: error: 'matrix_kbd_row_isr_callback' undeclared (first use in this function); did you mean 'matrix_kbd_debounce_timer_callback'?
DEDIC_GPIO_INTR_BOTH_EDGE, matrix_kbd_row_isr_callback, mkbd);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
matrix_kbd_debounce_timer_callback
../components/matrix_keyboard/src/matrix_keyboard.c: In function 'matrix_kbd_install':
../components/matrix_keyboard/src/matrix_keyboard.c:127:5: error: unknown type name 'dedic_gpio_bundle_config_t'; did you mean 'gpio_config_t'?
dedic_gpio_bundle_config_t bundle_row_config = {
^~~~~~~~~~~~~~~~~~~~~~~~~~
gpio_config_t
../components/matrix_keyboard/src/matrix_keyboard.c:128:9: error: field name not in record or union initializer
.gpio_array = config->row_gpios,
^
../components/matrix_keyboard/src/matrix_keyboard.c:128:9: note: (near initialization for 'bundle_row_config')
../components/matrix_keyboard/src/matrix_keyboard.c:128:23: warning: initialization of 'int' from 'const int * const' makes integer from pointer without a cast [-Wint-conversion]
.gpio_array = config->row_gpios,
^~~~~~
../components/matrix_keyboard/src/matrix_keyboard.c:128:23: note: (near initialization for 'bundle_row_config')
../components/matrix_keyboard/src/matrix_keyboard.c:129:9: error: field name not in record or union initializer
.array_size = config->nr_row_gpios,
^
../components/matrix_keyboard/src/matrix_keyboard.c:129:9: note: (near initialization for 'bundle_row_config')
../components/matrix_keyboard/src/matrix_keyboard.c:129:23: warning: excess elements in scalar initializer
.array_size = config->nr_row_gpios,
^~~~~~
../components/matrix_keyboard/src/matrix_keyboard.c:129:23: note: (near initialization for 'bundle_row_config')
../components/matrix_keyboard/src/matrix_keyboard.c:130:9: error: field name not in record or union initializer
.flags = {
^
../components/matrix_keyboard/src/matrix_keyboard.c:130:9: note: (near initialization for 'bundle_row_config')
../components/matrix_keyboard/src/matrix_keyboard.c:130:9: warning: braces around scalar initializer
../components/matrix_keyboard/src/matrix_keyboard.c:130:9: note: (near initialization for 'bundle_row_config')
../components/matrix_keyboard/src/matrix_keyboard.c:131:13: error: field name not in record or union initializer
.in_en = 1,
^
../components/matrix_keyboard/src/matrix_keyboard.c:131:13: note: (near initialization for 'bundle_row_config')
../components/matrix_keyboard/src/matrix_keyboard.c:132:13: error: field name not in record or union initializer
.out_en = 1,
^
../components/matrix_keyboard/src/matrix_keyboard.c:132:13: note: (near initialization for 'bundle_row_config')
../components/matrix_keyboard/src/matrix_keyboard.c:132:23: warning: excess elements in scalar initializer
.out_en = 1,
^
../components/matrix_keyboard/src/matrix_keyboard.c:132:23: note: (near initialization for 'bundle_row_config')
../components/matrix_keyboard/src/matrix_keyboard.c:130:18: warning: excess elements in scalar initializer
.flags = {
^
../components/matrix_keyboard/src/matrix_keyboard.c:130:18: note: (near initialization for 'bundle_row_config')
In file included from ../../../../../components/freertos/esp_additions/include/freertos/FreeRTOSConfig.h:76,
from ../../../../../components/freertos/FreeRTOS-Kernel/include/freertos/FreeRTOS.h:57,
from ../components/matrix_keyboard/src/matrix_keyboard.c:15:
../components/matrix_keyboard/src/matrix_keyboard.c:135:16: error: implicit declaration of function 'dedic_gpio_new_bundle' [-Werror=implicit-function-declaration]
MKBD_CHECK(dedic_gpio_new_bundle(&bundle_row_config, &mkbd->row_bundle) == ESP_OK,
^~~~~~~~~~~~~~~~~~~~~
../../../../../components/esp_common/include/esp_compiler.h:37:25: note: in definition of macro 'unlikely'
#define unlikely(x) (x)
^
../components/matrix_keyboard/src/matrix_keyboard.c:135:5: note: in expansion of macro 'MKBD_CHECK'
MKBD_CHECK(dedic_gpio_new_bundle(&bundle_row_config, &mkbd->row_bundle) == ESP_OK,
^~~~~~~~~~
../components/matrix_keyboard/src/matrix_keyboard.c:143:5: error: unknown type name 'dedic_gpio_bundle_config_t'; did you mean 'gpio_config_t'?
dedic_gpio_bundle_config_t bundle_col_config = {
^~~~~~~~~~~~~~~~~~~~~~~~~~
gpio_config_t
../components/matrix_keyboard/src/matrix_keyboard.c:144:9: error: field name not in record or union initializer
.gpio_array = config->col_gpios,
^
../components/matrix_keyboard/src/matrix_keyboard.c:144:9: note: (near initialization for 'bundle_col_config')
../components/matrix_keyboard/src/matrix_keyboard.c:144:23: warning: initialization of 'int' from 'const int * const' makes integer from pointer without a cast [-Wint-conversion]
.gpio_array = config->col_gpios,
^~~~~~
../components/matrix_keyboard/src/matrix_keyboard.c:144:23: note: (near initialization for 'bundle_col_config')
../components/matrix_keyboard/src/matrix_keyboard.c:145:9: error: field name not in record or union initializer
.array_size = config->nr_col_gpios,
^
../components/matrix_keyboard/src/matrix_keyboard.c:145:9: note: (near initialization for 'bundle_col_config')
../components/matrix_keyboard/src/matrix_keyboard.c:145:23: warning: excess elements in scalar initializer
.array_size = config->nr_col_gpios,
^~~~~~
../components/matrix_keyboard/src/matrix_keyboard.c:145:23: note: (near initialization for 'bundle_col_config')
../components/matrix_keyboard/src/matrix_keyboard.c:146:9: error: field name not in record or union initializer
.flags = {
^
../components/matrix_keyboard/src/matrix_keyboard.c:146:9: note: (near initialization for 'bundle_col_config')
../components/matrix_keyboard/src/matrix_keyboard.c:146:9: warning: braces around scalar initializer
../components/matrix_keyboard/src/matrix_keyboard.c:146:9: note: (near initialization for 'bundle_col_config')
../components/matrix_keyboard/src/matrix_keyboard.c:147:13: error: field name not in record or union initializer
.in_en = 1,
^
../components/matrix_keyboard/src/matrix_keyboard.c:147:13: note: (near initialization for 'bundle_col_config')
../components/matrix_keyboard/src/matrix_keyboard.c:148:13: error: field name not in record or union initializer
.out_en = 1,
^
../components/matrix_keyboard/src/matrix_keyboard.c:148:13: note: (near initialization for 'bundle_col_config')
../components/matrix_keyboard/src/matrix_keyboard.c:148:23: warning: excess elements in scalar initializer
.out_en = 1,
^
../components/matrix_keyboard/src/matrix_keyboard.c:148:23: note: (near initialization for 'bundle_col_config')
../components/matrix_keyboard/src/matrix_keyboard.c:146:18: warning: excess elements in scalar initializer
.flags = {
^
../components/matrix_keyboard/src/matrix_keyboard.c:146:18: note: (near initialization for 'bundle_col_config')
../components/matrix_keyboard/src/matrix_keyboard.c:156:13: error: 'DEDIC_GPIO_INTR_NONE' undeclared (first use in this function); did you mean 'ETS_GPIO_INTR_SOURCE'?
DEDIC_GPIO_INTR_NONE, NULL, NULL);
^~~~~~~~~~~~~~~~~~~~
ETS_GPIO_INTR_SOURCE
../components/matrix_keyboard/src/matrix_keyboard.c:172:13: error: implicit declaration of function 'dedic_gpio_del_bundle' [-Werror=implicit-function-declaration]
dedic_gpio_del_bundle(mkbd->col_bundle);
^~~~~~~~~~~~~~~~~~~~~
../components/matrix_keyboard/src/matrix_keyboard.c: In function 'matrix_kbd_start':
../components/matrix_keyboard/src/matrix_keyboard.c:211:13: error: 'DEDIC_GPIO_INTR_BOTH_EDGE' undeclared (first use in this function); did you mean 'GPIO_PIN_INTR_POSEDGE'?
DEDIC_GPIO_INTR_BOTH_EDGE, matrix_kbd_row_isr_callback, mkbd_handle);
^~~~~~~~~~~~~~~~~~~~~~~~~
GPIO_PIN_INTR_POSEDGE
../components/matrix_keyboard/src/matrix_keyboard.c:211:40: error: 'matrix_kbd_row_isr_callback' undeclared (first use in this function); did you mean 'matrix_kbd_debounce_timer_callback'?
DEDIC_GPIO_INTR_BOTH_EDGE, matrix_kbd_row_isr_callback, mkbd_handle);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
matrix_kbd_debounce_timer_callback
../components/matrix_keyboard/src/matrix_keyboard.c: In function 'matrix_kbd_stop':
../components/matrix_keyboard/src/matrix_keyboard.c:227:13: error: 'DEDIC_GPIO_INTR_NONE' undeclared (first use in this function); did you mean 'ETS_GPIO_INTR_SOURCE'?
DEDIC_GPIO_INTR_NONE, NULL, NULL);
^~~~~~~~~~~~~~~~~~~~
\examples\peripherals\gpio\matrix_keyboard Example not working
-
- Posts: 9769
- Joined: Thu Nov 26, 2015 4:08 am
Re: \examples\peripherals\gpio\matrix_keyboard Example not working
What chip are you compiling this for? Note that, as specified in the README of that example, it's intended to illustrate the dedicated_GPIO feature that only exists in the ESP32S2 and later.
Re: \examples\peripherals\gpio\matrix_keyboard Example not working
Ok Thanks. for the Reply. I was trying with ESP32 WROOM Chip.
Who is online
Users browsing this forum: dzungpv and 42 guests