Skip to content

Commit 5c2f6ef

Browse files
authored
Merge pull request #24 from dhalbert/cc-gamepad-doc-fixes
Add consumer control and gamepad files to api.rst. Fix version checking.
2 parents 1da880c + 5d0b79e commit 5c2f6ef

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

adafruit_hid/consumer_control.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"""
3030

3131
import sys
32-
if sys.implementation[1][0] < 3:
32+
if sys.implementation.version[0] < 3:
3333
raise ImportError('{0} is not supported in CircuitPython 2.x or lower'.format(__name__))
3434

3535
# pylint: disable=wrong-import-position

adafruit_hid/consumer_control_code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
"""
2525
`adafruit_hid.consumer_control_code.ConsumerControlCode`
26-
====================================================
26+
========================================================
2727
2828
* Author(s): Dan Halbert
2929
"""

adafruit_hid/gamepad.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"""
3030

3131
import sys
32-
if sys.implementation[1][0] < 3:
32+
if sys.implementation.version[0] < 3:
3333
raise ImportError('{0} is not supported in CircuitPython 2.x or lower'.format(__name__))
3434

3535
# pylint: disable=wrong-import-position

docs/api.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,13 @@
1111
:members:
1212

1313
.. automodule:: adafruit_hid.mouse
14-
:members:
14+
:members:
15+
16+
.. automodule:: adafruit_hid.consumer_control
17+
:members:
18+
19+
.. automodule:: adafruit_hid.consumer_control_code
20+
:members:
21+
22+
.. automodule:: adafruit_hid.gamepad
23+
:members:

0 commit comments

Comments
 (0)