1 year, 7 months ago.

How to Set the Parity of a serial object?

I need a way to be able to call the Serial.format() function. However I can't seem to find the syntax that works with the parity.

I have the following:

Parity parity = SerialBase::None; uart.format(8, parity, 1);

When I try to compile, I get Parity is undefined.

Comment on this question

1 Answer

1 year, 7 months ago.

Hello,

Try either

    SerialBase::Parity  parity = SerialBase::None;
    uart.format(8, parity, 1);

or simply

    uart.format(8, SerialBase::None, 1);