Skip to content
Snippets Groups Projects
Unverified Commit 6d8826e4 authored by José Ignacio Alamos Aste's avatar José Ignacio Alamos Aste Committed by GitHub
Browse files

Merge pull request #10267 from maribu/autoinit_fix

sys/auto_init: Fixed initialization of sht1x
parents cf24def6 be6b705b
No related branches found
No related tags found
No related merge requests found
...@@ -296,6 +296,10 @@ void auto_init(void) ...@@ -296,6 +296,10 @@ void auto_init(void)
/* initialize sensors and actuators */ /* initialize sensors and actuators */
#ifdef MODULE_SHT1X #ifdef MODULE_SHT1X
/* The sht1x module needs to be initialized regardless of SAUL being used,
* as the shell commands rely on auto-initialization. auto_init_sht1x also
* performs SAUL registration, but only if module auto_init_saul is used.
*/
DEBUG("Auto init SHT1X module (SHT10/SHT11/SHT15 sensor driver).\n"); DEBUG("Auto init SHT1X module (SHT10/SHT11/SHT15 sensor driver).\n");
extern void auto_init_sht1x(void); extern void auto_init_sht1x(void);
auto_init_sht1x(); auto_init_sht1x();
...@@ -428,10 +432,6 @@ void auto_init(void) ...@@ -428,10 +432,6 @@ void auto_init(void)
extern void auto_init_pulse_counter(void); extern void auto_init_pulse_counter(void);
auto_init_pulse_counter(); auto_init_pulse_counter();
#endif #endif
#ifdef MODULE_SHT1X
extern void auto_init_sht1x(void);
auto_init_sht1x();
#endif
#ifdef MODULE_SI114X #ifdef MODULE_SI114X
extern void auto_init_si114x(void); extern void auto_init_si114x(void);
auto_init_si114x(); auto_init_si114x();
......
...@@ -16,6 +16,11 @@ ...@@ -16,6 +16,11 @@
* *
* @author Marian Buschsieweke <marian.buschsieweke@ovgu.de> * @author Marian Buschsieweke <marian.buschsieweke@ovgu.de>
* *
* Please note that the sht1x differs from other sensor modules, as
* initialization is performed regardless of the use of SAUL. However, when
* the module `auto_init_saul` is *not* used, the SAUL registration is skipped
* and the initialization does *not* depend on SAUL in this case.
*
* @} * @}
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment