decrease color update interval
This commit is contained in:
Binary file not shown.
+1
-1
@@ -62,7 +62,7 @@ void rgb_task(uint8_t dev_addr, uint8_t instance, uint8_t report_id) {
|
||||
lastTime = get_absolute_time();
|
||||
}
|
||||
} else {
|
||||
if ( absolute_time_diff_us(lastTime, get_absolute_time()) > 1000000) {
|
||||
if ( absolute_time_diff_us(lastTime, get_absolute_time()) > 500000) {
|
||||
send_initial(dev_addr, instance, report_id);
|
||||
lastTime = get_absolute_time();
|
||||
}
|
||||
|
||||
+6
-2
@@ -84,9 +84,11 @@ uint8_t const desc_fs_configuration[] =
|
||||
// Config number, interface count, string index, total length, attribute, power in mA
|
||||
TUD_CONFIG_DESCRIPTOR(1, ITF_NUM_TOTAL, 0, CONFIG_TOTAL_LEN, 0x00, 100),
|
||||
|
||||
// Interface number, string index, protocol, report descriptor len, EP In address, size & polling interval
|
||||
// Interface number, string index, protocol, report descriptor len, EP In address, size
|
||||
TUD_CDC_DESCRIPTOR(ITF_NUM_CDC, 4, EPNUM_CDC_NOTIF, 8, EPNUM_CDC_OUT, EPNUM_CDC_IN, 64),
|
||||
TUD_HID_DESCRIPTOR(ITF_NUM_HID, 5, HID_ITF_PROTOCOL_NONE, sizeof(desc_hid_report), EPNUM_HID, CFG_TUD_HID_EP_BUFSIZE, 5),
|
||||
|
||||
// Interface number, string index, protocol, report descriptor len, EP In address, size & polling interval
|
||||
TUD_HID_DESCRIPTOR(ITF_NUM_HID, 5, HID_ITF_PROTOCOL_NONE, sizeof(desc_hid_report), EPNUM_HID, CFG_TUD_HID_EP_BUFSIZE, 1),
|
||||
};
|
||||
|
||||
// Invoked when received GET CONFIGURATION DESCRIPTOR
|
||||
@@ -110,6 +112,8 @@ char const* string_desc_arr [] =
|
||||
"Raspberry Pi", // 1: Manufacturer
|
||||
"Pico HyperX RGB Controller", // 2: Product
|
||||
NULL, // 3: Serials, should use chip ID
|
||||
"Pico HyperX CDC", // 4: CDC
|
||||
"Pico HyperX HID", // 5: HID
|
||||
};
|
||||
|
||||
static uint16_t _desc_str[32+1];
|
||||
|
||||
Reference in New Issue
Block a user