mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
Avoid spamming out endpoint on connect
This commit is contained in:
parent
43770802f9
commit
9247131b1f
@ -167,9 +167,10 @@ void hid_app_task(void)
|
||||
const uint32_t interval_ms = 200;
|
||||
static uint32_t start_ms = 0;
|
||||
|
||||
if ( board_millis() - start_ms >= interval_ms)
|
||||
uint32_t current_time_ms = board_millis();
|
||||
if ( current_time_ms - start_ms >= interval_ms)
|
||||
{
|
||||
start_ms += interval_ms;
|
||||
start_ms = current_time_ms;
|
||||
|
||||
sony_ds4_output_report_t output_report = {0};
|
||||
output_report.set_rumble = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user