From 45a6b7dc5a1758cb2bc49b0d76effa381043d297 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Wed, 19 Aug 2009 13:11:25 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1082 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/io/templates/serial_lld.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'os/io/templates') diff --git a/os/io/templates/serial_lld.c b/os/io/templates/serial_lld.c index 0fbaa3900..d0aabfaa0 100644 --- a/os/io/templates/serial_lld.c +++ b/os/io/templates/serial_lld.c @@ -26,6 +26,10 @@ #include +/** @brief Driver default configuration.*/ +static const SerialDriverConfig default_config = { +}; + /*===========================================================================*/ /* Low Level Driver local functions. */ /*===========================================================================*/ @@ -49,10 +53,15 @@ void sd_lld_init(void) { * @brief Low level serial driver configuration and (re)start. * * @param[in] sdp pointer to a @p SerialDriver object - * @param[in] config the architecture-dependent serial driver configuration + * @param[in] config the architecture-dependent serial driver configuration. + * If this parameter is set to @p NULL then a default + * configuration is used. */ void sd_lld_start(SerialDriver *sdp, const SerialDriverConfig *config) { + if (config == NULL) + config = &default_config; + } /** -- cgit v1.2.3