Fix Error: chip/rp2040_clock.c:148:19: error: invalid instruction
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
ba286e3824
commit
9f685435d0
@ -141,15 +141,12 @@ bool rp2040_clock_configure(int clk_index,
|
||||
* necessarily running, nor is timer... so, 3 cycles per loop:
|
||||
*/
|
||||
|
||||
unsigned int delay_cyc = rp2040_clock_freq[RP2040_CLOCKS_NDX_SYS] /
|
||||
rp2040_clock_freq[clk_index] + 1;
|
||||
volatile unsigned int delay_cyc;
|
||||
|
||||
__asm__ volatile (
|
||||
"1: \n\t"
|
||||
"sub %0, #1 \n\t"
|
||||
"bne 1b"
|
||||
: "+r" (delay_cyc)
|
||||
);
|
||||
delay_cyc = rp2040_clock_freq[RP2040_CLOCKS_NDX_SYS] /
|
||||
rp2040_clock_freq[clk_index] + 1;
|
||||
|
||||
while (--delay_cyc > 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user