Developer knowledge network · moderated exchange

UnreliableCode 커뮤니티

개발자 연구, 리버스 엔지니어링 및 코딩 커뮤니티

Knowledge index살다
4Categories
919Threads
2.8K게시물
Guide

Hardware USB mouse delta packet emulation with Raspberry Pi Pico

colorbot_crafter
Hardware Modder
MEMBER
대표: 126
가입 날짜: Mar 2021
게시물: 14
감사해요: 78
1개월 전 · Jun 29, 2026 8:39 PM
#1

Why Raspberry Pi Pico (RP2040) is replacing Arduino Leonardo for hardware mouse control:

  1. Dual Cortex-M0+ cores running at 133MHz (5x faster than 16MHz ATmega32U4).
  2. Hardware USB Controller supports custom TinyUSB HID descriptors.
  3. UART / Serial baud rate supports up to 921,600 baud, reducing serial packet latency from 4ms down to 0.1ms.

Code snippet in C with TinyUSB:

C
#include "tusb.h"
void send_mouse_delta(int8_t dx, int8_t dy, uint8_t buttons) {
    if (tud_hid_ready()) {
        tud_hid_mouse_report(0, buttons, dx, dy, 0, 0);
    }
}
dma_ghost
DMA Guru
MEMBER
대표: 115
가입 날짜: Jan 2020
게시물: 12
감사해요: 83
1개월 전 · Jun 30, 2026 12:52 AM
#2

RP2040 is awesome. You can also spoof the USB string descriptors (Manufacturer, Product, Serial) in flash memory.

val_driver_guy
Driver Dev
MEMBER
대표: 42
가입 날짜: May 2019
게시물: 24
감사해요: 37
1개월 전 · Jun 30, 2026 11:03 AM
#3

0.1ms transfer latency is huge. Completely eliminates input delay on fast flicks.