Hello all,

This is an old post but my reason for responding is the following. There 
are modules that can be controlled via the serial interface by sending AT 
commands. In these modules you can change the baudrate but the serial 
library does not support that so you cannot make use of a higher baudrate 
(the default of these modules is often 9600 baud).

So I changed - not yet tested and not yet uploaded - the serial library as 
follows:
-) If you define SERIAL_HW_BAUDRATE the library works as usual and you call 
serial_hw_init() as you are used to.
-) If you do not define SERIAL_HW_BAUDRATE you must pass the baudrate as 
argument to serial_hw_init()

So when using the SERIAL_HW_BAUDRATE constant there is no change but the 
behavior is different if you want to use the fixed baudrate but you forgot 
to define it. If you do not define it and you just call serial_hw_init() 
the compiler will now report that a parameter is missing for 
serial_hw_init() instead the message that SERIAL_HW_BAUDRATE is not defined.

I assume that you are OK with this.

BTW. When using the feature to change the baudrate dynamically, you will 
need more Code space and Data space.

Kind regards,

Rob


Op maandag 17 oktober 2022 om 13:39:52 UTC schreef [email protected]:

> Hello everyone, Is there anyone who has a solution to my problem. I am 
> working on a serial LCD now that I have this working, I want to select the 
> baud rate before running the program. Unfortunately, the "const 
> serial_hw_baudate" do not easily change. In the library "usart_common" I 
> changed all the constants in a variable "var dword" but I keep getting 
> error messages from this lib. Maybe I'm overlooking something, or is there 
> a simple method to set the Baud rate under software control.
>  Kind regards, Bill
>

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/jallib/b02cf1cd-01f8-43e0-bfc9-fbb0b09644e4n%40googlegroups.com.

Reply via email to