aboutsummaryrefslogtreecommitdiffstats
path: root/os/io/templates/serial_lld.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/io/templates/serial_lld.c')
-rw-r--r--os/io/templates/serial_lld.c11
1 files changed, 10 insertions, 1 deletions
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 <ch.h>
+/** @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;
+
}
/**