瀏覽代碼

expose ccmicros for testing

micros() unchanged - minor systick_isr() diversion - one line added to systick_isr.
teensy4-core
Defragster 6 年之前
父節點
當前提交
8cb4de3469
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 5 行新增5 行删除
  1. +5
    -5
      teensy4/delay.c

+ 5
- 5
teensy4/delay.c 查看文件

@@ -62,7 +62,8 @@ void delay(uint32_t msec)
// TODO...
}

uint32_t micros(void)
extern uint32_t ccmicros(void);
uint32_t ccmicros(void)
{
uint32_t ccdelta, usec, smc, scc;
do {
@@ -74,9 +75,8 @@ uint32_t micros(void)
return usec;
}

#if 0 // kept to compare test to cycle count micro()
extern uint32_t otmicros(void);
uint32_t otmicros(void)
//#if 0 // kept to compare test to cycle count micro()
uint32_t micros(void)
{
uint32_t msec, tick, elapsed, istatus, usec;
//static uint32_t prev_msec=0;
@@ -133,4 +133,4 @@ uint32_t otmicros(void)
prev_usec = usec;
return usec;
}
#endif
//#endif

Loading…
取消
儲存