| 627 | #endif // STM32H7 |
| 628 | |
| 629 | void Scheduler::_storage_thread(void* arg) |
| 630 | { |
| 631 | Scheduler *sched = (Scheduler *)arg; |
| 632 | chRegSetThreadName("storage"); |
| 633 | while (!sched->_hal_initialized) { |
| 634 | sched->delay_microseconds(10000); |
| 635 | } |
| 636 | #if defined STM32H7 |
| 637 | uint16_t memcheck_counter=0; |
| 638 | #endif |
| 639 | while (true) { |
| 640 | sched->delay_microseconds(1000); |
| 641 | |
| 642 | // process any pending storage writes |
| 643 | hal.storage->_timer_tick(); |
| 644 | |
| 645 | #if defined STM32H7 |
| 646 | if (memcheck_counter++ % 500 == 0) { |
| 647 | // run check at 2Hz |
| 648 | sched->check_low_memory_is_zero(); |
| 649 | } |
| 650 | #endif |
| 651 | } |
| 652 | } |
| 653 | |
| 654 | void Scheduler::set_system_initialized() |
| 655 | { |
nothing calls this directly
no test coverage detected