Skip to content

Unable to set the number of data bits on serial port in Uart::begin due to data type width #83

Closed
@TomKeddie

Description

@TomKeddie

These constants for the number of data bits are all 16 bit values.

#define HARDSER_DATA_5      (0x100ul)
#define HARDSER_DATA_6      (0x200ul)
#define HARDSER_DATA_7      (0x300ul)
#define HARDSER_DATA_8      (0x400ul)
#define HARDSER_DATA_MASK   (0xF00ul)`

But Uart::begin takes an 8 bit value
void begin(unsigned long baudrate, uint8_t config);

This makes it impossible to change the number of bits.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions