rename common func to avoid conflict
This commit is contained in:
@@ -497,7 +497,7 @@ bool dcd_edpt_busy(edpt_hdl_t edpt_hdl)
|
||||
|
||||
static void queue_xfer_to_buffer(uint8_t ep_id, uint8_t buff_idx, uint16_t buff_addr_offset, uint16_t total_bytes)
|
||||
{
|
||||
uint16_t const queued_bytes = min16_of(total_bytes, DCD_11U_13U_MAX_BYTE_PER_TD);
|
||||
uint16_t const queued_bytes = tu_min16(total_bytes, DCD_11U_13U_MAX_BYTE_PER_TD);
|
||||
|
||||
dcd_data.current_td[ep_id].queued_bytes_in_buff[buff_idx] = queued_bytes;
|
||||
dcd_data.current_td[ep_id].remaining_bytes -= queued_bytes;
|
||||
|
||||
@@ -312,7 +312,7 @@ static inline uint16_t length_byte2dword(uint16_t length_in_bytes)
|
||||
|
||||
static tusb_error_t pipe_control_xfer(uint8_t ep_id, uint8_t* p_buffer, uint16_t length)
|
||||
{
|
||||
uint16_t const packet_len = min16_of(length, CFG_TUD_ENDOINT0_SIZE);
|
||||
uint16_t const packet_len = tu_min16(length, CFG_TUD_ENDOINT0_SIZE);
|
||||
|
||||
if (ep_id)
|
||||
{
|
||||
@@ -355,7 +355,7 @@ static tusb_error_t pipe_control_read(void * buffer, uint16_t length)
|
||||
LPC_USB->USBCtrl = USBCTRL_READ_ENABLE_MASK; // logical endpoint = 0
|
||||
while ((LPC_USB->USBRxPLen & USBRXPLEN_PACKET_READY_MASK) == 0) {} // TODO blocking, should have timeout
|
||||
|
||||
uint16_t actual_length = min16_of(length, (uint16_t) (LPC_USB->USBRxPLen & USBRXPLEN_PACKET_LENGTH_MASK) );
|
||||
uint16_t actual_length = tu_min16(length, (uint16_t) (LPC_USB->USBRxPLen & USBRXPLEN_PACKET_LENGTH_MASK) );
|
||||
uint32_t *p_read_data = (uint32_t*) buffer;
|
||||
for( uint16_t count=0; count < length_byte2dword(actual_length); count++)
|
||||
{
|
||||
|
||||
@@ -209,7 +209,7 @@ static void qtd_init(dcd_qtd_t* p_qtd, void * data_ptr, uint16_t total_bytes)
|
||||
p_qtd->buffer[0] = (uint32_t) data_ptr;
|
||||
for(uint8_t i=1; i<5; i++)
|
||||
{
|
||||
p_qtd->buffer[i] |= align4k( p_qtd->buffer[i-1] ) + 4096;
|
||||
p_qtd->buffer[i] |= tu_align4k( p_qtd->buffer[i-1] ) + 4096;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user