Private
Public Access
2
0
Commit Graph

1507 Commits

Author SHA1 Message Date
Sanrio Alvares
ce0edf0f62 periphmraa: set pin capabilities
Peripheral Manager provides mutual exclusion between pins
multiple functionalities. This feature in MRAA is redundant for
this platform.

Once the API to retrieve pin functionality from PIO is available
use it to update each pins capabilities.

Signed-off-by: Sanrio Alvares <sanrio.alvares@intel.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-04-26 14:43:26 -07:00
Noel Eck
038a7c542a building.md: Small updates to format for AT
Added a bit of formatting to the AT peripheral manager instructions.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-04-24 16:24:18 -07:00
Noel Eck
aeb293a163 Peripheralman: Update peripheralman API docs
* Update documentation for C methods
    * Update documentation for CXX methods
    * Update build instructions for building on AT Peripheral Manager Client

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-04-24 16:04:33 -07:00
Noel Eck
87fda62759 peripheralman.c: Allocate pwm context for spi
Updated the mraa_pman_pwm_init_replace method to allocate heap space for the
mraa_pwm_context (returned by this method.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-04-24 14:42:55 -07:00
Noel Eck
3e19a58710 pio: Remove pio headers from MRAA
The Native PIO API provides both the libraries and headers for use with
the Android Things Peripheralanager client.  This commit removes these
from the MRAA repo in favor of the FindAndroidThings.cmake provided by
the Native PIO API.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-04-24 14:42:55 -07:00
Noel Eck
380d2cf638 CMakeLists.txt: Find AT-specific jni.h
Updated the java CMakeLists file to set the JAVA_INCLUDE_PATH for
Android Things.  The JAVA SWIG wrapper will require the jni.h from the
Android NDK.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-04-24 14:42:55 -07:00
Noel Eck
1d200840f4 src/CMakeLists.txt: Use AndroidThings find_package
Use the cmake module provided by AndroidThings for setting libs/hdrs
instead of the hard-coded path to the AndroidThings library.  This
requires adding a path to CMAKE_MODULE_PATH which contains
FindAndroidThings.cmake.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-04-24 14:42:55 -07:00
Vineela Tummalapalli
34b4d4a97b Periphmraa: Bypass version check if version is 0.0
Signed-off-by: Vineela Tummalapalli <vineela.tummalapalli@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-04-24 14:42:55 -07:00
Vineela Tummalapalli
913eaf2440 periphmraa: Create IndexLookup functions for GPIO, I2C, SPI, PWM
These lookups provide the MRAA index with the Pin/Bus name as input

Signed-off-by: Vineela Tummalapalli <vineela.tummalapalli@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-04-24 14:42:55 -07:00
Sanrio Alvares
7bc069a8fd periphmraa: Fix compilation errors in PWM
config PERIPHERALMAN fails to compile with PWM. Fix it.

Signed-off-by: Sanrio Alvares <sanrio.alvares@intel.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-04-24 14:42:55 -07:00
Sanrio Alvares
beaba463f7 peripheralman.c: Added PWM
Signed-off-by: Sanrio Alvares <sanrio.alvares@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-04-24 14:42:55 -07:00
Stefan Andritoiu
567a92fde5 periphmraa: Added explicit casts for (implicit) casts that were causing errors in periphmraa build, in the wrapper code
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-04-24 14:42:55 -07:00
Stefan Andritoiu
4270e7a743 periphmraa: Corrected typo in documentation
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-04-24 14:42:55 -07:00
Vineela Tummalapalli
a2ee056c7d peripheralman.c: Updating GPIO, SPI, I2C bus structures for all the available buses
Signed-off-by: Vineela Tummalapalli <vineela.tummalapalli@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-04-24 14:42:55 -07:00
Sanrio Alvares
e607beedda periphmraa: Rename B* -> A*
Fixes compilation issues introduced earlier

Signed-off-by: Sanrio Alvares <sanrio.alvares@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-04-24 14:42:55 -07:00
Sanrio Alvares
c4555bc4e5 peripheralman: Update APIs in accordance with Android Things
Signed-off-by: Sanrio Alvares <sanrio.alvares@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-04-24 14:42:55 -07:00
Vineela Tummalapalli
1cec6705d1 peripheralman.c: Updating the mraa_i2c_bus_t structure for all the available i2c busses
Signed-off-by: Vineela Tummalapalli <vineela.tummalapalli@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-04-24 14:42:55 -07:00
Vineela Tummalapalli
9a306fc1f5 peripheralman.c: Fix Gpio pin map value to be valid
Signed-off-by: Vineela Tummalapalli <vineela.tummalapalli@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-04-24 14:42:55 -07:00
Brendan Le Foll
8a1c58bc7f peripheralman: Remove stray source files from pmraa
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-04-24 14:42:55 -07:00
Brendan Le Foll
76850eb0f4 peripheralman.c: Added UART
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-04-24 14:42:55 -07:00
Brendan Le Foll
0ec90a3138 peripheralman.c: Added SPI & I2C
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-04-24 14:42:55 -07:00
Brendan Le Foll
60ca81a3e1 android-things: Possibly working gpio
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-04-24 14:42:55 -07:00
Brendan Le Foll
533517a864 mraa.c: Fix elif without statement
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-04-24 14:42:54 -07:00
Brendan Le Foll
69fcd861a7 android-things: Peripheralmanager target build
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-04-24 14:42:54 -07:00
Brendan Le Foll
4c7616fe91 android-things: Prep for peripheralmanager support
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-04-24 14:42:54 -07:00
Mihai Tudor Panu
d7fb6c5af9 travis.yml: use TRAVIS_BUILD_DIR for node-gyp path
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2017-04-20 12:27:30 -07:00
Mihai Tudor Panu
9cb0440955 imraa: match version number in imraa.c with imraa.conf
Fixes version inconsistencies for imraa service.

Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2017-04-19 15:31:11 -07:00
Mihai Tudor Panu
2f51627d18 x86.c: add NUC5i7RYB to the list of known NUC5 platforms
While the NUC5i7RYB doesn't provide any built-in IO, this change will at least allow it to be used with a subplatform from IDEs that filter out unknown devices (e.g. Intel XDK).

Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2017-04-19 15:31:07 -07:00
Arun Ravindran
05d4a917e5 joule: Update the documentation on SPI
The existing documentation shows the MISO and MOSI
pins wrongly. As per the hardware document available
at http://www.intel.com/content/dam/support/us/en/documents/
joule-products/intel-joule-dev-kit-hardware-guide.pdf
pin2 should be MISO and pin 4, MOSI.

Signed-off-by: Arun Ravindran <arun.ravindran@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-04-19 18:53:16 +02:00
Brendan Le Foll
0d6700fe50 mraa: Update to v1.6.1
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-04-06 23:55:12 +02:00
Mihai Tudor Panu
791fe0c05a de-nano-soc: renamed platform to avoid ambiguity
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-04-06 23:53:44 +02:00
g-vidal
ecc64da418 rpi3: Adding detection of raspberrypi3
Signed-off-by: g-vidal <gerard.vidal@ens-lyon.fr>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-04-06 20:42:22 +02:00
Brendan Le Foll
6d004ca80d mraa.c: mraa_deinit make plat pointer NULL after freeing it
This fixes #698 where an application will crash after calling mraa_deinit and
later closing calling deinit again because of the gcc destructor argument
introduced with cac8f7a

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-04-06 20:40:18 +02:00
Brendan Le Foll
f911e0620e mraa: Update to v1.6.0
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-04-02 20:17:53 +02:00
Brendan Le Foll
bf548a3377 Android.mk: Remove defunct Android.mk file
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-04-02 20:06:49 +02:00
Noel Eck
cac8f7a47a common.h: Added destructor attribute for deinit
Currently, mraa_init is called when loading libmraa.  This commit
adds similar functionality to call mraa_deinit when unloading
libmraa.  This is a nice-to-have since it makes identifying other
memory leaks easier.

Signed-off-by: Noel Eck <noel.eck@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-04-02 20:03:19 +02:00
Noel Eck
65f7d2a250 mraa.c: Fix for various small memory leaks
In the process of using the mraa mock platform to identify memory leaks
in UPM libraries.  This commit fixes some non-critical places where
memory was getting lost in mraa.

Signed-off-by: Noel Eck <noel.eck@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-04-02 20:03:19 +02:00
Noel Eck
b937c521f6 Doxyfile.in: Use relative paths in generated docs
Updated Doxyfile to strip the full path to the base MRAA directory
from generated documentation.  This removes the build path from
MRAA documentation.

Old html:

aio_8h.html:<title>mraa: /iotdk/jenkins/workspace/upm-doc-stable/api/mraa/aio.h File Reference</title>

New html:

aio_8h.html:<title>mraa: api/mraa/aio.h File Reference</title>

Signed-off-by: Noel Eck <noel.eck@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-04-02 20:02:43 +02:00
Mihai Tudor Panu
48fe5cebbb de10-nano: minor readme update and added to types.hpp
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-04-02 20:00:56 +02:00
Stefan Andritoiu
d2bbfe376d java: bypass version check for packages that don't have version specified
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-04-02 20:00:18 +02:00
Nicola Lunghi
a3f5db1d84 up.c: Removed dead code in up.c
Signed-off-by: Nicola Lunghi <nicola.lunghi@emutex.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-04-02 19:59:53 +02:00
Lunghi@Emutex
2a1590fdf1 platform_checks.py: Disable check on non edison platforms
Signed-off-by: Nicola Lunghi <nicola.lunghi@emutex.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-04-02 19:55:21 +02:00
Arun Ravindran
5e34a5cd3b intel_joule: Update doc with correct PIN behavior
GPIO and I2C functions of some PINs are not possible
with default BIOS configuration. Current documentation
wrongly shows that the PINs can work as both GPIO and I2C.

This patch fixes this issue and also updated pin conf for
I2C 1 and 2 to disable GPIO functionality.

Signed-off-by: Arun Ravindran <arun.ravindran@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-03-20 16:44:18 +00:00
Andrew Koroluk
6f4b333a31 docs(readme): add note about not supporting Node.js 7
Signed-off-by: Andrew Koroluk <koroluka@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-03-20 08:37:57 +00:00
Arun Ravindran
dd19634889 joule: Fixing descripencies in gpio numbers
The earlier patches did not fix the following issues.

1) gpio number used for ISH I2C 0 and I2C 1 were not correct
2) gpio number used in ISH I2C 1 and I2C 2 were not correct
3) ISH UART 0 gpio numbers were wrong

This patch fixes this issue and also update the doc.

Signed-off-by: Arun Ravindran <arun.ravindran@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-03-20 08:37:24 +00:00
Alex Tereschenko
21e0ff7c02 pwm.c: properly close duty file when disabling PWM
Fixes #669.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-03-16 11:15:35 +01:00
Simo Kuusela
b24e90db0c mraa.c: Fix strsep crash
Variable 'dup' doesn't get freed correctly as the pointer to it changes
after 'strsep' function is used. Also 'token' variable doesn't need to
be freed as freeing the original 'dup' already frees the same memory.

Signed-off-by: Simo Kuusela <simo.kuusela@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-03-16 11:11:06 +01:00
Arun Ravindran
1c4b1fc329 joule: Fix issue with ISH UART name
MRAA is using gpio 484, 483, 485 and 486 as ISH UART1.
But J13 expansion connector doesn't expose ISH UART1,
instead it exposes ISH UART0 as per dev kit hardware guide.

This patch fixes this descrpency and renames the UART and
also enables the GPIO usage.

Signed-off-by: Arun Ravindran <arun.ravindran@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-03-13 22:11:40 +01:00
Jon Trulson
f6f124a35f uart_ow: prevent possible infinite loop in _ow_read_byte()
With a broken device, or a broken interface circuit, it is possible
for _ow_read_byte() to spin forever.  This patch arranges for it to
timeout after 5 seconds if it cannot read a valid byte from the UART.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-03-13 21:55:40 +01:00
Arun Ravindran
c7a4a6db34 intel_joule_expansion.c: Fix issue with gpio-339 mapping
The mapping for gpio-339 went away with commit

gpio-339 is available as LED102 or ISH_IO2

Signed-off-by: Arun Ravindran <arun.ravindran@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-03-13 21:54:27 +01:00