modify usb init position into board.c from init.c
This commit is contained in:
		
							parent
							
								
									5f4922866e
								
							
						
					
					
						commit
						636f803b7b
					
				|  | @ -51,6 +51,8 @@ extern int HwSramInit(void); | ||||||
| extern int Stm32HwAdcInit(void); | extern int Stm32HwAdcInit(void); | ||||||
| extern int Stm32HwDacInit(void); | extern int Stm32HwDacInit(void); | ||||||
| extern int Stm32HwLcdInit(void); | extern int Stm32HwLcdInit(void); | ||||||
|  | extern int STM32USBHostRegister(void); | ||||||
|  | extern int Stm32HwUsbInit(void); | ||||||
| 
 | 
 | ||||||
| static void ClockConfiguration() | static void ClockConfiguration() | ||||||
| { | { | ||||||
|  | @ -147,6 +149,12 @@ struct InitSequenceDesc _board_init[] = | ||||||
| #ifdef BSP_USING_SDIO | #ifdef BSP_USING_SDIO | ||||||
|     {"hw sdcard init",HwSdioInit}, |     {"hw sdcard init",HwSdioInit}, | ||||||
| #endif | #endif | ||||||
|  | #ifdef BSP_USING_USB | ||||||
|  | #ifdef BSP_USING_STM32_USBH | ||||||
|  |     { "STM32USBHostRegister", STM32USBHostRegister }, | ||||||
|  | 	{ "hw usb", Stm32HwUsbInit }, | ||||||
|  | #endif | ||||||
|  | #endif | ||||||
| #ifdef BSP_USING_EXTMEM | #ifdef BSP_USING_EXTMEM | ||||||
|     { "hw extern sram", HwSramInit }, |     { "hw extern sram", HwSramInit }, | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
|  | @ -59,6 +59,10 @@ extern int ExtSramInit(void); | ||||||
| #include <connect_uart.h> | #include <connect_uart.h> | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|  | #ifdef BSP_USING_USB | ||||||
|  | #include <connect_usb.h> | ||||||
|  | #endif | ||||||
|  | 
 | ||||||
| #ifdef BSP_USING_ADC | #ifdef BSP_USING_ADC | ||||||
| #include <connect_adc.h> | #include <connect_adc.h> | ||||||
| #endif | #endif | ||||||
|  | @ -693,5 +697,11 @@ void InitBoardHardware() | ||||||
|     Imxrt1052HwSdioInit(); |     Imxrt1052HwSdioInit(); | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|  | #ifdef BSP_USING_USB | ||||||
|  | #ifdef BSP_USING_NXP_USBH | ||||||
|  |     Imxrt1052HwUsbHostInit(); | ||||||
|  | #endif | ||||||
|  | #endif | ||||||
|  | 
 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -28,7 +28,6 @@ Modification: | ||||||
| #include <board.h> | #include <board.h> | ||||||
| #include <connect_usb.h> | #include <connect_usb.h> | ||||||
| 
 | 
 | ||||||
| #define BSP_USING_NXP_USBH |  | ||||||
| #ifdef BSP_USING_NXP_USBH | #ifdef BSP_USING_NXP_USBH | ||||||
| 
 | 
 | ||||||
| /*! @brief USB host msd command instance global variable */ | /*! @brief USB host msd command instance global variable */ | ||||||
|  |  | ||||||
|  | @ -50,6 +50,8 @@ extern int Stm32HwRtcInit(); | ||||||
| extern int HwSdioInit(); | extern int HwSdioInit(); | ||||||
| extern int Stm32HwAdcInit(void); | extern int Stm32HwAdcInit(void); | ||||||
| extern int Stm32HwDacInit(void); | extern int Stm32HwDacInit(void); | ||||||
|  | extern int STM32USBHostRegister(void); | ||||||
|  | extern int Stm32HwUsbInit(void); | ||||||
| #ifdef BSP_USING_LWIP | #ifdef BSP_USING_LWIP | ||||||
| extern int ETH_BSP_Config(); | extern int ETH_BSP_Config(); | ||||||
| #endif | #endif | ||||||
|  | @ -139,6 +141,12 @@ struct InitSequenceDesc _board_init[] = | ||||||
| #ifdef BSP_USING_SDIO | #ifdef BSP_USING_SDIO | ||||||
|     {"hw sdcard init", HwSdioInit}, |     {"hw sdcard init", HwSdioInit}, | ||||||
| #endif | #endif | ||||||
|  | #ifdef BSP_USING_USB | ||||||
|  | #ifdef BSP_USING_STM32_USBH | ||||||
|  |     { "STM32USBHostRegister", STM32USBHostRegister }, | ||||||
|  | 	{ "hw usb", Stm32HwUsbInit }, | ||||||
|  | #endif | ||||||
|  | #endif | ||||||
| #ifdef BSP_USING_ADC | #ifdef BSP_USING_ADC | ||||||
|     {"hw adc init", Stm32HwAdcInit}, |     {"hw adc init", Stm32HwAdcInit}, | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
|  | @ -56,6 +56,10 @@ Modification: | ||||||
| #include <connect_sdio.h> | #include <connect_sdio.h> | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|  | #ifdef BSP_USING_USB | ||||||
|  | #include <connect_usb.h> | ||||||
|  | #endif | ||||||
|  | 
 | ||||||
| #ifdef BSP_USING_WDT | #ifdef BSP_USING_WDT | ||||||
| #include <connect_wdt.h> | #include <connect_wdt.h> | ||||||
| #endif | #endif | ||||||
|  | @ -303,6 +307,12 @@ struct InitSequenceDesc _board_init[] = | ||||||
| 	{ "sdio", Imxrt1052HwSdioInit }, | 	{ "sdio", Imxrt1052HwSdioInit }, | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|  | #ifdef BSP_USING_USB | ||||||
|  | #ifdef BSP_USING_NXP_USBH | ||||||
|  | 	{ "nxp hw usb", Imxrt1052HwUsbHostInit }, | ||||||
|  | #endif | ||||||
|  | #endif | ||||||
|  | 
 | ||||||
| #ifdef BSP_USING_I2C | #ifdef BSP_USING_I2C | ||||||
|     { "hw_i2c", Imxrt1052HwI2cInit }, |     { "hw_i2c", Imxrt1052HwI2cInit }, | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
|  | @ -28,7 +28,6 @@ Modification: | ||||||
| #include <board.h> | #include <board.h> | ||||||
| #include <connect_usb.h> | #include <connect_usb.h> | ||||||
| 
 | 
 | ||||||
| #define BSP_USING_NXP_USBH |  | ||||||
| #ifdef BSP_USING_NXP_USBH | #ifdef BSP_USING_NXP_USBH | ||||||
| 
 | 
 | ||||||
| /*! @brief USB host msd command instance global variable */ | /*! @brief USB host msd command instance global variable */ | ||||||
|  |  | ||||||
|  | @ -56,6 +56,10 @@ Modification: | ||||||
| #include <connect_sdio.h> | #include <connect_sdio.h> | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|  | #ifdef BSP_USING_USB | ||||||
|  | #include <connect_usb.h> | ||||||
|  | #endif | ||||||
|  | 
 | ||||||
| #ifdef BSP_USING_WDT | #ifdef BSP_USING_WDT | ||||||
| #include <connect_wdt.h> | #include <connect_wdt.h> | ||||||
| #endif | #endif | ||||||
|  | @ -303,6 +307,12 @@ struct InitSequenceDesc _board_init[] = | ||||||
| 	{ "sdio", Imxrt1052HwSdioInit }, | 	{ "sdio", Imxrt1052HwSdioInit }, | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|  | #ifdef BSP_USING_USB | ||||||
|  | #ifdef BSP_USING_NXP_USBH | ||||||
|  | 	{ "nxp hw usb", Imxrt1052HwUsbHostInit }, | ||||||
|  | #endif | ||||||
|  | #endif | ||||||
|  | 
 | ||||||
| #ifdef BSP_USING_I2C | #ifdef BSP_USING_I2C | ||||||
|     { "hw_i2c", Imxrt1052HwI2cInit }, |     { "hw_i2c", Imxrt1052HwI2cInit }, | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
|  | @ -28,7 +28,6 @@ Modification: | ||||||
| #include <board.h> | #include <board.h> | ||||||
| #include <connect_usb.h> | #include <connect_usb.h> | ||||||
| 
 | 
 | ||||||
| #define BSP_USING_NXP_USBH |  | ||||||
| #ifdef BSP_USING_NXP_USBH | #ifdef BSP_USING_NXP_USBH | ||||||
| 
 | 
 | ||||||
| /*! @brief USB host msd command instance global variable */ | /*! @brief USB host msd command instance global variable */ | ||||||
|  |  | ||||||
|  | @ -113,13 +113,6 @@ struct InitSequenceDesc components_init[] = | ||||||
| }; | }; | ||||||
| struct InitSequenceDesc env_init[] =  | struct InitSequenceDesc env_init[] =  | ||||||
| { | { | ||||||
| #ifdef BSP_USING_STM32_USBH |  | ||||||
|     { "STM32USBHostRegister", STM32USBHostRegister }, |  | ||||||
| 	{ "hw usb", Stm32HwUsbInit }, |  | ||||||
| #endif |  | ||||||
| #ifdef BSP_USING_NXP_USBH |  | ||||||
| 	{ "nxp hw usb", Imxrt1052HwUsbHostInit }, |  | ||||||
| #endif |  | ||||||
| #ifdef MOUNT_SDCARD | #ifdef MOUNT_SDCARD | ||||||
| 	{ "MountSDCard", MountSDCard }, | 	{ "MountSDCard", MountSDCard }, | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue