fix dual example for rp2350 conflict printf and cdc_printf

This commit is contained in:
hathach
2025-05-13 16:27:26 +07:00
parent ed087b9ed8
commit fe4446090e
3 changed files with 33 additions and 25 deletions

View File

@@ -190,7 +190,9 @@ void tuh_hid_umount_cb(uint8_t dev_addr, uint8_t instance) {
// look up new key in previous keys
static inline bool find_key_in_report(hid_keyboard_report_t const* report, uint8_t keycode) {
for (uint8_t i = 0; i < 6; i++) {
if (report->keycode[i] == keycode) return true;
if (report->keycode[i] == keycode) {
return true;
}
}
return false;
@@ -230,7 +232,9 @@ static void process_kbd_report(uint8_t dev_addr, hid_keyboard_report_t const* re
// TODO example skips key released
}
if (flush) tud_cdc_write_flush();
if (flush) {
tud_cdc_write_flush();
}
prev_report = *report;
}