/** * @brief Manages DS Menu Process. * @param None * @retval None */ void DS_MenuProcess(void) { switch(Appli_state) { case APPLICATION_IDLE: break; case APPLICATION_MSC: MSC_MenuProcess(); break; case APPLICATION_AUDIO: AUDIO_MenuProcess(); break; case APPLICATION_HID: HID_MenuProcess(); break; default: break; } if(Appli_state == APPLICATION_DISCONNECT) { Appli_state = APPLICATION_IDLE; Menu_Init(); /* Unlink the micro SD disk I/O driver */ FATFS_UnLinkDriver(SD_Path); /* Unlink the USB disk I/O driver */ FATFS_UnLinkDriver(USBDISKPath); } }
/** * @brief Main program * @param None * @retval None */ int main(void) { /* STM32F4xx HAL library initialization: - Configure the Flash prefetch, instruction and Data caches - Configure the Systick to generate an interrupt each 1 msec - Set NVIC Group Priority to 4 - Global MSP (MCU Support Package) initialization */ HAL_Init(); /* Configure the system clock to 168 MHz */ SystemClock_Config(); /* Init Audio Application */ Audio_InitApplication(); /* Init Host Library */ USBH_Init(&hUSBHost, USBH_UserProcess, 0); /* Add Supported Class */ USBH_RegisterClass(&hUSBHost, USBH_AUDIO_CLASS); /* Start Host Process */ USBH_Start(&hUSBHost); /* Run Application (Blocking mode) */ while (1) { /* USB Host Background task */ USBH_Process(&hUSBHost); /* AUDIO Menu Process */ AUDIO_MenuProcess(); } }
/** * @brief Main program * @param None * @retval None */ int main(void) { /* Enable the CPU Cache */ CPU_CACHE_Enable(); /* STM32F7xx HAL library initialization: - Configure the Flash ART accelerator on ITCM interface - Configure the Systick to generate an interrupt each 1 msec - Set NVIC Group Priority to 4 - Global MSP (MCU Support Package) initialization */ HAL_Init(); /* Configure the system clock to 200 MHz */ SystemClock_Config(); /* Init Audio Application */ AUDIO_InitApplication(); /* Init Host Library */ USBH_Init(&hUSBHost, USBH_UserProcess, 0); /* Add Supported Class */ USBH_RegisterClass(&hUSBHost, USBH_MSC_CLASS); /* Start Host Process */ USBH_Start(&hUSBHost); /* Run Application (Blocking mode) */ while (1) { /* USB Host Background task */ USBH_Process(&hUSBHost); /* AUDIO Menu Process */ AUDIO_MenuProcess(); if ( MfxToggleLed == 1) { #if defined(USE_STM32756G_EVAL_REVA) /* On RevA board, as LED1 is connected to MFX, the toggle is performed in main loop */ BSP_LED_Toggle(LED1); #else /* On RevB board, as LED1 is connected to GPIO, it is toggled in ISR, * the LED4 is toggled in main loop as it is connected to MFX */ BSP_LED_Toggle(LED4); #endif MfxToggleLed = 0; } } }
/** * @brief Main program * @param None * @retval None */ int main(void) { /* Enable the CPU Cache */ CPU_CACHE_Enable(); /* STM32F7xx HAL library initialization: - Configure the Flash ART accelerator on ITCM interface - Configure the Systick to generate an interrupt each 1 msec - Set NVIC Group Priority to 4 - Low Level Initialization */ HAL_Init(); /* Configure the System clock to have a frequency of 200 Mhz */ SystemClock_Config(); /* Initialize IO expander */ BSP_IO_Init(); /* Init Audio Application */ Audio_InitApplication(); /* Init Host Library */ USBH_Init(&hUSBHost, USBH_UserProcess, 0); /* Add Supported Class */ USBH_RegisterClass(&hUSBHost, USBH_AUDIO_CLASS); /* Start Host Process */ USBH_Start(&hUSBHost); /* Run Application (Blocking mode) */ while (1) { /* USB Host Background task */ USBH_Process(&hUSBHost); /* AUDIO Menu Process */ AUDIO_MenuProcess(); } }
/** * @brief Demo state machine. * @param None * @retval None */ void AUDIO_MenuInit(void) { audio_demo.state = AUDIO_DEMO_IDLE; audio_select_mode = AUDIO_SELECT_MENU; AUDIO_MenuProcess(); }