|
|
@@ -6,6 +6,7 @@
|
|
|
* Change Logs:
|
|
|
* Date Author Notes
|
|
|
* 2019-11-09 xiangxistu first version
|
|
|
+ * 2020-05-18 chenyaxing modify stm32_uart_config struct
|
|
|
*/
|
|
|
|
|
|
#include <stm32f2xx.h>
|
|
|
@@ -212,7 +213,7 @@ static long stm32_gpio_clk_enable(GPIO_TypeDef *gpiox)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-char * up_char(char * c)
|
|
|
+static int up_char(char * c)
|
|
|
{
|
|
|
if ((*c >= 'a') && (*c <= 'z'))
|
|
|
{
|
|
|
@@ -220,6 +221,7 @@ char * up_char(char * c)
|
|
|
}
|
|
|
return 0;
|
|
|
}
|
|
|
+
|
|
|
static void get_pin_by_name(const char* pin_name, GPIO_TypeDef **port, uint16_t *pin)
|
|
|
{
|
|
|
int pin_num = atoi((char*) &pin_name[2]);
|
|
|
@@ -323,4 +325,3 @@ void print_char(char c)
|
|
|
{
|
|
|
HAL_UART_Transmit(&handle, (uint8_t *) (&c), 1, 1);
|
|
|
}
|
|
|
-
|