Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: Serial use

  1. #1

    Serial use

    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

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,045
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •