Private
Public Access
2
0
Commit Graph

485 Commits

Author SHA1 Message Date
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
Thomas Ingleby
e39268899c spi: move spi setup from core into module
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-11-17 17:41:47 +00:00
Thomas Ingleby
ffd38bb68c i2c: move i2c setup from core into module
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-11-17 17:40:48 +00:00
Thomas Ingleby
66c5011cfb aio: move aio setup from core into module
Added additional syslog messages for debugging

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-11-17 17:40:48 +00:00
Thomas Ingleby
401f0cfe65 gpio: move gpio setup from core into module
Added syslog lines for easier fault investigation

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-11-17 17:40:48 +00:00
Thomas Ingleby
1cbdef1ab3 internal: add function protype for mux setup.
Now accesible from all mraa modules

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-11-17 17:40:48 +00:00
Thomas Ingleby
2be24d8887 spi: expose defined CS
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-11-17 17:40:48 +00:00
Thomas Ingleby
a3d5af9ea1 edison: fix gpio mapping on j18-8
Closes #37

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-11-17 16:06:56 +00:00
Thomas Ingleby
ee1f7281dc galileo gen2: add uart definitions
Also added hook for setting output buffers.
fixes #36

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-11-17 15:39:25 +00:00
Brendan Le Foll
fd920d6fd1 docs: update libmraa intro text
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-12 13:48:46 +00:00
Brendan Le Foll
b5a273965d cmake: add cmake toolchain file for oe setup
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-10 20:48:27 +00:00
Brendan Le Foll
93107a388c building.md: update cmake instructions
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-09 12:26:09 +00:00
Brendan Le Foll
fdb11d98ea galileorevh.md: add i2c frequency info
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-07 15:05:23 +00:00
Brendan Le Foll
bb3228ad58 mraa: update to version 0.5.2
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-06 15:25:01 +00:00
Matthias Hahn
cf6c3dd144 pwm: syslog message typo correction
Signed-off-by: Matthias Hahn <matthias.hahn@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-06 15:23:25 +00:00
Brendan Le Foll
ac02940174 rgblcd.py: update example to use only writeReg()
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-05 11:25:42 +00:00
Brendan Le Foll
2896b05dcd rgblcd.js: add i2c example similar to python
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-05 11:25:41 +00:00
Brendan Le Foll
d0d0d3ced7 i2c_HMC5883L.c: fix type in i2c buffer
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-05 11:25:40 +00:00
Brendan Le Foll
274d5b2d50 i2c: use uint8_t when appropriate and remove char
Object APIs used signed chars for some operations which are not appropriate
when using i2c.

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-05 11:25:38 +00:00
Bernd Barsuhn
428c99f940 gpio: fix identation
Signed-off-by: Bernd Barsuhn <bernd.barsuhn@me.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-04 10:13:45 +00:00
Bernd Barsuhn
2a851d7cc7 gpio: make mraa_gpio_isr_exit block until the interrupt handling thread is terminated.
Signed-off-by: Bernd Barsuhn <bernd.barsuhn@me.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-04 10:12:34 +00:00
Brendan Le Foll
9235ed178a Pwm3-cycle.cpp: add pwm::enable() call to example
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-03 15:08:11 +00:00
Anton Krasovsky
cbf4c7447f i2c: add api call to read byte from a specified register
Signed-off-by: Anton Krasovsky <anton@no-mad.net>
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-10-31 01:17:17 +00:00
Thomas Ingleby
c852685975 spi: expose defined CS
Add missing information for Gen 2 CS info

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-10-30 20:41:51 +00:00
Thomas Ingleby
3b01af1da1 pwm: add period limits, warn over syslog
Added minimum, maximum and default period settings to board definitions
PWM will now have a default period as defined in the board defintion.
When using pwm_write() writing 1.0f or above will default to 100%.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-10-30 12:22:40 +00:00
Brendan Le Foll
29b0425c9b contributing.md: add a few contribution rules matching UPM
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-10-29 13:14:46 +00:00
Maximilian von Tschirschnitz
a202b3fd17 pwm: fixed wrong line ending being checked by strtol
Move from fopen to POSIX open introduced this bug in strtol

Signed-off-by: Maximilian von Tschirschnitz <maximilian.tschirschnitz@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-10-29 13:01:53 +00:00
Thomas Ingleby
e5c3e491a8 README: add Intel DE3815 to supported systems.
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-10-24 14:23:56 +01:00
Thomas Ingleby
af3aa9d8b9 de3815: add initial doc
Also removed printf used during inital implementation.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-10-24 14:21:20 +01:00
Thomas Ingleby
b59aecb70d de3815: added PWM support
There are two PWM pins on the custom solutions header.
10-PWM[0] and 11-PWM[1] in mraa.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-10-24 14:21:20 +01:00
Thomas Ingleby
7c807b3acc intel_de3815: initial support for Baytrail NUC
* I2C only currently supported, Both bus 0 and 1

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-10-24 14:21:20 +01:00
Brendan Le Foll
418c198999 spi: attempt to fix spi lsb mode
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-10-23 18:05:36 +01:00
Brendan Le Foll
535d92ab79 i2c: use default i2c bus in board config if invalid
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-10-23 18:05:07 +01:00
Brendan Le Foll
a6b3d384b2 syslog: unify error msg style
syslog messages should be written as <module>: Message in order to increase
readability and usefulness

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-10-22 21:09:11 +01:00
Brendan Le Foll
a67d71ed90 spi: fix mraa_spi_bit_per_word call to use correct ioctl
This should fix #14

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-10-22 21:09:03 +01:00
Brendan Le Foll
8b7c1d80cb intel_edison_fab_c.c: If i2c bus number is invalid use the default bus (6)
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-10-22 20:51:13 +01:00
Thomas Ingleby
232fb2cf5e edison: fix uart missing information
This should fix #19

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-10-20 19:14:41 +01:00