Skip to content

Commit 761be0c

Browse files
author
Chris Hager
committed
RPIO 0.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)
1 parent 0740d8e commit 761be0c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1321
-1349
lines changed

CHECKLIST.txt

-58
This file was deleted.

LICENSE.txt

+159-668
Large diffs are not rendered by default.

MANIFEST.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
graft source/c_gpio
22
graft source/c_pwm
3-
include source/rpio
4-
include source/rpio-curses
3+
include source/scripts/rpio
4+
include source/scripts/rpio-curses

Makefile

+20-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,27 @@
1+
# $Id: Makefile,v 1.0 2013/03/12 01:01:35 Chris Hager Exp $
2+
#
3+
4+
all:
5+
@echo "make source - Create source package"
6+
@echo "make doc - Generate the html documentation"
7+
@echo "make doc_upload - make doc and upload to pythonhosted.com/RPIO"
8+
@echo "make clean - Clean up build directories"
9+
10+
source:
11+
$(PYTHON) setup.py sdist $(COMPILE)
12+
13+
14+
clean:
15+
python setup.py clean
16+
find . -name '*.pyc' -delete
17+
rm -rf build dist MANIFEST Debug/ source/Debug RPIO.egg-info source/RPIO.egg-info
18+
cd documentation && make clean
19+
cd source/scripts/man && make clean
20+
121
doc_upload: doc
222
python setup.py upload_docs --upload-dir=documentation/build/html/
323

424
doc:
525
cd documentation && make html
626
cd source/scripts/man && make man
727
cp source/scripts/man/build/man/rpio.1 source/scripts/man/
8-
9-
clean:
10-
rm -rf build dist RPIO.egg-info
11-
cd documentation && make clean
12-
cd source/scripts/man && make clean

README.rst

+16-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
RPIO is an advanced GPIO module for the Raspberry Pi.
22

3+
* PWM via DMA (up to 1µs resolution)
34
* GPIO input and output (drop-in replacement for `RPi.GPIO <http://pypi.python.org/pypi/RPi.GPIO>`_)
45
* GPIO interrupts (callbacks when events occur on input gpios)
56
* TCP socket interrupts (callbacks when tcp socket clients send data)
6-
* PWM via DMA (up to 1µs resolution; 500kHz)
77
* Command-line tools ``rpio`` and ``rpio-curses``
88
* Well documented, fast source code with minimal CPU usage
9-
* Open source (GPLv3+)
9+
* Open source (LGPLv3+)
1010

1111

1212
`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
2222

2323
After the installation you can use ``import RPIO`` as well as the command-line tools ``rpio`` and ``rpio-curses``.
2424

25+
Debian packages are available at `metachris.github.com/rpio/download <http://metachris.github.com/rpio/download/latest/>`_.
26+
2527

2628
Examples
2729
--------
@@ -39,15 +41,22 @@ if you've encountered a bug.
3941
License
4042
-------
4143

42-
RPIO is free software: you can redistribute it and/or modify
43-
it under the terms of the GNU General Public License as published by
44-
the Free Software Foundation, either version 3 of the License, or
44+
This program is free software: you can redistribute it and/or modify
45+
it under the terms of the GNU Lesser General Public License as published
46+
by the Free Software Foundation, either version 3 of the License, or
4547
(at your option) any later version.
4648

47-
RPIO is distributed in the hope that it will be useful,
49+
This program is distributed in the hope that it will be useful,
4850
but WITHOUT ANY WARRANTY; without even the implied warranty of
4951
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
50-
GNU General Public License for more details.
52+
GNU Lesser General Public License for more details at
53+
<http://www.gnu.org/licenses/lgpl-3.0-standalone.html>
54+
55+
56+
Copyright
57+
---------
58+
59+
Copyright (C) 2013 Chris Hager <[email protected]>
5160

5261

5362
Links

debian/changelog

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
rpio (0.9.5) unstable; urgency=low
2+
3+
* Cleanup
4+
5+
-- Chris Hager <[email protected]> Wed, 13 Mar 2013 02:24:08 +0100
6+
7+
rpio (0.9.4) unstable; urgency=low
8+
9+
* Debounce timeout for interrupts (Closes: #XXXXXX)
10+
* Threaded argument for wait_for_interrupts()
11+
* Refactoring
12+
13+
-- Chris Hager <[email protected]> Tue, 12 Mar 2013 22:34:04 +0100
14+
15+
rpio (0.9.2) unstable; urgency=low
16+
17+
* Initial PWM release. (Closes: #XXXXXX)
18+
19+
-- Chris Hager <[email protected]> Tue, 12 Mar 2013 17:59:56 +0100

debian/compat

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7

debian/control

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Source: rpio
2+
Section: python
3+
Priority: optional
4+
Maintainer: Chris Hager <[email protected]>
5+
Build-Depends: debhelper (>= 8.0.0), python (>= 2.6.6-3~), python3 (>= 3.1.3-12~), python-setuptools, python3-setuptools, python-dev, python3-dev
6+
Standards-Version: 3.8.4
7+
X-Python-Version: >= 2.6
8+
X-Python3-Version: >= 3.2
9+
Homepage: https://github.com/metachris/RPIO
10+
11+
Package: python-rpio
12+
Architecture: armhf
13+
Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}
14+
Description: Advanced GPIO module for Python 2.x. Extends RPi.GPIO with
15+
PWM, GPIO interrups, TCP socket interrupts, command line tools
16+
and more.
17+
18+
19+
Package: python3-rpio
20+
Architecture: armhf
21+
Depends: ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends}
22+
Description: Advanced GPIO module for Python 3.x. Extends RPi.GPIO with
23+
PWM, GPIO interrups, TCP socket interrupts, command line tools
24+
and more.

debian/copyright

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
This package is provided to you by Chris Hager <[email protected]>
2+
3+
Files: *
4+
Copyright:
5+
2013, Chris Hager
6+
License: LGPLv3+
7+
8+
Files: debian/*
9+
Copyright:
10+
2013, Chris Hager
11+
License: LGPLv3+
12+
13+
License: LGPLv3+
14+
RPIO is free software: you can redistribute it and/or modify it
15+
under the terms of the GNU Lesser General Public License as
16+
published by the Free Software Foundation, either version 3 of
17+
the License, or (at your option) any later version.
18+
19+
RPIO is distributed in the hope that it will be useful, but
20+
WITHOUT ANY WARRANTY; without even the implied warranty of
21+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22+
GNU General Public License for more details.

debian/python-rpio.install

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
usr/lib/python2.*/
2+
usr/bin/

debian/python3-rpio.install

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
usr/lib/python3/
2+

debian/rules

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/make -f
2+
# -*- makefile -*-
3+
4+
PYTHON2=$(shell pyversions -vr)
5+
PYTHON3=$(shell py3versions -vr)
6+
7+
%:
8+
dh $@ --with python2,python3
9+
10+
build-python%:
11+
python$* setup.py build
12+
13+
override_dh_auto_build: $(PYTHON3:%=build-python%)
14+
dh_auto_build
15+
16+
install-python%:
17+
python$* setup.py install --root=debian/tmp --install-layout=deb
18+
19+
override_dh_auto_install: $(PYTHON3:%=install-python%)
20+
dh_auto_install
21+
22+
override_dh_auto_clean:
23+
dh_auto_clean
24+
rm -rf build
25+
rm -rf *.egg-info

documentation/source/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
# built documents.
4949
#
5050
# The short X.Y version.
51-
version = '0.9.2'
51+
version = '0.9.5'
5252
# The full version, including alpha/beta/rc tags.
5353
release = version
5454

documentation/source/index.rst

+30-57
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ Welcome to RPIO's documentation!
33

44
RPIO is an advanced GPIO module for the Raspberry Pi.
55

6+
* PWM via DMA (up to 1µs resolution)
67
* GPIO input and output (drop-in replacement for `RPi.GPIO <http://pypi.python.org/pypi/RPi.GPIO>`_)
78
* GPIO interrupts (callbacks when events occur on input gpios)
89
* TCP socket interrupts (callbacks when tcp socket clients send data)
9-
* PWM via DMA (up to 1µs resolution; 500kHz)
1010
* Command-line tools ``rpio`` and ``rpio-curses``
1111
* Well documented, fast source code with minimal CPU usage
12-
* Open source (GPLv3+)
12+
* Open source (LGPLv3+)
1313

1414
RPIO consists of two main components:
1515

@@ -74,38 +74,6 @@ Please send feedback and ideas to [email protected], and `open an issue at Gith
7474
you've encountered a bug.
7575

7676

77-
FAQ
78-
---
79-
80-
**How does RPIO work?**
81-
82-
RPIO extends RPi.GPIO, a GPIO controller written in C which uses a low-level memory interface. Interrupts are
83-
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.
84-
85-
86-
**Should I update RPIO often?**
87-
88-
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.
89-
90-
91-
**I've encountered a bug, what next?**
92-
93-
* Make sure you are using the latest version of RPIO (see :ref:`Installation <ref-installation>`)
94-
* Open an issue at Github
95-
96-
* Go to https://github.com/metachris/RPIO/issues/new
97-
* Describe the problem and steps to replicate
98-
* Add the output of ``$ rpio --version`` and ``$ rpio --sysinfo``
99-
100-
101-
**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``
102-
103-
You need to install the ``python-dev`` package (eg. ``$ sudo apt-get install python-dev``), or use ``easy_install`` (see :ref:`Installation <ref-installation>`).
104-
105-
* ``rpio-curses``
106-
* Bugfix in RPIO: tcp callbacks (first parameter ``socket`` works now)
107-
* Renamed ``RPIO.rpi_sysinfo()`` to ``RPIO.sysinfo``
108-
10977
Links
11078
-----
11179

@@ -115,39 +83,44 @@ Links
11583
* http://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf
11684
* http://www.kernel.org/doc/Documentation/gpio.txt
11785

118-
* Added TCP socket callbacks
119-
* ``RPIO`` does not auto-clean interfaces on exceptions anymore, but will auto-clean them
120-
as needed. This means you should now call ``RPIO.cleanup_interrupts()`` to properly close
121-
the sockets and unexport the interfaces.
122-
* Renamed ``RPIO.rpi_sysinfo()`` to ``RPIO.sysinfo()``
12386

124-
License
125-
-------
87+
License & Copyright
88+
-------------------
12689

12790
::
12891

129-
RPIO is free software: you can redistribute it and/or modify
130-
it under the terms of the GNU General Public License as published by
131-
the Free Software Foundation, either version 3 of the License, or
132-
(at your option) any later version.
92+
Copyright
13393

134-
RPIO is distributed in the hope that it will be useful,
135-
but WITHOUT ANY WARRANTY; without even the implied warranty of
136-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
137-
GNU General Public License for more details.
94+
Copyright (C) 2013 Chris Hager <[email protected]>
95+
96+
License
97+
98+
This program is free software: you can redistribute it and/or modify
99+
it under the terms of the GNU Lesser General Public License as published
100+
by the Free Software Foundation, either version 3 of the License, or
101+
(at your option) any later version.
102+
103+
This program is distributed in the hope that it will be useful,
104+
but WITHOUT ANY WARRANTY; without even the implied warranty of
105+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
106+
GNU Lesser General Public License for more details at
107+
<http://www.gnu.org/licenses/lgpl-3.0-standalone.html>
138108

139-
* Improved auto-cleaning of interrupt interfaces
140-
* BOARD numbering scheme support for interrupts
141-
* Support for software pullup and -down resistor with interrupts
142-
* New method ``RPIO.set_pullupdn(..)``
143-
* ``rpio`` now supports P5 header gpios (28, 29, 30, 31) (only in BCM mode)
144-
* Tests added in ``source/run_tests.py`` and ``fabfile.py``
145-
* Major refactoring of C GPIO code
146-
* Various minor updates and fixes
147109

148110
Changes
149111
-------
150112

113+
* v0.9.5
114+
115+
* Added ``debounce_timeout_ms`` argument to ``RPIO.add_interrupt_callback(..)``
116+
* Added ``threaded`` argument to ``RPIO.wait_for_interrupts(..)``
117+
* Interrupt callbacks now receive integer values ``0`` or ``1`` instead of strings
118+
* Interrupt callbacks with edge=``rising`` or ``falling`` only receive the correct values
119+
* Added ``RPIO.close_tcp_client(fileno)``
120+
* Debian .deb package builds
121+
* License changed to GNU Lesser General Public License v3 or later (LGPLv3+)
122+
* ``RPIO.sysinfo()`` returns is_overclocked (improved detection in cpuinfo.c)
123+
151124
* v0.9.1
152125

153126
* PWM

0 commit comments

Comments
 (0)