Private
Public Access
2
0
Commit Graph

1584 Commits

Author SHA1 Message Date
Jon Trulson
e38630097e UartOW.cpp example: Use .data() string accessor instead of .c_str().
.c_str() works accidentally, but is technically incorrect as these
"strings" can have embedded 0 bytes in them.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-01-19 08:04:45 +00:00
Jon Trulson
c3332f5542 uart_ow.hpp: Correct a logic bug, and 2 questionable uses of c_str()
The command() function had a logic error that caused a command to be
broadcast to all devices on the DS OW bus when a proper ID was
specified.  This should only be done when NO ID is specified.

This fixes UPM issue #502.

In addition, there were two cases where the C++ string accessor method
.c_str() was used when .data() should be used instead.  This worked
anyway (accidentally), but is improper since the strings can have
embedded 0 bytes.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-01-19 08:04:45 +00:00
Abhishek Malik
3bd590c18c Firmata: I2C read bytes data array size mismatch fix
Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-12-29 18:51:35 +00:00
Abhishek Malik
17b147ba82 Firmata: Reducing wait time
Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-12-29 18:49:24 +00:00
Abhishek Malik
4b22a923cf Firmata: Increasing iterations to allow more precise readings and allow more time for response
Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-12-29 18:49:24 +00:00
Alex Tereschenko
af051d820a intel_edison_fab_c.c: further fix for PWM disable problem
This adds logic to save PWM duty when disabling the pin (which sets
the duty to 0), and restore it when re-enabling the pin.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-12-29 18:48:53 +00:00
belugon
2558866d4a intel_edison_fab_c.c: Fix edison disabled pwm stuck at high
Edison pwm can stuck at high if pin is disabled during ON pwm peroid.
Workaround is to force zero duty time before disabling the pin.

Signed-off-by: Billy Bai <belugon@outlook.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-12-29 18:48:41 +00:00
Brendan Le Foll
c1017bb6ea intel_gt_tuchuck.c: Clear uart pin cap since bios doesn't allow muxing
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-11-30 11:37:47 +01:00
Brendan Le Foll
1c180e393c uart.c: Allocate mem for dev->path to fix getDevicePath in raw mode
When mraa_init_uart_raw is called it places the path arg in dev->path. This
works in non raw mode because the path is statically in the device
configuration but in raw mode this is a dynamic address meaning that we need to
copy it. Fix this by simply copying the device path rather than relying on the
user keeping that string path in memory.

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-11-30 11:33:40 +01:00
Fan Jiang
250590e1ed 96boards.c: Added Bubblegum 96 board
- Proper board detection
- Styling refactored using clang-format

Signed-off-by: Fan Jiang <i@fanjiang.me>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-11-30 11:13:38 +01:00
Brendan Le Foll
68e9399c4c cmake: use TARGETS instead of FILES for js module install
This strips the local RPATH when doing a `make install` rather than running
from the build/ dir

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-11-23 17:59:04 +00:00
Brendan Le Foll
ad6eb53f81 jsonplatform.c: Remove for loop initial delcarations
This is C99 only and doesn't really provide any value

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-11-21 10:33:29 +00:00
Dan O'Donovan
d2f1b068b7 update UP board hardware details and enable ADC
Some details regarding the UP board are not in-sync with the
final production version of the board.  This update adds an
ADC, removes a UART, and some corrections in the docs for UP.

Signed-off-by: Dan O'Donovan <dan@emutex.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-11-21 10:24:05 +00:00
Henry Bruce
a0332a13b0 examples: Python MCP3004 ADC example (use with MinnowMax Calamari lure)
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-11-21 10:23:21 +00:00
Henry Bruce
a63ad7e10d json: Initial config file for Intel Aero platform (i2c and spi only)
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-11-21 10:23:21 +00:00
Henry Bruce
9de294b389 json: Improve i2c and spi configuration.
Bus number no longer has to be the same as its id and all busses are
disabled until a configuration entry is found.

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-11-21 10:23:21 +00:00
Henry Bruce
61d20c7266 json: Removed tabs and tidied up Turbot JSON formatting
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-11-21 10:23:21 +00:00
Thomas Ingleby
d043faf687 imraa: correct imraa.service
Should work in more environments now.

Signed-off-by: Thomas Ingleby <thomas.ingleby@intel.com>
2016-11-08 16:24:51 +01:00
Brendan Le Foll
6f9b470d8d mraa: Update to v1.5.1
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-11-04 13:39:32 +00:00
Brendan Le Foll
92188ab950 mraa.c: Fix another memleak in mraa_find_i2c_bus_pci
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-11-04 13:36:53 +00:00
Brendan Le Foll
3d790a8278 mraa.c: fix memleak in find_i2c_bus_pci
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-11-04 13:27:38 +00:00
Brendan Le Foll
dbcba5cbeb imraa.c: remove ARGP_KEY_ARG checking that makes no sense
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-11-04 13:04:44 +00:00
Brendan Le Foll
ef8102deb1 imraa_io.c: Avoid gpio handle going out of scope if uid == NULL
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-11-04 12:55:34 +00:00
Brendan Le Foll
7b7b11415b imraa.c: We have 0 args as minimum so remove error check for < 0 against unsinged int
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-11-04 12:48:47 +00:00
Brendan Le Foll
5a3f73731c mraa: Update to v1.5.0
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-11-04 12:32:49 +00:00
Brendan Le Foll
e466d1f890 imraa.service: Adjust flag to match new imraa argp options
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-11-04 10:29:26 +00:00
Brendan Le Foll
ae127b19a5 binding.gyp.cmake: Use node or nodejs depending on what the binary is called
This should fix npm builds on some recent ubuntu and debian images

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-11-03 15:24:47 +00:00
Brendan Le Foll
fe76260837 npm.md: Update docs to include json removal
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-11-03 15:24:12 +00:00
Brendan Le Foll
bf4d14ef02 imraa: change list_serialport function to get_101_serialport
This makes things alot less confusing!

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-11-03 09:40:23 +00:00
Brendan Le Foll
d602196bd6 mraa.c: add LOG_NOTICE to checkout what i2c bus is added from pci
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-11-02 17:22:38 +00:00
Brendan Le Foll
e387946208 jsonplatform.c: Disable i2c bus in case of bus count being high but busses are undefined
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-11-02 17:20:31 +00:00
Brendan Le Foll
fa35855bb6 mraa.c: Use mraa_atoi instead of atoi in lockfile adding
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-11-02 15:30:56 +00:00
Brendan Le Foll
4a33aca8fd intel_gt_tuchuck.c: Use new mraa_find_i2c_bus_pci to find i2c busses
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-11-02 15:30:56 +00:00
Brendan Le Foll
9d365ce0d6 mraa.c: Find i2c bus by pci id
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-11-02 15:30:56 +00:00
Brendan Le Foll
23e871c5bb mraa_internal.h: Add internal definition for mraa_atoi
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-11-02 15:30:56 +00:00
Thomas Ingleby
3bb17bb7b9 travis: use mirror of swig-3.0.10.tar.gz
closes #595

Signed-off-by: Thomas Ingleby <thomas.ingleby@intel.com>
2016-10-31 14:31:18 +01:00
Fathi Boudra
8218e42d41 doc: fix spelling errors
Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-10-30 10:58:36 +00:00
Brendan Le Foll
3971d27f8a imraa: split imraa up into imraa_io and imraa_lock
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-10-26 14:24:50 +01:00
Brendan Le Foll
c69d1884c9 imraa.io.conf: Imraa IO configuration
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-10-26 14:24:50 +01:00
Brendan Le Foll
cada819c39 intel_edison_fab_c.c: don't undo muxing if we don't own the pin
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-10-26 14:24:50 +01:00
Brendan Le Foll
0b5130335d mraa.c: add error if adding a MRAA_GENERIC_FIRMATA subplat and not supported
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-10-26 14:24:50 +01:00
Brendan Le Foll
b4cf93f1f8 gpio.c: Remove use of sprintf in favour of snprintf
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-10-26 14:24:50 +01:00
Brendan Le Foll
c7ff9a5173 imraa: Add argp support, split arduino functionality
This commit gets us closer to what was intended for imraa, support of setting
sysfs user permissions

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-10-26 14:24:50 +01:00
Brendan Le Foll
c993cf10b4 firmata_curie_imu.c: Fix warning due to signed nature of function input buffer
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-10-26 14:24:50 +01:00
Brendan Le Foll
623fef670e firmata: Add pthread spin locks around uart operations
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-10-26 14:24:50 +01:00
Brendan Le Foll
bb5ec8bd10 firmata: Remove all 6.2.x warnings
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-10-26 12:56:20 +01:00
Brendan Le Foll
a3c717553c cmake: enable INSTALLTOOLS by default
This means mraa-i2c and mraa-gpio are installed in <prefix>/bin by default

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-10-26 11:55:19 +01:00
Mihai Tudor Panu
6ce1b1c4ce python: remove temporary RPATH from _mraa.so when installing
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-10-25 12:15:29 +01:00
Alex Tereschenko
9f03afbcbc mock: implement UART functionality
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-10-25 12:04:04 +01:00
Alex Tereschenko
8a9efd1bcc uart.c: add replace functions used by mock
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-10-25 12:04:04 +01:00