Removed all 'self, )'
This commit is contained in:
parent
522b17ca93
commit
54cb1feea0
|
@ -58,7 +58,7 @@ STATIC mp_obj_t _register(mp_obj_t self, mp_obj_t o) {
|
|||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_2(register_obj, _register);
|
||||
|
||||
//| def flush(self, ) -> Any:
|
||||
//| def flush(self) -> Any:
|
||||
//| """Send any queued drawing commands directly to the hardware.
|
||||
//|
|
||||
//| :param int width: The width of the grid in tiles, or 1 for sprites."""
|
||||
|
@ -559,7 +559,7 @@ STATIC mp_obj_t _colorrgb(size_t n_args, const mp_obj_t *args) {
|
|||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(colorrgb_obj, 4, 4, _colorrgb);
|
||||
|
||||
//| def Display(self, ) -> Any: ...
|
||||
//| def Display(self) -> Any: ...
|
||||
//| """End the display list"""
|
||||
//|
|
||||
|
||||
|
@ -570,7 +570,7 @@ STATIC mp_obj_t _display(mp_obj_t self) {
|
|||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_1(display_obj, _display);
|
||||
|
||||
//| def End(self, ) -> Any:
|
||||
//| def End(self) -> Any:
|
||||
//| """End drawing a graphics primitive
|
||||
//|
|
||||
//| :meth:`Vertex2ii` and :meth:`Vertex2f` calls are ignored until the next :meth:`Begin`."""
|
||||
|
@ -628,7 +628,7 @@ STATIC mp_obj_t _macro(mp_obj_t self, mp_obj_t a0) {
|
|||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_2(macro_obj, _macro);
|
||||
|
||||
//| def Nop(self, ) -> Any:
|
||||
//| def Nop(self) -> Any:
|
||||
//| """No operation"""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -672,7 +672,7 @@ STATIC mp_obj_t _pointsize(mp_obj_t self, mp_obj_t a0) {
|
|||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_2(pointsize_obj, _pointsize);
|
||||
|
||||
//| def RestoreContext(self, ) -> Any:
|
||||
//| def RestoreContext(self) -> Any:
|
||||
//| """Restore the current graphics context from the context stack"""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -684,7 +684,7 @@ STATIC mp_obj_t _restorecontext(mp_obj_t self) {
|
|||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_1(restorecontext_obj, _restorecontext);
|
||||
|
||||
//| def Return(self, ) -> Any:
|
||||
//| def Return(self) -> Any:
|
||||
//| """Return from a previous call command"""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -696,7 +696,7 @@ STATIC mp_obj_t _return(mp_obj_t self) {
|
|||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_1(return_obj, _return);
|
||||
|
||||
//| def SaveContext(self, ) -> Any:
|
||||
//| def SaveContext(self) -> Any:
|
||||
//| """Push the current graphics context on the context stack"""
|
||||
//| ...
|
||||
//|
|
||||
|
|
|
@ -245,7 +245,7 @@ STATIC mp_obj_t pixelbuf_pixelbuf_unary_op(mp_unary_op_t op, mp_obj_t self_in) {
|
|||
}
|
||||
}
|
||||
|
||||
//| def show(self, ) -> Any:
|
||||
//| def show(self) -> Any:
|
||||
//| """Transmits the color data to the pixels so that they are shown. This is done automatically
|
||||
//| when `auto_write` is True."""
|
||||
//| ...
|
||||
|
|
|
@ -70,7 +70,7 @@ STATIC mp_obj_t analogio_analogin_make_new(const mp_obj_type_t *type,
|
|||
return MP_OBJ_FROM_PTR(self);
|
||||
}
|
||||
|
||||
//| def deinit(self, ) -> None:
|
||||
//| def deinit(self) -> None:
|
||||
//| """Turn off the AnalogIn and release the pin for other use."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -86,13 +86,13 @@ STATIC void check_for_deinit(analogio_analogin_obj_t *self) {
|
|||
raise_deinited_error();
|
||||
}
|
||||
}
|
||||
//| def __enter__(self, ) -> AnalogIn:
|
||||
//| def __enter__(self) -> AnalogIn:
|
||||
//| """No-op used by Context Managers."""
|
||||
//| ...
|
||||
//|
|
||||
// Provided by context manager helper.
|
||||
|
||||
//| def __exit__(self, ) -> None:
|
||||
//| def __exit__(self) -> None:
|
||||
//| """Automatically deinitializes the hardware when exiting a context. See
|
||||
//| :ref:`lifetime-and-contextmanagers` for more info."""
|
||||
//| ...
|
||||
|
|
|
@ -66,7 +66,7 @@ STATIC mp_obj_t analogio_analogout_make_new(const mp_obj_type_t *type, mp_uint_t
|
|||
return MP_OBJ_FROM_PTR(self);
|
||||
}
|
||||
|
||||
//| def deinit(self, ) -> None:
|
||||
//| def deinit(self) -> None:
|
||||
//| """Turn off the AnalogOut and release the pin for other use."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -79,13 +79,13 @@ STATIC mp_obj_t analogio_analogout_deinit(mp_obj_t self_in) {
|
|||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_1(analogio_analogout_deinit_obj, analogio_analogout_deinit);
|
||||
|
||||
//| def __enter__(self, ) -> AnalogOut:
|
||||
//| def __enter__(self) -> AnalogOut:
|
||||
//| """No-op used by Context Managers."""
|
||||
//| ...
|
||||
//|
|
||||
// Provided by context manager helper.
|
||||
|
||||
//| def __exit__(self, ) -> None:
|
||||
//| def __exit__(self) -> None:
|
||||
//| """Automatically deinitializes the hardware when exiting a context. See
|
||||
//| :ref:`lifetime-and-contextmanagers` for more info."""
|
||||
//| ...
|
||||
|
|
|
@ -112,7 +112,7 @@ STATIC mp_obj_t audiobusio_i2sout_make_new(const mp_obj_type_t *type, size_t n_a
|
|||
return MP_OBJ_FROM_PTR(self);
|
||||
}
|
||||
|
||||
//| def deinit(self, ) -> None:
|
||||
//| def deinit(self) -> None:
|
||||
//| """Deinitialises the I2SOut and releases any hardware resources for reuse."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -128,13 +128,13 @@ STATIC void check_for_deinit(audiobusio_i2sout_obj_t *self) {
|
|||
raise_deinited_error();
|
||||
}
|
||||
}
|
||||
//| def __enter__(self, ) -> I2SOut:
|
||||
//| def __enter__(self) -> I2SOut:
|
||||
//| """No-op used by Context Managers."""
|
||||
//| ...
|
||||
//|
|
||||
// Provided by context manager helper.
|
||||
|
||||
//| def __exit__(self, ) -> None:
|
||||
//| def __exit__(self) -> None:
|
||||
//| """Automatically deinitializes the hardware when exiting a context. See
|
||||
//| :ref:`lifetime-and-contextmanagers` for more info."""
|
||||
//| ...
|
||||
|
@ -174,7 +174,7 @@ STATIC mp_obj_t audiobusio_i2sout_obj_play(size_t n_args, const mp_obj_t *pos_ar
|
|||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_KW(audiobusio_i2sout_play_obj, 1, audiobusio_i2sout_obj_play);
|
||||
|
||||
//| def stop(self, ) -> None:
|
||||
//| def stop(self) -> None:
|
||||
//| """Stops playback."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -203,7 +203,7 @@ const mp_obj_property_t audiobusio_i2sout_playing_obj = {
|
|||
(mp_obj_t)&mp_const_none_obj},
|
||||
};
|
||||
|
||||
//| def pause(self, ) -> None:
|
||||
//| def pause(self) -> None:
|
||||
//| """Stops playback temporarily while remembering the position. Use `resume` to resume playback."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -219,7 +219,7 @@ STATIC mp_obj_t audiobusio_i2sout_obj_pause(mp_obj_t self_in) {
|
|||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(audiobusio_i2sout_pause_obj, audiobusio_i2sout_obj_pause);
|
||||
|
||||
//| def resume(self, ) -> None:
|
||||
//| def resume(self) -> None:
|
||||
//| """Resumes sample playback after :py:func:`pause`."""
|
||||
//| ...
|
||||
//|
|
||||
|
|
|
@ -134,7 +134,7 @@ STATIC mp_obj_t audiobusio_pdmin_make_new(const mp_obj_type_t *type, size_t n_ar
|
|||
return MP_OBJ_FROM_PTR(self);
|
||||
}
|
||||
|
||||
//| def deinit(self, ) -> None:
|
||||
//| def deinit(self) -> None:
|
||||
//| """Deinitialises the PDMIn and releases any hardware resources for reuse."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -150,13 +150,13 @@ STATIC void check_for_deinit(audiobusio_pdmin_obj_t *self) {
|
|||
raise_deinited_error();
|
||||
}
|
||||
}
|
||||
//| def __enter__(self, ) -> PDMIn:
|
||||
//| def __enter__(self) -> PDMIn:
|
||||
//| """No-op used by Context Managers."""
|
||||
//| ...
|
||||
//|
|
||||
// Provided by context manager helper.
|
||||
|
||||
//| def __exit__(self, ) -> None:
|
||||
//| def __exit__(self) -> None:
|
||||
//| """Automatically deinitializes the hardware when exiting a context."""
|
||||
//| ...
|
||||
//|
|
||||
|
|
|
@ -101,7 +101,7 @@ STATIC mp_obj_t audioio_rawsample_make_new(const mp_obj_type_t *type, size_t n_a
|
|||
return MP_OBJ_FROM_PTR(self);
|
||||
}
|
||||
|
||||
//| def deinit(self, ) -> None:
|
||||
//| def deinit(self) -> None:
|
||||
//| """Deinitialises the AudioOut and releases any hardware resources for reuse."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -118,13 +118,13 @@ STATIC void check_for_deinit(audioio_rawsample_obj_t *self) {
|
|||
}
|
||||
}
|
||||
|
||||
//| def __enter__(self, ) -> RawSample:
|
||||
//| def __enter__(self) -> RawSample:
|
||||
//| """No-op used by Context Managers."""
|
||||
//| ...
|
||||
//|
|
||||
// Provided by context manager helper.
|
||||
|
||||
//| def __exit__(self, ) -> None:
|
||||
//| def __exit__(self) -> None:
|
||||
//| """Automatically deinitializes the hardware when exiting a context. See
|
||||
//| :ref:`lifetime-and-contextmanagers` for more info."""
|
||||
//| ...
|
||||
|
|
|
@ -91,7 +91,7 @@ STATIC mp_obj_t audioio_wavefile_make_new(const mp_obj_type_t *type, size_t n_ar
|
|||
return MP_OBJ_FROM_PTR(self);
|
||||
}
|
||||
|
||||
//| def deinit(self, ) -> None:
|
||||
//| def deinit(self) -> None:
|
||||
//| """Deinitialises the WaveFile and releases all memory resources for reuse."""
|
||||
//| ...
|
||||
STATIC mp_obj_t audioio_wavefile_deinit(mp_obj_t self_in) {
|
||||
|
@ -107,13 +107,13 @@ STATIC void check_for_deinit(audioio_wavefile_obj_t *self) {
|
|||
}
|
||||
}
|
||||
|
||||
//| def __enter__(self, ) -> WaveFile:
|
||||
//| def __enter__(self) -> WaveFile:
|
||||
//| """No-op used by Context Managers."""
|
||||
//| ...
|
||||
//|
|
||||
// Provided by context manager helper.
|
||||
|
||||
//| def __exit__(self, ) -> None:
|
||||
//| def __exit__(self) -> None:
|
||||
//| """Automatically deinitializes the hardware when exiting a context. See
|
||||
//| :ref:`lifetime-and-contextmanagers` for more info."""
|
||||
//| ...
|
||||
|
|
|
@ -121,7 +121,7 @@ STATIC mp_obj_t audiomixer_mixer_make_new(const mp_obj_type_t *type, size_t n_ar
|
|||
return MP_OBJ_FROM_PTR(self);
|
||||
}
|
||||
|
||||
//| def deinit(self, ) -> None:
|
||||
//| def deinit(self) -> None:
|
||||
//| """Deinitialises the Mixer and releases any hardware resources for reuse."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -138,13 +138,13 @@ STATIC void check_for_deinit(audiomixer_mixer_obj_t *self) {
|
|||
}
|
||||
}
|
||||
|
||||
//| def __enter__(self, ) -> Mixer:
|
||||
//| def __enter__(self) -> Mixer:
|
||||
//| """No-op used by Context Managers."""
|
||||
//| ...
|
||||
//|
|
||||
// Provided by context manager helper.
|
||||
|
||||
//| def __exit__(self, ) -> None:
|
||||
//| def __exit__(self) -> None:
|
||||
//| """Automatically deinitializes the hardware when exiting a context. See
|
||||
//| :ref:`lifetime-and-contextmanagers` for more info."""
|
||||
//| ...
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
//|
|
||||
//| Used to access and control samples with `audiomixer.Mixer`."""
|
||||
//|
|
||||
//| def __init__(self, ):
|
||||
//| def __init__(self):
|
||||
//| """MixerVoice instance object(s) created by `audiomixer.Mixer`."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -81,7 +81,7 @@ STATIC mp_obj_t audiomixer_mixervoice_obj_play(size_t n_args, const mp_obj_t *po
|
|||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_KW(audiomixer_mixervoice_play_obj, 1, audiomixer_mixervoice_obj_play);
|
||||
|
||||
//| def stop(self, ) -> None:
|
||||
//| def stop(self) -> None:
|
||||
//| """Stops playback of the sample on this voice."""
|
||||
//| ...
|
||||
//|
|
||||
|
|
|
@ -89,7 +89,7 @@ STATIC mp_obj_t audiomp3_mp3file_make_new(const mp_obj_type_t *type, size_t n_ar
|
|||
return MP_OBJ_FROM_PTR(self);
|
||||
}
|
||||
|
||||
//| def deinit(self, ) -> None:
|
||||
//| def deinit(self) -> None:
|
||||
//| """Deinitialises the MP3 and releases all memory resources for reuse."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -106,13 +106,13 @@ STATIC void check_for_deinit(audiomp3_mp3file_obj_t *self) {
|
|||
}
|
||||
}
|
||||
|
||||
//| def __enter__(self, ) -> MP3:
|
||||
//| def __enter__(self) -> MP3:
|
||||
//| """No-op used by Context Managers."""
|
||||
//| ...
|
||||
//|
|
||||
// Provided by context manager helper.
|
||||
|
||||
//| def __exit__(self, ) -> None:
|
||||
//| def __exit__(self) -> None:
|
||||
//| """Automatically deinitializes the hardware when exiting a context. See
|
||||
//| :ref:`lifetime-and-contextmanagers` for more info."""
|
||||
//| ...
|
||||
|
|
|
@ -114,7 +114,7 @@ STATIC mp_obj_t audiopwmio_pwmaudioout_make_new(const mp_obj_type_t *type, size_
|
|||
return MP_OBJ_FROM_PTR(self);
|
||||
}
|
||||
|
||||
//| def deinit(self, ) -> None:
|
||||
//| def deinit(self) -> None:
|
||||
//| """Deinitialises the PWMAudioOut and releases any hardware resources for reuse."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -130,13 +130,13 @@ STATIC void check_for_deinit(audiopwmio_pwmaudioout_obj_t *self) {
|
|||
raise_deinited_error();
|
||||
}
|
||||
}
|
||||
//| def __enter__(self, ) -> PWMAudioOut:
|
||||
//| def __enter__(self) -> PWMAudioOut:
|
||||
//| """No-op used by Context Managers."""
|
||||
//| ...
|
||||
//|
|
||||
// Provided by context manager helper.
|
||||
|
||||
//| def __exit__(self, ) -> None:
|
||||
//| def __exit__(self) -> None:
|
||||
//| """Automatically deinitializes the hardware when exiting a context. See
|
||||
//| :ref:`lifetime-and-contextmanagers` for more info."""
|
||||
//| ...
|
||||
|
@ -177,7 +177,7 @@ STATIC mp_obj_t audiopwmio_pwmaudioout_obj_play(size_t n_args, const mp_obj_t *p
|
|||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_KW(audiopwmio_pwmaudioout_play_obj, 1, audiopwmio_pwmaudioout_obj_play);
|
||||
|
||||
//| def stop(self, ) -> None:
|
||||
//| def stop(self) -> None:
|
||||
//| """Stops playback and resets to the start of the sample."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -206,7 +206,7 @@ const mp_obj_property_t audiopwmio_pwmaudioout_playing_obj = {
|
|||
(mp_obj_t)&mp_const_none_obj},
|
||||
};
|
||||
|
||||
//| def pause(self, ) -> None:
|
||||
//| def pause(self) -> None:
|
||||
//| """Stops playback temporarily while remembering the position. Use `resume` to resume playback."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -222,7 +222,7 @@ STATIC mp_obj_t audiopwmio_pwmaudioout_obj_pause(mp_obj_t self_in) {
|
|||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(audiopwmio_pwmaudioout_pause_obj, audiopwmio_pwmaudioout_obj_pause);
|
||||
|
||||
//| def resume(self, ) -> None:
|
||||
//| def resume(self) -> None:
|
||||
//| """Resumes sample playback after :py:func:`pause`."""
|
||||
//| ...
|
||||
//|
|
||||
|
|
|
@ -79,7 +79,7 @@ STATIC mp_obj_t bitbangio_i2c_make_new(const mp_obj_type_t *type, size_t n_args,
|
|||
return (mp_obj_t)self;
|
||||
}
|
||||
|
||||
//| def deinit(self, ) -> None:
|
||||
//| def deinit(self) -> None:
|
||||
//| """Releases control of the underlying hardware so other classes can use it."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -96,13 +96,13 @@ STATIC void check_for_deinit(bitbangio_i2c_obj_t *self) {
|
|||
}
|
||||
}
|
||||
|
||||
//| def __enter__(self, ) -> I2C:
|
||||
//| def __enter__(self) -> I2C:
|
||||
//| """No-op used in Context Managers."""
|
||||
//| ...
|
||||
//|
|
||||
// Provided by context manager helper.
|
||||
|
||||
//| def __exit__(self, ) -> None:
|
||||
//| def __exit__(self) -> None:
|
||||
//| """Automatically deinitializes the hardware on context exit. See
|
||||
//| :ref:`lifetime-and-contextmanagers` for more info."""
|
||||
//| ...
|
||||
|
@ -120,7 +120,7 @@ static void check_lock(bitbangio_i2c_obj_t *self) {
|
|||
}
|
||||
}
|
||||
|
||||
//| def scan(self, ) -> list:
|
||||
//| def scan(self) -> list:
|
||||
//| """Scan all I2C addresses between 0x08 and 0x77 inclusive and return a list of
|
||||
//| those that respond. A device responds if it pulls the SDA line low after
|
||||
//| its address (including a read bit) is sent on the bus."""
|
||||
|
@ -142,7 +142,7 @@ STATIC mp_obj_t bitbangio_i2c_scan(mp_obj_t self_in) {
|
|||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(bitbangio_i2c_scan_obj, bitbangio_i2c_scan);
|
||||
|
||||
//| def try_lock(self, ) -> bool:
|
||||
//| def try_lock(self) -> bool:
|
||||
//| """Attempts to grab the I2C lock. Returns True on success."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -153,7 +153,7 @@ STATIC mp_obj_t bitbangio_i2c_obj_try_lock(mp_obj_t self_in) {
|
|||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(bitbangio_i2c_try_lock_obj, bitbangio_i2c_obj_try_lock);
|
||||
|
||||
//| def unlock(self, ) -> None:
|
||||
//| def unlock(self) -> None:
|
||||
//| """Releases the I2C lock."""
|
||||
//| ...
|
||||
//|
|
||||
|
|
|
@ -78,7 +78,7 @@ STATIC mp_obj_t bitbangio_onewire_make_new(const mp_obj_type_t *type, size_t n_a
|
|||
return MP_OBJ_FROM_PTR(self);
|
||||
}
|
||||
|
||||
//| def deinit(self, ) -> None:
|
||||
//| def deinit(self) -> None:
|
||||
//| """Deinitialize the OneWire bus and release any hardware resources for reuse."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -95,13 +95,13 @@ STATIC void check_for_deinit(bitbangio_onewire_obj_t *self) {
|
|||
}
|
||||
}
|
||||
|
||||
//| def __enter__(self, ) -> OneWire:
|
||||
//| def __enter__(self) -> OneWire:
|
||||
//| """No-op used by Context Managers."""
|
||||
//| ...
|
||||
//|
|
||||
// Provided by context manager helper.
|
||||
|
||||
//| def __exit__(self, ) -> None:
|
||||
//| def __exit__(self) -> None:
|
||||
//| """Automatically deinitializes the hardware when exiting a context. See
|
||||
//| :ref:`lifetime-and-contextmanagers` for more info."""
|
||||
//| ...
|
||||
|
@ -113,7 +113,7 @@ STATIC mp_obj_t bitbangio_onewire_obj___exit__(size_t n_args, const mp_obj_t *ar
|
|||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(bitbangio_onewire___exit___obj, 4, 4, bitbangio_onewire_obj___exit__);
|
||||
|
||||
//| def reset(self, ) -> bool:
|
||||
//| def reset(self) -> bool:
|
||||
//| """Reset the OneWire bus"""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -125,7 +125,7 @@ STATIC mp_obj_t bitbangio_onewire_obj_reset(mp_obj_t self_in) {
|
|||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(bitbangio_onewire_reset_obj, bitbangio_onewire_obj_reset);
|
||||
|
||||
//| def read_bit(self, ) -> bool:
|
||||
//| def read_bit(self) -> bool:
|
||||
//| """Read in a bit
|
||||
//|
|
||||
//| :returns: bit state read
|
||||
|
|
|
@ -90,7 +90,7 @@ STATIC mp_obj_t bitbangio_spi_make_new(const mp_obj_type_t *type, size_t n_args,
|
|||
return (mp_obj_t)self;
|
||||
}
|
||||
|
||||
//| def deinit(self, ) -> None:
|
||||
//| def deinit(self) -> None:
|
||||
//| """Turn off the SPI bus."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -107,13 +107,13 @@ STATIC void check_for_deinit(bitbangio_spi_obj_t *self) {
|
|||
}
|
||||
}
|
||||
|
||||
//| def __enter__(self, ) -> SPI:
|
||||
//| def __enter__(self) -> SPI:
|
||||
//| """No-op used by Context Managers."""
|
||||
//| ...
|
||||
//|
|
||||
// Provided by context manager helper.
|
||||
|
||||
//| def __exit__(self, ) -> None:
|
||||
//| def __exit__(self) -> None:
|
||||
//| """Automatically deinitializes the hardware when exiting a context. See
|
||||
//| :ref:`lifetime-and-contextmanagers` for more info."""
|
||||
//| ...
|
||||
|
@ -174,7 +174,7 @@ STATIC mp_obj_t bitbangio_spi_configure(size_t n_args, const mp_obj_t *pos_args,
|
|||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_KW(bitbangio_spi_configure_obj, 1, bitbangio_spi_configure);
|
||||
|
||||
//| def try_lock(self, ) -> bool:
|
||||
//| def try_lock(self) -> bool:
|
||||
//| """Attempts to grab the SPI lock. Returns True on success.
|
||||
//|
|
||||
//| :return: True when lock has been grabbed
|
||||
|
@ -188,7 +188,7 @@ STATIC mp_obj_t bitbangio_spi_obj_try_lock(mp_obj_t self_in) {
|
|||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(bitbangio_spi_try_lock_obj, bitbangio_spi_obj_try_lock);
|
||||
|
||||
//| def unlock(self, ) -> None:
|
||||
//| def unlock(self) -> None:
|
||||
//| """Releases the SPI lock."""
|
||||
//| ...
|
||||
//|
|
||||
|
|
|
@ -83,7 +83,7 @@ STATIC mp_obj_t busio_i2c_make_new(const mp_obj_type_t *type, size_t n_args, con
|
|||
return (mp_obj_t)self;
|
||||
}
|
||||
|
||||
//| def deinit(self, ) -> None:
|
||||
//| def deinit(self) -> None:
|
||||
//| """Releases control of the underlying hardware so other classes can use it."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -100,13 +100,13 @@ STATIC void check_for_deinit(busio_i2c_obj_t *self) {
|
|||
}
|
||||
}
|
||||
|
||||
//| def __enter__(self, ) -> I2C:
|
||||
//| def __enter__(self) -> I2C:
|
||||
//| """No-op used in Context Managers."""
|
||||
//| ...
|
||||
//|
|
||||
// Provided by context manager helper.
|
||||
|
||||
//| def __exit__(self, ) -> None:
|
||||
//| def __exit__(self) -> None:
|
||||
//| """Automatically deinitializes the hardware on context exit. See
|
||||
//| :ref:`lifetime-and-contextmanagers` for more info."""
|
||||
//| ...
|
||||
|
@ -125,7 +125,7 @@ static void check_lock(busio_i2c_obj_t *self) {
|
|||
}
|
||||
}
|
||||
|
||||
//| def scan(self, ) -> list:
|
||||
//| def scan(self) -> list:
|
||||
//|
|
||||
//| """Scan all I2C addresses between 0x08 and 0x77 inclusive and return a
|
||||
//| list of those that respond.
|
||||
|
@ -150,7 +150,7 @@ STATIC mp_obj_t busio_i2c_scan(mp_obj_t self_in) {
|
|||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(busio_i2c_scan_obj, busio_i2c_scan);
|
||||
|
||||
//| def try_lock(self, ) -> bool:
|
||||
//| def try_lock(self) -> bool:
|
||||
//| """Attempts to grab the I2C lock. Returns True on success.
|
||||
//|
|
||||
//| :return: True when lock has been grabbed
|
||||
|
@ -164,7 +164,7 @@ STATIC mp_obj_t busio_i2c_obj_try_lock(mp_obj_t self_in) {
|
|||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(busio_i2c_try_lock_obj, busio_i2c_obj_try_lock);
|
||||
|
||||
//| def unlock(self, ) -> None:
|
||||
//| def unlock(self) -> None:
|
||||
//| """Releases the I2C lock."""
|
||||
//| ...
|
||||
//|
|
||||
|
|
|
@ -77,7 +77,7 @@ STATIC mp_obj_t busio_onewire_make_new(const mp_obj_type_t *type, size_t n_args,
|
|||
return MP_OBJ_FROM_PTR(self);
|
||||
}
|
||||
|
||||
//| def deinit(self, ) -> None:
|
||||
//| def deinit(self) -> None:
|
||||
//| """Deinitialize the OneWire bus and release any hardware resources for reuse."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -94,13 +94,13 @@ STATIC void check_for_deinit(busio_onewire_obj_t *self) {
|
|||
}
|
||||
}
|
||||
|
||||
//| def __enter__(self, ) -> OneWire:
|
||||
//| def __enter__(self) -> OneWire:
|
||||
//| """No-op used by Context Managers."""
|
||||
//| ...
|
||||
//|
|
||||
// Provided by context manager helper.
|
||||
|
||||
//| def __exit__(self, ) -> None:
|
||||
//| def __exit__(self) -> None:
|
||||
//| """Automatically deinitializes the hardware when exiting a context. See
|
||||
//| :ref:`lifetime-and-contextmanagers` for more info."""
|
||||
//| ...
|
||||
|
@ -112,7 +112,7 @@ STATIC mp_obj_t busio_onewire_obj___exit__(size_t n_args, const mp_obj_t *args)
|
|||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(busio_onewire___exit___obj, 4, 4, busio_onewire_obj___exit__);
|
||||
|
||||
//| def reset(self, ) -> bool:
|
||||
//| def reset(self) -> bool:
|
||||
//| """Reset the OneWire bus and read presence
|
||||
//|
|
||||
//| :returns: False when at least one device is present
|
||||
|
@ -127,7 +127,7 @@ STATIC mp_obj_t busio_onewire_obj_reset(mp_obj_t self_in) {
|
|||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(busio_onewire_reset_obj, busio_onewire_obj_reset);
|
||||
|
||||
//| def read_bit(self, ) -> bool:
|
||||
//| def read_bit(self) -> bool:
|
||||
//| """Read in a bit
|
||||
//|
|
||||
//| :returns: bit state read
|
||||
|
|
|
@ -100,7 +100,7 @@ STATIC mp_obj_t busio_spi_make_new(const mp_obj_type_t *type, size_t n_args, con
|
|||
return MP_OBJ_FROM_PTR(self);
|
||||
}
|
||||
|
||||
//| def deinit(self, ) -> None:
|
||||
//| def deinit(self) -> None:
|
||||
//| """Turn off the SPI bus."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -111,13 +111,13 @@ STATIC mp_obj_t busio_spi_obj_deinit(mp_obj_t self_in) {
|
|||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(busio_spi_deinit_obj, busio_spi_obj_deinit);
|
||||
|
||||
//| def __enter__(self, ) -> SPI:
|
||||
//| def __enter__(self) -> SPI:
|
||||
//| """No-op used by Context Managers.
|
||||
//| Provided by context manager helper."""
|
||||
//| ...
|
||||
//|
|
||||
|
||||
//| def __exit__(self, ) -> None:
|
||||
//| def __exit__(self) -> None:
|
||||
//| """Automatically deinitializes the hardware when exiting a context. See
|
||||
//| :ref:`lifetime-and-contextmanagers` for more info."""
|
||||
//| ...
|
||||
|
@ -201,7 +201,7 @@ STATIC mp_obj_t busio_spi_configure(size_t n_args, const mp_obj_t *pos_args, mp_
|
|||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_KW(busio_spi_configure_obj, 1, busio_spi_configure);
|
||||
|
||||
//| def try_lock(self, ) -> bool:
|
||||
//| def try_lock(self) -> bool:
|
||||
//| """Attempts to grab the SPI lock. Returns True on success.
|
||||
//|
|
||||
//| :return: True when lock has been grabbed
|
||||
|
@ -215,7 +215,7 @@ STATIC mp_obj_t busio_spi_obj_try_lock(mp_obj_t self_in) {
|
|||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(busio_spi_try_lock_obj, busio_spi_obj_try_lock);
|
||||
|
||||
//| def unlock(self, ) -> None:
|
||||
//| def unlock(self) -> None:
|
||||
//| """Releases the SPI lock."""
|
||||
//| ...
|
||||
//|
|
||||
|
|
|
@ -142,7 +142,7 @@ STATIC mp_obj_t busio_uart_make_new(const mp_obj_type_t *type, size_t n_args, co
|
|||
return (mp_obj_t)self;
|
||||
}
|
||||
|
||||
//| def deinit(self, ) -> None:
|
||||
//| def deinit(self) -> None:
|
||||
//| """Deinitialises the UART and releases any hardware resources for reuse."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -159,13 +159,13 @@ STATIC void check_for_deinit(busio_uart_obj_t *self) {
|
|||
}
|
||||
}
|
||||
|
||||
//| def __enter__(self, ) -> UART:
|
||||
//| def __enter__(self) -> UART:
|
||||
//| """No-op used by Context Managers."""
|
||||
//| ...
|
||||
//|
|
||||
// Provided by context manager helper.
|
||||
|
||||
//| def __exit__(self, ) -> None:
|
||||
//| def __exit__(self) -> None:
|
||||
//| """Automatically deinitializes the hardware when exiting a context. See
|
||||
//| :ref:`lifetime-and-contextmanagers` for more info."""
|
||||
//| ...
|
||||
|
@ -200,7 +200,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(busio_uart___exit___obj, 4, 4, busio_
|
|||
//| ...
|
||||
//|
|
||||
|
||||
//| def readline(self, ) -> bytes:
|
||||
//| def readline(self) -> bytes:
|
||||
//| """Read a line, ending in a newline character.
|
||||
//|
|
||||
//| :return: the line read
|
||||
|
@ -332,7 +332,7 @@ const mp_obj_property_t busio_uart_timeout_obj = {
|
|||
(mp_obj_t)&mp_const_none_obj},
|
||||
};
|
||||
|
||||
//| def reset_input_buffer(self, ) -> None:
|
||||
//| def reset_input_buffer(self) -> None:
|
||||
//| """Discard any unread characters in the input buffer."""
|
||||
//| ...
|
||||
//|
|
||||
|
|
|
@ -82,13 +82,13 @@ STATIC mp_obj_t digitalio_digitalinout_obj_deinit(mp_obj_t self_in) {
|
|||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(digitalio_digitalinout_deinit_obj, digitalio_digitalinout_obj_deinit);
|
||||
|
||||
//| def __enter__(self, ) -> DigitalInOut:
|
||||
//| def __enter__(self) -> DigitalInOut:
|
||||
//| """No-op used by Context Managers."""
|
||||
//| ...
|
||||
//|
|
||||
// Provided by context manager helper.
|
||||
|
||||
//| def __exit__(self, ) -> None:
|
||||
//| def __exit__(self) -> None:
|
||||
//| """Automatically deinitializes the hardware when exiting a context. See
|
||||
//| :ref:`lifetime-and-contextmanagers` for more info."""
|
||||
//| ...
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
//| class Direction:
|
||||
//| """Defines the direction of a digital pin"""
|
||||
//|
|
||||
//| def __init__(self, ):
|
||||
//| def __init__(self):
|
||||
//| """Enum-like class to define which direction the digital values are
|
||||
//| going."""
|
||||
//| ...
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
//| class DriveMode:
|
||||
//| """Defines the drive mode of a digital pin"""
|
||||
//|
|
||||
//| def __init__(self, ):
|
||||
//| def __init__(self):
|
||||
//| """Enum-like class to define the drive mode used when outputting
|
||||
//| digital values."""
|
||||
//| ...
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
//| class Pull:
|
||||
//| """Defines the pull of a digital input pin"""
|
||||
//|
|
||||
//| def __init__(self, ):
|
||||
//| def __init__(self):
|
||||
//| """Enum-like class to define the pull value, if any, used while reading
|
||||
//| digital values in."""
|
||||
//| ...
|
||||
|
|
|
@ -190,7 +190,7 @@ STATIC mp_obj_t displayio_epaperdisplay_obj_show(mp_obj_t self_in, mp_obj_t grou
|
|||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_2(displayio_epaperdisplay_show_obj, displayio_epaperdisplay_obj_show);
|
||||
|
||||
//| def refresh(self, ) -> Any:
|
||||
//| def refresh(self) -> Any:
|
||||
//| """Refreshes the display immediately or raises an exception if too soon. Use
|
||||
//| ``time.sleep(display.time_to_refresh)`` to sleep until a refresh can occur."""
|
||||
//| ...
|
||||
|
|
|
@ -96,7 +96,7 @@ STATIC mp_obj_t displayio_fourwire_make_new(const mp_obj_type_t *type, size_t n_
|
|||
return self;
|
||||
}
|
||||
|
||||
//| def reset(self, ) -> Any:
|
||||
//| def reset(self) -> Any:
|
||||
//| """Performs a hardware reset via the reset pin. Raises an exception if called when no reset pin
|
||||
//| is available."""
|
||||
//| ...
|
||||
|
|
|
@ -264,7 +264,7 @@ STATIC mp_obj_t displayio_group_obj_remove(mp_obj_t self_in, mp_obj_t layer) {
|
|||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_2(displayio_group_remove_obj, displayio_group_obj_remove);
|
||||
|
||||
//| def __len__(self, ) -> Any:
|
||||
//| def __len__(self) -> Any:
|
||||
//| """Returns the number of layers in a Group"""
|
||||
//| ...
|
||||
//|
|
||||
|
|
|
@ -76,7 +76,7 @@ STATIC mp_obj_t displayio_i2cdisplay_make_new(const mp_obj_type_t *type, size_t
|
|||
return self;
|
||||
}
|
||||
|
||||
//| def reset(self, ) -> Any:
|
||||
//| def reset(self) -> Any:
|
||||
//| """Performs a hardware reset via the reset pin. Raises an exception if called when no reset pin
|
||||
//| is available."""
|
||||
//| ...
|
||||
|
|
|
@ -70,7 +70,7 @@ STATIC mp_obj_t displayio_palette_make_new(const mp_obj_type_t *type, size_t n_a
|
|||
return MP_OBJ_FROM_PTR(self);
|
||||
}
|
||||
|
||||
//| def __len__(self, ) -> Any:
|
||||
//| def __len__(self) -> Any:
|
||||
//| """Returns the number of colors in a Palette"""
|
||||
//| ...
|
||||
//|
|
||||
|
|
|
@ -86,7 +86,7 @@ STATIC mp_obj_t displayio_parallelbus_make_new(const mp_obj_type_t *type, size_t
|
|||
return self;
|
||||
}
|
||||
|
||||
//| def reset(self, ) -> Any:
|
||||
//| def reset(self) -> Any:
|
||||
//| """Performs a hardware reset via the reset pin. Raises an exception if called when no reset pin
|
||||
//| is available."""
|
||||
//| ...
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
//| class BuiltinFont:
|
||||
//| """A font built into CircuitPython"""
|
||||
//|
|
||||
//| def __init__(self, ):
|
||||
//| def __init__(self):
|
||||
//| """Creation not supported. Available fonts are defined when CircuitPython is built. See the
|
||||
//| `Adafruit_CircuitPython_Bitmap_Font <https://github.com/adafruit/Adafruit_CircuitPython_Bitmap_Font>`_
|
||||
//| library for dynamically loaded fonts."""
|
||||
|
@ -64,7 +64,7 @@ const mp_obj_property_t fontio_builtinfont_bitmap_obj = {
|
|||
(mp_obj_t)&mp_const_none_obj},
|
||||
};
|
||||
|
||||
//| def get_bounding_box(self, ) -> Any:
|
||||
//| def get_bounding_box(self) -> Any:
|
||||
//| """Returns the maximum bounds of all glyphs in the font in a tuple of two values: width, height."""
|
||||
//| ...
|
||||
//|
|
||||
|
|
|
@ -94,7 +94,7 @@ STATIC mp_obj_t frequencyio_frequencyin_make_new(const mp_obj_type_t *type, size
|
|||
return MP_OBJ_FROM_PTR(self);
|
||||
}
|
||||
|
||||
//| def deinit(self, ) -> Any:
|
||||
//| def deinit(self) -> Any:
|
||||
//| """Deinitialises the FrequencyIn and releases any hardware resources for reuse."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -111,13 +111,13 @@ STATIC void check_for_deinit(frequencyio_frequencyin_obj_t *self) {
|
|||
}
|
||||
}
|
||||
|
||||
//| def __enter__(self, ) -> Any:
|
||||
//| def __enter__(self) -> Any:
|
||||
//| """No-op used by Context Managers."""
|
||||
//| ...
|
||||
//|
|
||||
// Provided by context manager helper.
|
||||
|
||||
//| def __exit__(self, ) -> Any:
|
||||
//| def __exit__(self) -> Any:
|
||||
//| """Automatically deinitializes the hardware when exiting a context. See
|
||||
//| :ref:`lifetime-and-contextmanagers` for more info."""
|
||||
//| ...
|
||||
|
@ -129,7 +129,7 @@ STATIC mp_obj_t frequencyio_frequencyin_obj___exit__(size_t n_args, const mp_obj
|
|||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(frequencyio_frequencyin___exit___obj, 4, 4, frequencyio_frequencyin_obj___exit__);
|
||||
|
||||
//| def pause(self, ) -> Any:
|
||||
//| def pause(self) -> Any:
|
||||
//| """Pause frequency capture."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -142,7 +142,7 @@ STATIC mp_obj_t frequencyio_frequencyin_obj_pause(mp_obj_t self_in) {
|
|||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(frequencyio_frequencyin_pause_obj, frequencyio_frequencyin_obj_pause);
|
||||
|
||||
//| def resume(self, ) -> Any:
|
||||
//| def resume(self) -> Any:
|
||||
//| """Resumes frequency capture."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -155,7 +155,7 @@ STATIC mp_obj_t frequencyio_frequencyin_obj_resume(mp_obj_t self_in) {
|
|||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(frequencyio_frequencyin_resume_obj, frequencyio_frequencyin_obj_resume);
|
||||
|
||||
//| def clear(self, ) -> Any:
|
||||
//| def clear(self) -> Any:
|
||||
//| """Clears the last detected frequency capture value."""
|
||||
//| ...
|
||||
//|
|
||||
|
|
|
@ -114,7 +114,7 @@ STATIC mp_obj_t gamepad_make_new(const mp_obj_type_t *type, size_t n_args,
|
|||
return MP_OBJ_FROM_PTR(gamepad_singleton);
|
||||
}
|
||||
|
||||
//| def get_pressed(self, ) -> Any:
|
||||
//| def get_pressed(self) -> Any:
|
||||
//| """Get the status of buttons pressed since the last call and clear it.
|
||||
//|
|
||||
//| Returns an 8-bit number, with bits that correspond to buttons,
|
||||
|
@ -133,7 +133,7 @@ STATIC mp_obj_t gamepad_get_pressed(mp_obj_t self_in) {
|
|||
MP_DEFINE_CONST_FUN_OBJ_1(gamepad_get_pressed_obj, gamepad_get_pressed);
|
||||
|
||||
|
||||
//| def deinit(self, ) -> Any:
|
||||
//| def deinit(self) -> Any:
|
||||
//| """Disable button scanning."""
|
||||
//| ...
|
||||
//|
|
||||
|
|
|
@ -82,7 +82,7 @@ STATIC mp_obj_t gamepadshift_make_new(const mp_obj_type_t *type, size_t n_args,
|
|||
return MP_OBJ_FROM_PTR(gamepad_singleton);
|
||||
}
|
||||
|
||||
//| def get_pressed(self, ) -> Any:
|
||||
//| def get_pressed(self) -> Any:
|
||||
//| """Get the status of buttons pressed since the last call and clear it.
|
||||
//|
|
||||
//| Returns an 8-bit number, with bits that correspond to buttons,
|
||||
|
@ -100,7 +100,7 @@ STATIC mp_obj_t gamepadshift_get_pressed(mp_obj_t self_in) {
|
|||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(gamepadshift_get_pressed_obj, gamepadshift_get_pressed);
|
||||
|
||||
//| def deinit(self, ) -> Any:
|
||||
//| def deinit(self) -> Any:
|
||||
//| """Disable button scanning."""
|
||||
//| ...
|
||||
//|
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
//| print("Longitude: {0:.6f} degrees".format(nav.longitude))"""
|
||||
//|
|
||||
|
||||
//| def __init__(self, ):
|
||||
//| def __init__(self):
|
||||
//| """Turn on the GNSS.
|
||||
//|
|
||||
//| :param gnss.SatelliteSystem system: satellite system to use"""
|
||||
|
@ -90,7 +90,7 @@ STATIC mp_obj_t gnss_make_new(const mp_obj_type_t *type, size_t n_args, const mp
|
|||
return MP_OBJ_FROM_PTR(self);
|
||||
}
|
||||
|
||||
//| def deinit(self, ) -> Any:
|
||||
//| def deinit(self) -> Any:
|
||||
//| """Turn off the GNSS."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -107,7 +107,7 @@ STATIC void check_for_deinit(gnss_obj_t *self) {
|
|||
}
|
||||
}
|
||||
|
||||
//| def update(self, ) -> Any:
|
||||
//| def update(self) -> Any:
|
||||
//| """Update GNSS positioning information."""
|
||||
//| ...
|
||||
//|
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
//| class PositionFix:
|
||||
//| """Position fix mode"""
|
||||
//|
|
||||
//| def __init__(self, ):
|
||||
//| def __init__(self):
|
||||
//| """Enum-like class to define the position fix mode."""
|
||||
//|
|
||||
//| INVALID: Any = ...
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
//| class SatelliteSystem:
|
||||
//| """Satellite system type"""
|
||||
//|
|
||||
//| def __init__(self, ):
|
||||
//| def __init__(self):
|
||||
//| """Enum-like class to define the satellite system type."""
|
||||
//|
|
||||
//| GPS: Any = ...
|
||||
|
|
|
@ -102,7 +102,7 @@ STATIC mp_obj_t i2cperipheral_i2c_peripheral_make_new(const mp_obj_type_t *type,
|
|||
return (mp_obj_t)self;
|
||||
}
|
||||
|
||||
//| def deinit(self, ) -> Any:
|
||||
//| def deinit(self) -> Any:
|
||||
//| """Releases control of the underlying hardware so other classes can use it."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -114,13 +114,13 @@ STATIC mp_obj_t i2cperipheral_i2c_peripheral_obj_deinit(mp_obj_t self_in) {
|
|||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(i2cperipheral_i2c_peripheral_deinit_obj, i2cperipheral_i2c_peripheral_obj_deinit);
|
||||
|
||||
//| def __enter__(self, ) -> Any:
|
||||
//| def __enter__(self) -> Any:
|
||||
//| """No-op used in Context Managers."""
|
||||
//| ...
|
||||
//|
|
||||
// Provided by context manager helper.
|
||||
|
||||
//| def __exit__(self, ) -> Any:
|
||||
//| def __exit__(self) -> Any:
|
||||
//| """Automatically deinitializes the hardware on context exit. See
|
||||
//| :ref:`lifetime-and-contextmanagers` for more info."""
|
||||
//| ...
|
||||
|
@ -241,13 +241,13 @@ STATIC mp_obj_t i2cperipheral_i2c_peripheral_request_make_new(const mp_obj_type_
|
|||
return mp_obj_new_i2cperipheral_i2c_peripheral_request(args[0], mp_obj_get_int(args[1]), mp_obj_is_true(args[2]), mp_obj_is_true(args[3]));
|
||||
}
|
||||
|
||||
//| def __enter__(self, ) -> Any:
|
||||
//| def __enter__(self) -> Any:
|
||||
//| """No-op used in Context Managers."""
|
||||
//| ...
|
||||
//|
|
||||
// Provided by context manager helper.
|
||||
|
||||
//| def __exit__(self, ) -> Any:
|
||||
//| def __exit__(self) -> Any:
|
||||
//| """Close the request."""
|
||||
//| ...
|
||||
//|
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
//| class Pin:
|
||||
//| """Identifies an IO pin on the microcontroller."""
|
||||
//|
|
||||
//| def __init__(self, ):
|
||||
//| def __init__(self):
|
||||
//| """Identifies an IO pin on the microcontroller. They are fixed by the
|
||||
//| hardware so they cannot be constructed on demand. Instead, use
|
||||
//| `board` or `microcontroller.pin` to reference the desired pin."""
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
//| print(microcontroller.cpu.temperature)"""
|
||||
//|
|
||||
|
||||
//| def __init__(self, ):
|
||||
//| def __init__(self):
|
||||
//| """You cannot create an instance of `microcontroller.Processor`.
|
||||
//| Use `microcontroller.cpu` to access the sole instance available."""
|
||||
//| ...
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
//| class RunMode:
|
||||
//| """run state of the microcontroller"""
|
||||
//|
|
||||
//| def __init__(self, ):
|
||||
//| def __init__(self):
|
||||
//| """Enum-like class to define the run mode of the microcontroller and
|
||||
//| CircuitPython."""
|
||||
//|
|
||||
|
|
|
@ -44,12 +44,12 @@
|
|||
//| microcontroller.nvm[0:3] = b\"\xcc\x10\x00\""""
|
||||
//|
|
||||
|
||||
//| def __init__(self, ):
|
||||
//| def __init__(self):
|
||||
//| """Not currently dynamically supported. Access the sole instance through `microcontroller.nvm`."""
|
||||
//| ...
|
||||
//|
|
||||
|
||||
//| def __len__(self, ) -> Any:
|
||||
//| def __len__(self) -> Any:
|
||||
//| """Return the length. This is used by (`len`)"""
|
||||
//| ...
|
||||
//|
|
||||
|
|
|
@ -87,7 +87,7 @@ STATIC mp_obj_t ps2io_ps2_make_new(const mp_obj_type_t *type, size_t n_args, con
|
|||
return MP_OBJ_FROM_PTR(self);
|
||||
}
|
||||
|
||||
//| def deinit(self, ) -> Any:
|
||||
//| def deinit(self) -> Any:
|
||||
//| """Deinitialises the Ps2 and releases any hardware resources for reuse."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -104,13 +104,13 @@ STATIC void check_for_deinit(ps2io_ps2_obj_t *self) {
|
|||
}
|
||||
}
|
||||
|
||||
//| def __enter__(self, ) -> Any:
|
||||
//| def __enter__(self) -> Any:
|
||||
//| """No-op used by Context Managers."""
|
||||
//| ...
|
||||
//|
|
||||
// Provided by context manager helper.
|
||||
|
||||
//| def __exit__(self, ) -> Any:
|
||||
//| def __exit__(self) -> Any:
|
||||
//| """Automatically deinitializes the hardware when exiting a context. See
|
||||
//| :ref:`lifetime-and-contextmanagers` for more info."""
|
||||
//| ...
|
||||
|
@ -122,7 +122,7 @@ STATIC mp_obj_t ps2io_ps2_obj___exit__(size_t n_args, const mp_obj_t *args) {
|
|||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(ps2io_ps2___exit___obj, 4, 4, ps2io_ps2_obj___exit__);
|
||||
|
||||
//| def popleft(self, ) -> Any:
|
||||
//| def popleft(self) -> Any:
|
||||
//| """Removes and returns the oldest received byte. When buffer
|
||||
//| is empty, raises an IndexError exception."""
|
||||
//| ...
|
||||
|
@ -164,7 +164,7 @@ STATIC mp_obj_t ps2io_ps2_obj_sendcmd(mp_obj_t self_in, mp_obj_t ob) {
|
|||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_2(ps2io_ps2_sendcmd_obj, ps2io_ps2_obj_sendcmd);
|
||||
|
||||
//| def clear_errors(self, ) -> Any:
|
||||
//| def clear_errors(self) -> Any:
|
||||
//| """Returns and clears a bitmap with latest recorded communication errors.
|
||||
//|
|
||||
//| Reception errors (arise asynchronously, as data is received):
|
||||
|
@ -202,7 +202,7 @@ STATIC mp_obj_t ps2io_ps2_obj_clear_errors(mp_obj_t self_in) {
|
|||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(ps2io_ps2_clear_errors_obj, ps2io_ps2_obj_clear_errors);
|
||||
|
||||
//| def __len__(self, ) -> Any:
|
||||
//| def __len__(self) -> Any:
|
||||
//| """Returns the number of received bytes in buffer, available
|
||||
//| to :py:func:`popleft()`."""
|
||||
//| ...
|
||||
|
|
|
@ -115,7 +115,7 @@ STATIC mp_obj_t pulseio_pwmout_make_new(const mp_obj_type_t *type, size_t n_args
|
|||
return MP_OBJ_FROM_PTR(self);
|
||||
}
|
||||
|
||||
//| def deinit(self, ) -> Any:
|
||||
//| def deinit(self) -> Any:
|
||||
//| """Deinitialises the PWMOut and releases any hardware resources for reuse."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -132,13 +132,13 @@ STATIC void check_for_deinit(pulseio_pwmout_obj_t *self) {
|
|||
}
|
||||
}
|
||||
|
||||
//| def __enter__(self, ) -> Any:
|
||||
//| def __enter__(self) -> Any:
|
||||
//| """No-op used by Context Managers."""
|
||||
//| ...
|
||||
//|
|
||||
// Provided by context manager helper.
|
||||
|
||||
//| def __exit__(self, ) -> Any:
|
||||
//| def __exit__(self) -> Any:
|
||||
//| """Automatically deinitializes the hardware when exiting a context. See
|
||||
//| :ref:`lifetime-and-contextmanagers` for more info."""
|
||||
//| ...
|
||||
|
|
|
@ -96,7 +96,7 @@ STATIC mp_obj_t pulseio_pulsein_make_new(const mp_obj_type_t *type, size_t n_arg
|
|||
return MP_OBJ_FROM_PTR(self);
|
||||
}
|
||||
|
||||
//| def deinit(self, ) -> Any:
|
||||
//| def deinit(self) -> Any:
|
||||
//| """Deinitialises the PulseIn and releases any hardware resources for reuse."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -113,13 +113,13 @@ STATIC void check_for_deinit(pulseio_pulsein_obj_t *self) {
|
|||
}
|
||||
}
|
||||
|
||||
//| def __enter__(self, ) -> Any:
|
||||
//| def __enter__(self) -> Any:
|
||||
//| """No-op used by Context Managers."""
|
||||
//| ...
|
||||
//|
|
||||
// Provided by context manager helper.
|
||||
|
||||
//| def __exit__(self, ) -> Any:
|
||||
//| def __exit__(self) -> Any:
|
||||
//| """Automatically deinitializes the hardware when exiting a context. See
|
||||
//| :ref:`lifetime-and-contextmanagers` for more info."""
|
||||
//| ...
|
||||
|
@ -131,7 +131,7 @@ STATIC mp_obj_t pulseio_pulsein_obj___exit__(size_t n_args, const mp_obj_t *args
|
|||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(pulseio_pulsein___exit___obj, 4, 4, pulseio_pulsein_obj___exit__);
|
||||
|
||||
//| def pause(self, ) -> Any:
|
||||
//| def pause(self) -> Any:
|
||||
//| """Pause pulse capture"""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -171,7 +171,7 @@ STATIC mp_obj_t pulseio_pulsein_obj_resume(size_t n_args, const mp_obj_t *pos_ar
|
|||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_KW(pulseio_pulsein_resume_obj, 1, pulseio_pulsein_obj_resume);
|
||||
|
||||
//| def clear(self, ) -> Any:
|
||||
//| def clear(self) -> Any:
|
||||
//| """Clears all captured pulses"""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -184,7 +184,7 @@ STATIC mp_obj_t pulseio_pulsein_obj_clear(mp_obj_t self_in) {
|
|||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(pulseio_pulsein_clear_obj, pulseio_pulsein_obj_clear);
|
||||
|
||||
//| def popleft(self, ) -> Any:
|
||||
//| def popleft(self) -> Any:
|
||||
//| """Removes and returns the oldest read pulse."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -234,7 +234,7 @@ const mp_obj_property_t pulseio_pulsein_paused_obj = {
|
|||
(mp_obj_t)&mp_const_none_obj},
|
||||
};
|
||||
|
||||
//| def __len__(self, ) -> Any:
|
||||
//| def __len__(self) -> Any:
|
||||
//| """Returns the current pulse length
|
||||
//|
|
||||
//| This allows you to::
|
||||
|
|
|
@ -81,7 +81,7 @@ STATIC mp_obj_t pulseio_pulseout_make_new(const mp_obj_type_t *type, size_t n_ar
|
|||
return MP_OBJ_FROM_PTR(self);
|
||||
}
|
||||
|
||||
//| def deinit(self, ) -> Any:
|
||||
//| def deinit(self) -> Any:
|
||||
//| """Deinitialises the PulseOut and releases any hardware resources for reuse."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -92,13 +92,13 @@ STATIC mp_obj_t pulseio_pulseout_deinit(mp_obj_t self_in) {
|
|||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_1(pulseio_pulseout_deinit_obj, pulseio_pulseout_deinit);
|
||||
|
||||
//| def __enter__(self, ) -> Any:
|
||||
//| def __enter__(self) -> Any:
|
||||
//| """No-op used by Context Managers."""
|
||||
//| ...
|
||||
//|
|
||||
// Provided by context manager helper.
|
||||
|
||||
//| def __exit__(self, ) -> Any:
|
||||
//| def __exit__(self) -> Any:
|
||||
//| """Automatically deinitializes the hardware when exiting a context. See
|
||||
//| :ref:`lifetime-and-contextmanagers` for more info."""
|
||||
//| ...
|
||||
|
|
|
@ -237,7 +237,7 @@ STATIC mp_obj_t rgbmatrix_rgbmatrix_make_new(const mp_obj_type_t *type, size_t n
|
|||
return MP_OBJ_FROM_PTR(self);
|
||||
}
|
||||
|
||||
//| def deinit(self, ) -> Any:
|
||||
//| def deinit(self) -> Any:
|
||||
//| """Free the resources (pins, timers, etc.) associated with this
|
||||
//| rgbmatrix instance. After deinitialization, no further operations
|
||||
//| may be performed."""
|
||||
|
|
|
@ -80,7 +80,7 @@ STATIC mp_obj_t rotaryio_incrementalencoder_make_new(const mp_obj_type_t *type,
|
|||
return MP_OBJ_FROM_PTR(self);
|
||||
}
|
||||
|
||||
//| def deinit(self, ) -> Any:
|
||||
//| def deinit(self) -> Any:
|
||||
//| """Deinitializes the IncrementalEncoder and releases any hardware resources for reuse."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -97,13 +97,13 @@ STATIC void check_for_deinit(rotaryio_incrementalencoder_obj_t *self) {
|
|||
}
|
||||
}
|
||||
|
||||
//| def __enter__(self, ) -> Any:
|
||||
//| def __enter__(self) -> Any:
|
||||
//| """No-op used by Context Managers."""
|
||||
//| ...
|
||||
//|
|
||||
// Provided by context manager helper.
|
||||
|
||||
//| def __exit__(self, ) -> Any:
|
||||
//| def __exit__(self) -> Any:
|
||||
//| """Automatically deinitializes the hardware when exiting a context. See
|
||||
//| :ref:`lifetime-and-contextmanagers` for more info."""
|
||||
//| ...
|
||||
|
|
|
@ -41,7 +41,7 @@ const rtc_rtc_obj_t rtc_rtc_obj = {{&rtc_rtc_type}};
|
|||
//| class RTC:
|
||||
//| """Real Time Clock"""
|
||||
//|
|
||||
//| def __init__(self, ):
|
||||
//| def __init__(self):
|
||||
//| """This class represents the onboard Real Time Clock. It is a singleton and will always return the same instance."""
|
||||
//| ...
|
||||
//|
|
||||
|
|
|
@ -255,13 +255,13 @@ STATIC mp_obj_t sdioio_sdcard_obj_deinit(mp_obj_t self_in) {
|
|||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(sdioio_sdcard_deinit_obj, sdioio_sdcard_obj_deinit);
|
||||
|
||||
//| def __enter__(self, ) -> Any:
|
||||
//| def __enter__(self) -> Any:
|
||||
//| """No-op used by Context Managers.
|
||||
//| Provided by context manager helper."""
|
||||
//| ...
|
||||
//|
|
||||
|
||||
//| def __exit__(self, ) -> Any:
|
||||
//| def __exit__(self) -> Any:
|
||||
//| """Automatically deinitializes the hardware when exiting a context. See
|
||||
//| :ref:`lifetime-and-contextmanagers` for more info."""
|
||||
//| ...
|
||||
|
|
|
@ -145,7 +145,7 @@ STATIC mp_obj_t socket_listen(mp_obj_t self_in, mp_obj_t backlog) {
|
|||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_2(socket_listen_obj, socket_listen);
|
||||
|
||||
//| def accept(self, ) -> Any:
|
||||
//| def accept(self) -> Any:
|
||||
//| """Accept a connection on a listening socket of type SOCK_STREAM,
|
||||
//| creating a new socket of type SOCK_STREAM.
|
||||
//| Returns a tuple of (new_socket, remote_address)"""
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
//| print("Hello World!")"""
|
||||
//|
|
||||
|
||||
//| def __init__(self, ):
|
||||
//| def __init__(self):
|
||||
//| """You cannot create an instance of `supervisor.Runtime`.
|
||||
//| Use `supervisor.runtime` to access the sole instance available."""
|
||||
//| ...
|
||||
|
|
|
@ -73,7 +73,7 @@ STATIC mp_obj_t touchio_touchin_make_new(const mp_obj_type_t *type,
|
|||
return (mp_obj_t) self;
|
||||
}
|
||||
|
||||
//| def deinit(self, ) -> Any:
|
||||
//| def deinit(self) -> Any:
|
||||
//| """Deinitialises the TouchIn and releases any hardware resources for reuse."""
|
||||
//| ...
|
||||
//|
|
||||
|
@ -90,13 +90,13 @@ STATIC void check_for_deinit(touchio_touchin_obj_t *self) {
|
|||
}
|
||||
}
|
||||
|
||||
//| def __enter__(self, ) -> Any:
|
||||
//| def __enter__(self) -> Any:
|
||||
//| """No-op used by Context Managers."""
|
||||
//| ...
|
||||
//|
|
||||
// Provided by context manager helper.
|
||||
|
||||
//| def __exit__(self, ) -> Any:
|
||||
//| def __exit__(self) -> Any:
|
||||
//| """Automatically deinitializes the hardware when exiting a context. See
|
||||
//| :ref:`lifetime-and-contextmanagers` for more info."""
|
||||
//| ...
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
//| mouse.send_report()"""
|
||||
//|
|
||||
|
||||
//| def __init__(self, ):
|
||||
//| def __init__(self):
|
||||
//| """Not currently dynamically supported."""
|
||||
//| ...
|
||||
//|
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
//| class PortOut:
|
||||
//| """Sends midi messages to a computer over USB"""
|
||||
//|
|
||||
//| def __init__(self, ):
|
||||
//| def __init__(self):
|
||||
//| """You cannot create an instance of `usb_midi.PortOut`.
|
||||
//|
|
||||
//| PortOut objects are constructed for every corresponding entry in the USB
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
//| class WatchDogMode:
|
||||
//| """run state of the watchdog timer"""
|
||||
//|
|
||||
//| def __init__(self, ):
|
||||
//| def __init__(self):
|
||||
//| """Enum-like class to define the run mode of the watchdog timer."""
|
||||
//|
|
||||
//| RAISE: Any = ...
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
//| """
|
||||
//|
|
||||
|
||||
//| def __init__(self, ):
|
||||
//| def __init__(self):
|
||||
//| """Not currently dynamically supported. Access the sole instance through `microcontroller.watchdog`."""
|
||||
//| ...
|
||||
//|
|
||||
|
|
Loading…
Reference in New Issue