123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- #include "main.h"
- volatile flag_t Flag = {0};
- int main(void)
- {
-
- Board_Init();
-
- RTOS_Init();
-
-
- ES_Init(stShowTime);
-
- RTC_Init();
- sensor_Init();
- es_event_t event = eventNull;
- RTC_ReadAll(&Clock);
- showTime();
-
- RTOS_SetTask(btnProcess, 1, BTN_SCAN_PERIOD);
-
- while (1)
- {
-
- if (Flag.RTC_IRQ != 0) {
- Flag.RTC_IRQ = 0;
- new_Second();
- }
- event = ES_GetEvent();
- if (event) {
- ES_Dispatch(event);
- }
- RTOS_DispatchTask();
- __WFI();
- }
- }
- void Error_Handler(void)
- {
-
- __disable_irq();
- while (1)
- {
- }
- }
- #ifdef USE_FULL_ASSERT
- void assert_failed(uint8_t *file, uint32_t line)
- {
-
- }
- #endif
|