rename usbd_setup_received_isr to hal_dcd_setup_received
This commit is contained in:
parent
f6137903bc
commit
394302c8cb
|
@ -567,10 +567,9 @@ void dcd_isr(uint8_t coreid)
|
||||||
//------------- Set up Received -------------//
|
//------------- Set up Received -------------//
|
||||||
if (lpc_usb->ENDPTSETUPSTAT)
|
if (lpc_usb->ENDPTSETUPSTAT)
|
||||||
{ // 23.10.10.2 Operational model for setup transfers
|
{ // 23.10.10.2 Operational model for setup transfers
|
||||||
tusb_control_request_t control_request = p_dcd->qhd[0].setup_request;
|
|
||||||
lpc_usb->ENDPTSETUPSTAT = lpc_usb->ENDPTSETUPSTAT;// acknowledge
|
lpc_usb->ENDPTSETUPSTAT = lpc_usb->ENDPTSETUPSTAT;// acknowledge
|
||||||
|
|
||||||
usbd_setup_received_isr(coreid, &control_request);
|
hal_dcd_setup_received(coreid, (uint8_t*) &p_dcd->qhd[0].setup_request);
|
||||||
}
|
}
|
||||||
//------------- Control Request Completed -------------//
|
//------------- Control Request Completed -------------//
|
||||||
else if ( edpt_complete & 0x03 )
|
else if ( edpt_complete & 0x03 )
|
||||||
|
|
|
@ -188,7 +188,7 @@ static void endpoint_control_isr(void)
|
||||||
|
|
||||||
tusb_control_request_t control_request;
|
tusb_control_request_t control_request;
|
||||||
pipe_control_read(&control_request, 8); // TODO read before clear setup above
|
pipe_control_read(&control_request, 8); // TODO read before clear setup above
|
||||||
usbd_setup_received_isr(0, &control_request);
|
hal_dcd_setup_received(0, (uint8_t*) &control_request);
|
||||||
}
|
}
|
||||||
else if (endpoint_int_status & 0x03)
|
else if (endpoint_int_status & 0x03)
|
||||||
{
|
{
|
||||||
|
|
|
@ -349,7 +349,7 @@ void dcd_isr(uint8_t coreid)
|
||||||
if ( BIT_TEST_(int_status, 0) && (dev_cmd_stat & CMDSTAT_SETUP_RECEIVED_MASK) )
|
if ( BIT_TEST_(int_status, 0) && (dev_cmd_stat & CMDSTAT_SETUP_RECEIVED_MASK) )
|
||||||
{ // received control request from host
|
{ // received control request from host
|
||||||
// copy setup request & acknowledge so that the next setup can be received by hw
|
// copy setup request & acknowledge so that the next setup can be received by hw
|
||||||
usbd_setup_received_isr(coreid, &dcd_data.setup_request);
|
hal_dcd_setup_received(coreid, (uint8_t*)&dcd_data.setup_request);
|
||||||
|
|
||||||
// NXP control flowchart clear Active & Stall on both Control IN/OUT endpoints
|
// NXP control flowchart clear Active & Stall on both Control IN/OUT endpoints
|
||||||
dcd_data.qhd[0][0].stall = dcd_data.qhd[1][0].stall = 0;
|
dcd_data.qhd[0][0].stall = dcd_data.qhd[1][0].stall = 0;
|
||||||
|
|
|
@ -432,7 +432,7 @@ void usbd_dcd_bus_event_isr(uint8_t coreid, usbd_bus_event_type_t bus_event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void usbd_setup_received_isr(uint8_t coreid, tusb_control_request_t * p_request)
|
void hal_dcd_setup_received(uint8_t coreid, uint8_t const* p_request)
|
||||||
{
|
{
|
||||||
usbd_task_event_t task_event =
|
usbd_task_event_t task_event =
|
||||||
{
|
{
|
||||||
|
@ -440,7 +440,7 @@ void usbd_setup_received_isr(uint8_t coreid, tusb_control_request_t * p_request)
|
||||||
.event_id = USBD_EVENTID_SETUP_RECEIVED,
|
.event_id = USBD_EVENTID_SETUP_RECEIVED,
|
||||||
};
|
};
|
||||||
|
|
||||||
task_event.setup_received = (*p_request);
|
memcpy(&task_event.setup_received, p_request, sizeof(tusb_control_request_t));
|
||||||
osal_queue_send(usbd_queue_hdl, &task_event);
|
osal_queue_send(usbd_queue_hdl, &task_event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,10 +47,6 @@
|
||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
#include "common/common.h"
|
#include "common/common.h"
|
||||||
|
|
||||||
#ifdef _TEST_
|
|
||||||
#include "dcd.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
@ -79,7 +75,8 @@ extern usbd_device_info_t usbd_devices[CONTROLLER_DEVICE_NUMBER];
|
||||||
// callback from DCD ISR
|
// callback from DCD ISR
|
||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
void usbd_dcd_bus_event_isr(uint8_t coreid, usbd_bus_event_type_t bus_event);
|
void usbd_dcd_bus_event_isr(uint8_t coreid, usbd_bus_event_type_t bus_event);
|
||||||
void usbd_setup_received_isr(uint8_t coreid, tusb_control_request_t * p_request);
|
void hal_dcd_setup_received(uint8_t coreid, uint8_t const* p_request);
|
||||||
|
|
||||||
void usbd_xfer_isr(endpoint_handle_t edpt_hdl, tusb_event_t event, uint32_t xferred_bytes);
|
void usbd_xfer_isr(endpoint_handle_t edpt_hdl, tusb_event_t event, uint32_t xferred_bytes);
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue