mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-05 22:45:23 +00:00
Fix integer size bug for Delay::us
This commit is contained in:
parent
69269b4179
commit
4541dcb71b
3 changed files with 15 additions and 7 deletions
|
|
@ -35,8 +35,8 @@ void Delay::ms(uint32_t t) {
|
|||
us(1000);
|
||||
}
|
||||
}
|
||||
void Delay::us(uint32_t t) {
|
||||
uint64_t start = TIM1->CNT;
|
||||
void Delay::us(uint16_t t) {
|
||||
uint16_t start = TIM1->CNT;
|
||||
while(TIM1->CNT - start < t);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue