Serial use

Status
Not open for further replies.

michastro

Member
Hello,
I am translating a program from an UNO32 board to teensy 4.0. I am searching how to use the serial link. I would like to know was is the register or bit to test to know if there is something arrived on the serial port. Is there also a bit changed when the all the bytes arrived on serial port have been read.
Thanks for your help very usefull, now I am able to program the GPT timer directly.
Michel
 
Use Serial.available().

Or if you really want to dive into the low-level details, look at the code in HardwareSerial.cpp. You will also need to read the reference manual to learn the LPUART registers. But the hardware and the way it is used is much more advanced than your question seems to assume. A combination of a FIFO inside the hardware and a buffer in software are used. Bits in registers are not checked explicitly by code, because interrupt are used to respond to events.
 
Status
Not open for further replies.
Back
Top