main(7602).c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580
  1. /* USER CODE BEGIN Header */
  2. /**
  3. ******************************************************************************
  4. * @file : main.c
  5. * @brief : Main program body
  6. ******************************************************************************
  7. ** This notice applies to any and all portions of this file
  8. * that are not between comment pairs USER CODE BEGIN and
  9. * USER CODE END. Other portions of this file, whether
  10. * inserted by the user or by software development tools
  11. * are owned by their respective copyright owners.
  12. *
  13. * COPYRIGHT(c) 2019 STMicroelectronics
  14. *
  15. * Redistribution and use in source and binary forms, with or without modification,
  16. * are permitted provided that the following conditions are met:
  17. * 1. Redistributions of source code must retain the above copyright notice,
  18. * this list of conditions and the following disclaimer.
  19. * 2. Redistributions in binary form must reproduce the above copyright notice,
  20. * this list of conditions and the following disclaimer in the documentation
  21. * and/or other materials provided with the distribution.
  22. * 3. Neither the name of STMicroelectronics nor the names of its contributors
  23. * may be used to endorse or promote products derived from this software
  24. * without specific prior written permission.
  25. *
  26. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  27. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,p THE
  28. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  29. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  30. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  31. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  32. * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  33. * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  34. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  35. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  36. *
  37. ******************************************************************************
  38. */
  39. /* USER CODE END Header */
  40. /* Includes ------------------------------------------------------------------*/
  41. #include "main.h"
  42. /* Private includes ----------------------------------------------------------*/
  43. /* USER CODE BEGIN Includes */
  44. /* USER CODE END Includes */
  45. /* Private typedef -----------------------------------------------------------*/
  46. /* USER CODE BEGIN PTD */
  47. /* USER CODE END PTD */
  48. /* Private define ------------------------------------------------------------*/
  49. /* USER CODE BEGIN PD */
  50. /* USER CODE END PD */
  51. /* Private macro -------------------------------------------------------------*/
  52. /* USER CODE BEGIN PM */
  53. /* USER CODE END PM */
  54. /* Private variables ---------------------------------------------------------*/
  55. TIM_HandleTypeDef htim6;
  56. UART_HandleTypeDef huart3;
  57. /* USER CODE BEGIN PV */
  58. unsigned char ring_buffer[150];
  59. unsigned int ring_header = 0;
  60. unsigned int ring_tail = 0;
  61. uint8_t rx1_data[1];
  62. uint8_t UartDataisReved;
  63. uint8_t RGB_SensorIDAutoset = 0;
  64. volatile uint32_t UartTimerCnt = 0;
  65. volatile uint32_t LedTimerCnt = 0;
  66. volatile uint8_t rx3_data[1] = {0,};
  67. uint8_t buf[buf_size] = {0,};
  68. uint8_t MyControllerID = 0;
  69. uint8_t SensorID = 1;
  70. /* USER CODE END PV */
  71. /* Private function prototypes -----------------------------------------------*/
  72. void SystemClock_Config(void);
  73. static void MX_GPIO_Init(void);
  74. static void MX_TIM6_Init(void);
  75. static void MX_USART3_UART_Init(void);
  76. static void MX_NVIC_Init(void);
  77. /* USER CODE BEGIN PFP */
  78. void Uart1_Data_Send(uint8_t* data,uint8_t size);
  79. /* USER CODE END PFP */
  80. /* Private user code ---------------------------------------------------------*/
  81. /* USER CODE BEGIN 0 */
  82. void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
  83. {
  84. if(huart->Instance == USART1)//RGB Comunication
  85. {
  86. ring_buffer[ring_header] = rx1_data[0];
  87. ring_header = ring_header +1;
  88. if(ring_header>=100){ ring_header = 0; }
  89. HAL_UART_Receive_IT(&huart3,&rx1_data[0],1);
  90. }
  91. }
  92. void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
  93. {
  94. if(htim->Instance == TIM6){
  95. UartTimerCnt++;
  96. LedTimerCnt++;
  97. }
  98. }
  99. void Uart3_Data_Send(uint8_t* data,uint8_t size){
  100. HAL_UART_Transmit(&huart3, data,size, 10);
  101. }
  102. int _write (int file, uint8_t *ptr, uint16_t len)
  103. {
  104. HAL_UART_Transmit (&huart3, ptr, len, 10);
  105. return len;
  106. }
  107. void Uart_dataCheck(uint8_t* cnt){
  108. etError crccheck = 0;
  109. #if 0
  110. for(uint8_t i = 0; i < (* cnt); i++){
  111. printf("%02x ",buf[i]);
  112. }
  113. printf("\r\n");
  114. #endif
  115. crccheck = STH30_CheckCrc(&buf[blucell_type],buf[blucell_length],buf[buf[blucell_length] + 1]);
  116. if(crccheck == CHECKSUM_ERROR){
  117. for(uint8_t i = 0; i < (*cnt); i++){
  118. printf("%02x ",buf[i]);
  119. }
  120. printf("Original CRC : %02x RecvCRC : %02x \r\n",crccheck,buf[buf[blucell_length] + 1]);
  121. }
  122. else if(crccheck == NO_ERROR){
  123. RGB_Controller_Func(&buf[blucell_stx]);
  124. }
  125. else{
  126. printf("What Happen?\r\n");
  127. /*NOP*/
  128. }
  129. *cnt = 0;
  130. memset(buf,0x00,buf_size);
  131. }
  132. #define StartAddr ((uint32_t)0x08030000)
  133. #if 1 // PYJ.2019.03.19_BEGIN --
  134. //----------------------------------------------------
  135. #define FLASH_USER StartAddr
  136. #define START_ADDR FLASH_USER
  137. #define END_ADDR FLASH_USER + 262144 // 256K
  138. //----------------------------------------------------
  139. #if 0 // PYJ.2019.03.20_BEGIN --
  140. void test_write() // ?벐湲고븿?닔
  141. {
  142. __HAL_RCC_TIM7_CLK_DISABLE(); // 留ㅼ씤???씠癒몃?? ?젙吏??빀?땲?떎
  143. uint32_t Address = 0;
  144. Address = StartAddr;
  145. // printf("================First============ \r\n");
  146. // for(uint8_t i=0;i<16;i++)
  147. // {
  148. // printf("%08x: %X\r\n", Address, *(uint32_t*)Address);
  149. // Address += 4;
  150. // }
  151. // HAL_FLASH_Unlock(); // lock ??湲?
  152. // HAL_FLASH_Program(FLASH_TYPEPROGRAM_WORD, START_ADDR, (uint32_t)0x12345678); //test
  153. // HAL_FLASH_Lock(); // lock ?옞洹멸린
  154. // __HAL_RCC_TIM7_CLK_ENABLE(); // 留ㅼ씤???씠癒몃?? ?옱?떆?옉?빀?땲?떎
  155. Address = StartAddr;
  156. printf("================Second============ \r\n");
  157. //while(Address < 0x0803FFFF)
  158. for(uint16_t i = 0; i<37273 ; i++)
  159. {
  160. printf("%02X", *(uint8_t*)Address);
  161. Address ++;
  162. }
  163. printf("%08x:",Address);
  164. }
  165. #endif // PYJ.2019.03.20_END --
  166. #define DATA_16_1 ((uint32_t)0x1234)
  167. #define DATA_16_2 ((uint32_t)0x5678)
  168. #if 1 // PYJ.2019.03.20_BEGIN --
  169. void test_read(void) // ?벐湲고븿?닔
  170. {
  171. uint32_t Address = 0x08000000;
  172. uint8_t aa = 0;
  173. for(uint32_t i = Address; i <= Address + 0x35d8; i++ ){
  174. printf("%02X ",*(uint8_t*)i);
  175. aa++;
  176. if(aa > 15){
  177. printf("\n");
  178. aa= 0;
  179. }
  180. }
  181. }
  182. #endif // PYJ.2019.03.20_END --
  183. #define ADDR_FLASH_PAGE_TEST ((uint32_t)0x08030000) /* Base @ of Page 127, 1 Kbytes */
  184. #define FLASH_USER_START_ADDR ADDR_FLASH_PAGE_TEST /* Start @ of user Flash area */
  185. #define FLASH_USER_END_ADDR ADDR_FLASH_PAGE_TEST + ((uint32_t)0x0000FFFF) /* End @ of user Flash area */
  186. void Flash_RGB_Data_Write(uint32_t Addr,uint8_t* data){
  187. uint16_t temp_Red = 0,temp_Green = 0,temp_Blue = 0,temp_ret1 = 0,temp_ret2 = 0;
  188. temp_Red = ((data[blucell_red_H] << 8) |data[blucell_red_L]); //R
  189. temp_Green= ((data[blucell_green_H] << 8) |data[blucell_green_L]); //G
  190. temp_Blue = ((data[blucell_blue_H] << 8) |data[blucell_blue_L]); //B
  191. HAL_FLASH_Program(FLASH_TYPEPROGRAM_HALFWORD,Addr + 0 , (uint16_t)temp_Red);
  192. HAL_FLASH_Program(FLASH_TYPEPROGRAM_HALFWORD,Addr + 2 , (uint16_t)temp_Green);
  193. HAL_FLASH_Program(FLASH_TYPEPROGRAM_HALFWORD,Addr + 4 , (uint16_t)temp_Blue);
  194. }
  195. void Flash_write(uint8_t* data) // ?벐湲고븿?닔
  196. {
  197. /*Variable used for Erase procedure*/
  198. static FLASH_EraseInitTypeDef EraseInitStruct;
  199. uint32_t Address = 0, PAGEError = 0;
  200. /* Fill EraseInit structure*/
  201. // EraseInitStruct.TypeErase = FLASH_TYPEERASE_PAGES;
  202. // EraseInitStruct.PageAddress = FLASH_USER_START_ADDR;
  203. // EraseInitStruct.NbPages = (FLASH_USER_END_ADDR - FLASH_USER_START_ADDR) / FLASH_PAGE_SIZE;
  204. Address = START_ADDR;
  205. __HAL_RCC_TIM7_CLK_DISABLE(); // 留ㅼ씤???씠癒몃?? ?젙吏??빀?땲?떎
  206. HAL_FLASH_Unlock(); // lock ??湲?
  207. // if (HAL_FLASHEx_Erase(&EraseInitStruct, &PAGEError) != HAL_OK){
  208. // printf("Erase Failed \r\n");
  209. // }else{
  210. // printf("Erase Success \r\n");
  211. // }
  212. switch(data[blucell_dstid]){
  213. case 1:
  214. Address += 0;
  215. break;
  216. case 2:
  217. Address += 6;
  218. break;
  219. case 3:
  220. Address += 12;
  221. break;
  222. case 4:
  223. Address += 18;
  224. break;
  225. case 5:
  226. Address += 24;
  227. break;
  228. case 6:
  229. Address += 30;
  230. break;
  231. case 7:
  232. Address += 36;
  233. break;
  234. case 8:
  235. Address += 42;
  236. break;
  237. }
  238. Flash_RGB_Data_Write(Address,&data[blucell_stx]);
  239. HAL_FLASH_Lock(); // lock ?옞洹멸린
  240. __HAL_RCC_TIM7_CLK_ENABLE(); // 留ㅼ씤???씠癒몃?? ?옱?떆?옉?빀?땲?떎
  241. }
  242. void Flash_InitRead(void) // ?벐湲고븿?닔
  243. {
  244. uint32_t Address = 0;
  245. Address = StartAddr;
  246. for(uint8_t i = 1; i <= 8; i++ ){
  247. printf("%08x : %04X \n",Address ,*(uint16_t*)Address);
  248. Address += 2;
  249. printf("%08x : %04X \n",Address ,*(uint16_t*)Address);
  250. Address += 2;
  251. printf("%08x : %04X \n",Address ,*(uint16_t*)Address);
  252. Address += 2;
  253. }
  254. }
  255. #endif // PYJ.2019.03.19_END --
  256. /* USER CODE END 0 */
  257. /**
  258. * @brief The application entry point.
  259. * @retval int
  260. */
  261. int main(void)
  262. {
  263. /* USER CODE BEGIN 1 */
  264. uint8_t data[100] = {0,};
  265. uint8_t cnt = 0;
  266. uint8_t uartrecv = 0;
  267. /* USER CODE END 1 */
  268. /* MCU Configuration--------------------------------------------------------*/
  269. /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
  270. HAL_Init();
  271. /* USER CODE BEGIN Init */
  272. /* USER CODE END Init */
  273. /* Configure the system clock */
  274. SystemClock_Config();
  275. /* USER CODE BEGIN SysInit */
  276. /* USER CODE END SysInit */
  277. /* Initialize all configured peripherals */
  278. MX_GPIO_Init();
  279. MX_TIM6_Init();
  280. MX_USART3_UART_Init();
  281. /* Initialize interrupts */
  282. MX_NVIC_Init();
  283. /* USER CODE BEGIN 2 */
  284. HAL_TIM_Base_Start_IT(&htim6);
  285. HAL_UART_Receive_IT(&huart3, &rx3_data[0],1);
  286. setbuf(stdout, NULL); // \n ?占쏙옙?占쏙옙?占쏙옙, printf 占???????占쏙옙?占쏙옙占?????? ?占쏙옙?占쏙옙?占쏙옙
  287. #if 1 // PYJ.2019.03.04_BEGIN --
  288. printf("****************************************\r\n");
  289. printf("RGB Project\r\n");
  290. printf("Build at %s %s\r\n", __DATE__, __TIME__);
  291. printf("Copyright (c) 2019. BLUECELL\r\n");
  292. printf("****************************************\r\n");
  293. #endif // PYJ.2019.03.04_END --
  294. // RGB_Sensor_PowerOnOff(0);
  295. /* USER CODE END 2 */
  296. /* Infinite loop */
  297. /* USER CODE BEGIN WHILE */
  298. while (1)
  299. {
  300. if(ring_tail != ring_header){ // <-------
  301. data[cnt++] = ring_buffer[ring_tail++];
  302. ring_tail = ring_tail +1;
  303. if(ring_tail >= 100){ ring_tail = 0; }
  304. UartTimerCnt = 0;
  305. uartrecv = 1;
  306. }
  307. else if(uartrecv == 1 && UartTimerCnt > 25){
  308. for(uint8_t i = 0; i < cnt; i++)
  309. printf("%02x",data[i]);
  310. memset(&data[0],0,100);
  311. cnt = 0;
  312. uartrecv = 0;
  313. }
  314. if(LedTimerCnt > 500){
  315. HAL_GPIO_TogglePin(GPIOC,GPIO_PIN_15);
  316. LedTimerCnt = 0;
  317. }
  318. /* USER CODE END WHILE */
  319. /* USER CODE BEGIN 3 */
  320. }
  321. /* USER CODE END 3 */
  322. }
  323. /**
  324. * @brief System Clock Configuration
  325. * @retval None
  326. */
  327. void SystemClock_Config(void)
  328. {
  329. RCC_OscInitTypeDef RCC_OscInitStruct = {0};
  330. RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
  331. /**Initializes the CPU, AHB and APB busses clocks
  332. */
  333. RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
  334. RCC_OscInitStruct.HSEState = RCC_HSE_ON;
  335. RCC_OscInitStruct.HSEPredivValue = RCC_HSE_PREDIV_DIV1;
  336. RCC_OscInitStruct.HSIState = RCC_HSI_ON;
  337. RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
  338. RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
  339. RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL2;
  340. if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
  341. {
  342. Error_Handler();
  343. }
  344. /**Initializes the CPU, AHB and APB busses clocks
  345. */
  346. RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
  347. |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
  348. RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
  349. RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
  350. RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2;
  351. RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
  352. if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_0) != HAL_OK)
  353. {
  354. Error_Handler();
  355. }
  356. }
  357. /**
  358. * @brief NVIC Configuration.
  359. * @retval None
  360. */
  361. static void MX_NVIC_Init(void)
  362. {
  363. /* TIM6_IRQn interrupt configuration */
  364. HAL_NVIC_SetPriority(TIM6_IRQn, 0, 0);
  365. HAL_NVIC_EnableIRQ(TIM6_IRQn);
  366. /* USART3_IRQn interrupt configuration */
  367. HAL_NVIC_SetPriority(USART3_IRQn, 0, 0);
  368. HAL_NVIC_EnableIRQ(USART3_IRQn);
  369. }
  370. /**
  371. * @brief TIM6 Initialization Function
  372. * @param None
  373. * @retval None
  374. */
  375. static void MX_TIM6_Init(void)
  376. {
  377. /* USER CODE BEGIN TIM6_Init 0 */
  378. /* USER CODE END TIM6_Init 0 */
  379. TIM_MasterConfigTypeDef sMasterConfig = {0};
  380. /* USER CODE BEGIN TIM6_Init 1 */
  381. /* USER CODE END TIM6_Init 1 */
  382. htim6.Instance = TIM6;
  383. htim6.Init.Prescaler = 1600-1;
  384. htim6.Init.CounterMode = TIM_COUNTERMODE_UP;
  385. htim6.Init.Period = 10-1;
  386. htim6.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
  387. if (HAL_TIM_Base_Init(&htim6) != HAL_OK)
  388. {
  389. Error_Handler();
  390. }
  391. sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
  392. sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
  393. if (HAL_TIMEx_MasterConfigSynchronization(&htim6, &sMasterConfig) != HAL_OK)
  394. {
  395. Error_Handler();
  396. }
  397. /* USER CODE BEGIN TIM6_Init 2 */
  398. /* USER CODE END TIM6_Init 2 */
  399. }
  400. /**
  401. * @brief USART3 Initialization Function
  402. * @param None
  403. * @retval None
  404. */
  405. static void MX_USART3_UART_Init(void)
  406. {
  407. /* USER CODE BEGIN USART3_Init 0 */
  408. /* USER CODE END USART3_Init 0 */
  409. /* USER CODE BEGIN USART3_Init 1 */
  410. /* USER CODE END USART3_Init 1 */
  411. huart3.Instance = USART3;
  412. huart3.Init.BaudRate = 115200;
  413. huart3.Init.WordLength = UART_WORDLENGTH_8B;
  414. huart3.Init.StopBits = UART_STOPBITS_1;
  415. huart3.Init.Parity = UART_PARITY_NONE;
  416. huart3.Init.Mode = UART_MODE_TX_RX;
  417. huart3.Init.HwFlowCtl = UART_HWCONTROL_NONE;
  418. huart3.Init.OverSampling = UART_OVERSAMPLING_16;
  419. if (HAL_UART_Init(&huart3) != HAL_OK)
  420. {
  421. Error_Handler();
  422. }
  423. /* USER CODE BEGIN USART3_Init 2 */
  424. /* USER CODE END USART3_Init 2 */
  425. }
  426. /**
  427. * @brief GPIO Initialization Function
  428. * @param None
  429. * @retval None
  430. */
  431. static void MX_GPIO_Init(void)
  432. {
  433. GPIO_InitTypeDef GPIO_InitStruct = {0};
  434. /* GPIO Ports Clock Enable */
  435. __HAL_RCC_GPIOC_CLK_ENABLE();
  436. __HAL_RCC_GPIOD_CLK_ENABLE();
  437. __HAL_RCC_GPIOB_CLK_ENABLE();
  438. /*Configure GPIO pin Output Level */
  439. HAL_GPIO_WritePin(GPIOC, GPIO_PIN_15, GPIO_PIN_RESET);
  440. /*Configure GPIO pin : PC15 */
  441. GPIO_InitStruct.Pin = GPIO_PIN_15;
  442. GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
  443. GPIO_InitStruct.Pull = GPIO_NOPULL;
  444. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  445. HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
  446. }
  447. /* USER CODE BEGIN 4 */
  448. /* USER CODE END 4 */
  449. /**
  450. * @brief This function is executed in case of error occurrence.
  451. * @retval None
  452. */
  453. void Error_Handler(void)
  454. {
  455. /* USER CODE BEGIN Error_Handler_Debug */
  456. /* User can add his own implementation to report the HAL error return state */
  457. /* USER CODE END Error_Handler_Debug */
  458. }
  459. #ifdef USE_FULL_ASSERT
  460. /**
  461. * @brief Reports the name of the source file and the source line number
  462. * where the assert_param error has occurred.
  463. * @param file: pointer to the source file name
  464. * @param line: assert_param error line source number
  465. * @retval None
  466. */
  467. void assert_failed(uint8_t *file, uint32_t line)
  468. {
  469. /* USER CODE BEGIN 6 */
  470. /* User can add his own implementation to report the file name and line number,
  471. tex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
  472. /* USER CODE END 6 */
  473. }
  474. #endif /* USE_FULL_ASSERT */
  475. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/