clean up helper func
This commit is contained in:
@@ -61,8 +61,8 @@ extern usbh_device_info_t usbh_devices[CFG_TUSB_HOST_DEVICE_MAX+1];
|
||||
//--------------------------------------------------------------------+
|
||||
void ehci_controller_init(void)
|
||||
{
|
||||
memclr_(&lpc_usb0, sizeof(LPC_USB0_Type));
|
||||
memclr_(&lpc_usb1, sizeof(LPC_USB1_Type));
|
||||
tu_memclr(&lpc_usb0, sizeof(LPC_USB0_Type));
|
||||
tu_memclr(&lpc_usb1, sizeof(LPC_USB1_Type));
|
||||
}
|
||||
|
||||
void ehci_controller_control_xfer_proceed(uint8_t dev_addr, uint8_t p_data[])
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
({\
|
||||
uint32_t value=0;\
|
||||
struct_type str;\
|
||||
memclr_((void*)&str, sizeof(struct_type));\
|
||||
tu_memclr((void*)&str, sizeof(struct_type));\
|
||||
str.member.bitfield_member = 1;\
|
||||
memcpy(&value, (void*)&str.member, sizeof(str.member));\
|
||||
tu_log2( value );\
|
||||
@@ -84,7 +84,7 @@
|
||||
#define BITFIELD_OFFSET_OF_UINT32(struct_type, offset, bitfield_member) \
|
||||
({\
|
||||
struct_type str;\
|
||||
memclr_(&str, sizeof(struct_type));\
|
||||
tu_memclr(&str, sizeof(struct_type));\
|
||||
str.bitfield_member = 1;\
|
||||
tu_log2( ((uint32_t*) &str)[offset] );\
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user