Browse Source

enlarge uart buffer

Signed-off-by: zhaijunyuan <1045598574@qq.com>
master
zhaijunyuan 6 years ago
parent
commit
d2cfa64d47
  1. 14
      src/config.h
  2. 4
      src/main.c

14
src/config.h

@ -1,8 +1,22 @@
#ifndef __TARGET_CONFIG_H__
#define __TARGET_CONFIG_H__
#define TARGET_HAS_USART1 1
#define TARGET_HAS_USART2 1
#define TARGET_USART2_RX_BUFFER_SIZE (4096)
#define TARGET_USART2_TX_BUFFER_SIZE (4096)
#define TARGET_HAS_USART3 1
#define TARGET_USART3_RX_BUFFER_SIZE (4096)
#define TARGET_USART3_TX_BUFFER_SIZE (4096)
#define TARGET_HAS_USART4 1
#define TARGET_USART4_RX_BUFFER_SIZE (4096)
#define TARGET_USART4_TX_BUFFER_SIZE (4096)
#define TARGET_HAS_USART6 1
#define TARGET_USART6_RX_BUFFER_SIZE (4096)
#define TARGET_USART6_TX_BUFFER_SIZE (4096)
#endif

4
src/main.c

@ -118,6 +118,10 @@ static void loopback()
int main()
{
serial_setup(&serial0, 115200, 8, SERIAL_STOPBITS_1);
serial_setup(&serial3, 115200, 8, SERIAL_STOPBITS_1);
serial_setup(&serial5, 115200, 8, SERIAL_STOPBITS_1);
gpio_init(PK7 | PK6, GPIO_OUTPUT | GPIO_SPEED_FAST);
gpio_write(PK7 | PK6, 0);

Loading…
Cancel
Save