Skip to content
This repository was archived by the owner on Nov 28, 2022. It is now read-only.

Commit 07c776f

Browse files
author
Chris Hager
committed
v2.0.0-beta1: Merged changes from Andy Baker and Reik Hua for compatibility with Pi 0, 2 and 3
1 parent c4e8b73 commit 07c776f

File tree

20 files changed

+462
-101
lines changed

20 files changed

+462
-101
lines changed

README.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,26 @@ License
5555
<http://www.gnu.org/licenses/lgpl-3.0-standalone.html>
5656

5757

58+
Building for Development
59+
------------------------
60+
61+
On the Raspberry Pi:
62+
63+
sudo apt-get install python-dev python3 python3.2-dev
64+
65+
On the developer machine::
66+
67+
fab upload
68+
fab build_gpio
69+
fab build_pwm
70+
71+
5872
Special Thanks
5973
--------------
6074

75+
Andy Baker and Reik Hua for supplying compatibility updates for the
76+
Raspberry Pi 0, 2 and 3.
77+
6178
`csegit <https://github.com/csegit>`_, `waveform80 <https://github.com/waveform80>`_,
6279
`nils-werner <https://github.com/nils-werner>`_, `friedcell <https://github.com/friedcell>`_,
6380
`zejn <https://github.com/zejn>`_, `dbeal <https://github.com/dbeal>`_,

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.10.1
1+
2.0.0-beta1

debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
rpio (2.0.0-beta1) unstable; urgency=low
2+
3+
* Support for Raspberry Pi 0, 2, 3 (thanks to Andy Baker and Reik Hua)
4+
5+
-- Chris Hager <chris@linuxuser.at> Thu, 02 Jun 2016 21:32:58 +0100
6+
17
rpio (0.10.1) unstable; urgency=low
28

39
* Updated debian/control Standards-Version to 3.9.3.1

documentation/source/conf.py

Lines changed: 1 addition & 1 deletion
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.10.1'
51+
version = '2.0.0-beta1'
5252
# The full version, including alpha/beta/rc tags.
5353
release = version
5454

documentation/source/index.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Documentation
3131
News
3232
----
3333

34+
* v2.0.0-beta1: RPIO works with Raspberry Pi Zero, 2 and 3 (Thanks to Andy Baker and Reik Hua)
3435
* v0.9.2: :ref:`PWM via DMA <ref-rpio-pwm-py>`
3536
* v0.8.4: ``rpio-curses``
3637
* v0.8.2: Socket server callbacks with :ref:`RPIO.add_tcp_callback(port, callback, threaded_callback=False) <ref-rpio-py>`
@@ -113,6 +114,10 @@ License & Copyright
113114
Changes
114115
-------
115116

117+
* v2.0.0-beta1
118+
119+
* RPIO works with Raspberry Pi Zero, 2 and 3 (Thanks to Andy Baker and Reik Hua)
120+
116121
* v0.11.0
117122

118123
* Merged various pull requests: Arch package link, bugfixes, allow Pi to control
@@ -157,9 +162,9 @@ Changes
157162
* v0.8.2
158163

159164
* Added TCP socket callbacks
160-
* ``RPIO`` does not auto-clean interfaces on exceptions anymore, but will auto-clean them
165+
* ``RPIO`` does not auto-clean interfaces on exceptions anymore, but will auto-clean them
161166
as needed. This means you should now call ``RPIO.cleanup_interrupts()`` to properly close
162-
the sockets and unexport the interfaces.
167+
the sockets and unexport the interfaces.
163168
* Renamed ``RPIO.rpi_sysinfo()`` to ``RPIO.sysinfo()``
164169

165170

@@ -176,7 +181,7 @@ Changes
176181

177182

178183
* v0.7.1
179-
184+
180185
* Refactoring and cleanup of c_gpio
181186
* Added new constants and methods (see documentation above)
182187
* Bugfixes

fabfile.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414

1515
# Set default hosts
1616
if not env.hosts:
17-
env.hosts = ["raspberry_dev_local"]
17+
# env.hosts = ["raspberry_dev_local"]
18+
env.hosts = ["omxdev"]
1819

1920

2021
def _get_cur_version():

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ def read(fname):
88

99
setup(
1010
name="RPIO",
11-
version="0.10.1",
11+
version="2.0.0-beta1",
1212
package_dir={"": "source"},
1313
packages=['RPIO', 'RPIO.PWM'],
1414
ext_modules=[
1515
Extension('RPIO._GPIO', ['source/c_gpio/py_gpio.c',
1616
'source/c_gpio/c_gpio.c', 'source/c_gpio/cpuinfo.c'],
1717
extra_compile_args=["-Wno-error=declaration-after-statement"]),
18-
Extension('RPIO.PWM._PWM', ['source/c_pwm/pwm.c',
18+
Extension('RPIO.PWM._PWM', ['source/c_pwm/pwm.c', 'source/c_pwm/mailbox.c',
1919
'source/c_pwm/pwm_py.c'],
2020
extra_compile_args=["-Wno-error=declaration-after-statement"])],
2121
scripts=["source/scripts/rpio", "source/scripts/rpio-curses"],

source/RPIO/PWM/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def set_servo(self, gpio, pulse_width_us):
206206
if _subcycle_us != self._subcycle_time_us:
207207
raise AttributeError(("Error: DMA channel %s is setup with a "
208208
"subcycle_time of %sus (instead of %sus)") % \
209-
(self._dma_channel, _subcycle_us,
209+
(self._dma_channel, _subcycle_us,
210210
self._subcycle_time_us))
211211
else:
212212
init_channel(self._dma_channel, self._subcycle_time_us)

source/RPIO/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def socket_callback(socket, val):
116116
from RPIO._RPIO import Interruptor
117117

118118

119-
VERSION = "0.10.1"
119+
VERSION = "2.0.0-beta1"
120120

121121
# Exposing constants from RPi.GPIO
122122
VERSION_GPIO = _GPIO.VERSION_GPIO
@@ -266,7 +266,7 @@ def cleanup_interrupts():
266266
"""
267267
Removes all callbacks and closes used GPIO interfaces and sockets. After
268268
this you'll need to re-add the interrupt callbacks before waiting for
269-
interrupts again. Since RPIO v0.10.1 this is done automatically on exit.
269+
interrupts again. Since RPIO v2.0.0-beta1 this is done automatically on exit.
270270
"""
271271
_rpio.cleanup_interrupts()
272272

source/c_gpio/c_gpio.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ setup(void)
7979
if ((uint32_t)gpio_mem % PAGE_SIZE)
8080
gpio_mem += PAGE_SIZE - ((uint32_t)gpio_mem % PAGE_SIZE);
8181

82-
gpio_map = (uint32_t *)mmap( (void *)gpio_mem, BLOCK_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_FIXED, mem_fd, GPIO_BASE);
82+
gpio_map = (uint32_t *)mmap( (caddr_t)gpio_mem, BLOCK_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_FIXED, mem_fd, GPIO_BASE);
8383

8484
if ((uint32_t)gpio_map < 0)
8585
return SETUP_MMAP_FAIL;
@@ -163,5 +163,5 @@ void
163163
cleanup(void)
164164
{
165165
// fixme - set all gpios back to input
166-
munmap((void *)gpio_map, BLOCK_SIZE);
166+
munmap((caddr_t)gpio_map, BLOCK_SIZE);
167167
}

0 commit comments

Comments
 (0)