usb_cdc: Add usb_read_ep0_setup() interface function

Use new usb_read_ep0_setup() function when reading a setup packet -
this allows the low-level usb hardware code to better handle errors.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2018-09-30 15:14:30 -04:00
parent 731236cf20
commit 93e4897044
4 changed files with 14 additions and 2 deletions

View File

@@ -189,6 +189,12 @@ usb_read_ep0(void *data, uint_fast8_t max_len)
return usb_read_packet(EP0OUT, data, max_len);
}
int_fast8_t
usb_read_ep0_setup(void *data, uint_fast8_t max_len)
{
return usb_read_ep0(data, max_len);
}
int_fast8_t
usb_send_ep0(const void *data, uint_fast8_t len)
{