You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
3.1 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. Introduction
  2. ============
  3. .. image:: https://readthedocs.org/projects/adafruit-micropython-blinka/badge/?version=latest
  4. :target: https://circuitpython.readthedocs.io/projects/blinka/en/latest/
  5. :alt: Documentation Status
  6. .. image:: https://img.shields.io/discord/327254708534116352.svg
  7. :target: https://discord.gg/nBQh6qu
  8. :alt: Discord
  9. .. image:: https://travis-ci.org/adafruit/Adafruit_Micropython_Blinka.svg?branch=master
  10. :target: https://travis-ci.org/adafruit/Adafruit__Micropython_Blinka
  11. :alt: Build Status
  12. This repository contains a selection of packages mirroring the CircuitPython API
  13. on hosts running micropython. Working code exists to emulate the CircuitPython packages;
  14. * **board** - breakout-specific pin identities
  15. * **microcontroller** - chip-specific pin identities
  16. * **digitalio** - digital input/output pins, using pin identities from board+microcontroller packages
  17. * **bitbangio** - software-driven interfaces for I2C, SPI
  18. * **busio** - hardware-driven interfaces for I2C, SPI, UART
  19. * **time** * - substitute functions monkey-patched to time module
  20. Dependencies
  21. =============
  22. The Micropython compatibility layers described above are intended to provide a CircuitPython-like API for devices which
  23. are running Micropython. Since corresponding packages should be built-in to any standard
  24. CircuitPython image, they have no value on a device already running CircuitPython and would likely conflict in unhappy ways.
  25. The test suites in the test/src folder under **testing.universal** are by design
  26. intended to run on *either* CircuitPython *or* Micropython+compatibility layer to prove conformance.
  27. Usage Example
  28. =============
  29. At the time of writing (`git:7fc1f8ab <https://github.com/cefn/Adafruit_Micropython_Blinka/tree/7fc1f8ab477124628a5afebbf6826005955805f9>`_),
  30. the following sequence runs through some basic testing of the digitalio compatibility layer...
  31. .. code-block:: python
  32. from testing import test_module_name
  33. test_module_name("testing.universal.digitalio")
  34. An example log from running the suites is `here <https://github.com/cefn/Adafruit_Micropython_Blinka/issues/2#issuecomment-366713394>`_ .
  35. Contributing
  36. ============
  37. Contributions are welcome! Please read our `Code of Conduct
  38. <https://github.com/adafruit/Adafruit_Micropython_Blinka/blob/master/CODE_OF_CONDUCT.md>`_
  39. before contributing to help this project stay welcoming.
  40. Building locally
  41. ================
  42. Sphinx documentation
  43. -----------------------
  44. Sphinx is used to build the documentation based on rST files and comments in the code. First,
  45. install dependencies (feel free to reuse the virtual environment from above):
  46. .. code-block:: shell
  47. python3 -m venv .env
  48. source .env/bin/activate
  49. pip install Sphinx sphinx-rtd-theme
  50. Now, once you have the virtual environment activated:
  51. .. code-block:: shell
  52. cd docs
  53. sphinx-build -E -W -b html . _build/html
  54. This will output the documentation to ``docs/_build/html``. Open the index.html in your browser to
  55. view them. It will also (due to -W) error out on any warning like Travis will. This is a good way to
  56. locally verify it will pass.