浏览代码

format imxrt drver files

Meco Man 2 年之前
父节点
当前提交
b9a9225c84

+ 2 - 2
bsp/imxrt/libraries/drivers/drv_flexspi.c

@@ -80,7 +80,7 @@ static int rt_hw_imxrt_flexspi_init(void)
     config.ahbConfig.enableAHBBufferable = true;
     config.ahbConfig.enableAHBBufferable = true;
     config.ahbConfig.enableReadAddressOpt = true;
     config.ahbConfig.enableReadAddressOpt = true;
     config.ahbConfig.enableAHBCachable = true;
     config.ahbConfig.enableAHBCachable = true;
-    config.ahbConfig.enableClearAHBBufferOpt	= true;
+    config.ahbConfig.enableClearAHBBufferOpt    = true;
     config.rxSampleClock = FLEXSPI_RX_SAMPLE_CLOCK;
     config.rxSampleClock = FLEXSPI_RX_SAMPLE_CLOCK;
     if(COMBINATION_MODE)
     if(COMBINATION_MODE)
     {
     {
@@ -125,7 +125,7 @@ static void flexspi_test(void)
     LOG_D("FLEXSPI Memory 32 bit Write End\n");
     LOG_D("FLEXSPI Memory 32 bit Write End\n");
 
 
     memset(recv_buf, 0, sizeof(recv_buf));
     memset(recv_buf, 0, sizeof(recv_buf));
-    
+
     LOG_D("FLEXSPI Memory 32 bit Read Start\n");
     LOG_D("FLEXSPI Memory 32 bit Read Start\n");
     recv_buf[2] = *(flexspi + 11);
     recv_buf[2] = *(flexspi + 11);
     recv_buf[3] = *(flexspi + 15);
     recv_buf[3] = *(flexspi + 15);

+ 8 - 16
bsp/imxrt/libraries/drivers/drv_rtc.c

@@ -33,7 +33,7 @@ static time_t imxrt_hp_get_timestamp(void)
     snvs_lp_srtc_datetime_t srtcDate = {0};
     snvs_lp_srtc_datetime_t srtcDate = {0};
 
 
     SNVS_LP_SRTC_GetDatetime(SNVS, &srtcDate);
     SNVS_LP_SRTC_GetDatetime(SNVS, &srtcDate);
-    SNVS_HP_RTC_TimeSynchronize(SNVS); 
+    SNVS_HP_RTC_TimeSynchronize(SNVS);
     SNVS_HP_RTC_GetDatetime(SNVS, &rtcDate);
     SNVS_HP_RTC_GetDatetime(SNVS, &rtcDate);
 
 
     tm_new.tm_sec  = rtcDate.second;
     tm_new.tm_sec  = rtcDate.second;
@@ -69,7 +69,7 @@ static int imxrt_hp_set_timestamp(time_t timestamp)
         return -RT_ERROR;
         return -RT_ERROR;
     }
     }
 
 
-    SNVS_HP_RTC_TimeSynchronize(SNVS); 
+    SNVS_HP_RTC_TimeSynchronize(SNVS);
 
 
     return RT_EOK;
     return RT_EOK;
 }
 }
@@ -77,7 +77,7 @@ static int imxrt_hp_set_timestamp(time_t timestamp)
 static rt_err_t imxrt_hp_rtc_init(rt_device_t dev)
 static rt_err_t imxrt_hp_rtc_init(rt_device_t dev)
 {
 {
     snvs_hp_rtc_config_t snvsRtcConfig;
     snvs_hp_rtc_config_t snvsRtcConfig;
-    snvs_lp_srtc_config_t snvsSrtcConfig;    
+    snvs_lp_srtc_config_t snvsSrtcConfig;
 
 
     /* Init SNVS_HP */
     /* Init SNVS_HP */
     SNVS_HP_RTC_GetDefaultConfig(&snvsRtcConfig);
     SNVS_HP_RTC_GetDefaultConfig(&snvsRtcConfig);
@@ -105,12 +105,12 @@ static rt_err_t imxrt_hp_rtc_close(rt_device_t dev)
 
 
 static rt_size_t imxrt_hp_rtc_read(rt_device_t dev, rt_off_t pos, void* buffer, rt_size_t size)
 static rt_size_t imxrt_hp_rtc_read(rt_device_t dev, rt_off_t pos, void* buffer, rt_size_t size)
 {
 {
-    return RT_EOK;
+    return -RT_EINVAL;
 }
 }
 
 
 static rt_size_t imxrt_hp_rtc_write(rt_device_t dev, rt_off_t pos, const void* buffer, rt_size_t size)
 static rt_size_t imxrt_hp_rtc_write(rt_device_t dev, rt_off_t pos, const void* buffer, rt_size_t size)
 {
 {
-    return RT_EOK;
+    return -RT_EINVAL;
 }
 }
 
 
 static rt_err_t imxrt_hp_rtc_control(rt_device_t dev, int cmd, void *args)
 static rt_err_t imxrt_hp_rtc_control(rt_device_t dev, int cmd, void *args)
@@ -132,7 +132,7 @@ static rt_err_t imxrt_hp_rtc_control(rt_device_t dev, int cmd, void *args)
     break;
     break;
 
 
     default:
     default:
-        return RT_EINVAL;
+        return -RT_EINVAL;
     }
     }
 
 
     return RT_EOK;
     return RT_EOK;
@@ -179,7 +179,6 @@ static int rtc_sample(int argc, char *argv[])
     time_t now;
     time_t now;
     rt_device_t device = RT_NULL;
     rt_device_t device = RT_NULL;
 
 
-    /*寻找设备*/
     device = rt_device_find(RTC_NAME);
     device = rt_device_find(RTC_NAME);
     if (!device)
     if (!device)
     {
     {
@@ -187,14 +186,12 @@ static int rtc_sample(int argc, char *argv[])
       return RT_ERROR;
       return RT_ERROR;
     }
     }
 
 
-    /*初始化RTC设备*/
     if(rt_device_open(device, 0) != RT_EOK)
     if(rt_device_open(device, 0) != RT_EOK)
     {
     {
       LOG_E("open %s failed!", RTC_NAME);
       LOG_E("open %s failed!", RTC_NAME);
-      return RT_ERROR;
+      return -RT_ERROR;
     }
     }
 
 
-    /* 设置日期 */
     ret = set_date(2018, 12, 3);
     ret = set_date(2018, 12, 3);
     if (ret != RT_EOK)
     if (ret != RT_EOK)
     {
     {
@@ -202,7 +199,6 @@ static int rtc_sample(int argc, char *argv[])
         return ret;
         return ret;
     }
     }
 
 
-    /* 设置时间 */
     ret = set_time(11, 15, 50);
     ret = set_time(11, 15, 50);
     if (ret != RT_EOK)
     if (ret != RT_EOK)
     {
     {
@@ -210,16 +206,12 @@ static int rtc_sample(int argc, char *argv[])
         return ret;
         return ret;
     }
     }
 
 
-    /* 延时3秒 */
-    rt_thread_mdelay(3000);
+    rt_thread_mdelay(1000);
 
 
-    /* 获取时间 */
     now = time(RT_NULL);
     now = time(RT_NULL);
     rt_kprintf("%s\n", ctime(&now));
     rt_kprintf("%s\n", ctime(&now));
 
 
     return ret;
     return ret;
 }
 }
-/* 导出到 msh 命令列表中 */
 MSH_CMD_EXPORT(rtc_sample, rtc sample);
 MSH_CMD_EXPORT(rtc_sample, rtc sample);
-
 #endif /* BSP_USING_RTC */
 #endif /* BSP_USING_RTC */

+ 3 - 3
bsp/imxrt/libraries/drivers/drv_sdio.c

@@ -49,7 +49,7 @@ static int enable_log = 1;
 #define USDHC_DATA_TIMEOUT          (0xFU)      /*!< data timeout counter value */
 #define USDHC_DATA_TIMEOUT          (0xFU)      /*!< data timeout counter value */
 #define SDMMCHOST_SUPPORT_MAX_BLOCK_LENGTH     (4096U)
 #define SDMMCHOST_SUPPORT_MAX_BLOCK_LENGTH     (4096U)
 #define SDMMCHOST_SUPPORT_MAX_BLOCK_COUNT      (USDHC_MAX_BLOCK_COUNT)
 #define SDMMCHOST_SUPPORT_MAX_BLOCK_COUNT      (USDHC_MAX_BLOCK_COUNT)
-      
+
 /* Read/write watermark level. The bigger value indicates DMA has higher read/write performance. */
 /* Read/write watermark level. The bigger value indicates DMA has higher read/write performance. */
 #define USDHC_READ_WATERMARK_LEVEL  (0x80U)
 #define USDHC_READ_WATERMARK_LEVEL  (0x80U)
 #define USDHC_WRITE_WATERMARK_LEVEL (0x80U)
 #define USDHC_WRITE_WATERMARK_LEVEL (0x80U)
@@ -404,7 +404,7 @@ rt_int32_t _imxrt_mci_init(void)
     struct rt_mmcsd_host *host;
     struct rt_mmcsd_host *host;
     struct imxrt_mmcsd *mmcsd;
     struct imxrt_mmcsd *mmcsd;
     uint32_t hs400Capability = 0U;
     uint32_t hs400Capability = 0U;
-    
+
     host = mmcsd_alloc_host();
     host = mmcsd_alloc_host();
     if (!host)
     if (!host)
     {
     {
@@ -433,7 +433,7 @@ rt_int32_t _imxrt_mci_init(void)
                   MMCSD_SUP_HIGHSPEED | MMCSD_SUP_SDIO_IRQ;
                   MMCSD_SUP_HIGHSPEED | MMCSD_SUP_SDIO_IRQ;
 #ifdef SOC_IMXRT1170_SERIES
 #ifdef SOC_IMXRT1170_SERIES
 #if defined FSL_FEATURE_USDHC_INSTANCE_SUPPORT_HS400_MODEn
 #if defined FSL_FEATURE_USDHC_INSTANCE_SUPPORT_HS400_MODEn
-    hs400Capability = (uint32_t)FSL_FEATURE_USDHC_INSTANCE_SUPPORT_HS400_MODEn(mmcsd->usdhc_host.base); 
+    hs400Capability = (uint32_t)FSL_FEATURE_USDHC_INSTANCE_SUPPORT_HS400_MODEn(mmcsd->usdhc_host.base);
 #endif
 #endif
 #if (defined(FSL_FEATURE_USDHC_HAS_HS400_MODE) && (FSL_FEATURE_USDHC_HAS_HS400_MODE))
 #if (defined(FSL_FEATURE_USDHC_HAS_HS400_MODE) && (FSL_FEATURE_USDHC_HAS_HS400_MODE))
     if (hs400Capability != 0U)
     if (hs400Capability != 0U)

+ 1 - 1
bsp/imxrt/libraries/drivers/drv_usbh.c

@@ -104,7 +104,7 @@ static void USB_HostClockInit(usb_controller_index_t controller_id)
     usb_phy_config_struct_t phyConfig = {
     usb_phy_config_struct_t phyConfig = {
         BOARD_USB_PHY_D_CAL, BOARD_USB_PHY_TXCAL45DP, BOARD_USB_PHY_TXCAL45DM,
         BOARD_USB_PHY_D_CAL, BOARD_USB_PHY_TXCAL45DP, BOARD_USB_PHY_TXCAL45DM,
     };
     };
-    
+
     usbClockFreq = 24000000;
     usbClockFreq = 24000000;
 
 
     if (controller_id == kUSB_ControllerEhci0)
     if (controller_id == kUSB_ControllerEhci0)

+ 1 - 1
bsp/imxrt/libraries/drivers/usb/host/usb_host.h

@@ -107,7 +107,7 @@ typedef struct _usb_host_process_descriptor_param
                                   device */
                                   device */
 #ifdef SOC_IMXRT1170_SERIES
 #ifdef SOC_IMXRT1170_SERIES
     uint16_t languageId;        /*!< It specifies the language ID for string descriptors or is reset to zero for other
     uint16_t languageId;        /*!< It specifies the language ID for string descriptors or is reset to zero for other
-                                  descriptors */    
+                                  descriptors */
 #else
 #else
     uint8_t languageId;        /*!< It specifies the language ID for string descriptors or is reset to zero for other
     uint8_t languageId;        /*!< It specifies the language ID for string descriptors or is reset to zero for other
                                   descriptors */
                                   descriptors */

+ 16 - 16
bsp/imxrt/libraries/drivers/usb/host/usb_host_ehci.c

@@ -1097,7 +1097,7 @@ static void USB_HostBandwidthHsHostComputeCurrentFsls(usb_host_ehci_instance_t *
     usb_host_ehci_pipe_t *ehciPipePointer;
     usb_host_ehci_pipe_t *ehciPipePointer;
     uint8_t index;
     uint8_t index;
 #ifdef SOC_IMXRT1170_SERIES
 #ifdef SOC_IMXRT1170_SERIES
-    uint32_t deviceInfo = 0;    
+    uint32_t deviceInfo = 0;
 #else
 #else
     uint32_t deviceInfo;
     uint32_t deviceInfo;
 #endif
 #endif
@@ -1173,7 +1173,7 @@ static void USB_HostBandwidthHsHostComputeCurrentHsAll(usb_host_ehci_instance_t
     usb_host_ehci_pipe_t *ehciPipePointer;
     usb_host_ehci_pipe_t *ehciPipePointer;
     uint16_t index;
     uint16_t index;
 #ifdef SOC_IMXRT1170_SERIES
 #ifdef SOC_IMXRT1170_SERIES
-    uint32_t deviceInfo = 0U;    
+    uint32_t deviceInfo = 0U;
 #else
 #else
     uint32_t deviceInfo;
     uint32_t deviceInfo;
 #endif
 #endif
@@ -3451,7 +3451,7 @@ static usb_status_t USB_HostEhciStartIP(usb_host_ehci_instance_t *ehciInstance)
     }
     }
 #ifdef SOC_IMXRT1170_SERIES
 #ifdef SOC_IMXRT1170_SERIES
     /* no interrupt threshold */
     /* no interrupt threshold */
-    ehciInstance->ehciIpBase->USBCMD &= ~USBHS_USBCMD_ITC_MASK;    
+    ehciInstance->ehciIpBase->USBCMD &= ~USBHS_USBCMD_ITC_MASK;
 #endif
 #endif
     /* start the controller */
     /* start the controller */
     ehciInstance->ehciIpBase->USBCMD |= USBHS_USBCMD_RS_MASK;
     ehciInstance->ehciIpBase->USBCMD |= USBHS_USBCMD_RS_MASK;
@@ -3665,7 +3665,7 @@ void USB_HostEhciTransactionDone(usb_host_ehci_instance_t *ehciInstance)
     usb_host_ehci_iso_t *isoPointer;
     usb_host_ehci_iso_t *isoPointer;
     uint32_t dataLength;
     uint32_t dataLength;
 #ifdef SOC_IMXRT1170_SERIES
 #ifdef SOC_IMXRT1170_SERIES
-    uint32_t speed = 0U;    
+    uint32_t speed = 0U;
 #else
 #else
     uint32_t speed;
     uint32_t speed;
 #endif
 #endif
@@ -3794,7 +3794,7 @@ void USB_HostEhciTransactionDone(usb_host_ehci_instance_t *ehciInstance)
                                     /* no action */
                                     /* no action */
                                 }
                                 }
                                 vltQtdPointer = (volatile usb_host_ehci_qtd_t *)vltQtdPointer->nextQtdPointer;
                                 vltQtdPointer = (volatile usb_host_ehci_qtd_t *)vltQtdPointer->nextQtdPointer;
-                            } while (true);                          
+                            } while (true);
 #else
 #else
                             while ((vltQtdPointer != NULL) &&
                             while ((vltQtdPointer != NULL) &&
                                    (0U == (transferResults & EHCI_HOST_QTD_IOC_MASK))) /* find the IOC qtd */
                                    (0U == (transferResults & EHCI_HOST_QTD_IOC_MASK))) /* find the IOC qtd */
@@ -4025,7 +4025,7 @@ void USB_HostEhciPortChange(usb_host_ehci_instance_t *ehciInstance)
 #ifdef SOC_IMXRT1170_SERIES
 #ifdef SOC_IMXRT1170_SERIES
 #if ((defined FSL_FEATURE_SOC_USBPHY_COUNT) && (FSL_FEATURE_SOC_USBPHY_COUNT > 0U))
 #if ((defined FSL_FEATURE_SOC_USBPHY_COUNT) && (FSL_FEATURE_SOC_USBPHY_COUNT > 0U))
             USB_EhcihostPhyDisconnectDetectCmd(ehciInstance->controllerId, 0);
             USB_EhcihostPhyDisconnectDetectCmd(ehciInstance->controllerId, 0);
-#endif            
+#endif
 #else
 #else
             USB_EhcihostPhyDisconnectDetectCmd(ehciInstance->controllerId, 0);
             USB_EhcihostPhyDisconnectDetectCmd(ehciInstance->controllerId, 0);
 #endif
 #endif
@@ -4192,28 +4192,28 @@ static void USB_HostEhciTimer1(usb_host_ehci_instance_t *ehciInstance)
 #if (defined(FSL_FEATURE_USBPHY_28FDSOI) && (FSL_FEATURE_USBPHY_28FDSOI > 0U))
 #if (defined(FSL_FEATURE_USBPHY_28FDSOI) && (FSL_FEATURE_USBPHY_28FDSOI > 0U))
                     ehciInstance->registerPhyBase->USB1_VBUS_DETECT_SET |=
                     ehciInstance->registerPhyBase->USB1_VBUS_DETECT_SET |=
                         USBPHY_USB1_VBUS_DETECT_VBUSVALID_TO_SESSVALID_MASK;
                         USBPHY_USB1_VBUS_DETECT_VBUSVALID_TO_SESSVALID_MASK;
-#endif                    
+#endif
 #endif
 #endif
                     ehciInstance->ehciIpBase->PORTSC1 |= USBHS_PORTSC1_PHCD_MASK;
                     ehciInstance->ehciIpBase->PORTSC1 |= USBHS_PORTSC1_PHCD_MASK;
 
 
 #ifdef SOC_IMXRT1170_SERIES
 #ifdef SOC_IMXRT1170_SERIES
-#if ((defined FSL_FEATURE_SOC_USBPHY_COUNT) && (FSL_FEATURE_SOC_USBPHY_COUNT > 0U))                    
+#if ((defined FSL_FEATURE_SOC_USBPHY_COUNT) && (FSL_FEATURE_SOC_USBPHY_COUNT > 0U))
                     ehciInstance->registerPhyBase->PWD = 0xFFFFFFFFU;
                     ehciInstance->registerPhyBase->PWD = 0xFFFFFFFFU;
 
 
                     while (0U != (ehciInstance->registerPhyBase->CTRL & (USBPHY_CTRL_UTMI_SUSPENDM_MASK)))
                     while (0U != (ehciInstance->registerPhyBase->CTRL & (USBPHY_CTRL_UTMI_SUSPENDM_MASK)))
                     {
                     {
                         __NOP();
                         __NOP();
                     }
                     }
-#endif              
+#endif
 #else
 #else
                     ehciInstance->registerPhyBase->PWD = 0xFFFFFFFFU;
                     ehciInstance->registerPhyBase->PWD = 0xFFFFFFFFU;
 
 
                     while (0U != (ehciInstance->registerPhyBase->CTRL & (USBPHY_CTRL_UTMI_SUSPENDM_MASK)))
                     while (0U != (ehciInstance->registerPhyBase->CTRL & (USBPHY_CTRL_UTMI_SUSPENDM_MASK)))
                     {
                     {
                         __NOP();
                         __NOP();
-                    }                    
+                    }
 #endif
 #endif
-                    
+
 #if (defined(FSL_FEATURE_SOC_USBNC_COUNT) && (FSL_FEATURE_SOC_USBNC_COUNT > 0U))
 #if (defined(FSL_FEATURE_SOC_USBNC_COUNT) && (FSL_FEATURE_SOC_USBNC_COUNT > 0U))
                     ehciInstance->registerNcBase->USB_OTGn_CTRL |= USBNC_USB_OTGn_CTRL_WKUP_ID_EN_MASK |
                     ehciInstance->registerNcBase->USB_OTGn_CTRL |= USBNC_USB_OTGn_CTRL_WKUP_ID_EN_MASK |
                                                                    USBNC_USB_OTGn_CTRL_WKUP_VBUS_EN_MASK |
                                                                    USBNC_USB_OTGn_CTRL_WKUP_VBUS_EN_MASK |
@@ -4224,7 +4224,7 @@ static void USB_HostEhciTimer1(usb_host_ehci_instance_t *ehciInstance)
 #if (defined(FSL_FEATURE_USB_ATLANTIC_EHCI_SUPPORT) && (FSL_FEATURE_USB_ATLANTIC_EHCI_SUPPORT > 0U))
 #if (defined(FSL_FEATURE_USB_ATLANTIC_EHCI_SUPPORT) && (FSL_FEATURE_USB_ATLANTIC_EHCI_SUPPORT > 0U))
 #else
 #else
                     ehciInstance->ehciIpBase->USBGENCTRL = USBHS_USBGENCTRL_WU_IE_MASK;
                     ehciInstance->ehciIpBase->USBGENCTRL = USBHS_USBGENCTRL_WU_IE_MASK;
-#endif                    
+#endif
 #else
 #else
                     ehciInstance->ehciIpBase->USBGENCTRL = USBHS_USBGENCTRL_WU_IE_MASK;
                     ehciInstance->ehciIpBase->USBGENCTRL = USBHS_USBGENCTRL_WU_IE_MASK;
 #endif
 #endif
@@ -4232,7 +4232,7 @@ static void USB_HostEhciTimer1(usb_host_ehci_instance_t *ehciInstance)
 #ifdef
 #ifdef
 #if ((defined FSL_FEATURE_SOC_USBPHY_COUNT) && (FSL_FEATURE_SOC_USBPHY_COUNT > 0U))
 #if ((defined FSL_FEATURE_SOC_USBPHY_COUNT) && (FSL_FEATURE_SOC_USBPHY_COUNT > 0U))
                     ehciInstance->registerPhyBase->CTRL |= USBPHY_CTRL_CLKGATE_MASK;
                     ehciInstance->registerPhyBase->CTRL |= USBPHY_CTRL_CLKGATE_MASK;
-#endif                    
+#endif
 #else
 #else
                     ehciInstance->registerPhyBase->CTRL |= USBPHY_CTRL_CLKGATE_MASK;
                     ehciInstance->registerPhyBase->CTRL |= USBPHY_CTRL_CLKGATE_MASK;
 #endif
 #endif
@@ -4309,11 +4309,11 @@ usb_status_t USB_HostEhciCreate(uint8_t controllerId,
 #ifdef SOC_IMXRT1170_SERIES
 #ifdef SOC_IMXRT1170_SERIES
 #if ((defined FSL_FEATURE_SOC_USBPHY_COUNT) && (FSL_FEATURE_SOC_USBPHY_COUNT > 0U))
 #if ((defined FSL_FEATURE_SOC_USBPHY_COUNT) && (FSL_FEATURE_SOC_USBPHY_COUNT > 0U))
     ehciInstance->registerPhyBase = (USBPHY_Type *)USB_EhciPhyGetBase(controllerId);
     ehciInstance->registerPhyBase = (USBPHY_Type *)USB_EhciPhyGetBase(controllerId);
-#endif    
+#endif
 #else
 #else
     ehciInstance->registerPhyBase = (USBPHY_Type *)USB_EhciPhyGetBase(controllerId);
     ehciInstance->registerPhyBase = (USBPHY_Type *)USB_EhciPhyGetBase(controllerId);
 #endif
 #endif
-    
+
 #if (defined(FSL_FEATURE_SOC_USBNC_COUNT) && (FSL_FEATURE_SOC_USBNC_COUNT > 0U))
 #if (defined(FSL_FEATURE_SOC_USBNC_COUNT) && (FSL_FEATURE_SOC_USBNC_COUNT > 0U))
     ehciInstance->registerNcBase = (USBNC_Type *)USB_EhciNCGetBase(controllerId);
     ehciInstance->registerNcBase = (USBNC_Type *)USB_EhciNCGetBase(controllerId);
 #endif
 #endif
@@ -5084,7 +5084,7 @@ void USB_HostEhciIsrFunction(void *hostHandle)
                 ehciInstance->ehciIpBase->USBCMD |= (USBHS_USBCMD_RS_MASK);
                 ehciInstance->ehciIpBase->USBCMD |= (USBHS_USBCMD_RS_MASK);
                 ehciInstance->busSuspendStatus = kBus_EhciStartResume;
                 ehciInstance->busSuspendStatus = kBus_EhciStartResume;
             }
             }
-#endif            
+#endif
 #endif
 #endif
             (void)OSA_EventSet(ehciInstance->taskEventHandle, EHCI_TASK_EVENT_PORT_CHANGE);
             (void)OSA_EventSet(ehciInstance->taskEventHandle, EHCI_TASK_EVENT_PORT_CHANGE);
         }
         }

+ 1 - 1
bsp/imxrt/libraries/drivers/usb/host/usb_host_ehci.h

@@ -312,7 +312,7 @@ typedef struct _usb_host_ehci_instance
 #ifdef SOC_IMXRT1170_SERIES
 #ifdef SOC_IMXRT1170_SERIES
 #if ((defined FSL_FEATURE_SOC_USBPHY_COUNT) && (FSL_FEATURE_SOC_USBPHY_COUNT > 0U))
 #if ((defined FSL_FEATURE_SOC_USBPHY_COUNT) && (FSL_FEATURE_SOC_USBPHY_COUNT > 0U))
     USBPHY_Type *registerPhyBase; /*!< The base address of the PHY register */
     USBPHY_Type *registerPhyBase; /*!< The base address of the PHY register */
-#endif    
+#endif
 #else
 #else
     USBPHY_Type *registerPhyBase; /*!< The base address of the PHY register */
     USBPHY_Type *registerPhyBase; /*!< The base address of the PHY register */
 #endif
 #endif

+ 4 - 4
bsp/imxrt/libraries/drivers/usb/host/usb_host_hci.c

@@ -266,7 +266,7 @@ usb_status_t USB_HostInit(uint8_t controllerId, usb_host_handle *hostHandle, hos
     {
     {
         return kStatus_USB_Error;
         return kStatus_USB_Error;
     }
     }
-    
+
 
 
     /* HOST instance init*/
     /* HOST instance init*/
     hostInstance->controllerId   = controllerId;
     hostInstance->controllerId   = controllerId;
@@ -291,7 +291,7 @@ usb_status_t USB_HostInit(uint8_t controllerId, usb_host_handle *hostHandle, hos
         transferPrev->next = &hostInstance->transferList[i];
         transferPrev->next = &hostInstance->transferList[i];
         transferPrev       = transferPrev->next;
         transferPrev       = transferPrev->next;
     }
     }
-    
+
     /* controller create, the callbackFn is initialized in USB_HostGetControllerInterface */
     /* controller create, the callbackFn is initialized in USB_HostGetControllerInterface */
     status =
     status =
         hostInstance->controllerTable->controllerCreate(controllerId, hostInstance, &(hostInstance->controllerHandle));
         hostInstance->controllerTable->controllerCreate(controllerId, hostInstance, &(hostInstance->controllerHandle));
@@ -700,7 +700,7 @@ usb_status_t USB_HostHelperParseAlternateSetting(usb_host_interface_handle inter
 
 
     /* parse configuration descriptor */
     /* parse configuration descriptor */
 #ifdef SOC_IMXRT1170_SERIES
 #ifdef SOC_IMXRT1170_SERIES
-    temp = (void *)((usb_host_interface_t *)interfaceHandle)->interfaceExtension;    
+    temp = (void *)((usb_host_interface_t *)interfaceHandle)->interfaceExtension;
 #else
 #else
     temp = (void *)((usb_host_interface_t *)interfaceHandle)->interfaceDesc;
     temp = (void *)((usb_host_interface_t *)interfaceHandle)->interfaceDesc;
 #endif
 #endif
@@ -711,7 +711,7 @@ usb_status_t USB_HostHelperParseAlternateSetting(usb_host_interface_handle inter
 #if !defined(SOC_IMXRT1170_SERIES)
 #if !defined(SOC_IMXRT1170_SERIES)
     unionDes = (usb_descriptor_union_t *)((uint32_t)unionDes + unionDes->common.bLength);
     unionDes = (usb_descriptor_union_t *)((uint32_t)unionDes + unionDes->common.bLength);
 #endif
 #endif
-    
+
     /* search for the alternate setting interface descriptor */
     /* search for the alternate setting interface descriptor */
     while ((uint32_t)unionDes < endPosition)
     while ((uint32_t)unionDes < endPosition)
     {
     {

+ 2 - 2
bsp/imxrt/libraries/drivers/usb/include/usb.h

@@ -61,7 +61,7 @@
 #define USB_STACK_COMPONENT_VERSION \
 #define USB_STACK_COMPONENT_VERSION \
     MAKE_VERSION(USB_STACK_VERSION_MAJOR, USB_STACK_VERSION_MINOR, USB_STACK_VERSION_BUGFIX)
     MAKE_VERSION(USB_STACK_VERSION_MAJOR, USB_STACK_VERSION_MINOR, USB_STACK_VERSION_BUGFIX)
 #endif
 #endif
-      
+
 /*! @brief USB error code */
 /*! @brief USB error code */
 typedef enum _usb_status
 typedef enum _usb_status
 {
 {
@@ -90,7 +90,7 @@ typedef enum _usb_status
     kStatus_USB_DataOverRun, /*!< The amount of data returned by the endpoint exceeded
     kStatus_USB_DataOverRun, /*!< The amount of data returned by the endpoint exceeded
                                   either the size of the maximum data packet allowed
                                   either the size of the maximum data packet allowed
                                   from the endpoint or the remaining buffer size. */
                                   from the endpoint or the remaining buffer size. */
-#endif    
+#endif
 } usb_status_t;
 } usb_status_t;
 
 
 /*! @brief USB host handle type define */
 /*! @brief USB host handle type define */

+ 3 - 3
bsp/imxrt/libraries/drivers/usb/include/usb_host_config.h

@@ -103,7 +103,7 @@
 #define USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE (0U)
 #define USB_HOST_CONFIG_BUFFER_PROPERTY_CACHEABLE (0U)
 #endif
 #endif
 /*! @brief if 1, enable usb compliance test codes; if 0, disable usb compliance test codes. */
 /*! @brief if 1, enable usb compliance test codes; if 0, disable usb compliance test codes. */
-#ifdef SOC_IMXRT1170_SERIES      
+#ifdef SOC_IMXRT1170_SERIES
 #ifndef USB_HOST_CONFIG_COMPLIANCE_TEST
 #ifndef USB_HOST_CONFIG_COMPLIANCE_TEST
 #define USB_HOST_CONFIG_COMPLIANCE_TEST (0U)
 #define USB_HOST_CONFIG_COMPLIANCE_TEST (0U)
 #endif
 #endif
@@ -165,7 +165,7 @@
 /*!
 /*!
  * @brief ohci GTD max count.
  * @brief ohci GTD max count.
  */
  */
-#define USB_HOST_CONFIG_OHCI_MAX_GTD (16U)      
+#define USB_HOST_CONFIG_OHCI_MAX_GTD (16U)
 #else
 #else
 /*!
 /*!
  * @brief ohci ED max count.
  * @brief ohci ED max count.
@@ -177,7 +177,7 @@
  */
  */
 #define USB_HOST_CONFIG_OHCI_MAX_GTD (8U)
 #define USB_HOST_CONFIG_OHCI_MAX_GTD (8U)
 #endif
 #endif
-      
+
 /*!
 /*!
  * @brief ohci ITD max count.
  * @brief ohci ITD max count.
  */
  */

+ 1 - 1
bsp/imxrt/libraries/drivers/usb/phy/usb_phy.c

@@ -505,4 +505,4 @@ void USB_EhcihostPhyDisconnectDetectCmd(uint8_t controllerId, uint8_t enable)
     }
     }
 #endif
 #endif
 }
 }
-#endif
+#endif