IAR下面,要用类似GCC的语法Syntax
The syntax of an inline assembler statement is (similar to the one used by GNU gcc):
asm [volatile]( string [assembler-interface])
string can contain one or more valid assembler instructions or data definition assembler directives, separated by
.
For example:
asm("label:nop
"
"b label");
[mw_shl_code=c,true]void WFI_SET(void)
{
asm("WFI");
}
void INTX_DISABLE(void)
{
asm("CPSID I
"
"BX LR");
}[/mw_shl_code]
The syntax of an inline assembler statement is (similar to the one used by GNU gcc):
asm [volatile]( string [assembler-interface])
string can contain one or more valid assembler instructions or data definition assembler directives, separated by .
For example:
asm("label:nop "
"b label");
[mw_shl_code=c,true]void WFI_SET(void)
{
asm("WFI");
}
void INTX_DISABLE(void)
{
asm("CPSID I "
"BX LR");
}[/mw_shl_code]
一周热门 更多>