diff options
| author | Nick Brassel <nick@tzarc.org> | 2021-11-16 05:21:09 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-15 18:21:09 +0000 |
| commit | 36d123e9c5a9ce0e29b9bc22ef87661bf479e299 (patch) | |
| tree | 1033718afb33e1eb7dc3cd7b99db59a90668fa8a /tmk_core/protocol | |
| parent | b3ee124da666287ef13787523ea88bf40713ff4c (diff) | |
| download | qmk_firmware-36d123e9c5a9ce0e29b9bc22ef87661bf479e299.tar.gz qmk_firmware-36d123e9c5a9ce0e29b9bc22ef87661bf479e299.zip | |
Add support for deferred executors. (#14859)
* Add support for deferred executors.
* More docs.
* Include from quantum.h
* Cleanup.
* Parameter checks
* Comments.
* qmk format-c
* I accidentally a few words.
* API name change.
* Apply suggestions from code review
Co-authored-by: Sergey Vlasov <sigprof@gmail.com>
* Review comments.
* qmk format-c
* Review comments.
Co-authored-by: Sergey Vlasov <sigprof@gmail.com>
Diffstat (limited to 'tmk_core/protocol')
| -rw-r--r-- | tmk_core/protocol/arm_atsam/main_arm_atsam.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tmk_core/protocol/arm_atsam/main_arm_atsam.c b/tmk_core/protocol/arm_atsam/main_arm_atsam.c index 1df5112ed..de12821a7 100644 --- a/tmk_core/protocol/arm_atsam/main_arm_atsam.c +++ b/tmk_core/protocol/arm_atsam/main_arm_atsam.c | |||
| @@ -40,6 +40,10 @@ void send_mouse(report_mouse_t *report); | |||
| 40 | void send_system(uint16_t data); | 40 | void send_system(uint16_t data); |
| 41 | void send_consumer(uint16_t data); | 41 | void send_consumer(uint16_t data); |
| 42 | 42 | ||
| 43 | #ifdef DEFERRED_EXEC_ENABLE | ||
| 44 | void deferred_exec_task(void); | ||
| 45 | #endif // DEFERRED_EXEC_ENABLE | ||
| 46 | |||
| 43 | host_driver_t arm_atsam_driver = {keyboard_leds, send_keyboard, send_mouse, send_system, send_consumer}; | 47 | host_driver_t arm_atsam_driver = {keyboard_leds, send_keyboard, send_mouse, send_system, send_consumer}; |
| 44 | 48 | ||
| 45 | uint8_t led_states; | 49 | uint8_t led_states; |
| @@ -360,6 +364,11 @@ int main(void) { | |||
| 360 | } | 364 | } |
| 361 | #endif // CONSOLE_ENABLE | 365 | #endif // CONSOLE_ENABLE |
| 362 | 366 | ||
| 367 | #ifdef DEFERRED_EXEC_ENABLE | ||
| 368 | // Run deferred executions | ||
| 369 | deferred_exec_task(); | ||
| 370 | #endif // DEFERRED_EXEC_ENABLE | ||
| 371 | |||
| 363 | // Run housekeeping | 372 | // Run housekeeping |
| 364 | housekeeping_task(); | 373 | housekeeping_task(); |
| 365 | } | 374 | } |
