func_idle.c 510 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #include "include.h"
  2. #include "func.h"
  3. #include "func_idle.h"
  4. #if FUNC_IDLE_EN
  5. AT(.text.func.idle)
  6. void func_idle_process(void)
  7. {
  8. func_process();
  9. }
  10. static void func_idle_enter(void)
  11. {
  12. }
  13. static void func_idle_exit(void)
  14. {
  15. func_cb.last = FUNC_IDLE;
  16. }
  17. AT(.text.func.idle)
  18. void func_idle(void)
  19. {
  20. printf("%s\n", __func__);
  21. func_idle_enter();
  22. while (func_cb.sta == FUNC_IDLE) {
  23. func_idle_process();
  24. func_idle_message(msg_dequeue());
  25. }
  26. func_idle_exit();
  27. }
  28. #endif