diff --git a/Makefile b/Makefile index f6b1f0eb28e3cefecf537df02dd6ecfffbf875d3..466cebc8a63c852b4a6fa8d7050128f436314d91 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,16 @@ ifneq ($(findstring lm75,${drivers}), ) COMMON_FLAGS += -DDRIVER_LM75 endif +ifneq ($(findstring max44006,${drivers}), ) + TARGETS += src/driver/max44006.cc + COMMON_FLAGS += -DDRIVER_MAX44006 +endif + +ifneq ($(findstring max44009,${drivers}), ) + TARGETS += src/driver/max44009.cc + COMMON_FLAGS += -DDRIVER_MAX44009 +endif + ifneq ($(findstring mmsimple,${drivers}), ) TARGETS += src/driver/mmsimple.cc COMMON_FLAGS += -DDRIVER_MMSIMPLE diff --git a/src/app/i2cdetect/main.cc b/src/app/i2cdetect/main.cc index 58406c60193e99d73a3090142eca05cd7e88dbbe..141c65a2b9ddbc22c3e333477b3a30e807a5c990 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];