Update to TinyUSB 0.12.0 (#622)
Update kitchent_sink compilation test to include TinyUSB to catch warnings Fix warnings in stdio_usb and stdio_semihosting caught by above
This commit is contained in:
@ -38,7 +38,7 @@ static uint16_t resetd_open(uint8_t __unused rhport, tusb_desc_interface_t const
|
||||
}
|
||||
|
||||
// Support for parameterized reset via vendor interface control request
|
||||
static bool resetd_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb_control_request_t const * request) {
|
||||
static bool resetd_control_xfer_cb(uint8_t __unused rhport, uint8_t stage, tusb_control_request_t const * request) {
|
||||
// nothing to do with DATA & ACK stage
|
||||
if (stage != CONTROL_STAGE_SETUP) return true;
|
||||
|
||||
|
@ -41,10 +41,10 @@ static void stdio_usb_out_chars(const char *buf, int length) {
|
||||
if (tud_cdc_connected()) {
|
||||
for (int i = 0; i < length;) {
|
||||
int n = length - i;
|
||||
int avail = tud_cdc_write_available();
|
||||
int avail = (int) tud_cdc_write_available();
|
||||
if (n > avail) n = avail;
|
||||
if (n) {
|
||||
int n2 = tud_cdc_write(buf + i, n);
|
||||
int n2 = (int) tud_cdc_write(buf + i, (uint32_t)n);
|
||||
tud_task();
|
||||
tud_cdc_write_flush();
|
||||
i += n2;
|
||||
@ -73,7 +73,7 @@ int stdio_usb_in_chars(char *buf, int length) {
|
||||
}
|
||||
int rc = PICO_ERROR_NO_DATA;
|
||||
if (tud_cdc_connected() && tud_cdc_available()) {
|
||||
int count = tud_cdc_read(buf, length);
|
||||
int count = (int) tud_cdc_read(buf, (uint32_t) length);
|
||||
rc = count ? count : PICO_ERROR_NO_DATA;
|
||||
}
|
||||
mutex_exit(&stdio_usb_mutex);
|
||||
|
@ -143,7 +143,7 @@ const uint16_t *tud_descriptor_string_cb(uint8_t index, __unused uint16_t langid
|
||||
}
|
||||
|
||||
// first byte is length (including header), second byte is string type
|
||||
desc_str[0] = (TUSB_DESC_STRING << 8) | (2 * len + 2);
|
||||
desc_str[0] = (uint16_t) ((TUSB_DESC_STRING << 8) | (2 * len + 2));
|
||||
|
||||
return desc_str;
|
||||
}
|
||||
|
Reference in New Issue
Block a user