From a00d69c60a66b997bad1351d0eb94cd50465d6b0 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 15 Oct 2018 15:32:37 +0200 Subject: i2cdetect: Add initial CCS811 support --- src/app/i2cdetect/main.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/app/i2cdetect/main.cc b/src/app/i2cdetect/main.cc index 4ec49d9..a31dbc9 100644 --- a/src/app/i2cdetect/main.cc +++ b/src/app/i2cdetect/main.cc @@ -12,6 +12,9 @@ #ifdef DRIVER_AM2320 #include "driver/am2320.h" #endif +#ifdef DRIVER_CCS811 +#include "driver/ccs811.h" +#endif #ifdef DRIVER_EEPROM24LC64 #include "driver/eeprom24lc64.h" #endif @@ -39,6 +42,9 @@ void loop(void) kout << "AM2320 error " << dec << am2320.getStatus() << endl; } #endif +#ifdef DRIVER_CCS811 + kout << "CCS811 status is " << ccs811.check() << endl; +#endif #ifdef DRIVER_MAX44009 kout.printf_float(max44009.getLux()); kout << endl; @@ -73,6 +79,10 @@ int main(void) kout << "I2C setup OK" << endl; +#ifdef DRIVER_CCS811 + ccs811.init(); +#endif + for (unsigned char i = 0; i < sizeof(i2c_status)/sizeof(unsigned int); i++) { i2c_status[i] = 0; } -- cgit v1.2.3