Rename dcd_edpt_iso_xfer() to dcd_edpt_xfer_fifo()

This commit is contained in:
Reinhard Panhuber 2021-03-02 20:00:39 +01:00
parent c8b6d9b990
commit 7b8a08d2e1
12 changed files with 14 additions and 14 deletions

View File

@ -34,7 +34,7 @@
* *
* 1. Input data -> SW-FIFO -> MCU USB * 1. Input data -> SW-FIFO -> MCU USB
* *
* The most easiest version, available in case the target MCU can handle the software FIFO (SW-FIFO) and if it is implemented in the device driver (if yes then dcd_edpt_iso_xfer() is available) * The most easiest version, available in case the target MCU can handle the software FIFO (SW-FIFO) and if it is implemented in the device driver (if yes then dcd_edpt_xfer_fifo() is available)
* *
* 2. Input data -> SW-FIFO -> Linear buffer -> MCU USB * 2. Input data -> SW-FIFO -> Linear buffer -> MCU USB
* *

View File

@ -135,7 +135,7 @@ void dcd_edpt_close (uint8_t rhport, uint8_t ep_addr) TU_ATTR_WEAK;
bool dcd_edpt_xfer (uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t total_bytes); bool dcd_edpt_xfer (uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t total_bytes);
// Submit an ISO transfer, When complete dcd_event_xfer_complete() is invoked to notify the stack // Submit an ISO transfer, When complete dcd_event_xfer_complete() is invoked to notify the stack
bool dcd_edpt_iso_xfer (uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff, uint16_t total_bytes); bool dcd_edpt_xfer_fifo (uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff, uint16_t total_bytes);
// Stall endpoint // Stall endpoint
void dcd_edpt_stall (uint8_t rhport, uint8_t ep_addr); void dcd_edpt_stall (uint8_t rhport, uint8_t ep_addr);

View File

@ -1246,7 +1246,7 @@ bool usbd_edpt_iso_xfer(uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff, uint16_
// and usbd task can preempt and clear the busy // and usbd task can preempt and clear the busy
_usbd_dev.ep_status[epnum][dir].busy = true; _usbd_dev.ep_status[epnum][dir].busy = true;
if (dcd_edpt_iso_xfer(rhport, ep_addr, ff, total_bytes)) if (dcd_edpt_xfer_fifo(rhport, ep_addr, ff, total_bytes))
{ {
TU_LOG2("OK\r\n"); TU_LOG2("OK\r\n");
return true; return true;

View File

@ -357,7 +357,7 @@ bool dcd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t *buffer, uint16_t to
return true; return true;
} }
bool dcd_edpt_iso_xfer (uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff, uint16_t total_bytes) bool dcd_edpt_xfer_fifo (uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff, uint16_t total_bytes)
{ {
(void)rhport; (void)rhport;

View File

@ -297,7 +297,7 @@ bool dcd_edpt_xfer (uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t
return true; return true;
} }
bool dcd_edpt_iso_xfer (uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff, uint16_t total_bytes) bool dcd_edpt_xfer_fifo (uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff, uint16_t total_bytes)
{ {
(void) rhport; (void) rhport;

View File

@ -77,7 +77,7 @@ static bool active_ep0_xfer;
static struct xfer_ctl_t static struct xfer_ctl_t
{ {
uint8_t *data_ptr; /* data_ptr tracks where to next copy data to (for OUT) or from (for IN) */ uint8_t *data_ptr; /* data_ptr tracks where to next copy data to (for OUT) or from (for IN) */
tu_fifo_t * ff; /* pointer to FIFO required for dcd_edpt_iso_xfer() */ tu_fifo_t * ff; /* pointer to FIFO required for dcd_edpt_xfer_fifo() */
union { union {
uint16_t in_remaining_bytes; /* for IN endpoints, we track how many bytes are left to transfer */ uint16_t in_remaining_bytes; /* for IN endpoints, we track how many bytes are left to transfer */
uint16_t out_bytes_so_far; /* but for OUT endpoints, we track how many bytes we've transferred so far */ uint16_t out_bytes_so_far; /* but for OUT endpoints, we track how many bytes we've transferred so far */
@ -297,7 +297,7 @@ bool dcd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t *buffer, uint16_t to
return true; return true;
} }
bool dcd_edpt_iso_xfer (uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff, uint16_t total_bytes) bool dcd_edpt_xfer_fifo (uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff, uint16_t total_bytes)
{ {
(void) rhport; (void) rhport;

View File

@ -303,7 +303,7 @@ bool dcd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t *buffer, uint16_t to
return true; return true;
} }
bool dcd_edpt_iso_xfer (uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff, uint16_t total_bytes) bool dcd_edpt_xfer_fifo (uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff, uint16_t total_bytes)
{ {
(void) rhport; (void) rhport;

View File

@ -95,7 +95,7 @@ static uint32_t bufseg_addr;
static struct xfer_ctl_t static struct xfer_ctl_t
{ {
uint8_t *data_ptr; /* data_ptr tracks where to next copy data to (for OUT) or from (for IN) */ uint8_t *data_ptr; /* data_ptr tracks where to next copy data to (for OUT) or from (for IN) */
tu_fifo_t * ff; /* pointer to FIFO required for dcd_edpt_iso_xfer() */ tu_fifo_t * ff; /* pointer to FIFO required for dcd_edpt_xfer_fifo() */
union { union {
uint16_t in_remaining_bytes; /* for IN endpoints, we track how many bytes are left to transfer */ uint16_t in_remaining_bytes; /* for IN endpoints, we track how many bytes are left to transfer */
uint16_t out_bytes_so_far; /* but for OUT endpoints, we track how many bytes we've transferred so far */ uint16_t out_bytes_so_far; /* but for OUT endpoints, we track how many bytes we've transferred so far */
@ -412,7 +412,7 @@ bool dcd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t *buffer, uint16_t to
return true; return true;
} }
bool dcd_edpt_iso_xfer (uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff, uint16_t total_bytes) bool dcd_edpt_xfer_fifo (uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff, uint16_t total_bytes)
{ {
(void) rhport; (void) rhport;

View File

@ -867,7 +867,7 @@ bool dcd_edpt_xfer (uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t
return true; return true;
} }
bool dcd_edpt_iso_xfer (uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff, uint16_t total_bytes) bool dcd_edpt_xfer_fifo (uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff, uint16_t total_bytes)
{ {
(void) rhport; (void) rhport;

View File

@ -675,7 +675,7 @@ bool dcd_edpt_xfer (uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t
// bytes should be written and second to keep the return value free to give back a boolean // bytes should be written and second to keep the return value free to give back a boolean
// success message. If total_bytes is too big, the FIFO will copy only what is available // success message. If total_bytes is too big, the FIFO will copy only what is available
// into the USB buffer! // into the USB buffer!
bool dcd_edpt_iso_xfer (uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff, uint16_t total_bytes) bool dcd_edpt_xfer_fifo (uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff, uint16_t total_bytes)
{ {
// USB buffers always work in bytes so to avoid unnecessary divisions we demand item_size = 1 // USB buffers always work in bytes so to avoid unnecessary divisions we demand item_size = 1
TU_ASSERT(ff->item_size == 1); TU_ASSERT(ff->item_size == 1);

View File

@ -106,7 +106,7 @@ bool dcd_edpt_xfer (uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t
} }
// Submit a transfer where is managed by FIFO, When complete dcd_event_xfer_complete() is invoked to notify the stack // Submit a transfer where is managed by FIFO, When complete dcd_event_xfer_complete() is invoked to notify the stack
bool dcd_edpt_iso_xfer (uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff, uint16_t total_bytes) bool dcd_edpt_xfer_fifo (uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff, uint16_t total_bytes)
{ {
(void) rhport; (void) rhport;
(void) ep_addr; (void) ep_addr;

View File

@ -347,7 +347,7 @@ bool dcd_edpt_xfer (uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t
return true; return true;
} }
bool dcd_edpt_iso_xfer (uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff, uint16_t total_bytes) bool dcd_edpt_xfer_fifo (uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff, uint16_t total_bytes)
{ {
(void) rhport; (void) rhport;