USART always ready
This commit is contained in:
parent
37ef30d1a1
commit
6841c7a6bf
@ -52,7 +52,35 @@ impl DeviceImpl for USART {
|
|||||||
info!(self.log, "USART::Read(), not implemented");
|
info!(self.log, "USART::Read(), not implemented");
|
||||||
0
|
0
|
||||||
},
|
},
|
||||||
USART_STATUS => self.status,
|
USART_STATUS => {
|
||||||
|
// USART_DREIF_bm 0x20
|
||||||
|
/*
|
||||||
|
|
||||||
|
6528 #define USART_RXCIF_bm 0x80 // Receive Interrupt Flag bit mask.
|
||||||
|
6529 #define USART_RXCIF_bp 7 // Receive Interrupt Flag bit position.
|
||||||
|
6530
|
||||||
|
6531 #define USART_TXCIF_bm 0x40 // Transmit Interrupt Flag bit mask.
|
||||||
|
6532 #define USART_TXCIF_bp 6 // Transmit Interrupt Flag bit position.
|
||||||
|
6533
|
||||||
|
6534 #define USART_DREIF_bm 0x20 // Data Register Empty Flag bit mask.
|
||||||
|
6535 #define USART_DREIF_bp 5 // Data Register Empty Flag bit position.
|
||||||
|
6536
|
||||||
|
6537 #define USART_FERR_bm 0x10 // Frame Error bit mask.
|
||||||
|
6538 #define USART_FERR_bp 4 // Frame Error bit position.
|
||||||
|
6539
|
||||||
|
6540 #define USART_BUFOVF_bm 0x08 // Buffer Overflow bit mask.
|
||||||
|
6541 #define USART_BUFOVF_bp 3 // Buffer Overflow bit position.
|
||||||
|
6542
|
||||||
|
6543 #define USART_PERR_bm 0x04 // Parity Error bit mask.
|
||||||
|
6544 #define USART_PERR_bp 2 // Parity Error bit position.
|
||||||
|
6545
|
||||||
|
6546 #define USART_RXB8_bm 0x01 // Receive Bit 8 bit mask.
|
||||||
|
6547 #define USART_RXB8_bp 0 // Receive Bit 8 bit position.
|
||||||
|
6548
|
||||||
|
*/
|
||||||
|
info!(self.log, "Checking USART status");
|
||||||
|
self.status | 0x20u8 // Data register empty flag.
|
||||||
|
}
|
||||||
USART_CTRLA => self.ctrla,
|
USART_CTRLA => self.ctrla,
|
||||||
USART_CTRLB => self.ctrlb,
|
USART_CTRLB => self.ctrlb,
|
||||||
USART_CTRLC => self.ctrlc,
|
USART_CTRLC => self.ctrlc,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user