/** * @brief MTP application Init. * @param None * @retval None */ static void MTP_InitApplication(void) { /* Configure Key Button */ BSP_PB_Init(BUTTON_KEY, BUTTON_MODE_EXTI); /* Configure Joystick in EXTI mode */ BSP_JOY_Init(JOY_MODE_EXTI); /* Configure LED1 and LED3 */ BSP_LED_Init(LED1); BSP_LED_Init(LED3); /* Initialize the LCD */ BSP_LCD_Init(); /* LCD Layer Initialization */ BSP_LCD_LayerDefaultInit(1, LCD_FB_START_ADDRESS); /* Selects the LCD Layer */ BSP_LCD_SelectLayer(1); /* Enables the display */ BSP_LCD_DisplayOn(); /* Init the LCD Log module */ LCD_LOG_Init(); #ifdef USE_USB_HS LCD_LOG_SetHeader((uint8_t *)" USB OTG HS MTP Host"); #else LCD_LOG_SetHeader((uint8_t *)" USB OTG FS MTP Host"); #endif LCD_UsrLog("USB Host library started.\n"); /* Start MTP Interface */ USBH_UsrLog("Starting MTP Demo"); /* Init Audio interface */ AUDIO_Init(); /* Start MTP Interface */ MTP_MenuInit(); }
/** * @brief MTP application Init. * @param None * @retval None */ static void MTP_InitApplication(void) { /* Configure Key Button */ BSP_PB_Init(BUTTON_KEY, BUTTON_MODE_EXTI); /* Configure Joystick in EXTI mode */ BSP_JOY_Init(JOY_MODE_EXTI); /* Configure LED1, LED2, LED3 and LED4 */ BSP_LED_Init(LED1); BSP_LED_Init(LED2); BSP_LED_Init(LED3); BSP_LED_Init(LED4); /* Initialize the LCD */ BSP_LCD_Init(); /* Init the LCD Log module */ LCD_LOG_Init(); #ifdef USE_USB_HS LCD_LOG_SetHeader((uint8_t *)" USB OTG HS MTP Host"); #else LCD_LOG_SetHeader((uint8_t *)" USB OTG FS MTP Host"); #endif LCD_UsrLog("USB Host library started.\n"); /* Start MTP Interface */ USBH_UsrLog("Starting MTP Demo"); /* Init Audio interface */ AUDIO_Init(); /* Start MTP Interface */ MTP_MenuInit(); }