Skip to content

Does serial_clear() disable the FIFO? #59

Closed
@adamgreen

Description

@adamgreen

As I was code reviewing the serial_api.c source code for the LPC176X port, I noticed the following code in serial_clear():

void serial_clear(serial_t *obj) {
    obj->uart->FCR = 1 << 1  // rx FIFO reset
                   | 1 << 2  // tx FIFO reset
                   | 0 << 6; // interrupt depth
}

I never see this API being called from any code in the mbed SDK but if it was called, wouldn't it end up disabling the FIFO as it does not keep bit 0, the FIFO enable bit, set high?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions