Fix the last of the issues introduced in 350a2250b

Change-Id: I4b58f5d9d1c4649080826a9cf1b438e13ed7ce81
This commit is contained in:
Solomon Peachy 2026-01-03 14:42:36 -05:00
parent 247d2020fa
commit ef47ffe250
2 changed files with 4 additions and 3 deletions

View file

@ -347,7 +347,7 @@ int usb_drv_init_endpoint(int endpoint, int type, int max_packet_size) {
(void)max_packet_size;
int i = EP_NUM(endpoint);
int d = EP_DIR(endpoint) == DIR_IN ? 0 : 1;
// int d = EP_DIR(endpoint) == DIR_IN ? 0 : 1;
if (EP_DIR(endpoint) == DIR_IN) {
USB_IEP_CTRL(i) = USB_EP_CTRL_FLUSH |

View file

@ -1491,14 +1491,15 @@ void usb_drv_set_test_mode(int mode)
int usb_drv_init_endpoint(int endpoint, int type, int max_packet_size) {
(void)max_packet_size; /* FIXME: support max packet size override */
(void)type;
int num = EP_NUM(endpoint);
int dir = EP_DIR(endpoint);
return tnetv_gadget_ep_enable(num, dir == EP_IN);
return tnetv_gadget_ep_enable(num, dir == DIR_IN);
}
int usb_drv_deinit_endpoint(int endpoint) {
int num = EP_NUM(endpoint);
int dir = EP_DIR(endpoint);
return tnetv_gadget_ep_disable(num, dir == EP_IN);
return tnetv_gadget_ep_disable(num, dir == DIR_IN);
}