Check if timer is syncing (required for SAMD register writes)
| 248 | |
| 249 | // Check if timer is syncing (required for SAMD register writes) |
| 250 | static bool tc_is_syncing(Tc* tc) FL_NOEXCEPT { |
| 251 | #if defined(FL_IS_SAMD21) |
| 252 | return tc->COUNT16.STATUS.reg & TC_STATUS_SYNCBUSY; |
| 253 | #elif defined(FL_IS_SAMD51) |
| 254 | return tc->COUNT16.SYNCBUSY.reg != 0; |
| 255 | #else |
| 256 | return tc->COUNT16.STATUS.reg & TC_STATUS_SYNCBUSY; |
| 257 | #endif |
| 258 | } |
| 259 | |
| 260 | // Wait for timer sync |
| 261 | static void tc_wait_sync(Tc* tc) FL_NOEXCEPT { |