Documentation
¶
Index ¶
Constants ¶
View Source
const ( Idle = Event(1 << 4) // IDLE line detected. RxNotEmpty = Event(1 << 5) // Read data register not empty. TxDone = Event(1 << 6) // Transmission complete. TxEmpty = Event(1 << 7) // Transmit data register empty. LINBreak = Event(1 << 8) // LIN break detection flag. CTS = Event(1 << 9) // Change on CTS status line EvAll = Idle | RxNotEmpty | TxDone | TxEmpty | LINBreak | CTS )
View Source
const ( ErrParity = Error(1 << 0) // Parity error. ErrFraming = Error(1 << 1) // Framing error. ErrNoise = Error(1 << 2) // Noise error flag. ErrOverrun = Error(1 << 3) // Overrun error. ErrAll = ErrParity | ErrFraming | ErrNoise | ErrOverrun )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error uint8
Error is bitmask that describes errors that can be detected by USART hardware when receiving data.
type Periph ¶
type Periph struct {
// contains filtered or unexported fields
}
Periph represents USART peripheral.
func (*Periph) Clear ¶
Clear clears events ev and errors err. For MCUs that have no USART_ICR register (older than L4, F7 series) only RxNotEmpty, TxDone, LINBreak and CTS events can be cleared this way. Other events can be cleared only by specific sequence of reading status register and read or write data register.
func (*Periph) EnableClock ¶
EnableClock enables clock for p. lp determines whether the clock remains on in low power (sleep) mode.
Click to show internal directories.
Click to hide internal directories.