|
|
3 лет назад | |
|---|---|---|
| .. | ||
| include | 4 лет назад | |
| CMakeLists.txt | 3 лет назад | |
| Kconfig | 5 лет назад | |
| README.md | 5 лет назад | |
| button.c | 3 лет назад | |
| button_obj.cpp | 4 лет назад | |
A button device can provide:
To use the button device, you need to :
Todo:
All the event callback function are realized by FreeRTOS soft timer APIs, the callback must follow the rule:
Button callback functions execute in the context of the timer service task.
It is therefore essential that button callback functions never attempt to block.
For example, a button callback function must not call vTaskDelay(), vTaskDelayUntil(), or specify a non zero block time when accessing a queue or a semaphore.
In addition: You can adjust the following macros within FreeRTOS to adjust the stack depth/queue length/task priority of the timer service.
#define configUSE_TIMERS //enable soft-timer
#define configTIMER_TASK_PRIORITY // priority of the timers service task
#define configQueue_LENGTH // length of timer command queue
#define configTIMER_TASK_STACK_DEPTH // stack depth of the soft-timer