diff options
| author | Dan Halbert <halbert@halwitz.org> | 2018-02-21 20:14:46 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-21 20:14:46 -0500 |
| commit | 419920987c2e9473ec7b75064506b9acbb696ddd (patch) | |
| tree | 758b72f0948e9894d4de03fe967e727da34038bc /shared-bindings | |
| parent | ee90056866d2a8a1e0eec21f0ce5c60b741ea411 (diff) | |
| parent | e667bdfe0583909c1a6fd7789ab5605f010d3005 (diff) | |
Merge pull request #632 from tannewt/delete_out_of_date
Delete out of date docs, drivers and examples
Diffstat (limited to 'shared-bindings')
| -rw-r--r-- | shared-bindings/_stage/__init__.c | 21 | ||||
| -rw-r--r-- | shared-bindings/audiobusio/PDMIn.c | 6 | ||||
| -rw-r--r-- | shared-bindings/audiobusio/__init__.c | 2 | ||||
| -rw-r--r-- | shared-bindings/help.c | 9 | ||||
| -rw-r--r-- | shared-bindings/microcontroller/Processor.c | 2 | ||||
| -rw-r--r-- | shared-bindings/microcontroller/__init__.c | 5 | ||||
| -rw-r--r-- | shared-bindings/random/__init__.c | 4 | ||||
| -rw-r--r-- | shared-bindings/storage/__init__.c | 4 |
8 files changed, 38 insertions, 15 deletions
diff --git a/shared-bindings/_stage/__init__.c b/shared-bindings/_stage/__init__.c index 16e0b58d9..832b28771 100644 --- a/shared-bindings/_stage/__init__.c +++ b/shared-bindings/_stage/__init__.c @@ -32,7 +32,22 @@ #include "Layer.h" #include "Text.h" -//| .. currentmodule:: _stage +//| :mod:`_stage` --- C-level helpers for animation of sprites on a stage +//| ===================================================================== +//| +//| .. module:: _stage +//| :synopsis: C-level helpers for animation of sprites on a stage +//| :platform: SAMD21 +//| +//| The `_stage` module contains native code to speed-up the ```stage`` Library +//| <https://github.com/python-ugame/circuitpython-stage>`_. +//| Libraries +//| +//| .. toctree:: +//| :maxdepth: 3 +//| +//| Layer +//| Text //| //| .. function:: render(x0, y0, x1, y1, layers, buffer, spi) //| @@ -42,9 +57,9 @@ //| :param int y0: Top edge of the fragment. //| :param int x1: Right edge of the fragment. //| :param int y1: Bottom edge of the fragment. -//| :param list layers: A list of the `Layer` objects. +//| :param list layers: A list of the :py:class:`~_stage.Layer` objects. //| :param bytearray buffer: A buffer to use for rendering. -//| :param SPI spi: The SPI device to use. +//| :param ~busio.SPI spi: The SPI bus to use. //| //| Note that this function only sends the raw pixel data. Setting up //| the display for receiving it and handling the chip-select and diff --git a/shared-bindings/audiobusio/PDMIn.c b/shared-bindings/audiobusio/PDMIn.c index c71f44679..a48b48a2d 100644 --- a/shared-bindings/audiobusio/PDMIn.c +++ b/shared-bindings/audiobusio/PDMIn.c @@ -51,7 +51,7 @@ //| :param ~microcontroller.Pin clock_pin: The pin to output the clock to //| :param ~microcontroller.Pin data_pin: The pin to read the data from //| :param int frequency: Target frequency of the resulting samples. Check `frequency` for actual value. -//| Minimum frequency is about 16000 Hz. +//| Minimum frequency is about 16000 Hz. //| :param int bit_depth: Final number of bits per sample. Must be divisible by 8 //| :param bool mono: True when capturing a single channel of audio, captures two channels otherwise //| :param int oversample: Number of single bit samples to decimate into a final sample. Must be divisible by 8 @@ -180,8 +180,8 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(audiobusio_pdmin___exit___obj, 4, 4, //| audio at the given rate. For internal flash, writing all 1s to the file //| before recording is recommended to speed up writes. //| -//| :return: The number of samples recorded. If this is less than `destination_length`, -//| some samples were missed due to processing time. +//| :return: The number of samples recorded. If this is less than ``destination_length``, +//| some samples were missed due to processing time. //| STATIC mp_obj_t audiobusio_pdmin_obj_record(mp_obj_t self_obj, mp_obj_t destination, mp_obj_t destination_length) { audiobusio_pdmin_obj_t *self = MP_OBJ_TO_PTR(self_obj); diff --git a/shared-bindings/audiobusio/__init__.c b/shared-bindings/audiobusio/__init__.c index 70606e496..bdd999b04 100644 --- a/shared-bindings/audiobusio/__init__.c +++ b/shared-bindings/audiobusio/__init__.c @@ -34,7 +34,7 @@ #include "shared-bindings/audiobusio/PDMIn.h" //| :mod:`audiobusio` --- Support for audio input and output over digital bus -//| ================================================= +//| ========================================================================= //| //| .. module:: audiobusio //| :synopsis: Support for audio input and output over digital bus diff --git a/shared-bindings/help.c b/shared-bindings/help.c index a3ae94797..cdd9a4a93 100644 --- a/shared-bindings/help.c +++ b/shared-bindings/help.c @@ -26,6 +26,15 @@ #include "genhdr/mpversion.h" +//| :func:`help` - Built-in method to provide helpful information +//| ============================================================== +//| +//| .. method:: help(object=None) +//| +//| Prints a help method about the given object. When ``object`` is none, +//| prints general port information. +//| + const char *circuitpython_help_text = "Welcome to Adafruit CircuitPython " MICROPY_GIT_TAG "!\r\n" "\r\n" diff --git a/shared-bindings/microcontroller/Processor.c b/shared-bindings/microcontroller/Processor.c index 0e843bd31..528925ef7 100644 --- a/shared-bindings/microcontroller/Processor.c +++ b/shared-bindings/microcontroller/Processor.c @@ -38,7 +38,7 @@ //| .. currentmodule:: microcontroller //| //| :class:`Processor` --- Microcontroller CPU information and control -//| -------------------------------------------------------- +//| ------------------------------------------------------------------ //| //| Get information about the microcontroller CPU and control it. //| diff --git a/shared-bindings/microcontroller/__init__.c b/shared-bindings/microcontroller/__init__.c index cc091591f..b5738f866 100644 --- a/shared-bindings/microcontroller/__init__.c +++ b/shared-bindings/microcontroller/__init__.c @@ -59,11 +59,12 @@ //| //| Pin //| Processor +//| RunMode //| //| .. attribute:: cpu //| -//| CPU information and control, such as `cpu.temperature` and `cpu.frequency` +//| CPU information and control, such as ``cpu.temperature`` and ``cpu.frequency`` //| (clock frequency). //| This object is the sole instance of `microcontroller.Processor`. //| @@ -130,7 +131,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(mcu_on_next_reset_obj, mcu_on_next_reset); //| .. method:: reset() //| //| Reset the microcontroller. After reset, the microcontroller will enter the -//| run mode last set by `one_next_reset`. +//| run mode last set by `on_next_reset`. //| //| .. warning:: This may result in file system corruption when connected to a //| host computer. Be very careful when calling this! Make sure the device diff --git a/shared-bindings/random/__init__.c b/shared-bindings/random/__init__.c index fe52c1fc0..cea437e98 100644 --- a/shared-bindings/random/__init__.c +++ b/shared-bindings/random/__init__.c @@ -79,7 +79,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(random_getrandbits_obj, random_getrandbits); //| .. function:: randrange(stop) //| randrange(start, stop, step=1) //| -//| Returns a randomly selected integer from `range(start, stop, step)`. +//| Returns a randomly selected integer from ``range(start, stop, step)``. //| STATIC mp_obj_t random_randrange(size_t n_args, const mp_obj_t *args) { mp_int_t start = 0; @@ -122,7 +122,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(random_randrange_obj, 1, 3, random_ra //| .. function:: randint(a, b) //| //| Returns a randomly selected integer between a and b inclusive. Equivalent -//| to `randrange(a, b + 1, 1)` +//| to ``randrange(a, b + 1, 1)`` //| STATIC mp_obj_t random_randint(mp_obj_t a_in, mp_obj_t b_in) { mp_int_t a = mp_obj_get_int(a_in); diff --git a/shared-bindings/storage/__init__.c b/shared-bindings/storage/__init__.c index 4831b0037..ccf8ff511 100644 --- a/shared-bindings/storage/__init__.c +++ b/shared-bindings/storage/__init__.c @@ -43,9 +43,7 @@ //| The `storage` provides storage management functionality such as mounting and //| unmounting which is typically handled by the operating system hosting Python. //| CircuitPython does not have an OS, so this module provides this functionality -//| directly. Its based on MicroPython's `uos` module but deliberately separates -//| CPython compatible functionality (in `os`) from incompatible functionality -//| (in `storage`). +//| directly. //| //| .. function:: mount(filesystem, mount_path, \*, readonly=False) |
