Remove delay_us

This commit is contained in:
Peter D. Gray 2021-05-14 11:01:00 -04:00
parent 1ea9979c8b
commit 89a603a864
No known key found for this signature in database
GPG Key ID: F0E6CC6AFC16CF7B
3 changed files with 4 additions and 21 deletions

View File

@ -280,7 +280,7 @@ ae_wake(void)
// send zero (all low), delay 2.5ms
_send_byte(0x00);
delay_us(2500); // measured: ~2.9ms
delay_ms(3); // measured: ~2.9ms
_flush_rx();
}

View File

@ -25,21 +25,4 @@ delay_ms(int ms)
}
}
// delay_us()
//
void
delay_us(int us)
{
if(us > 1000) {
// big round up
delay_ms((us + 500) / 1000);
} else {
// XXX calibrate this
for(volatile int i=0; i<(10000*us); i++) {
__NOP();
}
}
}
// EOF

View File

@ -3,7 +3,7 @@
*/
#pragma once
// Software delay loops (we have no interrupts)
// Uses SYSTICK in polling mode
void delay_ms(int ms);
void delay_us(int us);
// EOF