This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

协议栈中设置奇偶校验的问题

之前有个大佬说在hal_uart_xx.c文件中设置奇偶校验位,但是我只在里面找到了奇偶校验位的定义,即

#define UCR_FLUSH                  0x80
#define UCR_FLOW                   0x40
#define UCR_D9                     0x20
#define UCR_BIT9                   0x10
#define UCR_PARITY                 0x08
#define UCR_SPB                    0x04
#define UCR_STOP                   0x02
#define UCR_START                  0x01

想请问下如何去修改具体的值去设置成 奇校验:U0UCR = 0x18?

希望各位大佬指点一下~