summaryrefslogtreecommitdiff
path: root/src/app/i2cdetect
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2018-08-07 10:19:09 +0200
committerDaniel Friesel <derf@finalrewind.org>2018-08-07 10:19:09 +0200
commit444e03292cf59f8d91e73084f1ed648e02662e58 (patch)
tree9caed4d64d98d5820cdbade7c2b434d8b793539b /src/app/i2cdetect
parentf6a842b1b064c83d42dfd626e888f79e4c1633e8 (diff)
i2cdetect: Adjust behaviour to available drivers
Diffstat (limited to 'src/app/i2cdetect')
-rw-r--r--src/app/i2cdetect/main.cc19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/app/i2cdetect/main.cc b/src/app/i2cdetect/main.cc
index 58406c6..141c65a 100644
--- a/src/app/i2cdetect/main.cc
+++ b/src/app/i2cdetect/main.cc
@@ -6,14 +6,29 @@
#else
#include "driver/soft_i2c.h"
#endif
+#ifdef DRIVER_LM75
#include "driver/lm75.h"
-//#include "driver/mmsimple.h"
+#endif
+#ifdef DRIVER_MAX44009
+#include "driver/max44009.h"
+#endif
+#ifdef DRIVER_MMSIMPLE
+#include "driver/mmsimple.h"
+#endif
void loop(void)
{
+#ifdef DRIVER_LM75
kout.printf_float(lm75.getTemp());
kout << endl;
- //moody.toggleBlue();
+#endif
+#ifdef DRIVER_MAX44009
+ kout.printf_float(max44009.getLux());
+ kout << endl;
+#endif
+#ifdef DRIVER_MMSIMPLE
+ moody.toggleBlue();
+#endif
}
unsigned int i2c_status[128 / (8 * sizeof(unsigned int)) + 1];