Skip to content

Commit 819e060

Browse files
sdk-ng: usb: update mcux usb host controller driver to support zephyr
- add one porting file to use SDK usb host driver files in Zephyr - EHCI, KHCI, OHCI and IP3516HS driver include Zephyr USB port file if it is Zephyr environment - Fix the KHCI driver bus reset issue - update patch list Signed-off-by: Mark Wang <yichang.wang@nxp.com>
1 parent 6b11d19 commit 819e060

File tree

6 files changed

+438
-35
lines changed

6 files changed

+438
-35
lines changed

mcux/README

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,3 +192,9 @@ Patch List:
192192
- mcux-sdk-middleware-ieee_802.15.4: adapt code to be supported with Zephyr
193193
- mcux-sdk-middleware-usb: Disable the control endpoint ZLT (Zero Length Transaction) of MCUX hal USB controller drivers
194194
(usb_device_ehci.c and usb_device_lpcip3511.c) in Zephyr environment.
195+
- Add usb_host_mcux_drv_port.h file for using MCUX SDK USB host controller driver easily in Zephyr.
196+
- usb_host_mcux_drv_port.h contains the simplified structs, enums and APIs that MCUX SDK USB host controller drivers need.
197+
- Update usb_host_ehci.c, usb_host_khci.c, usb_host_ohci.c and usb_host_ip3516hs.c if in Zephyr environment.
198+
- Add include of usb_host_mcux_drv_port.h.
199+
- Remove include of usb_host.h, usb_host_hci.h, usb_host_devices.h and usb_host_framework.h.
200+
- Update usb_host_ehci.c and usb_host_ip3516hs.c to not depend on usb_host_device_instance_t struct.

mcux/mcux-sdk-ng/middleware/usb/host/usb_host_ehci.c

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@
77
*/
88
#include "usb_host_config.h"
99
#if ((defined USB_HOST_CONFIG_EHCI) && (USB_HOST_CONFIG_EHCI > 0U))
10+
/* CONFIG_UHC_DRIVER is for Zephyr, it will not be defined in NXP MCUXpresso SDK */
11+
#if (defined CONFIG_UHC_DRIVER)
12+
#include "usb_host_mcux_drv_port.h"
13+
#include "fsl_device_registers.h"
14+
#include "usb_host_ehci.h"
15+
#if ((defined FSL_FEATURE_SOC_USBPHY_COUNT) && (FSL_FEATURE_SOC_USBPHY_COUNT))
16+
#include "usb_phy.h"
17+
#endif
18+
#else
1019
#include "usb_host.h"
1120
#include "usb_host_hci.h"
1221
#include "usb_host_devices.h"
@@ -21,6 +30,7 @@
2130
#if ((defined USB_HOST_CONFIG_COMPLIANCE_TEST) && (USB_HOST_CONFIG_COMPLIANCE_TEST))
2231
#include "usb_host.h"
2332
#endif
33+
#endif
2434
#if (defined(FSL_FEATURE_MEMORY_HAS_ADDRESS_OFFSET) && (FSL_FEATURE_MEMORY_HAS_ADDRESS_OFFSET > 0U))
2535
#include "fsl_memory.h"
2636
#endif
@@ -3851,6 +3861,7 @@ static usb_status_t USB_HostEhciControlBus(usb_host_ehci_instance_t *ehciInstanc
38513861
case kUSB_HostBusL1Sleep:
38523862
if (0U != (ehciInstance->ehciIpBase->PORTSC1 & USBHS_PORTSC1_CCS_MASK))
38533863
{
3864+
uint32_t info_val;
38543865
volatile uint32_t lpm_count = 200000U;
38553866
OSA_SR_ALLOC();
38563867
/* set timer1 */
@@ -3876,11 +3887,9 @@ static usb_status_t USB_HostEhciControlBus(usb_host_ehci_instance_t *ehciInstanc
38763887
((uint32_t)ehciInstance->hirdValue << USBNC_LPM_CSR2_LPM_HST_BESL_SHIFT) |
38773888
((uint32_t)ehciInstance->L1remoteWakeupEnable << USBNC_LPM_CSR2_LPM_HST_RWKEN_SHIFT));
38783889
ehciInstance->registerNcBase->LPM_CSR2 = portScRegister;
3879-
3880-
usb_host_device_instance_t *deviceInstance;
38813890

38823891
ehciInstance->busSuspendStatus = kBus_EhciL1StartSleep;
3883-
deviceInstance = (usb_host_device_instance_t *)hostPointer->suspendedDevice;
3892+
USB_HostHelperGetPeripheralInformation(hostPointer->suspendedDevice, kUSB_HostGetDeviceAddress, &info_val);
38843893
OSA_ENTER_CRITICAL();
38853894
/* Workaroud for ERR052428: begin */
38863895
ehciInstance->ehciIpBase->USBSTS |= USB_USBSTS_SRI_MASK;
@@ -3890,7 +3899,7 @@ static usb_status_t USB_HostEhciControlBus(usb_host_ehci_instance_t *ehciInstanc
38903899
lpm_count--;
38913900
}
38923901
ehciInstance->registerNcBase->LPM_CSR2 |= ((uint32_t)USBNC_LPM_CSR2_LPM_HST_SEND_MASK |
3893-
(((uint32_t)deviceInstance->setAddress << USBNC_LPM_CSR2_LPM_HST_DEVADD_SHIFT) &
3902+
(((uint32_t)info_val << USBNC_LPM_CSR2_LPM_HST_DEVADD_SHIFT) &
38943903
(uint32_t)USBNC_LPM_CSR2_LPM_HST_DEVADD_MASK));
38953904
/* Workaroud for ERR052428: end */
38963905
OSA_EXIT_CRITICAL();

mcux/mcux-sdk-ng/middleware/usb/host/usb_host_ip3516hs.c

Lines changed: 37 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,17 @@
88

99
#include "usb_host_config.h"
1010
#if (defined(USB_HOST_CONFIG_IP3516HS) && (USB_HOST_CONFIG_IP3516HS > 0U))
11+
#if (defined CONFIG_UHC_DRIVER)
12+
#include "usb_host_mcux_drv_port.h"
13+
#include "fsl_device_registers.h"
14+
#include "usb_host_ip3516hs.h"
15+
#else
1116
#include "usb_host.h"
1217
#include "usb_host_hci.h"
1318
#include "fsl_device_registers.h"
1419
#include "usb_host_ip3516hs.h"
1520
#include "usb_host_devices.h"
21+
#endif
1622
#if ((defined FSL_FEATURE_SOC_USBPHY_COUNT) && (FSL_FEATURE_SOC_USBPHY_COUNT > 0U))
1723
#include "usb_phy.h"
1824
#endif
@@ -352,6 +358,15 @@ static void USB_HostIp3516HsDelay(usb_host_ip3516hs_state_struct_t *usbHostState
352358
(USB_HOST_IP3516HS_FLADJ_FRINDEX_MASK >> USB_HOST_IP3516HS_FLADJ_FRINDEX_SHIFT));
353359
} while ((distance) < (ms)); /* compute the distance between sofStart and SofEnd */
354360
}
361+
362+
static uint8_t USB_HostIp3516HsGetDeviceInfo(usb_device_handle deviceHandle, uint32_t infoCode)
363+
{
364+
uint32_t info_val = 0U;
365+
366+
USB_HostHelperGetPeripheralInformation(deviceHandle, (uint32_t)infoCode, &info_val);
367+
return (uint8_t)info_val;
368+
}
369+
355370
/*seperate bus control to standlone alone function for misra Rule17.2*/
356371
static usb_status_t USB_HostIp3516HsControlBusReset(usb_host_ip3516hs_state_struct_t *usbHostState)
357372
{
@@ -471,14 +486,11 @@ static usb_status_t USB_HostIp3516HsControlBus(usb_host_ip3516hs_state_struct_t
471486
((uint32_t)usbHostState->L1remoteWakeupEnable << USB_HOST_IP3516HS_USBCMD_LPM_RWU_SHIFT));
472487
usbHostState->usbRegBase->USBCMD = portStatus;
473488

474-
usb_host_device_instance_t *deviceInstance;
475-
476489
usbHostState->busSuspendStatus = (uint8_t)kBus_Ip3516HsL1StartSleep;
477490

478-
deviceInstance = (usb_host_device_instance_t *)hostPointer->suspendedDevice;
479491
usbHostState->usbRegBase->PORTSC1 |= (uint32_t)(
480492
(uint32_t)USB_HOST_IP3516HS_PORTSC1_SUSP_MASK | (uint32_t)USB_HOST_IP3516HS_PORTSC1_SUS_L1_MASK |
481-
(((uint32_t)deviceInstance->setAddress << USB_HOST_IP3516HS_PORTSC1_DEV_ADD_SHIFT) &
493+
(((uint32_t)USB_HostIp3516HsGetDeviceInfo(hostPointer->suspendedDevice, kUSB_HostGetDeviceAddress) << USB_HOST_IP3516HS_PORTSC1_DEV_ADD_SHIFT) &
482494
(uint32_t)USB_HOST_IP3516HS_PORTSC1_DEV_ADD_MASK));
483495
#if (defined(FSL_FEATURE_USBHSH_VERSION) && (FSL_FEATURE_USBHSH_VERSION >= 300U))
484496
#else
@@ -1126,7 +1138,7 @@ static usb_status_t USB_HostIp3516HsFindStartFrame(usb_host_ip3516hs_state_struc
11261138
uint32_t total = 0U;
11271139
void *temp;
11281140
uint8_t slotTime[8];
1129-
uint8_t speed = ((usb_host_device_instance_t *)pipe->pipeCommon.deviceHandle)->speed;
1141+
uint8_t speed = USB_HostIp3516HsGetDeviceInfo(pipe->pipeCommon.deviceHandle, kUSB_HostGetDeviceSpeed);
11301142

11311143
pipe->startUFrame = 0U;
11321144

@@ -1280,7 +1292,7 @@ static usb_status_t USB_HostIp3516BaudWidthCheck(usb_host_ip3516hs_state_struct_
12801292
usb_host_ip3516hs_pipe_struct_t *pipe)
12811293
{
12821294
usb_status_t error;
1283-
uint8_t speed = ((usb_host_device_instance_t *)pipe->pipeCommon.deviceHandle)->speed;
1295+
uint8_t speed = USB_HostIp3516HsGetDeviceInfo(pipe->pipeCommon.deviceHandle, kUSB_HostGetDeviceSpeed);
12841296
OSA_SR_ALLOC();
12851297

12861298
pipe->busHsTime = (uint16_t)USB_HostIp3516HsBusTime(
@@ -1334,11 +1346,11 @@ static usb_status_t USB_HostIp3516HsOpenControlBulkPipe(usb_host_ip3516hs_state_
13341346
atl->control1Union.stateBitField.Mult = pipe->pipeCommon.numberPerUframe;
13351347
atl->control2Union.stateBitField.EP = pipe->pipeCommon.endpointAddress;
13361348
atl->control2Union.stateBitField.DeviceAddress =
1337-
((usb_host_device_instance_t *)pipe->pipeCommon.deviceHandle)->setAddress;
1349+
USB_HostIp3516HsGetDeviceInfo(pipe->pipeCommon.deviceHandle, kUSB_HostGetDeviceAddress);
13381350
if (USB_SPEED_HIGH == usbHostState->portState[0].portSpeed)
13391351
{
13401352
atl->control2Union.stateBitField.S =
1341-
(USB_SPEED_HIGH == ((usb_host_device_instance_t *)pipe->pipeCommon.deviceHandle)->speed) ? 0U : 1U;
1353+
(USB_SPEED_HIGH == USB_HostIp3516HsGetDeviceInfo(pipe->pipeCommon.deviceHandle, kUSB_HostGetDeviceSpeed)) ? 0U : 1U;
13421354
}
13431355
else
13441356
{
@@ -1347,16 +1359,16 @@ static usb_status_t USB_HostIp3516HsOpenControlBulkPipe(usb_host_ip3516hs_state_
13471359
atl->control2Union.stateBitField.RL = 0xFU;
13481360
atl->stateUnion.stateBitField.NakCnt = 0xFU;
13491361
atl->control2Union.stateBitField.SE =
1350-
(USB_SPEED_LOW == ((usb_host_device_instance_t *)pipe->pipeCommon.deviceHandle)->speed) ? 2U : 0U;
1362+
(USB_SPEED_LOW == USB_HostIp3516HsGetDeviceInfo(pipe->pipeCommon.deviceHandle, kUSB_HostGetDeviceSpeed)) ? 2U : 0U;
13511363
atl->control2Union.stateBitField.PortNumber =
13521364
#if (defined(USB_HOST_CONFIG_HUB) && (USB_HOST_CONFIG_HUB > 0U))
1353-
((usb_host_device_instance_t *)pipe->pipeCommon.deviceHandle)->hsHubPort;
1365+
USB_HostIp3516HsGetDeviceInfo(pipe->pipeCommon.deviceHandle, kUSB_HostGetDeviceHSHubPort);
13541366
#else
13551367
0U;
13561368
#endif
13571369
atl->control2Union.stateBitField.HubAddress =
13581370
#if (defined(USB_HOST_CONFIG_HUB) && (USB_HOST_CONFIG_HUB > 0U))
1359-
((usb_host_device_instance_t *)pipe->pipeCommon.deviceHandle)->hsHubNumber;
1371+
USB_HostIp3516HsGetDeviceInfo(pipe->pipeCommon.deviceHandle, kUSB_HostGetDeviceHSHubNumber);
13601372
#else
13611373
0U;
13621374
#endif
@@ -1433,11 +1445,11 @@ static usb_status_t USB_HostIp3516HsOpenIsoPipe(usb_host_ip3516hs_state_struct_t
14331445
ptl->control1Union.stateBitField.Mult = pipe->pipeCommon.numberPerUframe;
14341446
ptl->control2Union.stateBitField.EP = pipe->pipeCommon.endpointAddress;
14351447
ptl->control2Union.stateBitField.DeviceAddress =
1436-
((usb_host_device_instance_t *)pipe->pipeCommon.deviceHandle)->setAddress;
1448+
USB_HostIp3516HsGetDeviceInfo(pipe->pipeCommon.deviceHandle, kUSB_HostGetDeviceAddress);
14371449
if (USB_SPEED_HIGH == usbHostState->portState[0].portSpeed)
14381450
{
14391451
ptl->control2Union.stateBitField.S =
1440-
(USB_SPEED_HIGH == ((usb_host_device_instance_t *)pipe->pipeCommon.deviceHandle)->speed) ? 0U : 1U;
1452+
(USB_SPEED_HIGH == USB_HostIp3516HsGetDeviceInfo(pipe->pipeCommon.deviceHandle, kUSB_HostGetDeviceSpeed)) ? 0U : 1U;
14411453
}
14421454
else
14431455
{
@@ -1446,18 +1458,18 @@ static usb_status_t USB_HostIp3516HsOpenIsoPipe(usb_host_ip3516hs_state_struct_t
14461458
ptl->control2Union.stateBitField.RL = 0U;
14471459
ptl->stateUnion.stateBitField.NakCnt = 0U;
14481460
ptl->control2Union.stateBitField.SE =
1449-
(USB_SPEED_LOW == ((usb_host_device_instance_t *)pipe->pipeCommon.deviceHandle)->speed) ? 2U : 0U;
1461+
(USB_SPEED_LOW == USB_HostIp3516HsGetDeviceInfo(pipe->pipeCommon.deviceHandle, kUSB_HostGetDeviceSpeed)) ? 2U : 0U;
14501462
if (0U != ptl->control2Union.stateBitField.S)
14511463
{
14521464
sptl->control2Union.stateBitField.PortNumber =
14531465
#if (defined(USB_HOST_CONFIG_HUB) && (USB_HOST_CONFIG_HUB > 0U))
1454-
((usb_host_device_instance_t *)pipe->pipeCommon.deviceHandle)->hsHubPort;
1466+
USB_HostIp3516HsGetDeviceInfo(pipe->pipeCommon.deviceHandle, kUSB_HostGetDeviceHSHubPort);
14551467
#else
14561468
0U;
14571469
#endif
14581470
sptl->control2Union.stateBitField.HubAddress =
14591471
#if (defined(USB_HOST_CONFIG_HUB) && (USB_HOST_CONFIG_HUB > 0U))
1460-
((usb_host_device_instance_t *)pipe->pipeCommon.deviceHandle)->hsHubNumber;
1472+
USB_HostIp3516HsGetDeviceInfo(pipe->pipeCommon.deviceHandle, kUSB_HostGetDeviceHSHubNumber);
14611473
#else
14621474
0U;
14631475
#endif
@@ -1523,11 +1535,11 @@ static usb_status_t USB_HostIp3516HsOpenInterruptPipe(usb_host_ip3516hs_state_st
15231535
ptl->control1Union.stateBitField.Mult = pipe->pipeCommon.numberPerUframe;
15241536
ptl->control2Union.stateBitField.EP = pipe->pipeCommon.endpointAddress;
15251537
ptl->control2Union.stateBitField.DeviceAddress =
1526-
((usb_host_device_instance_t *)pipe->pipeCommon.deviceHandle)->setAddress;
1538+
USB_HostIp3516HsGetDeviceInfo(pipe->pipeCommon.deviceHandle, kUSB_HostGetDeviceAddress);
15271539
if (USB_SPEED_HIGH == usbHostState->portState[0].portSpeed)
15281540
{
15291541
ptl->control2Union.stateBitField.S =
1530-
(USB_SPEED_HIGH == ((usb_host_device_instance_t *)pipe->pipeCommon.deviceHandle)->speed) ? 0U : 1U;
1542+
(USB_SPEED_HIGH == USB_HostIp3516HsGetDeviceInfo(pipe->pipeCommon.deviceHandle, kUSB_HostGetDeviceSpeed)) ? 0U : 1U;
15311543
}
15321544
else
15331545
{
@@ -1536,18 +1548,18 @@ static usb_status_t USB_HostIp3516HsOpenInterruptPipe(usb_host_ip3516hs_state_st
15361548
ptl->control2Union.stateBitField.RL = 0xFU;
15371549
ptl->stateUnion.stateBitField.NakCnt = 0xFU;
15381550
ptl->control2Union.stateBitField.SE =
1539-
(USB_SPEED_LOW == ((usb_host_device_instance_t *)pipe->pipeCommon.deviceHandle)->speed) ? 2U : 0U;
1551+
(USB_SPEED_LOW == USB_HostIp3516HsGetDeviceInfo(pipe->pipeCommon.deviceHandle, kUSB_HostGetDeviceSpeed)) ? 2U : 0U;
15401552
if (0U != ptl->control2Union.stateBitField.S)
15411553
{
15421554
sptl->control2Union.stateBitField.PortNumber =
15431555
#if (defined(USB_HOST_CONFIG_HUB) && (USB_HOST_CONFIG_HUB > 0U))
1544-
((usb_host_device_instance_t *)pipe->pipeCommon.deviceHandle)->hsHubPort;
1556+
USB_HostIp3516HsGetDeviceInfo(pipe->pipeCommon.deviceHandle, kUSB_HostGetDeviceHSHubPort);
15451557
#else
15461558
0U;
15471559
#endif
15481560
sptl->control2Union.stateBitField.HubAddress =
15491561
#if (defined(USB_HOST_CONFIG_HUB) && (USB_HOST_CONFIG_HUB > 0U))
1550-
((usb_host_device_instance_t *)pipe->pipeCommon.deviceHandle)->hsHubNumber;
1562+
USB_HostIp3516HsGetDeviceInfo(pipe->pipeCommon.deviceHandle, kUSB_HostGetDeviceHSHubNumber);
15511563
#else
15521564
0U;
15531565
#endif
@@ -2221,7 +2233,7 @@ static usb_status_t USB_HostIp3516HsWriteIsoPipe(usb_host_ip3516hs_state_struct_
22212233
indexLength_t indexLength;
22222234
uint8_t *bufferAddress;
22232235
void *temp;
2224-
uint8_t speed = ((usb_host_device_instance_t *)pipe->pipeCommon.deviceHandle)->speed;
2236+
uint8_t speed = USB_HostIp3516HsGetDeviceInfo(pipe->pipeCommon.deviceHandle, kUSB_HostGetDeviceSpeed);
22252237
OSA_SR_ALLOC();
22262238

22272239
OSA_ENTER_CRITICAL();
@@ -2425,7 +2437,7 @@ static usb_status_t USB_HostIp3516HsWriteInterruptPipe(usb_host_ip3516hs_state_s
24252437
uint32_t insertUFrame;
24262438
uint8_t *bufferAddress;
24272439
void *temp;
2428-
uint8_t speed = ((usb_host_device_instance_t *)pipe->pipeCommon.deviceHandle)->speed;
2440+
uint8_t speed = USB_HostIp3516HsGetDeviceInfo(pipe->pipeCommon.deviceHandle, kUSB_HostGetDeviceSpeed);
24292441
temp = (void *)ptl;
24302442
sptl = (usb_host_ip3516hs_sptl_struct_t *)temp;
24312443
OSA_SR_ALLOC();
@@ -3586,7 +3598,7 @@ usb_status_t USB_HostIp3516HsOpenPipe(usb_host_controller_handle controllerHandl
35863598
}
35873599
else if (USB_ENDPOINT_INTERRUPT == pipe->pipeCommon.pipeType)
35883600
{
3589-
if (USB_SPEED_HIGH != ((usb_host_device_instance_t *)pipe->pipeCommon.deviceHandle)->speed)
3601+
if (USB_SPEED_HIGH != USB_HostIp3516HsGetDeviceInfo(pipe->pipeCommon.deviceHandle, kUSB_HostGetDeviceSpeed))
35903602
{
35913603
uint32_t interval = 0U;
35923604
/* FS/LS interrupt interval should be the power of 2, it is used for ip3516hs bandwidth */
@@ -3613,7 +3625,7 @@ usb_status_t USB_HostIp3516HsOpenPipe(usb_host_controller_handle controllerHandl
36133625
pipe->pipeCommon.interval = 0U;
36143626
}
36153627

3616-
if (USB_SPEED_HIGH != ((usb_host_device_instance_t *)pipe->pipeCommon.deviceHandle)->speed)
3628+
if (USB_SPEED_HIGH != USB_HostIp3516HsGetDeviceInfo(pipe->pipeCommon.deviceHandle, kUSB_HostGetDeviceSpeed))
36173629
{
36183630
pipe->pipeCommon.interval = pipe->pipeCommon.interval << 3;
36193631
}

mcux/mcux-sdk-ng/middleware/usb/host/usb_host_khci.c

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,19 @@
88

99
#include "usb_host_config.h"
1010
#if ((defined USB_HOST_CONFIG_KHCI) && (USB_HOST_CONFIG_KHCI))
11+
/* CONFIG_UHC_DRIVER is for Zephyr, it will not be defined in NXP MCUXpresso SDK */
12+
#if (defined CONFIG_UHC_DRIVER)
13+
#include "usb_host_mcux_drv_port.h"
14+
#include "fsl_device_registers.h"
15+
#include "usb_host_khci.h"
16+
#else
1117
#include "usb_host.h"
1218
#include "usb_host_hci.h"
1319
#include "fsl_device_registers.h"
1420
#include "usb_host_khci.h"
1521
#include "usb_host_devices.h"
1622
#include "usb_host_framework.h"
23+
#endif
1724
/*******************************************************************************
1825
* Variables
1926
******************************************************************************/
@@ -1723,11 +1730,11 @@ usb_status_t USB_HostKhciOpenPipe(usb_host_controller_handle controllerHandle,
17231730
else
17241731
{
17251732
tempPipePointer = usbHostPointer->pipeDescriptorBasePointer;
1726-
while (NULL != tempPipePointer)
1733+
do
17271734
{
17281735
prePipePointer = tempPipePointer;
17291736
tempPipePointer = tempPipePointer->next;
1730-
}
1737+
} while (NULL != tempPipePointer);
17311738
prePipePointer->next = pipePointer;
17321739
}
17331740
pipePointer->next = NULL;
@@ -2012,7 +2019,11 @@ static usb_status_t _USB_HostKhciBusControl(usb_host_controller_handle handle, u
20122019
_USB_HostKhciDelay(usbHostPointer, 30U);
20132020
usbHostPointer->usbRegBase->CTL &= (uint8_t)(~USB_CTL_RESET_MASK);
20142021
usbHostPointer->usbRegBase->CTL |= USB_CTL_ODDRST_MASK;
2022+
#if (defined CONFIG_UHC_DRIVER)
2023+
usbHostPointer->usbRegBase->CTL = USB_CTL_HOSTMODEEN_MASK | USB_CTL_USBENSOFEN_MASK;
2024+
#else
20152025
usbHostPointer->usbRegBase->CTL = USB_CTL_HOSTMODEEN_MASK;
2026+
#endif
20162027

20172028
usbHostPointer->txBd = 0U;
20182029
usbHostPointer->rxBd = 0U;

0 commit comments

Comments
 (0)