mirror of
https://github.com/whowechina/chu_pico.git
synced 2026-09-22 22:37:54 +03:00
Better polling rate
This commit is contained in:
Binary file not shown.
@@ -228,6 +228,7 @@ static void core1_loop()
|
||||
|
||||
static void core0_loop()
|
||||
{
|
||||
uint64_t next_frame = time_us_64();
|
||||
while(1) {
|
||||
tud_task();
|
||||
|
||||
@@ -246,6 +247,9 @@ static void core0_loop()
|
||||
report_usb_hid();
|
||||
|
||||
runtime_ctrl();
|
||||
|
||||
sleep_until(next_frame);
|
||||
next_frame += 1001;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user