File tree Expand file tree Collapse file tree 7 files changed +14
-9
lines changed
Expand file tree Collapse file tree 7 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ void system_clock_config(int target_freq_mhz)
4444 RCC_OscInitStruct .PLL .PLLR = RCC_PLLR_DIV2 ;
4545 if (HAL_RCC_OscConfig (& RCC_OscInitStruct ) != HAL_OK )
4646 {
47- Error_Handler ();
47+ Error_Handler ();
4848 }
4949 /** Initializes the CPU, AHB and APB busses clocks
5050 */
@@ -56,7 +56,7 @@ void system_clock_config(int target_freq_mhz)
5656
5757 if (HAL_RCC_ClockConfig (& RCC_ClkInitStruct , FLASH_LATENCY_2 ) != HAL_OK )
5858 {
59- Error_Handler ();
59+ Error_Handler ();
6060 }
6161}
6262
Original file line number Diff line number Diff line change 66 * Change Logs:
77 * Date Author Notes
88 * 2019-11-09 xiangxistu first version
9+ * 2020-05-18 chenyaxing modify stm32_uart_config struct
910 */
1011
1112#include <stm32g0xx.h>
@@ -215,14 +216,15 @@ static long stm32_gpio_clk_enable(GPIO_TypeDef *gpiox)
215216 return 0 ;
216217}
217218
218- char * up_char (char * c )
219+ static int up_char (char * c )
219220{
220221 if ((* c >= 'a' ) && (* c <= 'z' ))
221222 {
222223 * c = * c - 32 ;
223224 }
224225 return 0 ;
225226}
227+
226228static void get_pin_by_name (const char * pin_name , GPIO_TypeDef * * port , uint16_t * pin )
227229{
228230 int pin_num = atoi ((char * ) & pin_name [2 ]);
Original file line number Diff line number Diff line change 77 * Date Author Notes
88 * 2018-10-30 SummerGift first version
99 * 2019-01-03 zylx modify dma support
10+ * 2020-05-18 chenyaxing modify uart_config struct
1011 */
1112
1213#ifndef __UART_CONFIG_H__
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ void system_clock_config(int target_freq_Mhz)
4343 RCC_OscInitStruct .PLL .PLLR = RCC_PLLR_DIV2 ;
4444 if (HAL_RCC_OscConfig (& RCC_OscInitStruct ) != HAL_OK )
4545 {
46- Error_Handler ();
46+ Error_Handler ();
4747 }
4848 /** Initializes the CPU, AHB and APB busses clocks
4949 */
@@ -55,7 +55,7 @@ void system_clock_config(int target_freq_Mhz)
5555
5656 if (HAL_RCC_ClockConfig (& RCC_ClkInitStruct , FLASH_LATENCY_2 ) != HAL_OK )
5757 {
58- Error_Handler ();
58+ Error_Handler ();
5959 }
6060}
6161
Original file line number Diff line number Diff line change @@ -223,7 +223,7 @@ static rt_err_t stm32_gpio_clk_enable(GPIO_TypeDef *gpiox)
223223 return RT_EOK ;
224224}
225225
226- char * up_char (char * c )
226+ static int up_char (char * c )
227227{
228228 if ((* c >= 'a' ) && (* c <= 'z' ))
229229 {
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ void system_clock_config(int target_freq_mhz)
4242 RCC_OscInitStruct .PLL .PLLR = RCC_PLLR_DIV2 ;
4343 if (HAL_RCC_OscConfig (& RCC_OscInitStruct ) != HAL_OK )
4444 {
45- Error_Handler ();
45+ Error_Handler ();
4646 }
4747 /** Initializes the CPU, AHB and APB busses clocks
4848 */
@@ -54,7 +54,7 @@ void system_clock_config(int target_freq_mhz)
5454
5555 if (HAL_RCC_ClockConfig (& RCC_ClkInitStruct , FLASH_LATENCY_2 ) != HAL_OK )
5656 {
57- Error_Handler ();
57+ Error_Handler ();
5858 }
5959}
6060int clock_information (void )
Original file line number Diff line number Diff line change @@ -331,14 +331,16 @@ static rt_err_t stm32_gpio_clk_enable(GPIO_TypeDef *gpiox)
331331
332332 return RT_EOK ;
333333}
334- char * up_char (char * c )
334+
335+ static int up_char (char * c )
335336{
336337 if ((* c >= 'a' ) && (* c <= 'z' ))
337338 {
338339 * c = * c - 32 ;
339340 }
340341 return 0 ;
341342}
343+
342344static void get_pin_by_name (const char * pin_name , GPIO_TypeDef * * port , uint16_t * pin )
343345{
344346 int pin_num = atoi ((char * ) & pin_name [2 ]);
You can’t perform that action at this time.
0 commit comments