diff options
Diffstat (limited to 'os/hal/templates')
-rw-r--r-- | os/hal/templates/serial_lld.c | 6 | ||||
-rw-r--r-- | os/hal/templates/serial_lld.h | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/os/hal/templates/serial_lld.c b/os/hal/templates/serial_lld.c index 52e1881e7..0293f28e7 100644 --- a/os/hal/templates/serial_lld.c +++ b/os/hal/templates/serial_lld.c @@ -68,10 +68,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;
}
diff --git a/os/hal/templates/serial_lld.h b/os/hal/templates/serial_lld.h index 72a0063be..2a2abb582 100644 --- a/os/hal/templates/serial_lld.h +++ b/os/hal/templates/serial_lld.h @@ -70,8 +70,6 @@ typedef struct { _base_asynchronous_channel_data \
/* Driver state.*/ \
sdstate_t state; \
- /* Current configuration data.*/ \
- const SerialConfig *config; \
/* Input queue.*/ \
InputQueue iqueue; \
/* Output queue.*/ \
@@ -98,7 +96,7 @@ typedef struct { 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);
#ifdef __cplusplus
}
|