Timer test

This commit is contained in:
Ea-r-th
2026-03-11 00:31:40 -07:00
parent 43bdee4406
commit 5b0819a300
7 changed files with 134 additions and 36 deletions

View File

@@ -42,8 +42,13 @@ enum class SHAL_Result{
//Currently configures systick to count down in microseconds
inline uint32_t ticks = 0;
void systick_init();
extern "C" void SysTick_Handler();
static uint32_t millis();
//Max of 16ms, use SHAL_delay_ms for longer delay
void SHAL_delay_us(uint32_t us);
@@ -71,6 +76,8 @@ bool SHAL_wait_for_condition_ms(Condition cond, uint32_t timeout_ms) {
return false; // timeout
}
#define SHAL_set_bits(reg, size, bits, offset) \
do { \
if ((reg) != NULL) { \