Skip to content

Commit 3b3d781

Browse files
committed
pbio/drv/clock/clock_ev3: Implement busy-wait delay
1 parent 7ba2c75 commit 3b3d781

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/pbio/drv/clock/clock_ev3.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ uint32_t pbdrv_clock_get_100us(void) {
122122
}
123123

124124
void pbdrv_clock_busy_delay_ms(uint32_t ms) {
125-
// TODO
125+
uint32_t start = pbdrv_clock_get_ms();
126+
while (pbdrv_clock_get_ms() - start < ms) {
127+
}
126128
}
127129

128130
bool pbdrv_clock_is_ticking(void) {

0 commit comments

Comments
 (0)