Commit graph

24 commits

Author SHA1 Message Date
Drew Fustini
61af64e734
use set_pin_mode() to set uart pinmux (#158)
Use set_pin_mode() to set pinmux for UART
RX and TX pins. This is similar effect as
running the config-pin utility.

Signed-off-by: Drew Fustini <drew@pdp7.com>
2017-11-30 22:39:14 -06:00
Drew Fustini
5e2e785b51 check if board is BeagleBone Blue or PocketBeagle
This check is needed as BeagleBone Blue and PocketBeagle
have additional LEDs connected to GPIO pins that other
BeagleBone models do not
2017-10-28 04:27:03 +00:00
Drew Fustini
ff57ef2558 increase size of ctrl_dir and ocp_dir for future use
Pad the size of ctrl_dir and ocp_dir to be on the safe side
2017-04-19 04:00:36 +00:00
Drew Fustini
01f73c578c remove conditional logic for ctrl_dir and ocp_dir size
Remove conditional logic for kernel version to determine the
size of ctrl_dir and ocp_dir.  Instead, the maximum possible
size is used for these arrays regardless of the kernel version

Resolves #144
2017-04-19 03:14:31 +00:00
cocasema
ceb468108f Add libadafruit-bbio with C++ wrappers for PWM/GPIO 2017-03-31 02:17:00 -07:00
cocasema
6c489fce8e Add syslog and debugging messages 2017-03-31 02:16:21 -07:00
cocasema
4b7e11f4d7 Extract BBIO_err into a separate header 2017-03-24 22:04:06 -07:00
Drew Fustini
6d78f9db06 Fix gcc warnings about comparing signed and unsigned values
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
2017-01-11 09:14:38 +00:00
Drew Fustini
452f2e7ee3 Buffer for SPI bus sysfs path too small
@kozga advised in issue #94 of a bug in
get_spi_bus_path_number()

> In version 1.0 declared path length is too low (50 bytes)
> But for kernels 4.1 path length is 54 bytes.
> In result, path is shortened to
> '/sys/devices/platform/ocp/48030000.spi/spi_master/'
> and function always return 1,
> even if you try to open /dev/spidev2.x.

These are the sysfs paths for the SPI bus 1 and 2
for Debian 8.6 with Linux 4.4.21-bone13 kernel:

/sys/devices/platform/ocp/48030000.spi/spi_master/spi1/
/sys/devices/platform/ocp/481a0000.spi/spi_master/spi2/

I have fixed by increasing the size of path to MAX_PATH.
MAX_PATH is defined as 256.  This should provide enough
extra margin for any future kernel changes in sysfs paths.
2016-10-19 23:05:52 +00:00
Matthew West
8fe1336b0a Bug fixes almost to stability 2016-08-08 10:51:15 -07:00
Matthew West
6b2aa7aabc Change return value convention for errors
Replace 1 for success and 0/-1 for failure with an enum type.
2016-08-05 13:19:54 -07:00
Matthew West
d6fe11ed89 Add ifndef guards to all header files 2016-08-05 11:17:14 -07:00
Peter Lawler
b7914ee3f6 Manually edited source change removed incorrect line 2016-05-11 08:43:02 +10:00
plawler
d16654d20a Make friends between 3.8 and 4.1+ kernels 2016-04-29 12:29:29 +10:00
Enzo Macari
d9ad2b3812 Soporte para adc y gpio ok
TODO: PWM
2016-02-03 17:23:35 -03:00
Justin Cooper
9e1bd7ba77 remove unused variable 2014-05-27 19:40:22 +00:00
Justin Cooper
25e654a982 fix for SPI not loading spidevX.X correctly based on load order 2014-05-23 03:22:48 +00:00
Eric Lee
715e87d2ab Increase the size of the buffer used for storing device tree names.
The previous buffer size was 9 which was not log enough to hold the name of the UART device tree items.
2013-09-21 23:30:34 -07:00
Chris Desjardins
10229240e4 The test_direction_readback fails, because gpio_get_direction wasn't properly null terminating the direction string 2013-08-09 09:57:56 +02:00
Justin Cooper
b829cc4132 initial support to export uart 2013-07-22 21:04:29 +00:00
Justin Cooper
c8b2057e1e update copyright 2000-01-01 10:28:25 +00:00
Justin Cooper
ab6dab6519 fix tests, initial non-working spi, refactor loading device tree 2000-01-01 00:06:09 +00:00
Justin Cooper
78610e35a2 clean up adc, and add test 2000-01-01 00:03:14 +00:00
Justin Cooper
1258c651cb Initial Commit 2013-06-10 20:16:39 +00:00