1669 Commits

Author SHA1 Message Date
Mihai Tudor Panu
b9988469ba upm: v1.1.0
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
v1.1.0
2017-02-13 16:11:37 -08:00
Mihai Tudor Panu
4fff3a500d apichanges: list i2clcd library and individual display modules being split
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2017-02-13 16:09:44 -08:00
Mihai Tudor Panu
a53ab5cb80 docs: updated sections on porting and documentation authoring
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2017-02-09 16:50:00 -08:00
Mihai Tudor Panu
bd8104f6ee tests: exclude build dir and update expected number of duplicates
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2017-02-09 16:49:27 -08:00
Mihai Tudor Panu
dbac88d225 ads1x15: extend examples for both ads1015 and ads1115 and clarify which one is used where
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2017-02-09 15:11:59 -08:00
Mihai Tudor Panu
70bcdfefa4 lcm1602/jhd1313m1: temporarily rename headers to avoid duplicates
This should be reverted when these 2 classes are removed from the i2clcd library. Will also require updating all the examples to load the new modules instead.

Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2017-02-09 15:06:12 -08:00
Noel Eck
762c28f000 docs: Changed magnometer to magnetometer
Replaced all occurances.  While there are a few references
to magnometer out there, magnetometer is used much more broadly.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-02-08 13:56:28 -08:00
Noel Eck
283fce619e doc: Scrubbed ALL sensor library descriptions
In an effort to clean-up and standardize UPM library
documentation, this commit updates (and in most cases,
unifies) the CMake description string AND CXX header
@comname string.

Strings were taken from datasheets when possible, spelling
mistakes were addressed, copy/paste errors where fixed,
Title Case was used, etc.

    * Tested/updated/added @web tags
    * Added/updated invalid sensor images
    * Added/updated @man tags, added missing manufacturers

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-02-08 11:50:00 -08:00
Noel Eck
7a5c8a6cb3 swigjava: Added SWIGJAVA define to java module build
SWIGJAVA is defined for the swig interface file processing but is not
defined for the sensor library source build.  There are multiple sensors
that appear to rely solely on SWIGJAVA - these are not building
correctly.  Adding SWIGJAVA define for the java module src build.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-02-07 15:37:46 -08:00
Mihai Tudor Panu
4342b880b9 st7735: add typemaps to uint8_t arrays for js and python
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2017-02-06 21:28:04 -08:00
Mihai Tudor Panu
ddddbd024d tests: temporarily allow duplicate headers until cleanup
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2017-02-06 21:28:01 -08:00
Mihai Tudor Panu
67e0ceb48d tests: add test for duplicate headers
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2017-02-06 19:30:02 -08:00
Mihai Tudor Panu
2298846fef install.md: added install instructions for different OSes
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2017-02-06 19:02:35 -08:00
Noel Eck
567476b89a cmake: Explicit dependency for mraa and interfaces
A handful of modules do not require mraa.  Captured this in
    src/CMakeLists.txt - only add mraa dependency for targets which
    use:

        upm_module_init(mraa ... )
            or
        upm_mixed_module_init(... REQUIRES mraa)

    All sensors which use UPM interfaces (src/interfaces) now
    explicitly add the interfaces target:

        upm_module_init(interfaces ... )
            or
        upm_mixed_module_init(... REQUIRES interfaces)

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-02-06 16:52:27 -08:00
Noel Eck
d345006c03 cmake: Dependency refactoring for includes and libs
This commit attempts to use a more cmake-friendly approach when
handling inter-target dependencies.  A combination of macros and
include_directories usage provided overzealous compile -I/blah
entries which equates to large catch-all build commands.  For
example, the last CXX target contains include directories for nearly
all preceeding targets (~190).  Library dependencies were also often
wrong or missing.

    * Removed nearly all used of include_directories (swig cmake
      commands still appear to need these for generating the swig
      command line)
    * Updated usage of target_link_libraries in upm_module_init,
      also changed to using target_include_directories per target.
      This greatly simplifies upm/mixed_module_init usage for libraries
      which depend on other libraries (in this project).

        example (src/tb7300/CMakeLists.txt)
            old:
                 # upm-libbacnetmstp will bring in libbacnet, I hope
                 set (reqlibname "upm-bacnetmstp")
                 include_directories(${BACNET_INCLUDE_DIRS})
                 include_directories("../bacnetmstp")
                 upm_module_init()
                 upm_target_link_libraries(${libname} bacnetmstp)
            new:
                 upm_module_init(bacnetmstp)

      The reason here, is that tb7300 depends on bacnetmstp, which
      depends on BACNET includes/libs, so tb7300 gets the headers and
      libraries transitively via its dependency on bacnetmstp.
    * Updated pkg-config .pc file generation flow to reflect changes
      with dependencies.
    * Create a real target for the interfaces (CXX abstract sensor
      classes).  Renamed the directory from 'upm/src/upm' to
      'upm/src/interfaces'  Also changed the install location of the
      interface headers to include/upm/interfaces.  Updated interface
      header usage to reflect this.
    * Updated a few sensor libs to use fwd declarations for mraa.
      Ideally the UPM libs would do more of this which eases the
      burden on anyone building on top of the sensor libraries since
      they would not need to know about mraa headers.
    * Fixed examples which use symbols not defined in local includes

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-02-06 10:23:28 -08:00
Noel Eck
7f0e03b0e3 cmake: Convert module_init to function
This is a housekeeping commit to move the upm_module_init
macro to a function.  The scope resolution of the function
call adds a bit more protection for the variables used inside
this macro/function.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-02-05 21:30:20 -08:00
Jon Trulson
08a46ee8e6 grovecollision,groveeldriver,groveelectromagnet,waterlevel: remove unnecessary librt dependency
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2017-02-02 14:36:51 -07:00
Jon Trulson
fb88fda5cb upm_utilities: Add a _POSIX_C_SOURCE define if needed
In certain systems, where -std=c11 is used, certain posix extensions
are disabled unless specifically enabled.  On these systems, this
could cause usleep() and/or nanosleep() to fail with an implicit
declaration warning.  This patch ensures that at least POSIX 200809 is
used, if otherwise undefined.

This should fix Issue #513.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2017-02-02 13:58:41 -07:00
Jon Trulson
90d856d128 utilities: use nanosleep() instead of usleep() for upm_delay*() functions
usleep() has been deprecated, and can cause compile problems on never
glibc versions (debian jesse).  We now use nanosleep() on linux
systems to implement delays.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2017-02-02 12:32:04 -07:00
Jon Trulson
d2e0327c30 src/CMakLists.txt: re-disable other warnings for SWIG building
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2017-02-02 12:31:57 -07:00
Jon Trulson
2e97aa9979 speaker: fix some incorrect comments/documentation
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2017-02-01 17:59:15 -07:00
Noel Eck
cdb75e8c13 swig_java: Fix for #518 - java wrapper implementations
This commit fixes #518 by adding source back into the CXX swig-
generated wrapper.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-02-01 16:15:30 -08:00
Jon Trulson
dac31a0347 speaker: Add pwm functionality and 5 new examples to demonstrate
These changes add the ability to intialize a speaker instance to use a
PWM pin instead of a standard GPIO pin in order to emit sounds.

The current GPIO functionality is fairly constrained by the
implementation -- it only permits playing cerain hardcoded "notes".

The PWM support allows one to emit specific frequencies (currently
between 50-32Khz) using a PWM pin.  Of course, you may still be
constrained by the limits of your PWM hardware in the end.

There are a few new functions provided to support this PWM mode.  To
use the PWM mode of speaker, use the speaker_init_pwm() initialization
routine instead of speaker_init() (for C). For C++ and the SWIG
languages, pass "true" as the second argument to the constructor to
enable PWM mode.  The default is "false", to match current default
behavior (GPIO).

Functions that are not related to a given mode (GPIO vs. PWM) will do
nothing if not usable in that mode.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2017-02-01 17:08:05 -07:00
Jon Trulson
0749f130e1 nunchuck: C port; FTI; C++ wraps C
Some API changes were made as well, see docs/apichanges.md.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2017-01-31 13:08:20 -07:00
Jon Trulson
1bbb9386b7 enc03r: C port; FTI; C++ wraps C
The API for this driver has changed.  See docs/apichanges.md.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2017-01-30 12:06:32 -07:00
Noel Eck
f914159e21 ims: Small logging change for C init method
Added a bit more description if the library cannot set I2C
standard mode.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-01-27 11:16:24 -08:00
Jon Trulson
849711c47d wfs: C port; C++ wraps C
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2017-01-26 15:13:01 -07:00
Jon Trulson
0a91eb0b46 hmc5883l: C port; FTI; C++ wraps C
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2017-01-25 17:42:38 -07:00
Jon Trulson
806b00c2b7 uartat: add missing uartat_defs.h to SWIG interface files
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2017-01-24 17:31:57 -07:00
Jon Trulson
e8151640a1 uartat, le910: initial implementation.
uartat is the underlying UART driver, specifically for use with
AT-style command driven devices like modems.

The le910 support is provided in the form of examples that make use
of the uartat driver to interact with the device.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2017-01-24 14:02:03 -07:00
Jon Trulson
123e611f45 cjq4435: C port, C++ wraps C
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2017-01-20 12:02:30 -07:00
Jon Trulson
8d5278b9d4 CMakeLists.txt: Bump minimum MRAA version to 1.4.0
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2017-01-19 16:26:48 -07:00
Jon Trulson
ab96e8f3a3 speaker: C port, C++ wraps C
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2017-01-19 13:54:47 -07:00
Jon Trulson
d3b864362d ds18b20: rewrite C++ to wrap C, add FTI, update examples
Previously, the C++ and C versions of this driver were separate.  Now
the C++ implementation wraps the C implementation.

In addition, the C++ init() function has been deprecated.  It
currently does nothing, and examples have been modified to remove it's
calls.  This function will be removed in a separate release.

The examples have been further modified to update all detected devices
and print their respective temperatures, instead of only reporting the
on the first device detected.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2017-01-18 13:33:44 -07:00
Noel Eck
6769d976a0 max30100: ISR recover attempt
Handle failure in ISR routine - attempt to read status and
FIFO registers and continue sampleing (vs exiting and turning
off continuous sampling).

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-01-11 15:52:41 -08:00
Noel Eck
bd47b9ed45 max30100: Initial commit - MAX30100 pulse oximeter
* c/c++ source
    * java/js/python/c/c++ examples
    * Doc image (png)
    * Tested on Intel Edison
    * TODO: Tuning for SpO2 reading

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-01-10 11:29:30 -08:00
Jon Trulson
6ea65a16a4 upm_platform: use __linux__ define to detect linux platforms
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2017-01-10 10:51:13 -07:00
Mihai Tudor Panu
0849fbc674 ads1x15: added elaborate examples for TI ADS1015 ADC
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2017-01-05 21:20:58 -08:00
Noel Eck
e25be536a1 ims: Small typo fix
Changed ISM to IMS.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2016-12-20 23:25:26 -08:00
Jon Trulson
a70629e3b2 mcp2515: fix return from rx_status_filtermatch; Travis CI (clang)
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-12-20 13:01:04 -07:00
Jon Trulson
fed0478dc9 mcp2515: fix conversion error reported by Travis CI (clang)
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-12-20 12:47:43 -07:00
Jon Trulson
fcb4d9d36d mcp2515: Initial implementation; C; C++
The mcp2515 is a CAN bus controller.  It was developed using the Seeed
CAN bus shield.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-12-20 12:17:14 -07:00
Jon Trulson
5eb8af6d70 upm.i: treat upm_result_t like an int in SWIG
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2016-12-20 12:17:09 -07:00
Brendan Le Foll
3c93eba4af LICENSE: Update license to be clearer and add 2016 copyright
MIT licenses should start with the following line to identify it as an MIT
license.

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-12-15 17:50:59 -08:00
Mihai Tudor Panu
78953b110f npm: small improvement in logic for handling C sources
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-12-15 16:44:36 -08:00
Mihai Tudor Panu
53124e9704 npm: rename c sources to avoid node-gyp makefile target collision
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-12-13 17:14:21 -08:00
Mihai Tudor Panu
cde747439f upm: v1.0.2
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
v1.0.2
2016-12-08 15:47:13 -08:00
Mihai Tudor Panu
dfc7a710d4 firmata: extended data types on pins to allow subplatform usage
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-12-08 15:10:36 -08:00
Mihai Tudor Panu
130cb822e4 rf22: Initial implementation for RFM22B radios, C++ only & bindings
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-12-07 14:38:56 -08:00
Mihai Tudor Panu
c057fa6708 travis.yml: use different swig ppa for Travis CI builds
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2016-12-06 19:33:00 -08:00