# HG changeset patch # User Josef 'Jeff' Sipek # Date 1672871955 18000 # Wed Jan 04 17:39:15 2023 -0500 # Node ID 8ba3d252cc122eb5fbe9b73db7d9ef814bbcaed0 # Parent b3fc6fa0f91b03ebfe89d1225c94e2232ef2d209 Don't open-code mcu_set_clock_prescalar Signed-off-by: Josef 'Jeff' Sipek diff --git a/main.c b/main.c --- a/main.c +++ b/main.c @@ -412,15 +412,7 @@ (RAW_MCU_FREQ_SCALE != 256) #error "Invalid MCU frequency prescaler value" #endif - asm volatile( - "st Z, %1\n" - "st Z, %2\n" - : /* out */ - : /* in */ - "z" (&mmregs->clkpr), - "r" (REG_CLKPR_CLKPCE), - "r" (mcu_clock_prescalar_to_clkps(RAW_MCU_FREQ_SCALE)) - ); + mcu_set_clock_prescalar(RAW_MCU_FREQ_SCALE); /* * Initialize the state struct