diff options
author | Daniel Friesel <derf@finalrewind.org> | 2018-10-22 09:30:13 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2018-10-22 09:30:13 +0200 |
commit | 1865935a9e7d335b7afff3a6a159a4fd81db1275 (patch) | |
tree | 4735c3d9fecbb3332e313533fd9a264edfaaea86 /src | |
parent | c94fc1dbe4cffaf3ec30c5aa43611ae134227248 (diff) |
i2cbench: configurable setos
Diffstat (limited to 'src')
-rw-r--r-- | src/app/i2cbench/Makefile.inc | 4 | ||||
-rw-r--r-- | src/app/i2cbench/main.cc | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/app/i2cbench/Makefile.inc b/src/app/i2cbench/Makefile.inc index d0337fc..15ce127 100644 --- a/src/app/i2cbench/Makefile.inc +++ b/src/app/i2cbench/Makefile.inc @@ -1 +1,5 @@ arch_drivers += ,i2c + +ifneq (${i2cbench_setos}, ) + COMMON_FLAGS += -DI2CBENCH_SETOS=${i2cbench_setos} +endif diff --git a/src/app/i2cbench/main.cc b/src/app/i2cbench/main.cc index a630c6d..3237f67 100644 --- a/src/app/i2cbench/main.cc +++ b/src/app/i2cbench/main.cc @@ -22,12 +22,16 @@ #include "driver/mmsimple.h" #endif +#ifndef I2CBENCH_SETOS +#error must define I2CBENCH_SETOS +#endif + void loop(void) { #ifdef DRIVER_LM75 //kout.printf_float(lm75.getTemp()); //kout << endl; - lm75.setOS(64); + lm75.setOS(I2CBENCH_SETOS); #endif #ifdef DRIVER_AM2320 am2320.read(); |