Commit graph

599 commits

Author SHA1 Message Date
Drew Fustini
cf306ed7f9
Merge pull request #366 from omerk/master
Fix compilation for newer versions of Python
2023-04-24 10:44:48 -07:00
omerk
57e630c155 fix compilation for newer versions of Python
PyEval_ThreadsInitialized() and PyEval_InitThreads() are deprecated and break the build, adding a version check to ignore if we are compiling with a newer Python version.
2023-04-22 23:15:33 +01:00
Drew Fustini
7361d9a997
Merge pull request #346 from pdp7/master
Fix pwm output for ecap pins P9_28 and P9_42 #342
2021-01-25 01:07:12 -08:00
Drew Fustini
fe2e30a8a6
Fix pwm output for ecap pins P9_28 and P9_42 #342
PWM outputs on P9_28 and P9_42 are part of the ECAP hardware block.  This causes 'ecap' to be in the path instead of 'pwm'.  For example:
`/sys/devices/platform/ocp/48300000.epwmss/48300100.ecap/pwm/pwmchip0/pwm0`
is one character longer than:
`/sys/devices/platform/ocp/48302000.epwmss/48302200.pwm/pwm/pwmchip4/pwm0`
Thus the index in pwm_path must be adjusted for the ecap_path_udev path.  This fixes issue #342
2021-01-24 22:09:43 -08:00
Drew Fustini
11e9d2d82e
Merge pull request #345 from martinezjavier/fix-multiple-def-error
fix link error due multiple variables definitions
2020-12-06 09:21:53 -08:00
Javier Martinez Canillas
be710eaf9b
fix link error due multiple variables definitions
Building with GCC 10.2.1 fails due linking errors caused by having multiple
definitions of the variables defined in the source/constants.h header file.

Fix this by moving the variables definition to the source/constants.c file,
to avoid the variables to be defined each time that the header is included.

While being there, use a single variable instead of having one for each
object that is added to the module.
2020-11-28 00:47:41 +01:00
Drew Fustini
0c7cdaf259
Merge pull request #340 from MLH-Fellowship/229-enable-pwm
Enable DMTimer PWM pins on BBB and PB
2020-07-31 17:22:57 -05:00
Drew Fustini
dbecfcddad add long_description_content_type to satisfy pypi
Refer to https://packaging.python.org/guides/making-a-pypi-friendly-readme/
2020-07-30 21:27:59 -05:00
Drew Fustini
d3bae3c1ab update CHANGELOG 2020-07-29 21:37:42 -05:00
Drew Fustini
1b2eb9d19d
Update version in setup.py to v1.2 2020-07-29 15:34:41 -05:00
Drew Fustini
8ba2f122a9
Remove suppression of gcc warnings in CFLAGS #336
CFLAGS is only -Wall now.  -Werror has been removed to the build will no longer fail on warnings.  Therefore, there is no need to suppress certain warnings.
2020-07-29 14:21:47 -05:00
Drew Fustini
24a617aecf
remove -Werror from CFLAGS
In issue #335, @mvduin noted that it is a poor idea to have compilation fail on warnings because a newer compiler version may add new warnings and as a result break compilation.
2020-07-29 14:06:32 -05:00
Drew Fustini
50fe27e928
Update README.md
update installation instructions to use python3
2020-07-29 10:57:43 -05:00
Drew Fustini
c25f27a51d
Update README.md
Change the kernel versions
2020-07-29 10:44:16 -05:00
Drew Fustini
536783c533
Update README.md
change link to current Debian image
2020-07-29 10:41:33 -05:00
Darren Schachter
af9ea512e8 Remove unnecessary conditional 2020-07-24 10:45:40 -04:00
Darren Schachter
db0adf258c Fix udev PWM path for DMTimer pins 2020-07-23 12:01:49 -04:00
Darren Schachter
928e8dc499 Add udev PWM path for DMTimer pins 2020-07-22 15:25:24 -04:00
Darren Schachter
1c012a42ed Add missing comma 2020-07-22 14:58:03 -04:00
Darren Schachter
1151dd9a8c Add dmtimer PWM entries in table for BBB 2020-07-22 14:05:10 -04:00
Darren Schachter
dcdb1adae9 Improve error logging 2020-07-22 13:50:37 -04:00
Darren Schachter
4149f2d4bc Change path for dmtimer PWM pins 2020-07-22 12:16:49 -04:00
Darren Schachter
0f9f472e36 Add is_dmtimer_pin function 2020-07-22 11:50:20 -04:00
Darren Schachter
c70c9bad97 Add dmtimer PWM entries in table for PocketBeagle 2020-07-22 10:36:03 -04:00
Drew Fustini
6f2a675d4b
Merge pull request #337 from SamPovilus/docfix
fixing document locaiton and version as current location dosn't load
2020-07-03 14:47:06 +02:00
Sam Povilus
40f1160ac3 fixing document locaiton and version as current location dosn't load 2020-07-02 19:54:43 -06:00
Drew Fustini
16f3249053
Merge pull request #327 from zer0cod3r/master
UART4 added to Pocketbeagle
2020-03-08 13:21:38 +01:00
Daniel Nguyen
61c29a1ecd
Update common.c 2020-03-07 14:19:39 -08:00
Daniel Nguyen
0be8cb5231
Update common.c
Added UART4 to Pocketbeagle
2020-03-07 14:15:49 -08:00
Drew Fustini
bd4745da78
Update README.md 2020-02-03 02:27:44 +01:00
Drew Fustini
dd6de40ba0
Update README.md 2020-02-03 02:25:02 +01:00
Drew Fustini
bf3e6b5bf0
Update ISSUE_TEMPLATE.md 2020-02-03 02:21:49 +01:00
Drew Fustini
a87a6d9496
Merge pull request #321 from adafruit/issue308
Fix warnings from gcc 8.2 in Debian 10 (Buster)
2019-12-17 05:49:41 +00:00
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