aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/hal/platforms/Posix/serial_lld.c6
-rw-r--r--os/hal/platforms/Posix/serial_lld.h4
2 files changed, 4 insertions, 6 deletions
diff --git a/os/hal/platforms/Posix/serial_lld.c b/os/hal/platforms/Posix/serial_lld.c
index 73a5aca1a..b312fccbd 100644
--- a/os/hal/platforms/Posix/serial_lld.c
+++ b/os/hal/platforms/Posix/serial_lld.c
@@ -226,10 +226,10 @@ void sd_lld_init(void) {
*
* @param[in] sdp pointer to a @p SerialDriver object
*/
-void sd_lld_start(SerialDriver *sdp) {
+void sd_lld_start(SerialDriver *sdp, const SerialConfig *config) {
- if (sdp->config == NULL)
- sdp->config = &default_config;
+ if (config == NULL)
+ config = &default_config;
#if USE_SIM_SERIAL1
if (sdp == &SD1)
diff --git a/os/hal/platforms/Posix/serial_lld.h b/os/hal/platforms/Posix/serial_lld.h
index ddb084db6..53ba4af95 100644
--- a/os/hal/platforms/Posix/serial_lld.h
+++ b/os/hal/platforms/Posix/serial_lld.h
@@ -111,8 +111,6 @@ typedef struct {
_base_asynchronous_channel_data \
/* Driver state.*/ \
sdstate_t state; \
- /* Current configuration data.*/ \
- const SerialConfig *config; \
/* Input queue.*/ \
InputQueue iqueue; \
/* Output queue.*/ \
@@ -152,7 +150,7 @@ extern SerialDriver SD2;
extern "C" {
#endif
void sd_lld_init(void);
- void sd_lld_start(SerialDriver *sdp);
+ void sd_lld_start(SerialDriver *sdp, const SerialConfig *config);
void sd_lld_stop(SerialDriver *sdp);
bool_t sd_lld_interrupt_pending(void);
#ifdef __cplusplus