mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-29 04:20:20 +00:00
btstack_uart_posix: set parity
This commit is contained in:
parent
79e58675d2
commit
1738838cad
@ -315,8 +315,9 @@ static int btstack_uart_posix_set_flowcontrol(int flowcontrol){
|
|||||||
static int btstack_uart_posix_open(void){
|
static int btstack_uart_posix_open(void){
|
||||||
|
|
||||||
const char * device_name = uart_config->device_name;
|
const char * device_name = uart_config->device_name;
|
||||||
const int flowcontrol = uart_config->flowcontrol;
|
|
||||||
const uint32_t baudrate = uart_config->baudrate;
|
const uint32_t baudrate = uart_config->baudrate;
|
||||||
|
const int flowcontrol = uart_config->flowcontrol;
|
||||||
|
const int parity = uart_config->parity;
|
||||||
|
|
||||||
struct termios toptions;
|
struct termios toptions;
|
||||||
int flags = O_RDWR | O_NOCTTY | O_NONBLOCK;
|
int flags = O_RDWR | O_NOCTTY | O_NONBLOCK;
|
||||||
@ -345,7 +346,7 @@ static int btstack_uart_posix_open(void){
|
|||||||
toptions.c_cc[VTIME] = 0;
|
toptions.c_cc[VTIME] = 0;
|
||||||
|
|
||||||
// no parity
|
// no parity
|
||||||
btstack_uart_posix_set_parity_option(&toptions, 0);
|
btstack_uart_posix_set_parity_option(&toptions, parity);
|
||||||
|
|
||||||
// flowcontrol
|
// flowcontrol
|
||||||
btstack_uart_posix_set_flowcontrol_option(&toptions, flowcontrol);
|
btstack_uart_posix_set_flowcontrol_option(&toptions, flowcontrol);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user