Guest User

UART1 Init

a guest
Aug 24th, 2017
410
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.41 KB | None | 0 0
  1. uart_config_t uart_config = { .baud_rate = 115200, .data_bits = UART_DATA_8_BITS, .parity = UART_PARITY_DISABLE, .stop_bits =
  2.             UART_STOP_BITS_1, .flow_ctrl = UART_HW_FLOWCTRL_DISABLE };
  3. //Configure UART1 parameters
  4.     uart_param_config(UART_NUM_1, &uart_config);
  5.  
  6.     uart_set_pin(UART_NUM_1, 21, 13, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE);
  7.     uart_driver_install(UART_NUM_1, BUFFER_SIZE * 2, BUFFER_SIZE * 2, 0, NULL, 0);
Add Comment
Please, Sign In to add comment