Skip to content

Commit

Permalink
impl uart
Browse files Browse the repository at this point in the history
  • Loading branch information
hidetatz committed Dec 17, 2022
1 parent fda1007 commit f2c4211
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions uart.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (u *Uart) read(address uint64) uint8 {
if (u.lcr >> 7) == 0 {
rbr := u.rbr
u.rbr = 0
u.lsr &= uint8(^lsrDataAvailable)
u.lsr &= ^uint8(lsrDataAvailable)
u.updateIir()
return rbr
}
Expand All @@ -158,7 +158,7 @@ func (u *Uart) write(address uint64, value uint8) {
case 0x10000000:
if (u.lcr >> 7) == 0 {
u.thr = value
u.lsr &= ^lsrThrEmpty
u.lsr &= ^uint8(lsrThrEmpty)
u.updateIir()
}
case 0x10000001:
Expand Down

0 comments on commit f2c4211

Please sign in to comment.