Private
Public Access
2
0

230 Commits

Author SHA1 Message Date
Brendan Le Foll
236a8e9586 uart: make mraa_uart_get_dev_path return const char*
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-06-01 10:54:40 +01:00
Jon Trulson
bdadbb8b01 uart: add fd (file descriptor) to uart context
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-05-28 23:31:11 +01:00
Michael Ring
56ba08a98f banana: Add bananapi support
Signed-off-by: Michael Ring <mail@michael-ring.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-04-08 22:19:14 +01:00
Michael Ring
bff7b558eb mraa.c: Add _contains helper functions
Signed-off-by: Michael Ring <mail@michael-ring.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-04-08 22:19:14 +01:00
Brendan Le Foll
68e216ec3f mraa_internal.h: clean header style
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-04-08 22:19:14 +01:00
Michael Ring
d2fcadc8d5 mraa.c: change helper functions to use const char*
Signed-off-by: Michael Ring <mail@michael-ring.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-04-08 22:19:14 +01:00
Michael Ring
d9d55e42bc beaglebone.h: added Beaglebone Black Platform
src/arm/CMakeLists.txt added beaglebone.c as a dependency src/arm/arm.c added
initialization of beaglebone black platform src/arm/beaglebone.c mraa support
for the Beaglebone Black Rev B+C includes support for mmap access to gpio

Signed-off-by: Michael Ring <mail@michael-ring.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-04-04 17:29:24 +01:00
Michael Ring
d0c466e81c mraa_adv_func.h: Added pwm initialization replace
current code in pwm does not work for beaglebone src/pwm/pwm.c Implemented
check for pwm_init_replace

Signed-off-by: Michael Ring <mail@michael-ring.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-04-04 17:29:24 +01:00
Thomas Ingleby
52c53760b2 api: introduce define for pin name size
MRAA_PIN_NAME_SIZE currently set at 12.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2015-03-23 17:25:27 +00:00
Michael Ring
0eda8cd397 internal/pin/name: increase length of pin name
From 8 to 12 array size

Signed-off-by: Michael Ring <mail@michael-ring.org>
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2015-03-19 00:18:41 +00:00
Michael Ring
581184d8fd include/arm/raspberry_pi.h Added pincount defines for all supported devices
Signed-off-by: Michael Ring <mail@michael-ring.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-02-15 22:39:56 +00:00
Michael Ring
8e305a1032 mraa.c added internal helper functions to support globbing and link analysis
Signed-off-by: Michael Ring <mail@michael-ring.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-02-15 22:38:36 +00:00
Thomas Ingleby
212be299fd api: remove internal strut from public API
Moved for internal use only

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2015-01-21 16:33:00 +00:00
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