Subversion Repositories DashDisplay

Rev

Rev 18 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 18 Rev 23
Line 3... Line 3...
3
  * File Name          : stm32f1xx_hal_msp.c
3
  * File Name          : stm32f1xx_hal_msp.c
4
  * Description        : This file provides code for the MSP Initialization
4
  * Description        : This file provides code for the MSP Initialization
5
  *                      and de-Initialization codes.
5
  *                      and de-Initialization codes.
6
  ******************************************************************************
6
  ******************************************************************************
7
  *
7
  *
8
  * COPYRIGHT(c) 2016 STMicroelectronics
8
  * COPYRIGHT(c) 2017 STMicroelectronics
9
  *
9
  *
10
  * Redistribution and use in source and binary forms, with or without modification,
10
  * Redistribution and use in source and binary forms, with or without modification,
11
  * are permitted provided that the following conditions are met:
11
  * are permitted provided that the following conditions are met:
12
  *   1. Redistributions of source code must retain the above copyright notice,
12
  *   1. Redistributions of source code must retain the above copyright notice,
13
  *      this list of conditions and the following disclaimer.
13
  *      this list of conditions and the following disclaimer.
Line 188... Line 188...
188
 
188
 
189
  /* USER CODE BEGIN USART2_MspInit 1 */
189
  /* USER CODE BEGIN USART2_MspInit 1 */
190
 
190
 
191
  /* USER CODE END USART2_MspInit 1 */
191
  /* USER CODE END USART2_MspInit 1 */
192
  }
192
  }
-
 
193
  else if(huart->Instance==USART3)
-
 
194
  {
-
 
195
  /* USER CODE BEGIN USART3_MspInit 0 */
-
 
196
 
-
 
197
  /* USER CODE END USART3_MspInit 0 */
-
 
198
    /* Peripheral clock enable */
-
 
199
    __HAL_RCC_USART3_CLK_ENABLE();
-
 
200
 
-
 
201
    /**USART3 GPIO Configuration    
-
 
202
    PB10     ------> USART3_TX
-
 
203
    PB11     ------> USART3_RX
-
 
204
    */
-
 
205
    GPIO_InitStruct.Pin = GPIO_PIN_10;
-
 
206
    GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
-
 
207
    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
-
 
208
    HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
-
 
209
 
-
 
210
    GPIO_InitStruct.Pin = GPIO_PIN_11;
-
 
211
    GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
-
 
212
    GPIO_InitStruct.Pull = GPIO_NOPULL;
-
 
213
    HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
-
 
214
 
-
 
215
  /* USER CODE BEGIN USART3_MspInit 1 */
-
 
216
 
-
 
217
  /* USER CODE END USART3_MspInit 1 */
-
 
218
  }
193
 
219
 
194
}
220
}
195
 
221
 
196
void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
222
void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
197
{
223
{
Line 230... Line 256...
230
 
256
 
231
  /* USER CODE BEGIN USART2_MspDeInit 1 */
257
  /* USER CODE BEGIN USART2_MspDeInit 1 */
232
 
258
 
233
  /* USER CODE END USART2_MspDeInit 1 */
259
  /* USER CODE END USART2_MspDeInit 1 */
234
  }
260
  }
-
 
261
  else if(huart->Instance==USART3)
-
 
262
  {
-
 
263
  /* USER CODE BEGIN USART3_MspDeInit 0 */
-
 
264
 
-
 
265
  /* USER CODE END USART3_MspDeInit 0 */
-
 
266
    /* Peripheral clock disable */
-
 
267
    __HAL_RCC_USART3_CLK_DISABLE();
-
 
268
 
-
 
269
    /**USART3 GPIO Configuration    
-
 
270
    PB10     ------> USART3_TX
-
 
271
    PB11     ------> USART3_RX
-
 
272
    */
-
 
273
    HAL_GPIO_DeInit(GPIOB, GPIO_PIN_10|GPIO_PIN_11);
-
 
274
 
-
 
275
  /* USER CODE BEGIN USART3_MspDeInit 1 */
-
 
276
 
-
 
277
  /* USER CODE END USART3_MspDeInit 1 */
-
 
278
  }
235
 
279
 
236
}
280
}
237
 
281
 
238
/* USER CODE BEGIN 1 */
282
/* USER CODE BEGIN 1 */
239
 
283