Thomas Ingleby
9cfbc87924
uart: add function mraa_uart_get_dev_path
...
Used for getting the path to the character device under linux for uart
device. i.e. "/dev/ttyS0"
Adds paths to existing platforms.
Closes #84
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2015-01-20 16:08:49 +00:00
Thomas Ingleby
ed4c68eba1
uart: cleanup and bring inline with standard
...
Removed mraa_setup_uart from core mraa.c moved logic within init
function
Add more syslog output for easier debugging.
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2015-01-20 14:44:28 +00:00
Kurt Eckhardt
41956b07d6
pwm.c: cache period
...
There is an issue that mraa_pwm_write would fail, because mraa_pwm_read
would fail and return 0. When the read fails, journalctl shows an
error:
Dec 28 18:01:38 Edison libmraa[365]: pwm: Error in reading period
So now trying version, where the pwm object caches the period, that is
updated whenever you do a read or write of the period. Side benefit is
that the write should be sped up.
Signed-off-by: Kurt Eckhardt <kurte@rockisland.com >
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2015-01-05 15:24:28 +00:00
Brendan Le Foll
3eb0a8dbf7
i2c: use I2C_FUNCS to store funcs map
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-01-05 14:49:48 +00:00
Brendan Le Foll
cc9a4f59b5
edison: add mraa_i2c_frequency replace hook for i2c-6
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-01-05 14:38:50 +00:00
Brendan Le Foll
ab3af9cc2d
i2c: add busnum to context
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-01-05 14:38:49 +00:00
Brendan Le Foll
836d953cb7
i2c: remove hz from context
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-01-05 14:38:48 +00:00
Kurt Eckhardt
21d88d15eb
gpio.c: add advance_func->gpio_close_pre
...
Signed-off-by: Kurt Eckhardt <kurte@rockisland.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-12-19 14:40:01 +00:00
Thomas Ingleby
ea38d8c397
raspberry pi: add model b definition
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-12-08 15:41:16 +00:00
Thomas Ingleby
f9d466bb84
arm: add initial skeleton for arm platform support
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-12-08 15:32:42 +00:00
Thomas Ingleby
79afd9173a
x86: move x86 platform include files into own directory
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-12-08 15:32:42 +00:00
Thomas Ingleby
b0a21e2c30
arch: initial framework for supporting other architectures added.
...
x86: all platforms moved into x86 directory
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-12-08 15:32:42 +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
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
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
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
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
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
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
Brendan Le Foll
32d8a6f0ca
syslog: remove all fprintf calls and use syslog instead
...
Syslog is now used for all error messages, return values in the code should be
used by programmers to see the status of the library/board and syslog can be
used to see quickly from a debugging perspective what has gone wrong. A few
cosmetics where improved as well as a mraa_set_log_level() call where the
syslog log mask can be set directly from libmraa.
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-09-25 14:31:04 +01:00
Brendan Le Foll
68de395fea
mraa_internal.h: fix styling issues
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-09-25 14:30:23 +01:00
Thomas Ingleby
6a7add6b99
aio: add calls for changing bit value of the read
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-09-22 14:52:45 +01:00
Thomas Ingleby
fb1034b2b0
hook: add spi init hooks
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-09-09 18:01:23 +01:00
Thomas Ingleby
dd9129d411
hook: add pwm hook around init
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-09-09 18:01:23 +01:00
Thomas Ingleby
62a1493bdf
aio: internal aio context to mraa_internal_types
...
* Some comments for members of structure also added
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-09-09 18:00:27 +01:00
Thomas Ingleby
92cbb6097c
aio: add init hooks, and fp hook
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-09-09 18:00:23 +01:00
Thomas Ingleby
5766b03068
intel_edision_fab_c: renamed from fab_b
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-09-09 17:28:43 +01:00
Thomas Ingleby
c9c1735e42
intel_edison_fab_b: initial board definition
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-09-09 17:13:18 +01:00
Thomas Ingleby
595eec2737
pwm: move internal context structure to internal header
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-07-24 14:21:06 +01:00
Thomas Ingleby
715863cd28
pwm: add period write replace hook
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-07-24 14:20:01 +01:00
Thomas Ingleby
57d58b66ca
i2c: add init(pre-post) hooks
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-07-14 18:19:07 +01:00
Thomas Ingleby
00f188c235
i2c: internal structure to mraa_internal_types
...
* For use in hooks
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-07-14 17:52:08 +01:00
Thomas Ingleby
3d5512c15e
mraa: make platform info more available internally
...
* available with mraa_internal header
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-07-14 16:56:12 +01:00
Thomas Ingleby
fb030b5e9f
hook: change structure to pointer
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-07-14 15:37:55 +01:00
Thomas Ingleby
b74759e973
mraa: rename internal adv func mraa_adv_func_t
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-07-14 15:12:08 +01:00
Thomas Ingleby
4d6a3be3db
hook: items lost in merge, missing adv items.
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-07-11 12:02:40 +01:00
Thomas Ingleby
9bacfcff5f
Merge branch 'hook'
...
Conflicts:
include/intel_galileo_rev_d.h
include/intel_galileo_rev_g.h
include/mraa_adv_func.h
include/mraa_internal.h
src/gpio/gpio.c
src/mraa.c
2014-07-11 11:56:45 +01:00
Thomas Ingleby
d7c8f2a794
hook: change header of board definition, add internal
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-07-11 11:41:14 +01:00
Thomas Ingleby
1fafd97f5e
hook: rename from declared struct to adance_func
...
* Removed bitfield, now checks if pointer NULL.
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-07-11 09:14:49 +01:00
Brendan Le Foll
b5b7dec441
mraa_internal: add extern "C" to internal headers
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-07-10 22:08:05 +01:00
Thomas Ingleby
23304fb6c4
uart: barebones uart module added.
...
* Only defined call is the init. Will then expose the uart from
* the multiplexors.
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-07-10 01:09:46 +01:00
Thomas Ingleby
0e46b94793
hook: remove hooks, move into branch.
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-07-01 18:32:38 +01:00
Thomas Ingleby
d0ea43f8d1
mraa: initial implementation of "hooks"
...
* Should allow for more platform quirks to be handled by mraa without
* massive conditional areas per platform.
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-06-27 15:37:48 +01:00