summaryrefslogtreecommitdiff
path: root/peripheral/libupm/src/ssd1351
diff options
context:
space:
mode:
Diffstat (limited to 'peripheral/libupm/src/ssd1351')
-rw-r--r--peripheral/libupm/src/ssd1351/CMakeLists.txt4
-rw-r--r--peripheral/libupm/src/ssd1351/gfx.cxx (renamed from peripheral/libupm/src/ssd1351/ssd1351_gfx.cxx)2
-rw-r--r--peripheral/libupm/src/ssd1351/gfx.h (renamed from peripheral/libupm/src/ssd1351/ssd1351_gfx.hpp)0
-rw-r--r--peripheral/libupm/src/ssd1351/javaupm_ssd1351.i8
-rw-r--r--peripheral/libupm/src/ssd1351/jsupm_ssd1351.i8
-rw-r--r--peripheral/libupm/src/ssd1351/pyupm_ssd1351.i8
-rw-r--r--peripheral/libupm/src/ssd1351/ssd1351.cxx4
-rw-r--r--peripheral/libupm/src/ssd1351/ssd1351.h (renamed from peripheral/libupm/src/ssd1351/ssd1351.hpp)10
8 files changed, 19 insertions, 25 deletions
diff --git a/peripheral/libupm/src/ssd1351/CMakeLists.txt b/peripheral/libupm/src/ssd1351/CMakeLists.txt
index 03a9b6c..ee75b73 100644
--- a/peripheral/libupm/src/ssd1351/CMakeLists.txt
+++ b/peripheral/libupm/src/ssd1351/CMakeLists.txt
@@ -1,5 +1,5 @@
set (libname "ssd1351")
set (libdescription "libupm SSD1351 SPI LCD")
-set (module_src ssd1351_gfx.cxx ssd1351.cxx)
-set (module_hpp ssd1351_gfx.hpp ssd1351.hpp)
+set (module_src gfx.cxx ssd1351.cxx)
+set (module_h gfx.h ssd1351.h)
upm_module_init()
diff --git a/peripheral/libupm/src/ssd1351/ssd1351_gfx.cxx b/peripheral/libupm/src/ssd1351/gfx.cxx
index 0eadfd1..443932e 100644
--- a/peripheral/libupm/src/ssd1351/ssd1351_gfx.cxx
+++ b/peripheral/libupm/src/ssd1351/gfx.cxx
@@ -28,7 +28,7 @@
#include <unistd.h>
#include <stdlib.h>
-#include "ssd1351_gfx.hpp"
+#include "gfx.h"
using namespace upm;
diff --git a/peripheral/libupm/src/ssd1351/ssd1351_gfx.hpp b/peripheral/libupm/src/ssd1351/gfx.h
index e199cd2..e199cd2 100644
--- a/peripheral/libupm/src/ssd1351/ssd1351_gfx.hpp
+++ b/peripheral/libupm/src/ssd1351/gfx.h
diff --git a/peripheral/libupm/src/ssd1351/javaupm_ssd1351.i b/peripheral/libupm/src/ssd1351/javaupm_ssd1351.i
index 36ca159..7adb59a 100644
--- a/peripheral/libupm/src/ssd1351/javaupm_ssd1351.i
+++ b/peripheral/libupm/src/ssd1351/javaupm_ssd1351.i
@@ -6,14 +6,14 @@
%ignore m_map;
%ignore font;
-%include "ssd1351_gfx.hpp"
+%include "gfx.h"
%{
- #include "ssd1351_gfx.hpp"
+ #include "gfx.h"
%}
-%include "ssd1351.hpp"
+%include "ssd1351.h"
%{
- #include "ssd1351.hpp"
+ #include "ssd1351.h"
%}
%pragma(java) jniclasscode=%{
diff --git a/peripheral/libupm/src/ssd1351/jsupm_ssd1351.i b/peripheral/libupm/src/ssd1351/jsupm_ssd1351.i
index 37677fc..b096151 100644
--- a/peripheral/libupm/src/ssd1351/jsupm_ssd1351.i
+++ b/peripheral/libupm/src/ssd1351/jsupm_ssd1351.i
@@ -1,12 +1,12 @@
%module jsupm_ssd1351
%include "../upm.i"
-%include "ssd1351_gfx.hpp"
+%include "gfx.h"
%{
- #include "ssd1351_gfx.hpp"
+ #include "gfx.h"
%}
-%include "ssd1351.hpp"
+%include "ssd1351.h"
%{
- #include "ssd1351.hpp"
+ #include "ssd1351.h"
%}
diff --git a/peripheral/libupm/src/ssd1351/pyupm_ssd1351.i b/peripheral/libupm/src/ssd1351/pyupm_ssd1351.i
index 70aa066..fee480d 100644
--- a/peripheral/libupm/src/ssd1351/pyupm_ssd1351.i
+++ b/peripheral/libupm/src/ssd1351/pyupm_ssd1351.i
@@ -6,12 +6,12 @@
%feature("autodoc", "3");
%rename("printString") print(std::string msg);
-%include "ssd1351_gfx.hpp"
+%include "gfx.h"
%{
- #include "ssd1351_gfx.hpp"
+ #include "gfx.h"
%}
-%include "ssd1351.hpp"
+%include "ssd1351.h"
%{
- #include "ssd1351.hpp"
+ #include "ssd1351.h"
%}
diff --git a/peripheral/libupm/src/ssd1351/ssd1351.cxx b/peripheral/libupm/src/ssd1351/ssd1351.cxx
index ab4e1f3..2103603 100644
--- a/peripheral/libupm/src/ssd1351/ssd1351.cxx
+++ b/peripheral/libupm/src/ssd1351/ssd1351.cxx
@@ -30,7 +30,7 @@
#include <unistd.h>
#include <stdlib.h>
-#include "ssd1351.hpp"
+#include "ssd1351.h"
using namespace upm;
using namespace std;
@@ -44,7 +44,7 @@ SSD1351::SSD1351 (uint8_t oc, uint8_t dc, uint8_t rst) :
// Setup SPI bus
m_spi.frequency(8 * 1000000);
- m_spi.mode(mraa::SPI_MODE0);
+ m_spi.mode(mraa::SPI_MODE3);
m_spi.writeByte(0x00); // Need to bring clk high before init
// Init pins
diff --git a/peripheral/libupm/src/ssd1351/ssd1351.hpp b/peripheral/libupm/src/ssd1351/ssd1351.h
index 4462fca..6f23c66 100644
--- a/peripheral/libupm/src/ssd1351/ssd1351.hpp
+++ b/peripheral/libupm/src/ssd1351/ssd1351.h
@@ -30,7 +30,7 @@
#include <mraa/common.hpp>
#include <mraa/gpio.hpp>
#include <mraa/spi.hpp>
-#include "ssd1351_gfx.hpp"
+#include "gfx.h"
// Display Size
#define SSD1351WIDTH 128
@@ -92,13 +92,7 @@ namespace upm {
*
* @brief API for SSD1351 OLED displays
*
- * This module defines the interface for the SSD1351 display library. It was
- * tested with the Adafruit 1.5" OLED Display, but should work with any SSD1351
- * display running in SPI mode.
- *
- * On the Intel Edison don't forget to disable SPI Power Management (PM) for
- * this driver to work, you can find more details on this topic here:
- * http://iotdk.intel.com/docs/master/mraa/edison.html
+ * This module defines the interface for the SSD1351 display library
*
* @image html ssd1351.jpg
* @snippet ssd1351.cxx Interesting