aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/templates
diff options
context:
space:
mode:
authorliamstask <liamstask@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-04-19 15:29:44 +0000
committerliamstask <liamstask@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-04-19 15:29:44 +0000
commitc2ba7ebf4611f2beec0ebdf537934f6f28513579 (patch)
tree88040ba4b38819e5877f1c9ded4321303ddc653c /os/hal/templates
parent09126fe34f64af501fd163d4d385a71479d71096 (diff)
downloadChibiOS-c2ba7ebf4611f2beec0ebdf537934f6f28513579.tar.gz
ChibiOS-c2ba7ebf4611f2beec0ebdf537934f6f28513579.tar.bz2
ChibiOS-c2ba7ebf4611f2beec0ebdf537934f6f28513579.zip
* remove the SerialConfig pointer from the SerialDriver structure. This is now simply passed through from sdStart() to sd_lld_start()
* implementation for AT91SAM7 port provided - others will need to be updated git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1875 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/templates')
-rw-r--r--os/hal/templates/serial_lld.c6
-rw-r--r--os/hal/templates/serial_lld.h4
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
}