Compare commits

...

14 Commits

Author SHA1 Message Date
655ccee9af upm: v0.6.1
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-03-31 17:22:16 -07:00
102d86870a bme280: added missing return in non-void function
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-03-31 17:21:54 -07:00
a88ec4237d gfx: renamed GFX headers to avoid overlap on install
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-03-31 17:21:07 -07:00
cf2b8c9a6e ssd1351: Changed SPI to MODE0 for compatibilty and listed SPI PM issue in description
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-03-31 16:16:46 -07:00
68aa067f82 SWIG: Added include carrays_uint8_t.i for nrf24l01 python and js bindings
Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
2016-03-30 10:30:12 -07:00
24062f6a9d Java: Added examples for AM2315 and TSL2561
Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
2016-03-30 10:23:24 -07:00
db8d708798 cmake: node install path is now same for both package and .node
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-03-29 17:28:28 -07:00
edfdf6ec34 cmake: added include_directories(..) to python too, for consistency
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-03-29 17:08:12 -07:00
7c66d5c321 examples/c++: Fix syntax errors in ads1x15.cxx
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-03-29 16:59:38 -07:00
0e365590c4 cmake: Add parent directory to include path for UPM modules
This avoids using include files from a pre-existing UPM installation
as they can break the build if API changes are made.

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-03-29 16:59:00 -07:00
ba127ec4d4 cmake: honor LIB_INSTALL_DIR and also for Node install path
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-03-28 17:51:54 -07:00
b6572e1f28 cmake: Add upm header files directory
Signed-off-by: Eugene Bolshakov <pub@relvarsoft.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-03-28 16:24:45 -07:00
02974f242e cmake: fix node modules install path when install prefix is given
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-03-28 16:22:49 -07:00
e809016152 cmake: added back PYTHON_VERSION_* when not building docs for install path
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-03-28 16:22:35 -07:00
32 changed files with 420 additions and 258 deletions

View File

@ -15,7 +15,12 @@ message (INFO " found mraa version: ${MRAA_VERSION}")
# Appends the cmake/modules path to MAKE_MODULE_PATH variable.
set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
set (LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}" CACHE PATH "Installation path for libraries")
# Older cmake might not pick CMAKE_INSTALL_LIBDIR right
if (CMAKE_INSTALL_LIBDIR)
set (LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}" CACHE PATH "Installation path for libraries")
else ()
set (LIB_INSTALL_DIR "lib" CACHE PATH "Installation path for libraries")
endif ()
# Set CMAKE_LIB_INSTALL_DIR if not defined
include(GNUInstallDirs)
@ -25,7 +30,7 @@ include (GetGitRevisionDescription)
git_describe (VERSION "--tags")
if ("x_${VERSION}" STREQUAL "x_GIT-NOTFOUND" OR "x_${VERSION}" STREQUAL "x_-128-NOTFOUND")
message (WARNING " - Install git to compile a production UPM!")
set (VERSION "v0.6.0-dirty")
set (VERSION "v0.6.1-dirty")
endif ()
message (INFO " - UPM Version ${VERSION}")
@ -126,7 +131,6 @@ if (BUILDDOC)
string (REPLACE "." ";" PYTHON_VERSION_LIST ${PYTHONLIBS_VERSION_STRING})
list (GET PYTHON_VERSION_LIST 0 PYTHON_VERSION_MAJOR)
list (GET PYTHON_VERSION_LIST 1 PYTHON_VERSION_MINOR)
set (SITE_PACKAGES ${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages)
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/doxy/conf.py.in ${CMAKE_CURRENT_BINARY_DIR}/pydoc/conf.py @ONLY)
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/doxy/index.rst ${CMAKE_CURRENT_BINARY_DIR}/pydoc/index.rst COPYONLY)
add_custom_target (pydoc ALL

View File

@ -4,6 +4,15 @@ Changelog {#changelog}
Here's a list summarizing some of the key undergoing changes to our library
from earlier versions:
### v0.6.1
* Fixed library build process for different configurations across multiple
environments reported by users.
* Fixed multiple GFX library header clash and improved SSD1351 compatibility
by changing SPI mode
* Added Node and Python array typemaps for nrf24l01
* Added 2 new JAVA examples
### v0.6.0
* Introduced C++ Interfaces for several sensor categories that will help

View File

@ -286,7 +286,7 @@ int main()
else ads->setCompMode();
break;
case 18:
cout << ads->getCompLatch() << cout;
cout << ads->getCompLatch() << endl;
break;
case 19:
cout << "select one of the following:" << endl;
@ -296,7 +296,7 @@ int main()
else ads->setCompLatch();
break;
case 20:
cout << ads->getContinuous() << cout;
cout << ads->getContinuous() << endl;
break;
case 21:
cout << "select one of the following:" << endl;

View File

@ -0,0 +1,66 @@
/*
* Author: Abhishek Malik <abhishek.malik@intel.com>
* Copyright (c) 2016 Intel Corporation.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
import upm_am2315.AM2315;
public class AM2315Example {
static {
try {
System.loadLibrary("javaupm_am2315");
System.loadLibrary("mraajava");
} catch (UnsatisfiedLinkError e) {
System.err.println(
"Native code library failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" +
e);
System.exit(1);
}
}
public static void main(String[] args) {
// TODO Auto-generated method stub
//! [Interesting]
float humidity = 0;
float temperature = 0;
// Instantiate the sensor
AM2315 sensor = new AM2315(0, upm_am2315.javaupm_am2315Constants.AM2315_I2C_ADDRESS);
sensor.testSensor();
while(true){
// retrieving the humidity and temperature values
humidity = sensor.getHumidity();
temperature = sensor.getTemperature();
System.out.println("Temperature : "+temperature+" Humidity: "+humidity);
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
System.out.println("The following exception occured: "+e.getMessage());
}
}
//! [Interesting]
}
}

View File

@ -110,6 +110,8 @@ add_example(TEAMS_Example teams)
add_example(APA102Sample apa102)
add_example(TEX00_Example tex00)
add_example(BMI160_Example bmi160)
add_example(Tsl2561 tsl2561)
add_example(AM2315Example am2315)
if (MODBUS_FOUND)
add_example(H803X_Example h803x)
endif()

View File

@ -0,0 +1,61 @@
/*
* Author: Abhishek Malik <abhishek.malik@intel.com>
* Copyright (c) 2016 Intel Corporation.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
import upm_tsl2561.TSL2561;
public class Tsl2561 {
static {
try {
System.loadLibrary("javaupm_tsl2561");
System.loadLibrary("mraajava");
} catch (UnsatisfiedLinkError e) {
System.err.println(
"Native code library failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" +
e);
System.exit(1);
}
}
public static void main(String[] args) {
// TODO Auto-generated method stub
//! [Interesting]
TSL2561 sensor = null;
int loopCount = 100;
// Instantiate the sensor object
sensor = new TSL2561();
for (int i=0; i<loopCount; i++){
// retrieving and displaying the Lux value
System.out.println("Lux: "+sensor.getLux());
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
System.out.println("The following exception occured: "+e.getMessage());
}
}
//! [Interesting]
}
}

View File

@ -29,6 +29,10 @@ endmacro (upm_CREATE_INSTALL_PKGCONFIG)
macro(upm_SWIG_PYTHON)
if (BUILDSWIGPYTHON AND BUILDSWIG)
include_directories (
${CMAKE_CURRENT_SOURCE_DIR}/..
)
set_source_files_properties (pyupm_${libname}.i PROPERTIES CPLUSPLUS ON)
set_source_files_properties (pyupm_${libname}.i PROPERTIES SWIG_FLAGS "-I${CMAKE_CURRENT_BINARY_DIR}/..")
swig_add_module (pyupm_${libname} python pyupm_${libname}.i ${module_src})
@ -40,7 +44,7 @@ macro(upm_SWIG_PYTHON)
)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/_pyupm_${libname}.so
${CMAKE_CURRENT_BINARY_DIR}/pyupm_${libname}.py
DESTINATION ${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/
DESTINATION ${LIB_INSTALL_DIR}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/
COMPONENT ${libname})
endif()
endmacro()
@ -58,7 +62,9 @@ macro(upm_SWIG_NODE)
string (LENGTH "${V8_VERSION_HEX}" V8_VERSION_HEX_length)
endwhile ()
# include_directories (${NODE_INCLUDE_DIRS})
include_directories (
${CMAKE_CURRENT_SOURCE_DIR}/..
)
set_property (SOURCE jsupm_${libname}.i PROPERTY SWIG_FLAGS "-node" "-DV8_VERSION=${V8_VERSION_HEX}")
set_source_files_properties (jsupm_${libname}.i PROPERTIES CPLUSPLUS ON)
@ -100,7 +106,6 @@ macro(upm_SWIG_NODE)
endif()
createpackagejson(${libname})
set (NODE_MODULE_INSTALL_PATH ${NODE_ROOT_DIR}/lib/node_modules/jsupm_${libname}/)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/jsupm_${libname}.node
DESTINATION ${NODE_MODULE_INSTALL_PATH} COMPONENT ${libname})
endif()
@ -132,8 +137,8 @@ macro(upm_SWIG_JAVA)
PREFIX "lib"
SUFFIX ".so"
)
install (TARGETS javaupm_${libname} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/upm_${libname}.jar DESTINATION ${CMAKE_INSTALL_LIBDIR}/../lib/java)
install (TARGETS javaupm_${libname} LIBRARY DESTINATION ${LIB_INSTALL_DIR})
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/upm_${libname}.jar DESTINATION ${LIB_INSTALL_DIR}/../lib/java)
if (NOT DEFINED $ENV{JAVA_HOME_NATIVE})
set (JAVAC $ENV{JAVA_HOME}/bin/javac)
@ -174,8 +179,11 @@ if (SWIG_FOUND)
if (BUILDSWIGPYTHON)
if(NOT PYTHONLIBS_FOUND)
find_package (PythonLibs ${PYTHONBUILD_VERSION} REQUIRED)
string (REPLACE "." ";" PYTHON_VERSION_LIST ${PYTHONLIBS_VERSION_STRING})
list (GET PYTHON_VERSION_LIST 0 PYTHON_VERSION_MAJOR)
list (GET PYTHON_VERSION_LIST 1 PYTHON_VERSION_MINOR)
endif()
endif()
endif(BUILDSWIGPYTHON)
if (BUILDSWIGNODE)
if(NOT NODE_FOUND)
find_package(Node)
@ -192,13 +200,19 @@ if (SWIG_FOUND)
)
macro(createpackagejson)
configure_file (${PROJECT_SOURCE_DIR}/src/package.json.in ${CMAKE_CURRENT_BINARY_DIR}/package.json @ONLY)
set (NODE_MODULE_INSTALL_PATH ${NODE_ROOT_DIR}/lib/node_modules/jsupm_${libname}/)
# If a CMAKE_INSTALL_PREFIX has NOT been provided, set NODE_MODULE_INSTALL_PATH
# base on the NODE_ROOT_DIR.
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set (NODE_MODULE_INSTALL_PATH ${NODE_ROOT_DIR}/${LIB_INSTALL_DIR}/node_modules/jsupm_${libname}/)
# If a CMAKE_INSTALL_PREFIX has been provided, set NODE_MODULE_INSTALL_PATH
# relative to the provided install directory.
else ()
set (NODE_MODULE_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/node_modules/jsupm_${libname}/)
endif ()
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/package.json
DESTINATION ${NODE_MODULE_INSTALL_PATH} COMPONENT ${libname})
endmacro()
endif(BUILDSWIGNODE)
endif()
macro(upm_module_init)
@ -207,7 +221,7 @@ macro(upm_module_init)
foreach (linkflag ${ARGN})
target_link_libraries (${libname} ${linkflag})
endforeach ()
include_directories (${MRAA_INCLUDE_DIRS} .)
include_directories (${MRAA_INCLUDE_DIRS} . ..)
target_link_libraries (${libname} ${MRAA_LIBRARIES})
set_target_properties(
${libname}
@ -215,7 +229,7 @@ macro(upm_module_init)
SOVERSION ${upm_VERSION_MAJOR}
VERSION ${upm_VERSION_STRING}
)
upm_create_install_pkgconfig (upm-${libname}.pc ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
upm_create_install_pkgconfig (upm-${libname}.pc ${LIB_INSTALL_DIR}/pkgconfig)
if (SWIG_FOUND)
if (NOT ";${PYTHONSWIG_BLACKLIST};" MATCHES ";${libname};")
upm_swig_python()
@ -230,7 +244,7 @@ macro(upm_module_init)
if (BUILDDOC)
upm_doxygen()
endif()
install(TARGETS ${libname} DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(TARGETS ${libname} DESTINATION ${LIB_INSTALL_DIR})
install (FILES ${module_h} DESTINATION include/upm COMPONENT ${libname})
if (IPK)

View File

@ -339,7 +339,7 @@ return v_data_uncomp_hum_int32;
* device address with global structure bme280
*-------------------------------------------------------------------------*/
int8_t BME280::I2C_routine()
{
{
/*--------------------------------------------------------------------------*
* By using bme280 the following structure parameter can be accessed
* Bus write function pointer: BME280_WR_FUNC_PTR
@ -371,9 +371,8 @@ int32_t BME280::i2c_write_string(uint8_t dev_addr,uint8_t* ptr, uint8_t cnt)
if((ret = m_i2c->write((const uint8_t*) (ptr), cnt)) != 0)
{
UPM_THROW("I2C write error");
}
return 0;
}
/* \Brief: The function is used as I2C bus write
@ -448,7 +447,6 @@ void BME280::BME280_delay_msek(uint16_t mseconds)
// Iterate nanosleep in a loop until the total sleep time is the original
// value of the seconds parameter
while ( ( nanosleep( &sleepTime, &sleepTime ) != 0 ) && ( errno == EINTR ) );
}

View File

@ -1,5 +1,5 @@
set (libname "ili9341")
set (libdescription "libupm ILI9341 SPI LCD")
set (module_src gfx.cxx ili9341.cxx)
set (module_h gfx.h ili9341.h)
set (module_src ili9341_gfx.cxx ili9341.cxx)
set (module_h ili9341_gfx.h ili9341.h)
upm_module_init()

View File

@ -32,7 +32,7 @@
#include <mraa/common.hpp>
#include <mraa/gpio.hpp>
#include <mraa/spi.hpp>
#include "gfx.h"
#include "ili9341_gfx.h"
// Defines
#define ILI9341_TFTWIDTH 240

View File

@ -24,7 +24,7 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "gfx.h"
#include "ili9341_gfx.h"
using namespace upm;

View File

@ -5,9 +5,9 @@
%apply uint8_t *INPUT { uint8_t *addr }
%include "gfx.h"
%include "ili9341_gfx.h"
%{
#include "gfx.h"
#include "ili9341_gfx.h"
%}
%{

View File

@ -1,9 +1,9 @@
%module jsupm_ili9341
%include "../upm.i"
%include "gfx.h"
%include "ili9341_gfx.h"
%{
#include "gfx.h"
#include "ili9341_gfx.h"
%}
%include "ili9341.h"

View File

@ -6,9 +6,9 @@
%feature("autodoc", "3");
%rename("printString") print(std::string msg);
%include "gfx.h"
%include "ili9341_gfx.h"
%{
#include "gfx.h"
#include "ili9341_gfx.h"
%}
%include "ili9341.h"

View File

@ -1,5 +1,6 @@
%module jsupm_nrf24l01
%include "../upm.i"
%include "../carrays_uint8_t.i"
%{
#include "nrf24l01.h"

View File

@ -2,6 +2,7 @@
%include "pyupm_doxy2swig.i"
%module pyupm_nrf24l01
%include "../upm.i"
%include "../carrays_uint8_t.i"
%feature("autodoc", "3");

View File

@ -1,5 +1,5 @@
set (libname "ssd1351")
set (libdescription "libupm SSD1351 SPI LCD")
set (module_src gfx.cxx ssd1351.cxx)
set (module_h gfx.h ssd1351.h)
set (module_src ssd1351_gfx.cxx ssd1351.cxx)
set (module_h ssd1351_gfx.h ssd1351.h)
upm_module_init()

View File

@ -6,9 +6,9 @@
%ignore m_map;
%ignore font;
%include "gfx.h"
%include "ssd1351_gfx.h"
%{
#include "gfx.h"
#include "ssd1351_gfx.h"
%}
%include "ssd1351.h"

View File

@ -1,9 +1,9 @@
%module jsupm_ssd1351
%include "../upm.i"
%include "gfx.h"
%include "ssd1351_gfx.h"
%{
#include "gfx.h"
#include "ssd1351_gfx.h"
%}
%include "ssd1351.h"

View File

@ -6,9 +6,9 @@
%feature("autodoc", "3");
%rename("printString") print(std::string msg);
%include "gfx.h"
%include "ssd1351_gfx.h"
%{
#include "gfx.h"
#include "ssd1351_gfx.h"
%}
%include "ssd1351.h"

View File

@ -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_MODE3);
m_spi.mode(mraa::SPI_MODE0);
m_spi.writeByte(0x00); // Need to bring clk high before init
// Init pins

View File

@ -30,7 +30,7 @@
#include <mraa/common.hpp>
#include <mraa/gpio.hpp>
#include <mraa/spi.hpp>
#include "gfx.h"
#include "ssd1351_gfx.h"
// Display Size
#define SSD1351WIDTH 128
@ -92,7 +92,13 @@ namespace upm {
*
* @brief API for SSD1351 OLED displays
*
* This module defines the interface for the SSD1351 display library
* 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
*
* @image html ssd1351.jpg
* @snippet ssd1351.cxx Interesting

View File

@ -28,7 +28,7 @@
#include <unistd.h>
#include <stdlib.h>
#include "gfx.h"
#include "ssd1351_gfx.h"
using namespace upm;

View File

@ -1,5 +1,5 @@
set (libname "st7735")
set (libdescription "libupm SPI LCD")
set (module_src gfx.cxx st7735.cxx)
set (module_h gfx.h st7735.h)
set (module_src st7735_gfx.cxx st7735.cxx)
set (module_h st7735_gfx.h st7735.h)
upm_module_init()

View File

@ -35,9 +35,9 @@
$1 = (unsigned char *)JCALL2(GetByteArrayElements, jenv, $input, NULL);
}
%include "gfx.h"
%include "st7735_gfx.h"
%{
#include "gfx.h"
#include "st7735_gfx.h"
%}
%include "st7735.h"

View File

@ -1,9 +1,9 @@
%module jsupm_st7735
%include "../upm.i"
%include "gfx.h"
%include "st7735_gfx.h"
%{
#include "gfx.h"
#include "st7735_gfx.h"
%}
%include "st7735.h"

View File

@ -6,9 +6,9 @@
%feature("autodoc", "3");
%rename("printString") print(std::string msg);
%include "gfx.h"
%include "st7735_gfx.h"
%{
#include "gfx.h"
#include "st7735_gfx.h"
%}
%include "st7735.h"

View File

@ -33,7 +33,7 @@
#include <mraa/gpio.hpp>
#include <mraa/spi.hpp>
#include "gfx.h"
#include "st7735_gfx.h"
#define INITR_GREENTAB 0x0
#define INITR_REDTAB 0x1

View File

@ -26,7 +26,7 @@
#include <unistd.h>
#include <stdlib.h>
#include "gfx.h"
#include "st7735_gfx.h"
using namespace upm;