diff --git a/bsp/mm32l3xx/drivers/Kconfig b/bsp/mm32l3xx/drivers/Kconfig index 5426992c1c..ae70f1800e 100644 --- a/bsp/mm32l3xx/drivers/Kconfig +++ b/bsp/mm32l3xx/drivers/Kconfig @@ -4,7 +4,7 @@ menu "Hardware Drivers Config" menu "GPIO Drivers" config BSP_USING_GPIO bool "Enable GPIO" - select BSP_USING_GPIO + select RT_USING_PIN default n endmenu menu "UART Drivers" diff --git a/bsp/mm32l3xx/drivers/board.h b/bsp/mm32l3xx/drivers/board.h index ffb1ce31ee..60c0f4ff66 100644 --- a/bsp/mm32l3xx/drivers/board.h +++ b/bsp/mm32l3xx/drivers/board.h @@ -13,7 +13,7 @@ #include #include -#define SRAM_SIZE 0x2000 +#define SRAM_SIZE 0x5000 #define SRAM_END (SRAM_BASE + SRAM_SIZE) #ifdef __CC_ARM diff --git a/bsp/mm32l3xx/drivers/drv_gpio.h b/bsp/mm32l3xx/drivers/drv_gpio.h index a412dea019..09de5d6e9b 100644 --- a/bsp/mm32l3xx/drivers/drv_gpio.h +++ b/bsp/mm32l3xx/drivers/drv_gpio.h @@ -10,6 +10,6 @@ #ifndef DRV_GPIO_H__ #define DRV_GPIO_H__ -int mm32_hw_pin_init(void); +int rt_hw_pin_init(void); #endif diff --git a/bsp/mm32l3xx/drivers/drv_uart.c b/bsp/mm32l3xx/drivers/drv_uart.c index 9417a10f79..65125b2339 100644 --- a/bsp/mm32l3xx/drivers/drv_uart.c +++ b/bsp/mm32l3xx/drivers/drv_uart.c @@ -201,11 +201,12 @@ static void UART2PINconfigStepB(void) { GPIO_InitTypeDef GPIO_InitStructure; /* Configure USART Rx/tx PIN */ - GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2; + GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; - GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP; + GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP; GPIO_Init(GPIOA, &GPIO_InitStructure); GPIO_InitStructure.GPIO_Pin = GPIO_Pin_3; + GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING; GPIO_Init(GPIOA, &GPIO_InitStructure); } @@ -238,7 +239,7 @@ int rt_hw_uart_init(void) config.baud_rate = BAUD_RATE_115200; serial2.ops = &mm32_uart_ops; serial2.config = config; - /* register UART1 device */ + /* register UART2 device */ rt_hw_serial_register(&serial2, "uart2", RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_INT_RX, uart); diff --git a/bsp/mm32l3xx/project.ewp b/bsp/mm32l3xx/project.ewp index bbfe0d8d61..f6c1f08238 100644 --- a/bsp/mm32l3xx/project.ewp +++ b/bsp/mm32l3xx/project.ewp @@ -1,7 +1,7 @@ 3 - Debug + rt-thread ARM @@ -15,15 +15,15 @@ 1 @@ -707,7 +707,7 @@