Thank you for the reply, indeed, making my variable a global variable does make the code behave as I intended!
Coming from a single-threaded procedural background, the idea that my main function goes out of scope while any part of my code is still executing had never occurred to me!
Search found 2 matches
- Wed Sep 04, 2024 3:10 pm
- Forum: ESP-IDF
- Topic: Values in argument struct change after xQueueReceive
- Replies: 3
- Views: 1086
- Tue Sep 03, 2024 7:42 pm
- Forum: ESP-IDF
- Topic: Values in argument struct change after xQueueReceive
- Replies: 3
- Views: 1086
Values in argument struct change after xQueueReceive
I'm working on a project involving timing button presses of a button attached to GPIO pin 23 of an ESP32 board. In my project, I need to be able to pass some state to my interrupt handler, as well as to my debounce timers. According to the FreeRTOS documentation: https://github.com/FreeRTOS/FreeRTOS...