summaryrefslogtreecommitdiff
path: root/src/portable/nxp
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-08-23 20:09:28 +0700
committerhathach <[email protected]>2018-08-23 20:09:28 +0700
commitc5d2f661e76adbe2f047c2f3a405ed60262ecb9b (patch)
treef0a2f3a6a85773af9e87ad0b71724bf1b3099b86 /src/portable/nxp
parentb350d8a0869c13d241ac5e7ae84ab77081bad114 (diff)
rename common func to avoid conflict
Diffstat (limited to 'src/portable/nxp')
-rw-r--r--src/portable/nxp/lpc11xx_lpc13xx/dcd_lpc_11uxx_13uxx.c2
-rw-r--r--src/portable/nxp/lpc17xx/dcd_lpc175x_6x.c4
-rw-r--r--src/portable/nxp/lpc43xx_lpc18xx/dcd_lpc43xx.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/portable/nxp/lpc11xx_lpc13xx/dcd_lpc_11uxx_13uxx.c b/src/portable/nxp/lpc11xx_lpc13xx/dcd_lpc_11uxx_13uxx.c
index 0eaecf1b8..3e536312a 100644
--- a/src/portable/nxp/lpc11xx_lpc13xx/dcd_lpc_11uxx_13uxx.c
+++ b/src/portable/nxp/lpc11xx_lpc13xx/dcd_lpc_11uxx_13uxx.c
@@ -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;
diff --git a/src/portable/nxp/lpc17xx/dcd_lpc175x_6x.c b/src/portable/nxp/lpc17xx/dcd_lpc175x_6x.c
index a87e7d899..8c87984e8 100644
--- a/src/portable/nxp/lpc17xx/dcd_lpc175x_6x.c
+++ b/src/portable/nxp/lpc17xx/dcd_lpc175x_6x.c
@@ -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++)
{
diff --git a/src/portable/nxp/lpc43xx_lpc18xx/dcd_lpc43xx.c b/src/portable/nxp/lpc43xx_lpc18xx/dcd_lpc43xx.c
index 61f829713..792a009f2 100644
--- a/src/portable/nxp/lpc43xx_lpc18xx/dcd_lpc43xx.c
+++ b/src/portable/nxp/lpc43xx_lpc18xx/dcd_lpc43xx.c
@@ -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;
}
}
}