Commit graph

71 commits

Author SHA1 Message Date
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
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
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
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
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
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
f64382b8db
create release 1.0.9
Features:
  * Issue #194: Encoder position cannot be set
  * PR #205: Encoder: add support for reading/writing sysfs attributes

Fixes:
  * Issue #198: use https for DEFAULT_URL in distribute_setup.py
  * Issue #197: Fix leak of pwm enable file descriptor
  * Issue #189: Fix seg fault of PWM in Python 3.6
  * Issue #180: Clarify there is no 0 prefix for pin lables
  * PR #201: Encoder: do kernel check, PEP8 cleanup
  * PR #202: Encoder: corrected kernel check logic
  * PR #207: Encoder: improved usage adocumentation
  * PR #210: Encoder: fix sysfs import, make code Python 3 compatible
  * PR #212: Encoder: fix Python 3 compatibility
  * PR #213: Encoder: fix frequency calculation from period

shortlog:

* David Planella (18):
  * Encoder: initialize only the given channel
  * Sync from master
  * Encoder: do kernel check, PEP8 cleanup
  * Encoder: added sysfs module
  * Encoder: use sysfs to write QEP attributes
  * Encoder: corrected kernel check logic
  * Merge pull request #2 from adafruit/master
  * Encoder: convert get/set methods to properties, update apidoc strings
  * Encoder: updated README
  * Encoder: add README apt install clarification
  * Encoder: copyright assignment note, updated comments
  * Encoder: added usage notes
  * Encoder: improved usage documentation
  * Encoder: minor fix to usage example
  * Encoder: added a note about permissions
  * Encoder: switched sysfs to be a relative import compatible with Python 2 and 3
  * Encoder: use items() instead of iteritems() to be Python 3 compatible
  * Encoder: fix frequency getter

* Drew Fustini (18):
  * use https for DEFAULT_URL in distribute_setup.py (#198)
  * fix except syntax for Python 3
  * use dict.items() instead of dict.iteritems() for Python 3
  * fix error in set_brightness()
  * close enable_fd when stopping PWM output (#197)
  * Merge pull request #199 from dplanella/patch-1
  * Fix leak of pwm enable file descriptor (#197)
  * Merge pull request #201 from dplanella/encoder-cleanup
  * remove test_rotary.py as not valid for pytest
  * Fix seg fault of PWM in Python 3.6 (#189)
  * Merge pull request #202 from dplanella/patch-2
  * Clarify there is no 0 prefix for pin lables (#180)
  * Merge pull request #205 from dplanella/encoder-sysfs
  * assign copyright for new file to Adafruit Industries
  * Add bash scripts to help install and test
  * Merge pull request #212 from dplanella/patch-4
  * Merge pull request #207 from dplanella/patch-3
  * Merge pull request #213 from dplanella/fix-encoder-frequency

Signed-off-by: Drew Fustini <drew@pdp7.com>
2017-11-30 20:31:39 -06:00
Drew Fustini
353acf8472
create release 1.0.8
Release 1.0.8:
==============
Fixes:
  Issue #196: cache board type to avoid poor performance
  Issue #192: fix PocketBeagle PWM pin typo
  Issue #191: turn off RotaryEncoder's debug output by default
  Issue #188: GPIO is extremely slow (20ms to toggle)
  Issue #186: problems with UART

shortlog:

David Planella (12):
  Copy Encoder module comments to README.md
  Formatted Encoder README in markdown
  Fixed Encoder README formatting
  Removed QEP instructions from Encoder module
  Fixes to Encoder README
  Updated Encoder README
  Encoder README: added info on dedicated overlays
  Encoder README: updated info on pre-requisites
  Encoder README update
  Encoder README update
  Add logging support, turn off unconditional debug output
  Encoder: remove unused logging code

Drew Fustini (3):
  Merge pull request #195 from dplanella/master
  Fix PocketBeagle PWM pin typo (#192)
  cache board type to avoid poor performance (#196)

Signed-off-by: Drew Fustini <drew@pdp7.com>
2017-11-19 17:21:14 -06:00
Drew Fustini
2c4d44e24f
Create release 1.0.7 with #188 fix
Signed-off-by: Drew Fustini <drew@pdp7.com>
2017-11-08 03:28:11 -06:00
Drew Fustini
b9f21e673b Create 1.0.6 release
shortlog of release 1.0.6:

Drew Fustini (39):
      Add -Wno-unit_address_vs_reg to avoid dtc warning
      check if board is BeagleBone Blue or PocketBeagle
      check if BeagleBone Blue before accessing non-standard LEDs
      Add test for GPIO regression #178
      change syslog mask level to DEBUG
      add "Adafruit_BBIO" to syslog()
      update test for issue #178
      remove polarity "hack" for PWM #170
      move pwm_set_polarity() after period is set
      add test for issue #170
      only check kernel overlays if u-boot overlays are not being used
      Attempt to use udev ecap path for pwm path
      add test script for all BeagleBone PWM outputs
      update PWM test for 4.14 kernel udev paths
      minor change to pwm debug logging
      sleep to avoid udev race condition #185

Mark A. Yoder (1):
      Added BAT25, BAT50, BAT75, BAT100 and WIFI LEDs

Peter Lawler (1):
      Missing CR/LF

Robert Nelson (10):
      source/common.c: add initial PocketBeagle values
      source/common.c: PocketBeagle, no slots file, everything built-in
      source/common.c: PocketBeagle, no slots file disable here too
      source/c_pwm.c: HACK: U-Boot pre-setup everything, dont search for specific overlay
      source/c_pwm.c: HACK: PocketBeagle: v4.14.x
      source/c_pwm.c: debug pwm_path/pwm_path_udev
      source/c_pwm.c: pwm: add support for pwmchipX/pwm-X:Y syntax
      source/c_pwm.c: disable pwm_set_polarity (broken in v4.9.x/v4.14.x)
      source/common.c: Blue Fix GP0_3 id
      source/common.c: PocketBeagle Fix P2.24
2017-11-03 00:45:21 +00:00
Drew Fustini
3f931da909 Update names of README and CHANGELOG 2017-11-02 18:56:06 +00:00
Drew Fustini
65af1c728c create release 1.0.5
1.0.5
----
* @pdp7 (5):
  * Merge pull request #153 from MarkAYoder/master
  * Fix print syntax to avoid python3 errors
  * Merge pull request #160 from MarkAYoder/master
  * document how to read QEP1
  * Update rotary-encoder-eqep-test.md

* @MarkAYoder (20):
  * Have GP0_1 working
  * Removed --force to speed things up
  * Added GP0 1, 2 and 3
  * Flashes 4 LEDs
  * Works with button
  * Blinks red and gree LEDs
  * Blinks all 6 GPIOs
  * Added red and green LEDs
  * i2c works
  * PWD isn't working, yet
  * Added port setup
  * Switched to apt install
  * Added tmp101 to name
  * Added LED matrix example
  * Removed newline from print
  * Added fade
  * Adding GPIO defs for uart1
  * Testing UT1_0, not working yet
  * Switched GP0_0 to GP0_3, etc.
  * Added PAUSE and MODE buttons.
2017-09-01 03:50:15 +00:00
Drew Fustini
a8b35df35e Create release 1.0.4: bug fixes and enhancements
Version 1.0.4: bug fixes and enhancements from last 6 months

- @djsutton (1):
  - fix TypeError: function takes exactly 3 arguments (2 given) from wait_for_edge

- @pdp7 (29):
  - Instruct users to open GitHub issue instead email
  - add udev rules and script for non-root access to gpio
  - fix file descriptor leak in gpio_set_value()
  - document how to test read and write to all GPIO pins
  - reduce ADC reads in pytest from 10,000 to 1,000
  - close file descriptor to avoid leak
  - remove conditional logic for ctrl_dir and ocp_dir size
  - increase size of ctrl_dir and ocp_dir for future use
  - Document how to run config-pin at boot
  - Document how to test eQEP with Rotary Encoder
  - Add skeleton for Encoder module to read eQEP
  - Add code to Encoder.QEP from PyBBIO.RotaryEncoder
  - Adapt code from PyBBIO.RotaryEncoder
  - add test for rotary encoder
  - read from eqep position file
  - return position from getPosition()
  - document howo to enable all the eqep pins
  - Document how to test eqep pins with rotary encoder
  - run config-pin to set pin mux for qep
  - update QEP test
  - update QEP test for issue #122
  - Test if kernel booted wit u-boot overlays
  - check if kernel cmdline for uboot overlay
  - Add documentation about u-boot overlays
  - Return BBIO_OK when u-boot overlays ared enabled
  - remove debug printing
  - Skip check for device tree loaded if u-boot overlays enabled
  - Sleep after loading ADC overlay to allow driver load
  - Workaround test failure until TIMERn bug is fixed

- @ltjax (3):
  - Use lookup table to prevent duplicate pin export
  - Handle already exported pins
  - Fix build_path memory leak

- @Vadim-Stupakov (1):
  - Fixed issue #145 GPIO library doesn't free GPIO file descriptor. File descriptor leak.     Made a little bit refactoring

- @cocasema (8):
  - Declare PHONY targets in root Makefile
  - Extract BBIO_err into a separate header
  - Add syslog and debugging messages
  - Add libadafruit-bbio with C++ wrappers for PWM/GPIO
  - Add 2 versions of library with c++98 and c++11 abi
  - Install header files properly
  - Add default values to pwm::start() method.
  - Add PWM c++ tests

- @zsserg (2):
  - Added error checking for setting pin direction in gpio.setup() (Python)
  - Added debug output to set_pin_mode()
2017-08-23 08:41:49 +00:00
cocasema
4b7e11f4d7 Extract BBIO_err into a separate header 2017-03-24 22:04:06 -07:00
Drew Fustini
921001c370 Increase package version to 1.0.3
Version 1.0.3: resolve gcc error
- Add -Wno-strict-aliasing to CFLAGS to ignore gcc warning
   - Resolves GitHub issue #133 by @archey
2017-02-10 09:29:51 +00:00
Drew Fustini
baf41fce84 Add -Wno-strict-aliasing to CFLAGS to ignore gcc warning
GitHub issue #133 was raised by @archey:
Compilation issues due to strict aliasing

These errors occured when building with gcc 6.3:
```
gcc -pthread -DNDEBUG -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -march=x86-64 -mtune=generic -O3 -pipe -fstack-protector-all --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fPIC -DBBBVERSION41 -I/usr/include/python2.7 -c source/py_gpio.c -o build/temp.linux-x86_64-2.7/source/py_gpio.o -Wall -Werror -Wextra -Wno-missing-field-initializers
source/py_gpio.c: In function ‘py_event_detected’:
source/py_gpio.c:433:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
       Py_RETURN_TRUE;
       ^~~~~~~~~~~~~~
source/py_gpio.c:435:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
       Py_RETURN_FALSE;
       ^~~~~~~~~~~~~~~
source/py_gpio.c: In function ‘py_wait_for_edge’:
source/py_gpio.c:479:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
       Py_RETURN_FALSE;
       ^~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
error: command 'gcc' failed with exit status 1
```

Py_RETURN_TRUE and Py_RETURN_FALSE are part of the Python C API:
https://docs.python.org/2/c-api/bool.html
2017-02-08 03:52:41 -06:00
Drew Fustini
af620d57aa Increase package version to 1.0.2
Version 1.0.2: bug fixes and minor improvements:
- Merge pull request #130 from adafruit/issue129-usr-leds [1439133]
  - Add support for alternate USR LED labels
- Merge pull request #131 from adafruit/fix-gcc-warnings [f0ee018]
   - Fix gcc warnings
- Merge pull request #132 from buckket/setup_unicode_fix [4c67dfc]
   - Make use of io.open() with explicit file encoding in setup.py
2017-02-01 05:22:04 +00:00
buckket
c82cd5f58a Make use of io.open() with explicit file encoding in setup.py 2017-01-16 03:48:06 +01: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
d727792e28 Silence gcc warning -Wsign-compare
TODO: fix source the actual cause of the warning:
source/common.c:344:14: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
2017-01-10 10:55:12 +00:00
Drew Fustini
edac02a875 Fix gcc warning -Wno-format-security 2017-01-10 10:52:01 +00:00
Drew Fustini
74e9123c39 Supress unnecessary GCC warning
Avoid warning for missing initializer:

source/common.c:156:5: error: missing initializer for field ‘pwm_mux_mode’ of ‘pins_t’ [-Werror=missing-field-initializers]
     { NULL, NULL, 0 }
     ^
source/common.c:54:9: note: ‘pwm_mux_mode’ declared here
     int pwm_mux_mode;
         ^
source/common.c:173:3: error: missing initializer for field ‘rx’ of ‘uart_t’ [-Werror=missing-field-initializers]
   { NULL, NULL, 0 }
   ^
source/common.c:163:17: note: ‘rx’ declared here
     const char *rx;
2017-01-10 10:52:00 +00:00
Drew Fustini
c8fe0701c6 Enable extra gcc warnings 2017-01-10 10:51:59 +00:00
Drew Fustini
237ceda989 Increase package version to 1.0.1 2016-12-22 06:44:52 +00:00
cocasema
efc0a25f65 Treat warnings as errors 2016-10-18 21:59:24 -07:00
Jesse McLachlan
6d4ada171a Update setup.py to compile pinmux set pin mode to GPIO 2016-10-10 15:03:21 +11:00
Drew Fustini
bc373997aa Bump version up to 1.0.0 2016-09-23 00:47:01 -05:00
Matthew West
599ec57f4c Fix PWM in Linux 4.1+ 2016-08-05 10:16:34 -07:00
Peter Lawler
dacf24a529 Remove unneeded code 2016-05-31 11:51:10 +10:00
Peter Lawler
1edaec71cf Remove stray whitespace 2016-05-31 11:47:45 +10:00
Drew Fustini
9dbd8fbac5 Correct logic for defining BBBVERSION41 2016-05-30 07:45:03 +00:00
Drew Fustini
dda8e63187 Define BBBVERSION41 in setup.py based on platform.release()
Refer to discussion in this pull request:
https://github.com/adafruit/adafruit-beaglebone-io-python/pull/96#issuecomment-222426587

and mailing list thread:
https://groups.google.com/forum/#!search/peter$20bbio/beagleboard/Vx5U15tcwlw/e2Gjj-rwBAAJ
2016-05-30 07:27:54 +00:00
root
23ba591640 Bump version up to 0.0.30 2015-05-07 21:00:30 +00:00
Simon Westphahl
9514af6f22 Add support for Python 3
Installation of the missing py_compile module was factored out into a
standalone script which is only compatible with Python 2.
2015-05-06 08:29:00 +02:00
Tony DiCola
d55fd617fb Resolve #71 by ignoring printf format security warning to worka around compiler error on GCC 4.9 2014-10-23 01:02:41 +00:00
Justin Cooper
dabffc6d9c bump version to 0.0.20 2014-05-27 19:45:51 +00:00
Justin Cooper
7617c873b0 bump version to 0.0.19, and update changelog 2013-11-25 18:15:11 +00:00
Zach Thorson
fa1b4a3e7e Added a retry to reading for the analog inputs to avoid a bug where reading back and forth between two analog inputs would cause the resource to be unavailable every 16 scans
Corrected the readback of the success bit to correctly check for a read and raise an exception on failure
2013-11-20 14:52:04 -06:00
Zach Thorson
34d7e30e1a Updated the build_path to be more selective over what paths it chooses (This should prevent chosing the wrong helper leading to seg faults)
Improved error messages when ADC fails to setup
Check for null file handle when opening AIN to prevent seg fault
2013-11-14 11:10:09 -06:00
Justin Cooper
5f6e66a352 bump version 2013-09-12 02:12:49 +00:00
Justin Cooper
7c130826d6 bump for 0.0.17 2013-08-19 21:52:41 +00:00
Justin Cooper
a322ddc2c0 fix for polarity not getting set properly, add polarity as optional parameter in start 2013-08-15 03:55:08 +00:00
Justin Cooper
bd1c99bf93 bump version to 0.0.15 2013-08-12 21:27:08 +00:00
Justin Cooper
210693200a bump version to 0.0.14 and update changelog 2013-08-12 21:26:06 +00:00
Justin Cooper
fb56ad916e bump version to 0.0.13 2013-07-26 17:58:42 +00:00
Justin Cooper
2047922902 bump version for pypi issue 2013-07-26 17:52:26 +00:00