You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
810 B

11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
  1. #include "page_processer.h"
  2. #include "front_end_controler.h"
  3. #include "Page_main.h"
  4. #include "Page_SettingTime.h"
  5. #define TAG "page_Processer"
  6. //ҳ���¼�����ע�᣺��������ʵ�ֶ༶�˵�
  7. PageProcesser init[] = {
  8. {OnPageLoad_main,OnPageButton_main},
  9. {OnPageLoade_settingtime,OnPageButton_settingtime},
  10. };
  11. void page_processer(tjc_event_t* event, uint8_t page){
  12. if(page != event->pid)return;
  13. ZLOGI(TAG, "page:%d",page);
  14. if(event->event_id == tjc_sys_event_page_id){
  15. init[page].OnPageLoad();
  16. }else if(event->event_id == tjc_button_event){
  17. init[page].OnPageButton(event->bid, event->date.button_event.val);
  18. }
  19. }
  20. /*
  21. * @brief ҳעǼǣҪǼÿҳid
  22. *
  23. *
  24. */
  25. void Page_initialize(uint8_t page) {regOnUsrEventCb(page_processer, page);}