forked from metachris/RPIO
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added ``debounce_timeout_ms`` argument to ``RPIO.add_interrupt_callback(..)`` * Added ``threaded`` argument to ``RPIO.wait_for_interrupts(..)`` * Interrupt callbacks now receive integer values ``0`` or ``1`` instead of strings * Interrupt callbacks with edge=``rising`` or ``falling`` only receive the correct values * Added ``RPIO.close_tcp_client(fileno)`` * Debian .deb package builds * License changed to GNU Lesser General Public License v3 or later (LGPLv3+) * ``RPIO.sysinfo()`` returns is_overclocked (improved detection in cpuinfo.c)
- Loading branch information
Chris Hager
committed
Mar 13, 2013
1 parent
0740d8e
commit 761be0c
Showing
41 changed files
with
1,321 additions
and
1,349 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
graft source/c_gpio | ||
graft source/c_pwm | ||
include source/rpio | ||
include source/rpio-curses | ||
include source/scripts/rpio | ||
include source/scripts/rpio-curses |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,27 @@ | ||
# $Id: Makefile,v 1.0 2013/03/12 01:01:35 Chris Hager Exp $ | ||
# | ||
|
||
all: | ||
@echo "make source - Create source package" | ||
@echo "make doc - Generate the html documentation" | ||
@echo "make doc_upload - make doc and upload to pythonhosted.com/RPIO" | ||
@echo "make clean - Clean up build directories" | ||
|
||
source: | ||
$(PYTHON) setup.py sdist $(COMPILE) | ||
|
||
|
||
clean: | ||
python setup.py clean | ||
find . -name '*.pyc' -delete | ||
rm -rf build dist MANIFEST Debug/ source/Debug RPIO.egg-info source/RPIO.egg-info | ||
cd documentation && make clean | ||
cd source/scripts/man && make clean | ||
|
||
doc_upload: doc | ||
python setup.py upload_docs --upload-dir=documentation/build/html/ | ||
|
||
doc: | ||
cd documentation && make html | ||
cd source/scripts/man && make man | ||
cp source/scripts/man/build/man/rpio.1 source/scripts/man/ | ||
|
||
clean: | ||
rm -rf build dist RPIO.egg-info | ||
cd documentation && make clean | ||
cd source/scripts/man && make clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
RPIO is an advanced GPIO module for the Raspberry Pi. | ||
|
||
* PWM via DMA (up to 1µs resolution) | ||
* GPIO input and output (drop-in replacement for `RPi.GPIO <http://pypi.python.org/pypi/RPi.GPIO>`_) | ||
* GPIO interrupts (callbacks when events occur on input gpios) | ||
* TCP socket interrupts (callbacks when tcp socket clients send data) | ||
* PWM via DMA (up to 1µs resolution; 500kHz) | ||
* Command-line tools ``rpio`` and ``rpio-curses`` | ||
* Well documented, fast source code with minimal CPU usage | ||
* Open source (GPLv3+) | ||
* Open source (LGPLv3+) | ||
|
||
|
||
`Visit pythonhosted.org/RPIO for the documentation. <http://pythonhosted.org/RPIO>`_ | ||
|
@@ -22,6 +22,8 @@ The easiest way to install/update RPIO on a Raspberry Pi is with either ``easy_i | |
|
||
After the installation you can use ``import RPIO`` as well as the command-line tools ``rpio`` and ``rpio-curses``. | ||
|
||
Debian packages are available at `metachris.github.com/rpio/download <http://metachris.github.com/rpio/download/latest/>`_. | ||
|
||
|
||
Examples | ||
-------- | ||
|
@@ -39,15 +41,22 @@ if you've encountered a bug. | |
License | ||
------- | ||
|
||
RPIO is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Lesser General Public License as published | ||
by the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
|
||
RPIO is distributed in the hope that it will be useful, | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
GNU Lesser General Public License for more details at | ||
<http://www.gnu.org/licenses/lgpl-3.0-standalone.html> | ||
|
||
|
||
Copyright | ||
--------- | ||
|
||
Copyright (C) 2013 Chris Hager <[email protected]> | ||
|
||
|
||
Links | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
rpio (0.9.5) unstable; urgency=low | ||
|
||
* Cleanup | ||
|
||
-- Chris Hager <[email protected]> Wed, 13 Mar 2013 02:24:08 +0100 | ||
|
||
rpio (0.9.4) unstable; urgency=low | ||
|
||
* Debounce timeout for interrupts (Closes: #XXXXXX) | ||
* Threaded argument for wait_for_interrupts() | ||
* Refactoring | ||
|
||
-- Chris Hager <[email protected]> Tue, 12 Mar 2013 22:34:04 +0100 | ||
|
||
rpio (0.9.2) unstable; urgency=low | ||
|
||
* Initial PWM release. (Closes: #XXXXXX) | ||
|
||
-- Chris Hager <[email protected]> Tue, 12 Mar 2013 17:59:56 +0100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Source: rpio | ||
Section: python | ||
Priority: optional | ||
Maintainer: Chris Hager <[email protected]> | ||
Build-Depends: debhelper (>= 8.0.0), python (>= 2.6.6-3~), python3 (>= 3.1.3-12~), python-setuptools, python3-setuptools, python-dev, python3-dev | ||
Standards-Version: 3.8.4 | ||
X-Python-Version: >= 2.6 | ||
X-Python3-Version: >= 3.2 | ||
Homepage: https://github.com/metachris/RPIO | ||
|
||
Package: python-rpio | ||
Architecture: armhf | ||
Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends} | ||
Description: Advanced GPIO module for Python 2.x. Extends RPi.GPIO with | ||
PWM, GPIO interrups, TCP socket interrupts, command line tools | ||
and more. | ||
|
||
|
||
Package: python3-rpio | ||
Architecture: armhf | ||
Depends: ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends} | ||
Description: Advanced GPIO module for Python 3.x. Extends RPi.GPIO with | ||
PWM, GPIO interrups, TCP socket interrupts, command line tools | ||
and more. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
This package is provided to you by Chris Hager <[email protected]> | ||
|
||
Files: * | ||
Copyright: | ||
2013, Chris Hager | ||
License: LGPLv3+ | ||
|
||
Files: debian/* | ||
Copyright: | ||
2013, Chris Hager | ||
License: LGPLv3+ | ||
|
||
License: LGPLv3+ | ||
RPIO is free software: you can redistribute it and/or modify it | ||
under the terms of the GNU Lesser General Public License as | ||
published by the Free Software Foundation, either version 3 of | ||
the License, or (at your option) any later version. | ||
|
||
RPIO is distributed in the hope that it will be useful, but | ||
WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
usr/lib/python2.*/ | ||
usr/bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
usr/lib/python3/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/make -f | ||
# -*- makefile -*- | ||
|
||
PYTHON2=$(shell pyversions -vr) | ||
PYTHON3=$(shell py3versions -vr) | ||
|
||
%: | ||
dh $@ --with python2,python3 | ||
|
||
build-python%: | ||
python$* setup.py build | ||
|
||
override_dh_auto_build: $(PYTHON3:%=build-python%) | ||
dh_auto_build | ||
|
||
install-python%: | ||
python$* setup.py install --root=debian/tmp --install-layout=deb | ||
|
||
override_dh_auto_install: $(PYTHON3:%=install-python%) | ||
dh_auto_install | ||
|
||
override_dh_auto_clean: | ||
dh_auto_clean | ||
rm -rf build | ||
rm -rf *.egg-info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,13 +3,13 @@ Welcome to RPIO's documentation! | |
|
||
RPIO is an advanced GPIO module for the Raspberry Pi. | ||
|
||
* PWM via DMA (up to 1µs resolution) | ||
* GPIO input and output (drop-in replacement for `RPi.GPIO <http://pypi.python.org/pypi/RPi.GPIO>`_) | ||
* GPIO interrupts (callbacks when events occur on input gpios) | ||
* TCP socket interrupts (callbacks when tcp socket clients send data) | ||
* PWM via DMA (up to 1µs resolution; 500kHz) | ||
* Command-line tools ``rpio`` and ``rpio-curses`` | ||
* Well documented, fast source code with minimal CPU usage | ||
* Open source (GPLv3+) | ||
* Open source (LGPLv3+) | ||
|
||
RPIO consists of two main components: | ||
|
||
|
@@ -74,38 +74,6 @@ Please send feedback and ideas to [email protected], and `open an issue at Gith | |
you've encountered a bug. | ||
|
||
|
||
FAQ | ||
--- | ||
|
||
**How does RPIO work?** | ||
|
||
RPIO extends RPi.GPIO, a GPIO controller written in C which uses a low-level memory interface. Interrupts are | ||
implemented with ``epoll`` via ``/sys/class/gpio/``. For more detailled information take a look at the `source <https://github.com/metachris/RPIO/tree/master/source>`_, it's well documented and easy to build. | ||
|
||
|
||
**Should I update RPIO often?** | ||
|
||
Yes, because RPIO is getting better by the day. You can use ``$ rpio --update-rpio`` or see :ref:`Installation <ref-installation>` for more information about methods to update. | ||
|
||
|
||
**I've encountered a bug, what next?** | ||
|
||
* Make sure you are using the latest version of RPIO (see :ref:`Installation <ref-installation>`) | ||
* Open an issue at Github | ||
|
||
* Go to https://github.com/metachris/RPIO/issues/new | ||
* Describe the problem and steps to replicate | ||
* Add the output of ``$ rpio --version`` and ``$ rpio --sysinfo`` | ||
|
||
|
||
**pip is throwing an error during the build:** ``source/c_gpio/py_gpio.c:9:20: fatal error: Python.h: No such file or directory`` | ||
|
||
You need to install the ``python-dev`` package (eg. ``$ sudo apt-get install python-dev``), or use ``easy_install`` (see :ref:`Installation <ref-installation>`). | ||
|
||
* ``rpio-curses`` | ||
* Bugfix in RPIO: tcp callbacks (first parameter ``socket`` works now) | ||
* Renamed ``RPIO.rpi_sysinfo()`` to ``RPIO.sysinfo`` | ||
|
||
Links | ||
----- | ||
|
||
|
@@ -115,39 +83,44 @@ Links | |
* http://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf | ||
* http://www.kernel.org/doc/Documentation/gpio.txt | ||
|
||
* Added TCP socket callbacks | ||
* ``RPIO`` does not auto-clean interfaces on exceptions anymore, but will auto-clean them | ||
as needed. This means you should now call ``RPIO.cleanup_interrupts()`` to properly close | ||
the sockets and unexport the interfaces. | ||
* Renamed ``RPIO.rpi_sysinfo()`` to ``RPIO.sysinfo()`` | ||
|
||
License | ||
------- | ||
License & Copyright | ||
------------------- | ||
|
||
:: | ||
|
||
RPIO is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
Copyright | ||
|
||
RPIO is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
Copyright (C) 2013 Chris Hager <[email protected]> | ||
|
||
License | ||
|
||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Lesser General Public License as published | ||
by the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
|
||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU Lesser General Public License for more details at | ||
<http://www.gnu.org/licenses/lgpl-3.0-standalone.html> | ||
|
||
* Improved auto-cleaning of interrupt interfaces | ||
* BOARD numbering scheme support for interrupts | ||
* Support for software pullup and -down resistor with interrupts | ||
* New method ``RPIO.set_pullupdn(..)`` | ||
* ``rpio`` now supports P5 header gpios (28, 29, 30, 31) (only in BCM mode) | ||
* Tests added in ``source/run_tests.py`` and ``fabfile.py`` | ||
* Major refactoring of C GPIO code | ||
* Various minor updates and fixes | ||
|
||
Changes | ||
------- | ||
|
||
* v0.9.5 | ||
|
||
* Added ``debounce_timeout_ms`` argument to ``RPIO.add_interrupt_callback(..)`` | ||
* Added ``threaded`` argument to ``RPIO.wait_for_interrupts(..)`` | ||
* Interrupt callbacks now receive integer values ``0`` or ``1`` instead of strings | ||
* Interrupt callbacks with edge=``rising`` or ``falling`` only receive the correct values | ||
* Added ``RPIO.close_tcp_client(fileno)`` | ||
* Debian .deb package builds | ||
* License changed to GNU Lesser General Public License v3 or later (LGPLv3+) | ||
* ``RPIO.sysinfo()`` returns is_overclocked (improved detection in cpuinfo.c) | ||
|
||
* v0.9.1 | ||
|
||
* PWM | ||
|
Oops, something went wrong.