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
Thomas Ingleby
77be6da29c
uart: add pre uart hook
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-10-20 18:43:58 +01:00
Brendan Le Foll
d49f20b7ba
i2c: mraa_i2c_frequency now returns correct returns
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-10-20 10:01:53 +01:00
Thomas Ingleby
c8a99ee8e4
edison: add uart definitions
...
Needed to use a hook to make sure the SoC pins for RX TX are in the
right place.
Also added a line in documentation listed what interface is available.
This resolves #18
Co-Authored-By: Kurt Eckhardt <kurte@rockisland.com >
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-10-19 16:29:27 +01:00
Thomas Ingleby
071951e926
uart: add init post hook
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-10-19 16:14:24 +01:00
Kurt Eckhardt
0f2329bd95
common: c++ link error if multiple files include header
...
Header only C++ function definitions need to be static to avoid linking issues
when including the header multiple times.
Signed-off-by: Kurt Eckhardt <kurte@rockisland.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-10-19 09:02:58 +01:00
Brendan Le Foll
d734a661fd
spi: make mraa_spi_write_buf call mraa_transfer_buf
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-10-19 09:01:01 +01:00
Kurt Eckhardt
2a11e31052
spi: Add SPI transfer function that pass in RX/TX
...
When using SPI, I prefer to not have to do malloc/free functions for each
transfer, so why not have a transfer function that you can pass in both
buffers. With my ILI9341 TFT display code that gave some perf wins, also more
of a win, you can pass in NULL for recv buffer and the underlying device driver
does not have to copy the data.
Signed-off-by: Kurt Eckhardt <kurte@rockisland.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-10-19 09:00:57 +01:00
Brendan Le Foll
54deb01796
exception: Add exceptions when context creation fails
...
* Exceptions only fired in constructor when it would initialise with a NULL
context causing segfaults if used any further
* Adds exception.i requirement to mraa.i for node.js and python support
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-10-16 15:07:18 +01:00