File tree Expand file tree Collapse file tree 7 files changed +12
-6
lines changed
Expand file tree Collapse file tree 7 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ void system_clock_config(int target_freq_mhz)
4141 RCC_OscInitStruct .PLL .PLLR = RCC_PLLR_DIV2 ;
4242 if (HAL_RCC_OscConfig (& RCC_OscInitStruct ) != HAL_OK )
4343 {
44- // Error_Handler();
44+ Error_Handler ();
4545 }
4646 /** Initializes the CPU, AHB and APB busses clocks
4747 */
@@ -53,7 +53,7 @@ void system_clock_config(int target_freq_mhz)
5353
5454 if (HAL_RCC_ClockConfig (& RCC_ClkInitStruct , FLASH_LATENCY_4 ) != HAL_OK )
5555 {
56- // Error_Handler();
56+ Error_Handler ();
5757 }
5858}
5959
Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ static long stm32_gpio_clk_enable(GPIO_TypeDef *gpiox)
213213 return 0 ;
214214}
215215
216- char * up_char (char * c )
216+ static int up_char (char * c )
217217{
218218 if ((* c >= 'a' ) && (* c <= 'z' ))
219219 {
Original file line number Diff line number Diff line change @@ -32,5 +32,6 @@ include_str = """
3232#include <stm32l4xx.h>
3333"""
3434modify_board_h_file (os .path .join (cwd , file_path ), include_str )
35+ os .remove (os .path .join (cwd ,"SConscript" ))
3536
3637Return ('group' )
Original file line number Diff line number Diff line change @@ -220,14 +220,15 @@ static rt_err_t stm32_gpio_clk_enable(GPIO_TypeDef *gpiox)
220220 return RT_EOK ;
221221}
222222
223- char * up_char (char * c )
223+ static int up_char (char * c )
224224{
225225 if ((* c >= 'a' ) && (* c <= 'z' ))
226226 {
227227 * c = * c - 32 ;
228228 }
229229 return 0 ;
230230}
231+
231232static void get_pin_by_name (const char * pin_name , GPIO_TypeDef * * port , uint16_t * pin )
232233{
233234 int pin_num = atoi ((char * ) & pin_name [2 ]);
@@ -370,4 +371,3 @@ char rt_hw_console_getchar(void)
370371}
371372#endif /* RT_USING_FINSH */
372373#endif /* RT_USING_CONSLONE */
373-
Original file line number Diff line number Diff line change @@ -32,5 +32,6 @@ include_str = """
3232#include <stm32l4xx.h>
3333"""
3434modify_board_h_file (os .path .join (cwd , file_path ), include_str )
35+ os .remove (os .path .join (cwd ,"SConscript" ))
3536
3637Return ('group' )
Original file line number Diff line number Diff line change 66 * Change Logs:
77 * Date Author Notes
88 * 2018-11-7 SummerGift first version
9+ * 2020-05-20 chenyaxing add hw_board_init
910 */
1011
1112#include "drv_common.h"
Original file line number Diff line number Diff line change 66 * Change Logs:
77 * Date Author Notes
88 * 2018-10-30 SummerGift first version
9+ * 2020-05-23 chenyaxing modify stm32_uart_config
910 */
1011#include "string.h"
1112#include "stdlib.h"
@@ -329,14 +330,16 @@ static rt_err_t stm32_gpio_clk_enable(GPIO_TypeDef *gpiox)
329330
330331 return RT_EOK ;
331332}
332- char * up_char (char * c )
333+
334+ static int up_char (char * c )
333335{
334336 if ((* c >= 'a' ) && (* c <= 'z' ))
335337 {
336338 * c = * c - 32 ;
337339 }
338340 return 0 ;
339341}
342+
340343static void get_pin_by_name (const char * pin_name , GPIO_TypeDef * * port , uint16_t * pin )
341344{
342345 int pin_num = atoi ((char * ) & pin_name [2 ]);
You can’t perform that action at this time.
0 commit comments