Skip to content

Commit

Permalink
fix(uart): implement TXFE bit in UARTFR
Browse files Browse the repository at this point in the history
  • Loading branch information
urish committed Apr 19, 2022
1 parent ca76b18 commit e13d7b2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/peripherals/uart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const UARTIMIS = 0x40;
const UARTICR = 0x44;

// UARTFR bits:
const TXFE = 1 << 7;
const RXFF = 1 << 6;
const RXFE = 1 << 4;

Expand Down Expand Up @@ -72,7 +73,7 @@ export class RPUART extends BasePeripheral implements Peripheral {
}

get flags() {
return (this.rxFIFO.full ? RXFF : 0) | (this.rxFIFO.empty ? RXFE : 0);
return (this.rxFIFO.full ? RXFF : 0) | (this.rxFIFO.empty ? RXFE : 0) | TXFE;
}

checkInterrupts() {
Expand Down

0 comments on commit e13d7b2

Please sign in to comment.