- - .devcontainer
- - .vscode
- - build
- - components
- - main
- - queue
- - routes
- - serial_protocol
I am using the ESP-IDF on VSCode, with a ESP32-WROOM-32E. I have started a project with ESP-IDS v5.2.1. I have added a few folders inside the main folder, for different drivers I have written. Essentially, my folder structure is:
- void queue_init(queue_t *queue, uint16_t *buffer, uint8_t size)
1. I used the init function as follows:
- queue_t tx_q;
- uint16_t tx_q_buffer[20];
- queue_init(&tx_q, tx_q_buffer, 20);
- error: expected declaration specifiers or '...' before '&' token
- 85 | queue_init(&tx_q, tx_q_buffer, 20);
- | ^
- C:/Users/Suvashan/Documents/IDS graf/captive_portal/main/main.c:85:19: error: expected declaration specifiers or '...' before 'tx_q_buffer' 85 | queue_init(&tx_q, tx_q_buffer, 20);
- | ^~~~~~~~~~~
- C:/Users/Suvashan/Documents/IDS graf/captive_portal/main/main.c:85:32: error: expected declaration specifiers or '...' before numeric constant
- 85 | queue_init(&tx_q, tx_q_buffer, 20);
- | ^~
- ninja: build stopped: subcommand failed.
- error: expected ')' before numeric constant
- 85 | queue_init(tx_q, tx_q_buffer, 20);
- queue_t *tx_q;
- uint16_t tx_q_buffer[20];
- uint8_t a = 20;
- queue_init(tx_q, tx_q_buffer, a);
- error: type defaults to 'int' in declaration of 'queue_init' [-Werror=implicit-int]
- warning: parameter names (without types) in function declaration
- error: conflicting types for 'queue_init'; have 'int()'
Any help would be appreciated.