I saw the GitHub repo of libmaple/delay.h
static inline void delay_us(uint32 us) {
us *= STM32_DELAY_US_MULT;
/* fudge for function call overhead */
us--;
asm volatile(" mov r0, %[us] \n\t"
"1: subs r0, #1 \n\t"
" bhi 1b \n\t"
:
: [us] "r" (us)
: "r0");
}
I would like to write the same function in IAR EWARM 6.3
I get the following error if I use the same code:
Error[Og006]: Syntax error in inline assembly: "Error[41]: Bad label"
Anyone who has writing code in IAR embedded workbech, suggestions please .