Private
Public Access
2
0
Commit Graph

521 Commits

Author SHA1 Message Date
Brendan Le Foll
0289c63c4c pwm.c: remove possibility of division by 0
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-26 14:00:17 +00:00
Brendan Le Foll
9f3cc6e890 pwm.c: check error condition when doing read operations
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-26 13:59:59 +00:00
Brendan Le Foll
be1a725db8 intel_de3815.c: make sure strncpy() doesn't go over 8 chars
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-26 13:59:01 +00:00
Brendan Le Foll
24e52bdbbd gpio.c: cast return value explicitly
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-26 13:58:28 +00:00
Brendan Le Foll
51cfc7981d gpio.c: fail early in case of error when reading file
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-26 13:56:33 +00:00
Brendan Le Foll
fefe0a24cd gpio.c: check return status of open call
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-26 13:56:10 +00:00
Brendan Le Foll
a7b8d4a0ca aio.c: check aio_get_valid_fp return value
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-26 13:30:10 +00:00
Brendan Le Foll
bb5314efc1 aio.c: remove less-than-zero comparison of an unsigned var
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-26 11:43:30 +00:00
Brendan Le Foll
1a1c9c2db2 gpio.c: fix incorrect debug message due to merge
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-26 11:43:30 +00:00
Brendan Le Foll
74bcaf3984 mraa_board_t: fix operator in *_mmap_unsetup
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-26 11:43:30 +00:00
Brendan Le Foll
d42f8f40f5 docs: update documentation mistakes
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-26 11:43:30 +00:00
Brendan Le Foll
276b0a8920 i2c.c: fix typo in mraa_i2c_read_word_data
Fixes #45

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-26 07:52:40 +00:00
Brendan Le Foll
8be861aa1f hello_isr.py: add counter to example
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-25 10:37:36 +00:00
Brendan Le Foll
abd538dc4b cmake: fix indentation
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-24 18:03:36 +00:00
Brendan Le Foll
0ca4b10687 package.json.cmake: remove repository tag causing issues on update
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-24 17:45:50 +00:00
Brendan Le Foll
a38c07f7b1 npm: add node-gyp build support
This commit adds all the infrastructure necessary for doing node-gyp builds of
mraa. Note this will only build the mraa js bindings and will dirty your git
tree whilst doing it. It also assumes the user does not have SWIG installed on
their machines and so the swig wrapper is static. The target to use this
feature is 'npmpkg'.

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-24 15:20:19 +00:00
Brendan Le Foll
d4552fdc5e javascript: add a generated package.json with versioning
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-24 11:19:05 +00:00
Brendan Le Foll
c01451989e docs: update product names & brand names
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-24 10:51:27 +00:00
Brendan Le Foll
7b93207fd9 docs: add minnowboard max to doxygen index page
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-24 10:50:32 +00:00
Brendan Le Foll
d99bfa45a3 i2c.h: fix typo in doxygen comment
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-24 08:04:08 +00:00
Henry Bruce
27f22d077b gpio.c: Added gpio list/set/get utility
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-11-21 20:06:37 +00:00
Henry Bruce
152a7b04df docs: Added first cut at minnow-max documentation
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-11-21 19:55:44 +00:00
Henry Bruce
d7c92bf19e intel_minnow_max.c: fixed pin capability errors
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-11-21 19:55:44 +00:00
Brendan Le Foll
97e00d9298 docs: explain aio numbering scheme
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-21 11:59:57 +00:00
Thomas Ingleby
8f9059767f spi: fix mistake from mem branch where spi will fail.
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-11-21 11:50:59 +00:00
Brendan Le Foll
148c22fb27 mraa.c: fix char count in board_name
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-20 15:08:31 +00:00
Henry Bruce
6805aebc47 oe-sdk_cross.cmake: 'make install' now targets oe sysroot
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-20 15:08:31 +00:00
Henry Bruce
7aea3459a9 pwm.c: Must write period before duty_cycle to avoid sysfs error
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
2014-11-20 15:08:31 +00:00
Henry Bruce
41bbc0b86b blink_onboard.c: Added Minnow Max support
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
2014-11-20 15:08:31 +00:00
Henry Bruce
4e0165c45a hellomraa.c: Extended sample to display detected platform.
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
2014-11-20 15:08:31 +00:00
Henry Bruce
57540cd86c gpio.c: check that real gpio did initialise correctly
On platforms without muxing perform a little more checking when the 'real'
linux/sysfs gpio is opened. We don't expect this to fail but on platforms where
the linux gpios can be changed depending on pinctrl/bios configuration this
might not always be the case.

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-20 15:08:31 +00:00
Henry Bruce
6bc2b0fb53 intel_minnow_max: Added platform definition
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-20 15:08:31 +00:00
Thomas Ingleby
c123ff75f0 galileo gen2: add missing mux information for UART on IO1
Fixes #36

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-11-20 15:08:31 +00:00
Brendan Le Foll
d95df3ec22 intel_edison_fab_c.c: remove uart_init_post hook for miniboard
use uart_init_pre hook instead. Fixes #39

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-11-20 14:50:58 +00:00
Brendan Le Foll
75be9992fd i2c: fix I2c::read() call
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-20 14:10:56 +00:00
Brendan Le Foll
19d7dad364 i2c: remove smbus helper library & clean up command use in API
This commit changes the mraa_i2c_read() API call behaviour, a register should
now always be set when using this call. The smbus helper library is no longer
required since the code is now all contained from i2c.c which avoids multiple
function calls

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-20 12:03:31 +00:00
Brendan Le Foll
e9de25d797 spi.hpp: remove transfer command from SWIG APIs
Transfer command works with a uint8_t buffer that is written into, this does
not work in SWIG APIs and will cause a copy in either case, so the API call is
not useful. Remove to stop confusion.

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-20 12:03:31 +00:00
Brendan Le Foll
7dc29aa3b7 common.hpp: add missing docstring param for setLogLevel
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-20 12:03:31 +00:00
Brendan Le Foll
ac1c60d4fe i2c: add clean {write, read}data functions
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-20 12:03:31 +00:00
Brendan Le Foll
1133b32b5a i2c.hpp: reorder & style header
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-20 12:03:31 +00:00
Brendan Le Foll
72ff035301 edison.md: add 1.8V IO warning
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-19 23:52:13 +00:00
Brendan Le Foll
745054e7d0 spi.c: fix identation
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-19 23:46:33 +00:00
Brendan Le Foll
d2ced53344 spi.c: check memory allocation for context was succesful
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-19 23:46:30 +00:00
Brendan Le Foll
e84baf6636 gpio.c: free context if we fail to write to export
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-19 23:46:25 +00:00
Thomas Ingleby
9014fc61a0 galileo gen 2: port mmap to new structure
Feature parity pre mem branch.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-11-17 17:46:09 +00:00
Thomas Ingleby
cf43031994 galileo gen 1: port mmap to new structure
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-11-17 17:46:09 +00:00
Thomas Ingleby
d2457c29d3 edison: add mmap support. read & write
Closes #27

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-11-17 17:45:46 +00:00
Thomas Ingleby
3865bebe8d mmap: remove implementation of mmap gpio
Instead of trying to have an implementation that covers most platforms
Leave all mmap up to platform definition. Through function pointers.

gpio_mmap_setup sets up the mmap

Within the internal gpio context struct two more function pointers now
exist mmap_read & mmap_write. They exist there so each context can its
own function for handling a write and read.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-11-17 17:41:47 +00:00
Thomas Ingleby
d1f9e98060 internal: remove un-implmented function prototype
Left over from earlier version of mraa.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-11-17 17:41:47 +00:00
Thomas Ingleby
5d7c85c7a1 pwm: move pwm setup to module
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-11-17 17:41:47 +00:00