Merge pull request #373 from scottamain/docs
Add missing modules to API docs build.
This commit is contained in:
commit
76c093908d
7 changed files with 50 additions and 15 deletions
|
|
@ -26,8 +26,10 @@ on hosts running micropython. Working code exists to emulate the CircuitPython p
|
||||||
* **digitalio** - digital input/output pins, using pin identities from board+microcontroller packages
|
* **digitalio** - digital input/output pins, using pin identities from board+microcontroller packages
|
||||||
* **bitbangio** - software-driven interfaces for I2C, SPI
|
* **bitbangio** - software-driven interfaces for I2C, SPI
|
||||||
* **busio** - hardware-driven interfaces for I2C, SPI, UART
|
* **busio** - hardware-driven interfaces for I2C, SPI, UART
|
||||||
* **time** * - substitute functions monkey-patched to time module
|
* **pulseio** - contains classes that provide access to basic pulse IO (PWM)
|
||||||
|
|
||||||
|
For details, see the `Blinka API reference
|
||||||
|
<https://circuitpython.readthedocs.io/projects/blinka/en/latest/index.html>`_.
|
||||||
|
|
||||||
Dependencies
|
Dependencies
|
||||||
=============
|
=============
|
||||||
|
|
@ -97,7 +99,7 @@ install dependencies (feel free to reuse the virtual environment from above):
|
||||||
|
|
||||||
python3 -m venv .env
|
python3 -m venv .env
|
||||||
source .env/bin/activate
|
source .env/bin/activate
|
||||||
pip install Sphinx sphinx-rtd-theme
|
pip install Sphinx sphinx-rtd-theme Adafruit-PlatformDetect
|
||||||
|
|
||||||
Now, once you have the virtual environment activated:
|
Now, once you have the virtual environment activated:
|
||||||
|
|
||||||
|
|
|
||||||
11
docs/api.rst
11
docs/api.rst
|
|
@ -24,3 +24,14 @@
|
||||||
|
|
||||||
.. automodule:: digitalio
|
.. automodule:: digitalio
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
|
.. automodule:: analogio
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. automodule:: pulseio
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. automodule:: neopixel_write
|
||||||
|
:members:
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,14 @@ extensions = [
|
||||||
# Uncomment the below if you use native CircuitPython modules such as
|
# Uncomment the below if you use native CircuitPython modules such as
|
||||||
# digitalio, micropython and busio. List the modules you use. Without it, the
|
# digitalio, micropython and busio. List the modules you use. Without it, the
|
||||||
# autodoc module docs will fail to generate with a warning.
|
# autodoc module docs will fail to generate with a warning.
|
||||||
autodoc_mock_imports = ["machine", "Adafruit_GPIO"]
|
autodoc_mock_imports = [
|
||||||
|
"machine",
|
||||||
|
"Adafruit_GPIO",
|
||||||
|
"RPi",
|
||||||
|
"RPi.GPIO",
|
||||||
|
"hid",
|
||||||
|
"sysv_ipc",
|
||||||
|
]
|
||||||
|
|
||||||
intersphinx_mapping = {
|
intersphinx_mapping = {
|
||||||
"python": ("https://docs.python.org/3.4", None),
|
"python": ("https://docs.python.org/3.4", None),
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,14 @@
|
||||||
"""
|
"""
|
||||||
`analogio` - Analog input and output control
|
`analogio` - Analog input and output control
|
||||||
=================================================
|
============================================
|
||||||
See `CircuitPython:analogio` in CircuitPython for more details.
|
See `CircuitPython:analogio` in CircuitPython for more details.
|
||||||
|
Not supported by all boards.
|
||||||
|
|
||||||
* Author(s): Carter Nelson, Melissa LeBlanc-Williams
|
* Author(s): Carter Nelson, Melissa LeBlanc-Williams
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
from adafruit_blinka.agnostic import detector
|
from adafruit_blinka.agnostic import detector
|
||||||
|
|
||||||
# pylint: disable=ungrouped-imports,wrong-import-position,unused-import
|
# pylint: disable=ungrouped-imports,wrong-import-position,unused-import
|
||||||
|
|
@ -17,5 +21,7 @@ elif detector.board.greatfet_one:
|
||||||
from adafruit_blinka.microcontroller.nxp_lpc4330.analogio import AnalogOut
|
from adafruit_blinka.microcontroller.nxp_lpc4330.analogio import AnalogOut
|
||||||
elif detector.chip.RK3308:
|
elif detector.chip.RK3308:
|
||||||
from adafruit_blinka.microcontroller.generic_linux.sysfs_analogin import AnalogIn
|
from adafruit_blinka.microcontroller.generic_linux.sysfs_analogin import AnalogIn
|
||||||
|
elif "sphinx" in sys.modules:
|
||||||
|
pass
|
||||||
else:
|
else:
|
||||||
raise NotImplementedError("analogio not supported for this board.")
|
raise NotImplementedError("analogio not supported for this board.")
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
"""
|
"""
|
||||||
`digitalio` - Digital input and output control
|
`digitalio` - Digital input and output control (GPIO)
|
||||||
=================================================
|
=====================================================
|
||||||
|
|
||||||
See `CircuitPython:digitalio` in CircuitPython for more details.
|
See `CircuitPython:digitalio` in CircuitPython for more details.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
"""
|
"""
|
||||||
`neopixel_write` - NeoPixel precision timed writing support
|
`neopixel_write` - NeoPixel precision timed writing support
|
||||||
=================================================
|
===========================================================
|
||||||
|
|
||||||
See `CircuitPython:neopixel_write` in CircuitPython for more details.
|
See `CircuitPython:neopixel_write` in CircuitPython for more details.
|
||||||
|
Currently supported on Raspberry Pi only.
|
||||||
|
|
||||||
* Author(s): ladyada
|
* Author(s): ladyada
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,14 @@
|
||||||
"""
|
"""
|
||||||
`pulseio` - Pulse Width Modulation Input and Output control
|
`pulseio` - Pulse Width Modulation input and output control
|
||||||
=================================================
|
===========================================================
|
||||||
See `CircuitPython:pulseio` in CircuitPython for more details.
|
See `CircuitPython:pulseio` in CircuitPython for more details.
|
||||||
|
Not supported by all boards.
|
||||||
|
|
||||||
* Author(s): Melissa LeBlanc-Williams
|
* Author(s): Melissa LeBlanc-Williams
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
from adafruit_blinka.agnostic import detector
|
from adafruit_blinka.agnostic import detector
|
||||||
|
|
||||||
# pylint: disable=unused-import
|
# pylint: disable=unused-import
|
||||||
|
|
@ -12,15 +16,19 @@ from adafruit_blinka.agnostic import detector
|
||||||
if detector.board.any_raspberry_pi:
|
if detector.board.any_raspberry_pi:
|
||||||
from adafruit_blinka.microcontroller.bcm283x.pulseio.PulseIn import PulseIn
|
from adafruit_blinka.microcontroller.bcm283x.pulseio.PulseIn import PulseIn
|
||||||
from adafruit_blinka.microcontroller.bcm283x.pulseio.PWMOut import PWMOut
|
from adafruit_blinka.microcontroller.bcm283x.pulseio.PWMOut import PWMOut
|
||||||
if detector.board.any_coral_board:
|
elif detector.board.any_coral_board:
|
||||||
from adafruit_blinka.microcontroller.generic_linux.sysfs_pwmout import PWMOut
|
from adafruit_blinka.microcontroller.generic_linux.sysfs_pwmout import PWMOut
|
||||||
if detector.board.any_giant_board:
|
elif detector.board.any_giant_board:
|
||||||
from adafruit_blinka.microcontroller.generic_linux.sysfs_pwmout import PWMOut
|
from adafruit_blinka.microcontroller.generic_linux.sysfs_pwmout import PWMOut
|
||||||
if detector.board.any_beaglebone:
|
elif detector.board.any_beaglebone:
|
||||||
from adafruit_blinka.microcontroller.am335x.sysfs_pwmout import PWMOut
|
from adafruit_blinka.microcontroller.am335x.sysfs_pwmout import PWMOut
|
||||||
if detector.board.any_rock_pi_board:
|
elif detector.board.any_rock_pi_board:
|
||||||
from adafruit_blinka.microcontroller.generic_linux.sysfs_pwmout import PWMOut
|
from adafruit_blinka.microcontroller.generic_linux.sysfs_pwmout import PWMOut
|
||||||
if detector.board.binho_nova:
|
elif detector.board.binho_nova:
|
||||||
from adafruit_blinka.microcontroller.nova.pwmout import PWMOut
|
from adafruit_blinka.microcontroller.nova.pwmout import PWMOut
|
||||||
if detector.board.greatfet_one:
|
elif detector.board.greatfet_one:
|
||||||
from adafruit_blinka.microcontroller.nxp_lpc4330.pwmout import PWMOut
|
from adafruit_blinka.microcontroller.nxp_lpc4330.pwmout import PWMOut
|
||||||
|
elif "sphinx" in sys.modules:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
raise NotImplementedError("pulseio not supported for this board.")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue