Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
TIT8 authored May 5, 2024
1 parent a2b8d94 commit e9f6ef0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ A push button is connected to the [ESP32](https://github.com/espressif/arduino-e

## Difference with branch V2?

On the master branch, I'm utilizing [task notifications](https://www.freertos.org/RTOS_Task_Notification_As_Binary_Semaphore.html) from FreeRTOS to unblock a high-priority (relative to [core 1](https://docs.espressif.com/projects/esp-idf/en/v5.0/esp32s3/api-guides/performance/speed.html#choosing-application-task-priorities)) task responsible for debouncing in the software, despite the use of interrupts (which are disabled and enabled within that task). Therefore, when the button is not in use, the task remains blocked on a type of semaphore, conserving CPU resources. This allows the idle task to run uninterrupted until the button is pressed, ensuring the watchdog timer is consistently reset.
On the master branch, I'm using [task notifications](https://www.freertos.org/RTOS_Task_Notification_As_Binary_Semaphore.html) from FreeRTOS to unblock a high-priority (relative to [core 1](https://docs.espressif.com/projects/esp-idf/en/v5.0/esp32s3/api-guides/performance/speed.html#choosing-application-task-priorities)) task responsible for debouncing in the software, despite the use of interrupts (which are disabled and enabled within that task). Therefore, when the button is not in use, the task remains blocked on a type of semaphore, conserving CPU resources. This allows the idle task to run uninterrupted until the button is pressed, ensuring the watchdog timer is consistently reset.

The main thread is more efficient than V2 (which employs [busy wait](https://github.com/TIT8/shelly_esp32_button_espidf/tree/v2?tab=readme-ov-file#why-busy-wait-the-button-status-and-not-polling-it-or-be-notified-by-interrupts) for monitoring button status instead of polling or being notified by interrupts).

Expand Down

0 comments on commit e9f6ef0

Please sign in to comment.