usb_cdc: Rename interface functions to avoid the term "setup"
Use "ep0" when referring to endpoint0 - don't use "setup" as that can be confused with the low-level usb setup token. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
#include "LPC17xx.h" // LPC_SC
|
||||
#include "byteorder.h" // cpu_to_le32
|
||||
#include "command.h" // output
|
||||
#include "generic/usb_cdc.h" // usb_notify_setup
|
||||
#include "generic/usb_cdc.h" // usb_notify_ep0
|
||||
#include "internal.h" // gpio_peripheral
|
||||
#include "sched.h" // DECL_INIT
|
||||
#include "usb_cdc_ep.h" // USB_CDC_EP_BULK_IN
|
||||
@@ -184,19 +184,19 @@ usb_send_bulk_in(void *data, uint_fast8_t len)
|
||||
}
|
||||
|
||||
int_fast8_t
|
||||
usb_read_setup(void *data, uint_fast8_t max_len)
|
||||
usb_read_ep0(void *data, uint_fast8_t max_len)
|
||||
{
|
||||
return usb_read_packet(EP0OUT, data, max_len);
|
||||
}
|
||||
|
||||
int_fast8_t
|
||||
usb_send_setup(const void *data, uint_fast8_t len)
|
||||
usb_send_ep0(const void *data, uint_fast8_t len)
|
||||
{
|
||||
return usb_write_packet(EP0IN, data, len);
|
||||
}
|
||||
|
||||
void
|
||||
usb_set_stall(void)
|
||||
usb_stall_ep0(void)
|
||||
{
|
||||
usb_irq_disable();
|
||||
sie_cmd_write(SIE_CMD_SET_ENDPOINT_STATUS | 0, (1<<7));
|
||||
@@ -209,7 +209,7 @@ usb_set_address(uint_fast8_t addr)
|
||||
usb_irq_disable();
|
||||
sie_cmd_write(SIE_CMD_SET_ADDRESS, addr | (1<<7));
|
||||
usb_irq_enable();
|
||||
usb_send_setup(NULL, 0);
|
||||
usb_send_ep0(NULL, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -279,11 +279,11 @@ USB_IRQHandler(void)
|
||||
uint32_t ueis = LPC_USB->USBEpIntSt;
|
||||
if (ueis & (1<<EP0OUT)) {
|
||||
sie_select_and_clear(EP0OUT);
|
||||
usb_notify_setup();
|
||||
usb_notify_ep0();
|
||||
}
|
||||
if (ueis & (1<<EP0IN)) {
|
||||
sie_select_and_clear(EP0IN);
|
||||
usb_notify_setup();
|
||||
usb_notify_ep0();
|
||||
}
|
||||
if (ueis & (1<<EP2OUT)) {
|
||||
sie_select_and_clear(EP2OUT);
|
||||
|
||||
Reference in New Issue
Block a user