Fixes for Pico SDK 1.5
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
4708ae3d99
commit
e47c5412cf
2 changed files with 8 additions and 4 deletions
|
|
@ -135,12 +135,16 @@ void tud_vendor_rx_cb(uint8_t itf) {
|
|||
}
|
||||
|
||||
void tud_vendor_tx_cb(uint8_t itf, uint32_t sent_bytes) {
|
||||
printf("written %ld\n", sent_bytes);
|
||||
//printf("written %ld\n", sent_bytes);
|
||||
usb_write_flush(ITF_CCID);
|
||||
}
|
||||
|
||||
int driver_write_ccid(const uint8_t *buffer, size_t buffer_size) {
|
||||
return tud_vendor_write(buffer, buffer_size);
|
||||
int r = tud_vendor_write(buffer, buffer_size);
|
||||
if (r > 0) {
|
||||
return MAX(tud_vendor_flush(), r);
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
size_t driver_read_ccid(uint8_t *buffer, size_t buffer_size) {
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ tusb_desc_endpoint_t const desc_ep1 = {
|
|||
.bDescriptorType = TUSB_DESC_ENDPOINT,
|
||||
.bEndpointAddress = TUSB_DIR_IN_MASK | 1,
|
||||
.bmAttributes.xfer = TUSB_XFER_BULK,
|
||||
.wMaxPacketSize.size = (64),
|
||||
.wMaxPacketSize = (64),
|
||||
.bInterval = 0
|
||||
};
|
||||
|
||||
|
|
@ -141,7 +141,7 @@ tusb_desc_endpoint_t const desc_ep2 = {
|
|||
.bDescriptorType = TUSB_DESC_ENDPOINT,
|
||||
.bEndpointAddress = 2,
|
||||
.bmAttributes.xfer = TUSB_XFER_BULK,
|
||||
.wMaxPacketSize.size = (64),
|
||||
.wMaxPacketSize = (64),
|
||||
.bInterval = 0
|
||||
};
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue