-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
The code snippets in the documentation do not match the actual code from 2_drivers.
For example the function "app_driver_toggle_state()" is not used anywhere in the jumpstart project.
Also for example in the docs it says:
"The push_btn_cb code then is simply as shown below:"
static void push_btn_cb(void* arg)
{
static uint64_t previous;
uint64_t current = xTaskGetTickCount();
if ((current - previous) > DEBOUNCE_TIME) {
previous = current;
app_driver_set_state(!g_output_state);
}
}
But the actual code is:
static void push_btn_cb(void *arg)
{
app_driver_set_state(!g_output_state);
}
Content of the app_driver_set_state(!g_output_state);
int IRAM_ATTR app_driver_set_state(bool state)
{
if(g_output_state != state) {
g_output_state = state;
set_output_state(g_output_state);
}
return ESP_OK;
}
The function xTaskGetTickCount() is explained in the documentation, but also not used in the code.
What is exactly the point of having documentation and explaining code, that is not even used in the actual jumpstart project?
Metadata
Metadata
Assignees
Labels
No labels