From 4f42a5d9786fbfd215de88051477be6d214d5848 Mon Sep 17 00:00:00 2001 From: liamstask Date: Mon, 19 Apr 2010 15:37:06 +0000 Subject: * update to Posix SerialDriver - removes SerialConfig pointer git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1876 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/Posix/serial_lld.c | 6 +++--- os/hal/platforms/Posix/serial_lld.h | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'os') 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 -- cgit v1.2.3