使用CubeMX生成的工程框架,只是让蜂鸣器开机响一下,但是蜂鸣器不响,两个晶振和旁边的电容都是全新的,仔细查了线路硬件没问题,请教大神指导,在线等。。。
- /* USER CODE BEGIN Header */
- /**
- ******************************************************************************
- * @file : main.c
- * @brief : Main program body
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2026 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
- /* USER CODE END Header */
- /* Includes ------------------------------------------------------------------*/
- #include "main.h"
- /* Private includes ----------------------------------------------------------*/
- /* USER CODE BEGIN Includes */
- /* USER CODE END Includes */
- /* Private typedef -----------------------------------------------------------*/
- /* USER CODE BEGIN PTD */
- /* USER CODE END PTD */
- /* Private define ------------------------------------------------------------*/
- /* USER CODE BEGIN PD */
- /* USER CODE END PD */
- /* Private macro -------------------------------------------------------------*/
- /* USER CODE BEGIN PM */
- /* USER CODE END PM */
- /* Private variables ---------------------------------------------------------*/
- ADC_HandleTypeDef hadc1;
- ADC_HandleTypeDef hadc2;
- ADC_HandleTypeDef hadc3;
- RTC_HandleTypeDef hrtc;
- SPI_HandleTypeDef hspi1;
- UART_HandleTypeDef huart1;
- /* USER CODE BEGIN PV */
- /* USER CODE END PV */
- /* Private function prototypes -----------------------------------------------*/
- void SystemClock_Config(void);
- static void MX_GPIO_Init(void);
- static void MX_ADC1_Init(void);
- static void MX_ADC2_Init(void);
- static void MX_ADC3_Init(void);
- static void MX_RTC_Init(void);
- static void MX_SPI1_Init(void);
- static void MX_USART1_UART_Init(void);
- /* USER CODE BEGIN PFP */
- /* USER CODE END PFP */
- /* Private user code ---------------------------------------------------------*/
- /* USER CODE BEGIN 0 */
- /* USER CODE END 0 */
- /**
- * @brief The application entry point.
- * @retval int
- */
- 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();
- /* USER CODE BEGIN Init */
- /* USER CODE END Init */
- /* Configure the system clock */
- SystemClock_Config();
- /* USER CODE BEGIN SysInit */
- /* USER CODE END SysInit */
- /* Initialize all configured peripherals */
- MX_GPIO_Init();
- MX_ADC1_Init();
- MX_ADC2_Init();
- MX_ADC3_Init();
- MX_RTC_Init();
- MX_SPI1_Init();
- MX_USART1_UART_Init();
- /* USER CODE BEGIN 2 */
- HAL_GPIO_WritePin(BUZZ_GPIO_Port, BUZZ_Pin, GPIO_PIN_RESET);
- HAL_Delay(500);
- HAL_GPIO_WritePin(BUZZ_GPIO_Port, BUZZ_Pin, GPIO_PIN_SET);
- HAL_Delay(500);
- /* USER CODE END 2 */
- /* Infinite loop */
- /* USER CODE BEGIN WHILE */
- while (1)
- {
- /* USER CODE END WHILE */
- /* USER CODE BEGIN 3 */
- }
- /* USER CODE END 3 */
- }
- /**
- * @brief System Clock Configuration
- * @retval None
- */
- void SystemClock_Config(void)
- {
- RCC_OscInitTypeDef RCC_OscInitStruct = {0};
- RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
- /** Configure the main internal regulator output voltage
- */
- __HAL_RCC_PWR_CLK_ENABLE();
- __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
- /** Initializes the RCC Oscillators according to the specified parameters
- * in the RCC_OscInitTypeDef structure.
- */
- RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE|RCC_OSCILLATORTYPE_LSE;
- RCC_OscInitStruct.HSEState = RCC_HSE_ON;
- RCC_OscInitStruct.LSEState = RCC_LSE_ON;
- RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
- RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
- RCC_OscInitStruct.PLL.PLLM = 12;
- RCC_OscInitStruct.PLL.PLLN = 168;
- RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
- RCC_OscInitStruct.PLL.PLLQ = 4;
- if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
- {
- Error_Handler();
- }
- /** Initializes the CPU, AHB and APB buses clocks
- */
- RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
- |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
- RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
- RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
- RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;
- RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;
- if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5) != HAL_OK)
- {
- Error_Handler();
- }
- }
- /**
- * @brief ADC1 Initialization Function
- * @param None
- * @retval None
- */
- static void MX_ADC1_Init(void)
- {
- /* USER CODE BEGIN ADC1_Init 0 */
- /* USER CODE END ADC1_Init 0 */
- ADC_ChannelConfTypeDef sConfig = {0};
- /* USER CODE BEGIN ADC1_Init 1 */
- /* USER CODE END ADC1_Init 1 */
- /** Configure the global features of the ADC (Clock, Resolution, Data Alignment and number of conversion)
- */
- hadc1.Instance = ADC1;
- hadc1.Init.ClockPrescaler = ADC_CLOCK_SYNC_PCLK_DIV4;
- hadc1.Init.Resolution = ADC_RESOLUTION_12B;
- hadc1.Init.ScanConvMode = DISABLE;
- hadc1.Init.ContinuousConvMode = DISABLE;
- hadc1.Init.DiscontinuousConvMode = DISABLE;
- hadc1.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE;
- hadc1.Init.ExternalTrigConv = ADC_SOFTWARE_START;
- hadc1.Init.DataAlign = ADC_DATAALIGN_RIGHT;
- hadc1.Init.NbrOfConversion = 1;
- hadc1.Init.DMAContinuousRequests = DISABLE;
- hadc1.Init.EOCSelection = ADC_EOC_SINGLE_CONV;
- if (HAL_ADC_Init(&hadc1) != HAL_OK)
- {
- Error_Handler();
- }
- /** Configure for the selected ADC regular channel its corresponding rank in the sequencer and its sample time.
- */
- sConfig.Channel = ADC_CHANNEL_2;
- sConfig.Rank = 1;
- sConfig.SamplingTime = ADC_SAMPLETIME_480CYCLES;
- if (HAL_ADC_ConfigChannel(&hadc1, &sConfig) != HAL_OK)
- {
- Error_Handler();
- }
- /* USER CODE BEGIN ADC1_Init 2 */
- /* USER CODE END ADC1_Init 2 */
- }
- /**
- * @brief ADC2 Initialization Function
- * @param None
- * @retval None
- */
- static void MX_ADC2_Init(void)
- {
- /* USER CODE BEGIN ADC2_Init 0 */
- /* USER CODE END ADC2_Init 0 */
- ADC_ChannelConfTypeDef sConfig = {0};
- /* USER CODE BEGIN ADC2_Init 1 */
- /* USER CODE END ADC2_Init 1 */
- /** Configure the global features of the ADC (Clock, Resolution, Data Alignment and number of conversion)
- */
- hadc2.Instance = ADC2;
- hadc2.Init.ClockPrescaler = ADC_CLOCK_SYNC_PCLK_DIV4;
- hadc2.Init.Resolution = ADC_RESOLUTION_12B;
- hadc2.Init.ScanConvMode = DISABLE;
- hadc2.Init.ContinuousConvMode = DISABLE;
- hadc2.Init.DiscontinuousConvMode = DISABLE;
- hadc2.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE;
- hadc2.Init.ExternalTrigConv = ADC_SOFTWARE_START;
- hadc2.Init.DataAlign = ADC_DATAALIGN_RIGHT;
- hadc2.Init.NbrOfConversion = 1;
- hadc2.Init.DMAContinuousRequests = DISABLE;
- hadc2.Init.EOCSelection = ADC_EOC_SINGLE_CONV;
- if (HAL_ADC_Init(&hadc2) != HAL_OK)
- {
- Error_Handler();
- }
- /** Configure for the selected ADC regular channel its corresponding rank in the sequencer and its sample time.
- */
- sConfig.Channel = ADC_CHANNEL_2;
- sConfig.Rank = 1;
- sConfig.SamplingTime = ADC_SAMPLETIME_3CYCLES;
- if (HAL_ADC_ConfigChannel(&hadc2, &sConfig) != HAL_OK)
- {
- Error_Handler();
- }
- /* USER CODE BEGIN ADC2_Init 2 */
- /* USER CODE END ADC2_Init 2 */
- }
- /**
- * @brief ADC3 Initialization Function
- * @param None
- * @retval None
- */
- static void MX_ADC3_Init(void)
- {
- /* USER CODE BEGIN ADC3_Init 0 */
- /* USER CODE END ADC3_Init 0 */
- ADC_ChannelConfTypeDef sConfig = {0};
- /* USER CODE BEGIN ADC3_Init 1 */
- /* USER CODE END ADC3_Init 1 */
- /** Configure the global features of the ADC (Clock, Resolution, Data Alignment and number of conversion)
- */
- hadc3.Instance = ADC3;
- hadc3.Init.ClockPrescaler = ADC_CLOCK_SYNC_PCLK_DIV4;
- hadc3.Init.Resolution = ADC_RESOLUTION_12B;
- hadc3.Init.ScanConvMode = DISABLE;
- hadc3.Init.ContinuousConvMode = DISABLE;
- hadc3.Init.DiscontinuousConvMode = DISABLE;
- hadc3.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE;
- hadc3.Init.ExternalTrigConv = ADC_SOFTWARE_START;
- hadc3.Init.DataAlign = ADC_DATAALIGN_RIGHT;
- hadc3.Init.NbrOfConversion = 1;
- hadc3.Init.DMAContinuousRequests = DISABLE;
- hadc3.Init.EOCSelection = ADC_EOC_SINGLE_CONV;
- if (HAL_ADC_Init(&hadc3) != HAL_OK)
- {
- Error_Handler();
- }
- /** Configure for the selected ADC regular channel its corresponding rank in the sequencer and its sample time.
- */
- sConfig.Channel = ADC_CHANNEL_2;
- sConfig.Rank = 1;
- sConfig.SamplingTime = ADC_SAMPLETIME_3CYCLES;
- if (HAL_ADC_ConfigChannel(&hadc3, &sConfig) != HAL_OK)
- {
- Error_Handler();
- }
- /* USER CODE BEGIN ADC3_Init 2 */
- /* USER CODE END ADC3_Init 2 */
- }
- /**
- * @brief RTC Initialization Function
- * @param None
- * @retval None
- */
- static void MX_RTC_Init(void)
- {
- /* USER CODE BEGIN RTC_Init 0 */
- /* USER CODE END RTC_Init 0 */
- /* USER CODE BEGIN RTC_Init 1 */
- /* USER CODE END RTC_Init 1 */
- /** Initialize RTC Only
- */
- hrtc.Instance = RTC;
- hrtc.Init.HourFormat = RTC_HOURFORMAT_24;
- hrtc.Init.AsynchPrediv = 127;
- hrtc.Init.SynchPrediv = 255;
- hrtc.Init.OutPut = RTC_OUTPUT_DISABLE;
- hrtc.Init.OutPutPolarity = RTC_OUTPUT_POLARITY_HIGH;
- hrtc.Init.OutPutType = RTC_OUTPUT_TYPE_OPENDRAIN;
- if (HAL_RTC_Init(&hrtc) != HAL_OK)
- {
- Error_Handler();
- }
- /* USER CODE BEGIN RTC_Init 2 */
- /* USER CODE END RTC_Init 2 */
- }
- /**
- * @brief SPI1 Initialization Function
- * @param None
- * @retval None
- */
- static void MX_SPI1_Init(void)
- {
- /* USER CODE BEGIN SPI1_Init 0 */
- /* USER CODE END SPI1_Init 0 */
- /* USER CODE BEGIN SPI1_Init 1 */
- /* USER CODE END SPI1_Init 1 */
- /* SPI1 parameter configuration*/
- hspi1.Instance = SPI1;
- hspi1.Init.Mode = SPI_MODE_MASTER;
- hspi1.Init.Direction = SPI_DIRECTION_2LINES;
- hspi1.Init.DataSize = SPI_DATASIZE_8BIT;
- hspi1.Init.CLKPolarity = SPI_POLARITY_LOW;
- hspi1.Init.CLKPhase = SPI_PHASE_1EDGE;
- hspi1.Init.NSS = SPI_NSS_SOFT;
- hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_4;
- hspi1.Init.FirstBit = SPI_FIRSTBIT_MSB;
- hspi1.Init.TIMode = SPI_TIMODE_DISABLE;
- hspi1.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
- hspi1.Init.CRCPolynomial = 10;
- if (HAL_SPI_Init(&hspi1) != HAL_OK)
- {
- Error_Handler();
- }
- /* USER CODE BEGIN SPI1_Init 2 */
- /* USER CODE END SPI1_Init 2 */
- }
- /**
- * @brief USART1 Initialization Function
- * @param None
- * @retval None
- */
- static void MX_USART1_UART_Init(void)
- {
- /* USER CODE BEGIN USART1_Init 0 */
- /* USER CODE END USART1_Init 0 */
- /* USER CODE BEGIN USART1_Init 1 */
- /* USER CODE END USART1_Init 1 */
- huart1.Instance = USART1;
- huart1.Init.BaudRate = 115200;
- huart1.Init.WordLength = UART_WORDLENGTH_8B;
- huart1.Init.StopBits = UART_STOPBITS_1;
- huart1.Init.Parity = UART_PARITY_NONE;
- huart1.Init.Mode = UART_MODE_TX_RX;
- huart1.Init.HwFlowCtl = UART_HWCONTROL_NONE;
- huart1.Init.OverSampling = UART_OVERSAMPLING_16;
- if (HAL_UART_Init(&huart1) != HAL_OK)
- {
- Error_Handler();
- }
- /* USER CODE BEGIN USART1_Init 2 */
- /* USER CODE END USART1_Init 2 */
- }
- /**
- * @brief GPIO Initialization Function
- * @param None
- * @retval None
- */
- static void MX_GPIO_Init(void)
- {
- GPIO_InitTypeDef GPIO_InitStruct = {0};
- /* USER CODE BEGIN MX_GPIO_Init_1 */
- /* USER CODE END MX_GPIO_Init_1 */
- /* GPIO Ports Clock Enable */
- __HAL_RCC_GPIOE_CLK_ENABLE();
- __HAL_RCC_GPIOC_CLK_ENABLE();
- __HAL_RCC_GPIOH_CLK_ENABLE();
- __HAL_RCC_GPIOA_CLK_ENABLE();
- __HAL_RCC_GPIOB_CLK_ENABLE();
- __HAL_RCC_GPIOD_CLK_ENABLE();
- /*Configure GPIO pin Output Level */
- HAL_GPIO_WritePin(GPIOA, DS18B20_Pin|SPI1_NSS_Pin, GPIO_PIN_RESET);
- /*Configure GPIO pin Output Level */
- HAL_GPIO_WritePin(GPIOE, SPI2_DREQ_Pin|SPI2_XRESET_Pin, GPIO_PIN_RESET);
- /*Configure GPIO pin Output Level */
- HAL_GPIO_WritePin(GPIOB, SPI2_XDCS_Pin|SPI2_NSS_Pin|SPI2_SCK_Pin|SPI2_MOSI_Pin
- |SPI2_MISO_Pin, GPIO_PIN_RESET);
- /*Configure GPIO pin Output Level */
- HAL_GPIO_WritePin(GPIOD, CH375_D0_Pin|CH375_D1_Pin|CH375_D2_Pin|CH375_D3_Pin
- |CH375_D4_Pin|CH375_D5_Pin|CH375_D6_Pin|CH375_D7_Pin
- |LCD_D0_Pin|LCD_D1_Pin|LCD_D2_Pin|LCD_D3_Pin
- |LCD_D4_Pin|LCD_D5_Pin|LCD_D6_Pin|LCD_D7_Pin, GPIO_PIN_RESET);
- /*Configure GPIO pin Output Level */
- HAL_GPIO_WritePin(GPIOC, CH375_A0_Pin|CH375_RD_Pin|CH375_WR_Pin|LCD_RW_Pin
- |LCD_E_Pin, GPIO_PIN_SET);
- /*Configure GPIO pin Output Level */
- HAL_GPIO_WritePin(GPIOA, CH375_CS_Pin|BUZZ_Pin, GPIO_PIN_SET);
- /*Configure GPIO pin Output Level */
- HAL_GPIO_WritePin(GPIOB, LCD_CS_Pin|LCD_RES_Pin|LCD_RS_Pin, GPIO_PIN_SET);
- /*Configure GPIO pins : KEY_1_Pin KEY_2_Pin KEY_3_Pin KEY_4_Pin */
- GPIO_InitStruct.Pin = KEY_1_Pin|KEY_2_Pin|KEY_3_Pin|KEY_4_Pin;
- GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
- GPIO_InitStruct.Pull = GPIO_PULLUP;
- HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
- /*Configure GPIO pins : DS18B20_Pin SPI1_NSS_Pin CH375_CS_Pin BUZZ_Pin */
- GPIO_InitStruct.Pin = DS18B20_Pin|SPI1_NSS_Pin|CH375_CS_Pin|BUZZ_Pin;
- GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
- GPIO_InitStruct.Pull = GPIO_NOPULL;
- GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
- HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
- /*Configure GPIO pin : HWJS_Pin */
- GPIO_InitStruct.Pin = HWJS_Pin;
- GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING;
- GPIO_InitStruct.Pull = GPIO_NOPULL;
- HAL_GPIO_Init(HWJS_GPIO_Port, &GPIO_InitStruct);
- /*Configure GPIO pins : SPI2_DREQ_Pin SPI2_XRESET_Pin */
- GPIO_InitStruct.Pin = SPI2_DREQ_Pin|SPI2_XRESET_Pin;
- GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
- GPIO_InitStruct.Pull = GPIO_NOPULL;
- GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
- HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
- /*Configure GPIO pins : SPI2_XDCS_Pin SPI2_NSS_Pin SPI2_SCK_Pin SPI2_MOSI_Pin
- SPI2_MISO_Pin LCD_CS_Pin LCD_RES_Pin LCD_RS_Pin */
- GPIO_InitStruct.Pin = SPI2_XDCS_Pin|SPI2_NSS_Pin|SPI2_SCK_Pin|SPI2_MOSI_Pin
- |SPI2_MISO_Pin|LCD_CS_Pin|LCD_RES_Pin|LCD_RS_Pin;
- GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
- GPIO_InitStruct.Pull = GPIO_NOPULL;
- GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
- HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
- /*Configure GPIO pins : CH375_D0_Pin CH375_D1_Pin CH375_D2_Pin CH375_D3_Pin
- CH375_D4_Pin CH375_D5_Pin CH375_D6_Pin CH375_D7_Pin
- LCD_D0_Pin LCD_D1_Pin LCD_D2_Pin LCD_D3_Pin
- LCD_D4_Pin LCD_D5_Pin LCD_D6_Pin LCD_D7_Pin */
- GPIO_InitStruct.Pin = CH375_D0_Pin|CH375_D1_Pin|CH375_D2_Pin|CH375_D3_Pin
- |CH375_D4_Pin|CH375_D5_Pin|CH375_D6_Pin|CH375_D7_Pin
- |LCD_D0_Pin|LCD_D1_Pin|LCD_D2_Pin|LCD_D3_Pin
- |LCD_D4_Pin|LCD_D5_Pin|LCD_D6_Pin|LCD_D7_Pin;
- GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
- GPIO_InitStruct.Pull = GPIO_NOPULL;
- GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
- HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
- /*Configure GPIO pins : CH375_A0_Pin CH375_RD_Pin CH375_WR_Pin LCD_RW_Pin
- LCD_E_Pin */
- GPIO_InitStruct.Pin = CH375_A0_Pin|CH375_RD_Pin|CH375_WR_Pin|LCD_RW_Pin
- |LCD_E_Pin;
- GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
- GPIO_InitStruct.Pull = GPIO_NOPULL;
- GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
- HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
- /*Configure GPIO pin : CH375_INT_Pin */
- GPIO_InitStruct.Pin = CH375_INT_Pin;
- GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING;
- GPIO_InitStruct.Pull = GPIO_NOPULL;
- HAL_GPIO_Init(CH375_INT_GPIO_Port, &GPIO_InitStruct);
- /* EXTI interrupt init*/
- HAL_NVIC_SetPriority(EXTI1_IRQn, 0, 0);
- HAL_NVIC_EnableIRQ(EXTI1_IRQn);
- HAL_NVIC_SetPriority(EXTI9_5_IRQn, 0, 0);
- HAL_NVIC_EnableIRQ(EXTI9_5_IRQn);
- /* USER CODE BEGIN MX_GPIO_Init_2 */
- /* USER CODE END MX_GPIO_Init_2 */
- }
- /* USER CODE BEGIN 4 */
- /* USER CODE END 4 */
- /**
- * @brief This function is executed in case of error occurrence.
- * @retval None
- */
- void Error_Handler(void)
- {
- /* USER CODE BEGIN Error_Handler_Debug */
- /* User can add his own implementation to report the HAL error return state */
- __disable_irq();
- while (1)
- {
- }
- /* USER CODE END Error_Handler_Debug */
- }
- #ifdef USE_FULL_ASSERT
- /**
- * @brief Reports the name of the source file and the source line number
- * where the assert_param error has occurred.
- * @param file: pointer to the source file name
- * @param line: assert_param error line source number
- * @retval None
- */
- void assert_failed(uint8_t *file, uint32_t line)
- {
- /* USER CODE BEGIN 6 */
- /* User can add his own implementation to report the file name and line number,
- ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
- /* USER CODE END 6 */
- }
- #endif /* USE_FULL_ASSERT */
复制代码
|