summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Beare <bruce.j.beare@intel.com>2016-01-12 13:02:34 -0800
committerBruce Beare <bruce.j.beare@intel.com>2016-01-14 09:34:48 -0800
commita73d756d9fced0c084dff267572c26d3330cb8f6 (patch)
treebe8bba128ae7f58efd7def0ffa260fade7bdafca
parentee70559bf3308708bc29b7765775fe389ab68948 (diff)
downloadintel-a73d756d9fced0c084dff267572c26d3330cb8f6.tar.gz
SparkFun OLED: use default I2C bus
BUG=none Change-Id: Iaf1055963f30ccace95116d41c6fb9f4286ee342 Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
-rw-r--r--peripheral/displays/SparkFun_OLED/SparkFunOLED.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/peripheral/displays/SparkFun_OLED/SparkFunOLED.cpp b/peripheral/displays/SparkFun_OLED/SparkFunOLED.cpp
index a1c1c03..b0cc2dc 100644
--- a/peripheral/displays/SparkFun_OLED/SparkFunOLED.cpp
+++ b/peripheral/displays/SparkFun_OLED/SparkFunOLED.cpp
@@ -20,6 +20,7 @@
*/
#include <eboled.h>
+#include <mraa.hpp>
#include <getopt.h>
#include <stdio.h>
@@ -92,7 +93,9 @@ int main(int argc, char* argv[]) {
if (ReadOpts(argc, argv, &options) < 0)
return 1;
- upm::EBOLED *display = new upm::EBOLED(EBOLED_DEFAULT_SPI_BUS, EBOLED_DEFAULT_CD, EBOLED_DEFAULT_RESET);
+ upm::EBOLED *display = new upm::EBOLED(
+ mraa_get_default_i2c_bus(MRAA_MAIN_PLATFORM_OFFSET),
+ EBOLED_DEFAULT_CD, EBOLED_DEFAULT_RESET);
if (options.invert_color) {
display->setTextColor(upm::COLOR_BLACK);