int main(void) { /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /* MCU Configuration----------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); /* Configure the system clock */ SystemClock_Config(); /* Initialize all configured peripherals */ MX_GPIO_Init(); MX_DMA_Init(); MX_I2S2_Init(); MX_SDIO_SD_Init(); MX_FATFS_Init(); /* USER CODE BEGIN 2 */ printf("Init complete"); //WavePlayerStartSample(); while((res=f_mount (&fatfs, SD_Path, 1))!=FR_OK) { printf("QQ"); } WavePlayerStart_DMA("0:/akuno.wav"); //playindex=rand()%6; /*switch(playindex) { case : WavePlayerStart_DMA("0:/test.wav"); break; case 1: WavePlayerStart_DMA("0:/akuno.wav"); break; default: WavePlayerStart_DMA("0:/akuno.wav"); break; }*/ /* USER CODE END 2 */ /* Infinite loop */ /* USER CODE BEGIN WHILE */ while (1) { /* USER CODE END WHILE */ /* USER CODE BEGIN 3 */ //WavePlayerStart_DMA("0:/test.wav"); } /* USER CODE END 3 */ }
int main(void) { /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /* MCU Configuration----------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); /* Configure the system clock */ SystemClock_Config(); /* System interrupt init*/ /* Sets the priority grouping field */ HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_0); HAL_NVIC_SetPriority(SysTick_IRQn, 0, 0); /* Initialize all configured peripherals */ MX_GPIO_Init(); MX_DMA_Init(); MX_I2C1_Init(); MX_I2S2_Init(); MX_I2S3_Init(); MX_SPI1_Init(); MX_SPI4_Init(); MX_TIM3_Init(); MX_USART2_UART_Init(); MX_USB_DEVICE_Init(); /* USER CODE BEGIN 2 */ /* USER CODE END 2 */ /*## FatFS: Link the USER disk I/O driver ###############################*/ USER_DriverNum = FATFS_LinkDriver(&USER_Driver, USER_Path); /* USER CODE BEGIN 3 */ dabstick_loop(); // endless return 0; /* USER CODE END 3 */ }