From d941f6d38046e6c94b824385ac38d5ad1bcab6a1 Mon Sep 17 00:00:00 2001 From: Alan Carvalho de Assis Date: Mon, 15 Aug 2016 09:33:51 -0600 Subject: [PATCH] Add oneshot board initialization to stm32f103-minimum --- configs/stm32f103-minimum/src/stm32_appinit.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/configs/stm32f103-minimum/src/stm32_appinit.c b/configs/stm32f103-minimum/src/stm32_appinit.c index 78b7ac3ebf..30a8f68211 100644 --- a/configs/stm32f103-minimum/src/stm32_appinit.c +++ b/configs/stm32f103-minimum/src/stm32_appinit.c @@ -45,6 +45,7 @@ #include #include +#include #include "stm32.h" #include "stm32f103_minimum.h" @@ -80,11 +81,22 @@ int board_app_initialize(uintptr_t arg) { +#ifdef CONFIG_ONESHOT + struct oneshot_lowerhalf_s *os = NULL; +#endif int ret = OK; #ifdef CONFIG_WL_MFRC522 ret = stm32_mfrc522initialize("/dev/rfid0"); #endif +#ifdef CONFIG_ONESHOT + os = oneshot_initialize(1, 10); + if (os) + { + ret = oneshot_register("/dev/oneshot", os); + } +#endif + return ret; }