Commit graph

566 commits

Author SHA1 Message Date
Drew Fustini
59dcd95755
Update tox.ini to Python 3.6
Try to fix TravisCI error that Python 3.4 does not exist
2019-12-17 05:34:03 +00:00
Drew Fustini
1ca2830828
Update travis config to specify Python 3.6
Attempt to fix Travis error:
https://travis-ci.com/adafruit/adafruit-beaglebone-io-python/builds/140636005

```
1.74s$ git clone --depth=50 --branch=issue308 https://github.com/adafruit/adafruit-beaglebone-io-python.git adafruit/adafruit-beaglebone-io-python
0.01s0.01s$ source ~/virtualenv/python3.6/bin/activate
$ python --version
Python 3.6.7
$ pip --version
pip 19.0.3 from /home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/pip (python 3.6)
install
1.54s$ pip install tox
5.96s$ tox
GLOB sdist-make: /home/travis/build/adafruit/adafruit-beaglebone-io-python/setup.py
py27 create: /home/travis/build/adafruit/adafruit-beaglebone-io-python/.tox/py27
py27 inst: /home/travis/build/adafruit/adafruit-beaglebone-io-python/.tox/.tmp/package/1/Adafruit_BBIO-1.1.1.zip
py27 installed: Adafruit-BBIO==1.1.1
py27 run-test-pre: PYTHONHASHSEED='645938357'
py27 run-test: commands[0] | echo 'run pytest on beaglebone'
run pytest on beaglebone
py34 create: /home/travis/build/adafruit/adafruit-beaglebone-io-python/.tox/py34
ERROR: InterpreterNotFound: python3.4
___________________________________ summary ____________________________________
  py27: commands succeeded
ERROR:  py34: InterpreterNotFound: python3.4
The command "tox" exited with 1.
Done. Your build exited with 1.
```
2019-12-17 05:27:46 +00:00
Drew Fustini
eca84d64d7 Fix warning about casting incompatible function types #308
Debian 10 (Buster) has gcc 8.2 which warns about:

cast between incompatible function types from ‘PyObject * (*)(PyObject *, PyObject *, PyObject *)’

The solution is to cast to '(PyCFunction)(void *)'
2019-12-11 09:06:12 +00:00
Drew Fustini
7fb13f9f3d Fix warnings on format truncation and sizeof in strncpy #308
Debian 10 (Buster) has gcc 8.2 which warns about:

source/c_pwm.c:459:65: error: argument to ‘sizeof’ in ‘strncpy’ call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess]
source/c_pwm.c:396:43: error: ‘%s’ directive output may be truncated writing up to 199 bytes into a region of size 100 [-Werror=format-truncation=]
2019-12-11 09:03:44 +00:00
Drew Fustini
3a5d23d01b Fix warning about casting incompatible function types #308
Debian 10 (Buster) has gcc 8.2 which warns about:

cast between incompatible function types from ‘PyObject * (*)(PyObject *, PyObject *, PyObject *)’

The solution is to cast to '(PyCFunction)(void *)'
2019-12-06 10:26:49 +00:00
Drew Fustini
9298393cf5 Fix warning print format strings being truncated #308
Debian 10 (Buster) has gcc 8.2 which warns about:

error: ‘%s’ directive output may be truncated writing up to 19 bytes into a region of size between 10 and 59 [-Werror=format-truncation=]
  snprintf(path, sizeof(path), "%s/%s/state", ocp_dir, pinmux_dir);
2019-12-06 10:24:47 +00:00
Drew Fustini
7032af7e5f Fix warning about casting incompatible function types #308
Debian 10 (Buster) has gcc 8.2 which warns about:

cast between incompatible function types from ‘PyObject * (*)(PyObject *, PyObject *, PyObject *)’

The solution is to cast to '(PyCFunction)(void *)'
2019-12-06 10:20:18 +00:00
Drew Fustini
b867bbffe3
Change name of P1_3 to match bone.js 2019-04-03 00:21:27 +01:00
Drew Fustini
5df30a8b73
do not set pin mode for built-in USRn LEDs
This fix resolves Adafruit_BBIO issue #310 and https://github.com/adafruit/Adafruit_Blinka/issues/96 which was preventing the USR LEDs from being used by the CircuitPython Blinka library
2019-04-01 03:10:02 +01:00
Drew Fustini
e06bec0d24
Update setup.py 2019-03-30 15:04:45 +00:00
Drew Fustini
0923b85884
Ignore new compiler warnings in gcc 8.2.0
I was testing the new Debian "buster" image by @RobertCNelson and we noticed that the Adafruit_BBIO build was failing on compiler warnings.  This seems to be due to the introduction of new compiler warnings in the more recent version of gcc that is on the buster image: https://rcn-ee.net/rootfs/bb.org/testing/2019-03-03/buster-iot/bone-debian-buster-iot-armhf-2019-03-03-4gb.img.xz a shot
2019-03-18 23:12:00 +01:00
Drew Fustini
b2a6be54a1 force Encoder period to be an integer #299 2018-12-19 13:31:34 -06:00
Drew Fustini
2cfded3459
Fix dead link to bone.js #296 2018-12-10 07:32:21 -06:00
Drew Fustini
e96e1efb53 remove deug output 2018-11-23 05:35:27 +00:00
Drew Fustini
96aa8ed2aa do not set pinmux on the beaglebone blue
beaglebone blue has complete dtb file and does not need pinmux set for gpio ports
2018-11-23 04:54:32 +00:00
Drew Fustini
f70453ed41 upload to PyPI againt to resolve #293 2018-11-20 08:26:47 +00:00
Drew Fustini
71d1bb293a update version to 1.1.0 2018-10-18 06:58:25 +00:00
Drew Fustini
1f7c20e899 remove debug logging 2018-10-17 14:59:09 -05:00
Drew Fustini
c09ab8ee43 fix pwm on pocketbeagle and beaglebone blue #286
pocketbeagle and beaglebone blue have complete dtb file
and do not need overlays
2018-10-17 14:56:11 -05:00
Drew Fustini
b1ee5998f0
Merge pull request #285 from sam-bristow/bugfix/uart-error-reporting
Return error-code for problem UART interface
2018-10-11 11:26:28 -05:00
Drew Fustini
32b1f7e1bb
Merge pull request #284 from sam-bristow/py3-docs
Update UART examples
2018-10-11 11:26:14 -05:00
Sam Bristow
448854c209 Return error-code for failing interface
Rather than returning the error code for UART1 regardless of which
interface had problems, we should return the error code for the
interface that actually had an error.

Pretty sure this was a simple copy-paste mistake.
2018-10-09 23:57:20 +13:00
Sam Bristow
783bfacee8 Use new python-serial API
Version 3.0 of python-serial introduced an updated API, we may as well
use it.

This change also uses context-managers for dealing with UARTs as they
are less error-prone and the code is much cleaner/shorter.
2018-10-09 23:39:43 +13:00
Sam Bristow
eff11b83fe Use print() function in all code and docs
Low-hanging fruit of Python3 compatibility work.

I've left fix_py_compile.py as it is only ever going to be run under
Python 2.
2018-10-09 23:34:26 +13:00
Drew Fustini
7affea78fd do not load overlays for the beaglebone blue #283
beaglebone blue has complete dtb file and does not need overlays

refer to issue 283:
https://github.com/adafruit/adafruit-beaglebone-io-python/issues/283
2018-10-07 22:10:02 +00:00
Drew Fustini
79e2d30526
Merge pull request #282 from erikwelsh/master
Fixed GPIO export problem; Leaves GPIO in bad state on latest BeagleB…
2018-10-07 15:41:45 -05:00
Erik Welsh
e626f07d8d Fixed GPIO export problem; Leaves GPIO in bad state on latest BeagleBone image on PocketBeagle 2018-09-30 16:24:33 +00:00
Drew Fustini
8353c7c39b
update UART section in README
Signed-off-by: Drew Fustini <drew@pdp7.com>
2018-08-31 05:19:22 -05:00
Drew Fustini
bf97de641a
update install and test shell scripts
Signed-off-by: Drew Fustini <drew@pdp7.com>
2018-08-31 04:34:38 -05:00
Drew Fustini
c749402003
Add UART entries for the PocketBeagle (issue #242)
PocketBeagle pins with UART pin mode:

  P1_30 uart0_txd
  P1_32 uart0_rxd
  P2_11 uart1_rxd
  P2_09 uart1_txd
  P1_08 uart2_rxd
  P1_10 uart2_txd
  P2_29 uart3_txd

Available UART names on PocketBeagle:

 PB-UART0: /dev/ttyO0, Rx: P1_30, Tx: P1_32
 PB-UART1: /dev/ttyO1, Rx: P2_11, Tx: P2_09
 PB-UART2: /dev/ttyO2, Rx: P1_08, Tx: P1_10
 PB-UART3: /dev/ttyO3, Rx: P2_29, Tx: none

Signed-off-by: Drew Fustini <drew@pdp7.com>
2018-08-31 04:10:47 -05:00
Drew Fustini
829f97a917
Update ADC.rst 2018-08-16 01:20:47 -05:00
Drew Fustini
4a82f4c430
Update Encoder.rst 2018-08-16 01:17:32 -05:00
Drew Fustini
e9d56e06c7
Update ADC.rst
testing readthedocs webhook
2018-08-16 01:06:50 -05:00
Drew Fustini
a841a9dd0a
Merge pull request #271 from fcooper/documentation-updates
Documentation updates
2018-08-06 18:51:54 -05:00
Franklin S Cooper Jr
44c371a77a docs/GPIO.rst Make documentation a bit newbie friendly
Make it clear in the parameter snippet that the various attributes
belong to the GPIO class.

Signed-off-by: Franklin S Cooper Jr <fcooper27@gmail.com>
2018-07-31 21:17:50 -05:00
Franklin S Cooper Jr
61ca14b926 docs/GPIO.rst: Add information on blinking led
Copy information regarding blinking leds to the GPIO documentation

Signed-off-by: Franklin S Cooper Jr <fcooper27@gmail.com>
2018-07-31 21:03:29 -05:00
Franklin S Cooper Jr
339314535b docs/SPI.rst: Fix bus numbering in examples
Commit 8dfbf64c36 ("Fix spidev path mismatch (#216)")
changes how the SPI constructor maps to the spidev entry.
Update the documentation to reflect this change.

Signed-off-by: Franklin S Cooper Jr <fcooper27@gmail.com>
2018-07-31 20:44:11 -05:00
Demo User
4cc4b76188
update README with recommended Debian image
Signed-off-by: Drew Fustini <drew@pdp7.com>
2018-07-20 05:54:26 -05:00
Drew Fustini
bbf0927781
Merge pull request #251 from amarburg/master
Added usleep after successfully enabling PWM via udev.
2018-06-26 11:16:03 -05:00
Drew Fustini
dc24ebfba6
Merge pull request #257 from zsserg/develop
Fixed SEGFAULT when calling remove_event_detect()  and added epoll_ctl() return code handling
2018-06-26 10:58:47 -05:00
zserg
3265d156e4 * Minor style fixes
* Added comments
* Added debug logging
* Line 724 - now <initial> flag is properly reset upon removal of event detection from GPIO pin
2018-05-31 18:10:26 +01:00
zserg
b054cc083e * Fixed SEGFAULT in event_gpio,c run_callbacks()
* Added more elaborate epoll() error logging
2018-05-30 16:47:47 +01:00
Aaron Marburg
e061d1358e Added usleep after successfully enabling PWM via udev. 2018-04-12 22:46:49 +00:00
zserg
7091eeb36e Merge branch 'master' into develop 2018-02-19 17:45:22 +00:00
Drew Fustini
49b2be3262
Merge pull request #233 from zsserg/fixed_segfault_in_event_detection
* Fixed  SEGFAULT when calling remove_event_detect() from python callback
2018-02-18 02:04:43 -06:00
zserg
e9c70f7d23 * Fixed SEGFAULT when calling remove_event_detect() inside python callback function. 2018-02-18 00:06:57 +00:00
zserg
9fd1073982 * Fixed SEGFAULT when calling remove_event_detect() inside python callback function. 2018-02-18 00:02:50 +00:00
Drew Fustini
6f3589a7c5
create release 1.0.10
Features:
* automatically set pin modes for UART (PR #158)
* Encoder: README.md: added note about eqep group change (PR #214)
* deprecate out of date Adafruit_I2C.py (PR #215)
* Add Encoder module info to main README.md (PR #217)
* Add automatic API documentation generation (PR #219)
* Separate API docs into modules (PR #221)

shortlog:
* David Planella (46):
  * Encoder: README.md: added note about eqep group change
  * Add Encoder module info to main README.md
  * Added docstrings using Google syntax and Sphinx support to generate the API documentation for the Encoder and PWM modules for now.
  * Made kernel version check to happen only if running on a beaglebone. The readthedocs builders that import the Encoder module have an old 3.3 kernel and the autodoc build fails
  * Use the default readthedocs theme
  * Use readthedocs theme if building docs there, remove redundand search link
  * Readthedocs theme tweaks
  * Removed redundant TOC, added global description
  * Added UART documentation
  * Added documentation badge
  * Added ADC API docs, fixed UART module definition
  * API docs: added SPI module
  * Added SPI module attribute docs
  * Added Python badges to README file
  * Added SPI pins table and first shot at GPIO module. Functions still need to be documented
  * Merge branch 'readthedocs' of https://github.com/dplanella/adafruit-beaglebone-io-python into readthedocs
  * Documented the API docs build process
  * Added docstrings using Google syntax and Sphinx support to generate the API documentation for the Encoder and PWM modules for now.
  * Made kernel version check to happen only if running on a beaglebone. The readthedocs builders that import the Encoder module have an old 3.3 kernel and the autodoc build fails
  * Use the default readthedocs theme
  * Use readthedocs theme if building docs there, remove redundand search link
  * Readthedocs theme tweaks
  * Removed redundant TOC, added global description
  * Added UART documentation
  * Added documentation badge
  * Added ADC API docs, fixed UART module definition
  * API docs: added SPI module
  * Added SPI module attribute docs
  * Added Python badges to README file
  * Added SPI pins table and first shot at GPIO module. Functions still need to be documented
  * Documented the API docs build process
  * Merge branch 'readthedocs' of https://github.com/dplanella/adafruit-beaglebone-io-python into readthedocs
  * Update README.md
  * Added some more API doc content
  * Sync from upstream master
  * Minor documentation and configuration improvements
  * Finished documenting GPIO
  * rST fixes
  * Update README.md
  * Minor API doc improvements
  * Merge branch 'readthedocs' of https://github.com/dplanella/adafruit-beaglebone-io-python into readthedocs
  * Generate the API documentation from a master index and a separate file for each module
  * Sync from upstream master
  * Improvements to the API docs output config
  * Update docs generation description to reflect new separate modules
  * Updated ADC API docs

* Drew Fustini (10):
  * use set_pin_mode() to set uart pinmux (#158)
  * Add SPI instructions to README (#158)
  * Update README.md
  * Fix spidev path mismatch (#216)
  * Merge pull request #217 from dplanella/patch-2
  * Merge pull request #214 from dplanella/patch-1
  * Deprecate Adafruit_BBIO.I2C in favor of Adafruit_GPIO.I2C (#215)
  * Merge pull request #219 from dplanella/readthedocs
  * relocate doc dir to avoid confusion (#218)
  * Merge pull request #221 from dplanella/readthedocs

Signed-off-by: Drew Fustini <drew@pdp7.com>
2018-01-25 22:49:09 -06:00
Drew Fustini
fe57d1f73d
Merge pull request #221 from dplanella/readthedocs
Separate API docs into modules
2017-12-23 11:27:51 -06:00
David Planella
14f1f79385
Updated ADC API docs 2017-12-05 08:44:52 +01:00