What does the comment in HardwareSerial.h file is explaining us?

Post here first, or if you can't find a relevant section!
Post Reply
mustaq_ahm
Posts: 31
Joined: Tue Sep 14, 2021 11:08 am
Answers: 2

What does the comment in HardwareSerial.h file is explaining us?

Post by mustaq_ahm »

In HardwareSerial.h file there is a set of following line. What does it say? I did not understand.

Is that saying, that only 32 bytes can be accessed in buffer? or What? Could some one explain me this?

Code: Select all

    // Don't put any members after these buffers, since only the first
    // 32 bytes of this struct can be accessed quickly using the ldd
    // instruction.
    unsigned char _rx_buffer[SERIAL_RX_BUFFER_SIZE];
    unsigned char _tx_buffer[SERIAL_TX_BUFFER_SIZE];
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: What does the comment in HardwareSerial.h file is explaining us?

Post by fpiSTM »

It's a legacy from Arduino:
https://github.com/arduino/ArduinoCore- ... #L110-L112

For STM32 this is not relevant.
mustaq_ahm
Posts: 31
Joined: Tue Sep 14, 2021 11:08 am
Answers: 2

Re: What does the comment in HardwareSerial.h file is explaining us?

Post by mustaq_ahm »

For STM32 this is not relevant.
Okay Thank you.
Post Reply

Return to “General discussion”