Fix delayms_power to do proper timecounting
This commit is contained in:
parent
bb178629a2
commit
7eba1c5240
|
@ -41,12 +41,12 @@ void delayms_queue(uint32_t ms){
|
||||||
};
|
};
|
||||||
|
|
||||||
void delayms_power(uint32_t ms){
|
void delayms_power(uint32_t ms){
|
||||||
|
ms+=_timectr;
|
||||||
do {
|
do {
|
||||||
ms-=10;
|
|
||||||
#ifdef ARM
|
#ifdef ARM
|
||||||
__asm volatile ("WFI");
|
__asm volatile ("WFI");
|
||||||
#endif
|
#endif
|
||||||
} while(ms>10);
|
} while (ms >_timectr);
|
||||||
};
|
};
|
||||||
|
|
||||||
int push_queue(void (*new)(void)){
|
int push_queue(void (*new)(void)){
|
||||||
|
|
Loading…
Reference in New Issue