瀏覽代碼

while(1); -> while (1) asm ("WFI");

Saves power and prevents heating
main
Frank 6 年之前
父節點
當前提交
0cb6ea8de3
No account linked to committer's email address
共有 1 個文件被更改,包括 4 次插入5 次删除
  1. +4
    -5
      teensy4/startup.c

+ 4
- 5
teensy4/startup.c 查看文件

#else #else
if ( F_CPU_ACTUAL >= 600000000 ) if ( F_CPU_ACTUAL >= 600000000 )
set_arm_clock(100000000); set_arm_clock(100000000);
while (1) {
}
while (1) asm ("WFI");
#endif #endif
} }


__attribute__((weak)) __attribute__((weak))
void _exit(int status) void _exit(int status)
{ {
while (1);
while (1) asm ("WFI");
} }


__attribute__((weak)) __attribute__((weak))
void __cxa_pure_virtual() void __cxa_pure_virtual()
{ {
while (1);
while (1) asm ("WFI");
} }


__attribute__((weak)) __attribute__((weak))
__attribute__((weak)) __attribute__((weak))
void abort(void) void abort(void)
{ {
while (1) ;
while (1) asm ("WFI");
} }

Loading…
取消
儲存