rename common func to avoid conflict

This commit is contained in:
hathach
2018-08-23 20:09:28 +07:00
parent b350d8a086
commit c5d2f661e7
22 changed files with 109 additions and 135 deletions
+6 -6
View File
@@ -95,7 +95,7 @@ void complete_qtd_in_qhd(ehci_qhd_t *p_qhd)
{
while(!p_qhd->qtd_overlay.next.terminate)
{
ehci_qtd_t* p_qtd = (ehci_qtd_t*) align32(p_qhd->qtd_overlay.next.address);
ehci_qtd_t* p_qtd = (ehci_qtd_t*) tu_align32(p_qhd->qtd_overlay.next.address);
p_qtd->active = 0;
p_qtd->total_bytes = 0;
p_qhd->qtd_overlay = *p_qtd;
@@ -110,7 +110,7 @@ bool complete_all_qtd_in_async(ehci_qhd_t *head)
do
{
complete_qtd_in_qhd(p_qhd);
p_qhd = (ehci_qhd_t*) align32(p_qhd->next.address);
p_qhd = (ehci_qhd_t*) tu_align32(p_qhd->next.address);
}while(p_qhd != head); // stop if loop around
return true;
@@ -121,7 +121,7 @@ bool complete_all_qtd_in_period(ehci_link_t *head)
while(!head->terminate)
{
uint32_t queue_type = head->type;
head = (ehci_link_t*) align32(head->address);
head = (ehci_link_t*) tu_align32(head->address);
if ( queue_type == EHCI_QUEUE_ELEMENT_QHD)
{
@@ -153,7 +153,7 @@ void complete_1st_qtd_with_error(ehci_qhd_t* p_qhd, bool halted, bool xact_err)
{
if(!p_qhd->qtd_overlay.next.terminate) // TODO add active check
{
ehci_qtd_t* p_qtd = (ehci_qtd_t*) align32(p_qhd->qtd_overlay.next.address);
ehci_qtd_t* p_qtd = (ehci_qtd_t*) tu_align32(p_qhd->qtd_overlay.next.address);
p_qtd->active = 0;
p_qtd->halted = halted ? 1 : 0;
p_qtd->xact_err = xact_err ? 1 : 0;
@@ -172,7 +172,7 @@ void complete_list_with_error(uint8_t hostid, bool halted, bool xact_err)
do
{
complete_1st_qtd_with_error(p_qhd, halted, xact_err);
p_qhd = (ehci_qhd_t*) align32(p_qhd->next.address);
p_qhd = (ehci_qhd_t*) tu_align32(p_qhd->next.address);
}while(p_qhd != get_async_head(hostid)); // stop if loop around
//------------- Period List -------------//
@@ -183,7 +183,7 @@ void complete_list_with_error(uint8_t hostid, bool halted, bool xact_err)
while(!head->terminate)
{
uint32_t queue_type = head->type;
head = (ehci_link_t*) align32(head->address);
head = (ehci_link_t*) tu_align32(head->address);
if ( queue_type == EHCI_QUEUE_ELEMENT_QHD)
{
+3 -3
View File
@@ -70,7 +70,7 @@
#define TEST_ASSERT_STATUS( actual )\
TEST_ASSERT_EQUAL( TUSB_ERROR_NONE, (actual) )
// log2_of a value is equivalent to its highest set bit's position
// tu_log2 a value is equivalent to its highest set bit's position
#define BITFIELD_OFFSET_OF_MEMBER(struct_type, member, bitfield_member) \
({\
uint32_t value=0;\
@@ -78,7 +78,7 @@
memclr_((void*)&str, sizeof(struct_type));\
str.member.bitfield_member = 1;\
memcpy(&value, (void*)&str.member, sizeof(str.member));\
log2_of( value );\
tu_log2( value );\
})
#define BITFIELD_OFFSET_OF_UINT32(struct_type, offset, bitfield_member) \
@@ -86,7 +86,7 @@
struct_type str;\
memclr_(&str, sizeof(struct_type));\
str.bitfield_member = 1;\
log2_of( ((uint32_t*) &str)[offset] );\
tu_log2( ((uint32_t*) &str)[offset] );\
})
#ifdef __cplusplus