Skip to content

Commit e343a2c

Browse files
authored
Merge pull request #47 from kattni/fix-up
Update repo.
2 parents e4ef881 + f535f0f commit e343a2c

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

README.rst

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ This driver depends on:
2626

2727
Please ensure all dependencies are available on the CircuitPython filesystem.
2828
This is easily achieved by downloading
29-
`the Adafruit library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_.
29+
`the Adafruit library and driver bundle <https://circuitpython.org/libraries>`_.
3030

3131
Usage Example
3232
=============
@@ -86,4 +86,3 @@ Now, once you have the virtual environment activated:
8686
This will output the documentation to ``docs/_build/html``. Open the index.html in your browser to
8787
view them. It will also (due to -W) error out on any warning like Travis will. This is a good way to
8888
locally verify it will pass.
89-

simpleio.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,15 @@
4646
except ImportError:
4747
pass # not always supported by every board!
4848

49+
__version__ = "0.0.0-auto.0"
50+
__repo__ = "https://github.com/adafruit/CircuitPython_SimpleIO.git"
51+
52+
4953
def tone(pin, frequency, duration=1, length=100):
5054
"""
5155
Generates a square wave of the specified frequency on a pin
5256
53-
:param ~microcontroller.Pin Pin: Pin on which to output the tone
57+
:param ~microcontroller.Pin pin: Pin on which to output the tone
5458
:param float frequency: Frequency of tone in Hz
5559
:param int length: Variable size buffer (optional)
5660
:param int duration: Duration of tone in seconds (optional)
@@ -79,7 +83,6 @@ def tone(pin, frequency, duration=1, length=100):
7983
dac.stop()
8084

8185

82-
8386
def bitWrite(x, n, b): #pylint: disable-msg=invalid-name
8487
"""
8588
Based on the Arduino bitWrite function, changes a specific bit of a value to 0 or 1.
@@ -97,7 +100,6 @@ def bitWrite(x, n, b): #pylint: disable-msg=invalid-name
97100
return x
98101

99102

100-
101103
def shift_in(data_pin, clock, msb_first=True):
102104
"""
103105
Shifts in a byte of data one bit at a time. Starts from either the LSB or
@@ -127,6 +129,7 @@ def shift_in(data_pin, clock, msb_first=True):
127129
i += 1
128130
return value
129131

132+
130133
def shift_out(data_pin, clock, value, msb_first=True, bitcount=8):
131134
"""
132135
Shifts out a byte of data one bit at a time. Data gets written to a data
@@ -194,6 +197,7 @@ def shift_out(data_pin, clock, value, msb_first=True, bitcount=8):
194197
clock.value = True
195198
clock.value = False
196199

200+
197201
class DigitalOut:
198202
"""
199203
Simple digital output that is valid until reload.
@@ -215,6 +219,7 @@ def value(self):
215219
def value(self, value):
216220
self.iopin.value = value
217221

222+
218223
class DigitalIn:
219224
"""
220225
Simple digital input that is valid until reload.
@@ -235,6 +240,7 @@ def value(self):
235240
def value(self, value): #pylint: disable-msg=no-self-use, unused-argument
236241
raise AttributeError("Cannot set the value on a digital input.")
237242

243+
238244
def map_range(x, in_min, in_max, out_min, out_max):
239245
"""
240246
Maps a number from one range to another.

0 commit comments

Comments
 (0)