Merge pull request #6337 from jepler/property-storage

Optimize flash storage of properties
This commit is contained in:
Dan Halbert 2022-05-06 09:55:18 -04:00 committed by GitHub
commit 5edc59f070
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
93 changed files with 671 additions and 1505 deletions

View File

@ -440,7 +440,7 @@ STATIC const mp_obj_property_t fat_vfs_label_obj = {
.base.type = &mp_type_property, .base.type = &mp_type_property,
.proxy = {(mp_obj_t)&fat_vfs_getlabel_obj, .proxy = {(mp_obj_t)&fat_vfs_getlabel_obj,
(mp_obj_t)&fat_vfs_setlabel_obj, (mp_obj_t)&fat_vfs_setlabel_obj,
(mp_obj_t)MP_ROM_NONE}, MP_ROM_NONE},
}; };
#endif #endif

View File

@ -53,12 +53,8 @@ STATIC mp_obj_t samd_clock_get_enabled(mp_obj_t self_in) {
MP_DEFINE_CONST_FUN_OBJ_1(samd_clock_get_enabled_obj, samd_clock_get_enabled); MP_DEFINE_CONST_FUN_OBJ_1(samd_clock_get_enabled_obj, samd_clock_get_enabled);
const mp_obj_property_t samd_clock_enabled_obj = { MP_PROPERTY_GETTER(samd_clock_enabled_obj,
.base.type = &mp_type_property, (mp_obj_t)&samd_clock_get_enabled_obj);
.proxy = {(mp_obj_t)&samd_clock_get_enabled_obj,
MP_ROM_NONE,
MP_ROM_NONE,},
};
//| parent: Union[Clock, None] //| parent: Union[Clock, None]
//| """Clock parent. (read-only)""" //| """Clock parent. (read-only)"""
@ -82,12 +78,8 @@ STATIC mp_obj_t samd_clock_get_parent(mp_obj_t self_in) {
MP_DEFINE_CONST_FUN_OBJ_1(samd_clock_get_parent_obj, samd_clock_get_parent); MP_DEFINE_CONST_FUN_OBJ_1(samd_clock_get_parent_obj, samd_clock_get_parent);
const mp_obj_property_t samd_clock_parent_obj = { MP_PROPERTY_GETTER(samd_clock_parent_obj,
.base.type = &mp_type_property, (mp_obj_t)&samd_clock_get_parent_obj);
.proxy = {(mp_obj_t)&samd_clock_get_parent_obj,
MP_ROM_NONE,
MP_ROM_NONE,},
};
//| frequency: int //| frequency: int
//| """Clock frequency in Herz. (read-only)""" //| """Clock frequency in Herz. (read-only)"""
@ -99,12 +91,8 @@ STATIC mp_obj_t samd_clock_get_frequency(mp_obj_t self_in) {
MP_DEFINE_CONST_FUN_OBJ_1(samd_clock_get_frequency_obj, samd_clock_get_frequency); MP_DEFINE_CONST_FUN_OBJ_1(samd_clock_get_frequency_obj, samd_clock_get_frequency);
const mp_obj_property_t samd_clock_frequency_obj = { MP_PROPERTY_GETTER(samd_clock_frequency_obj,
.base.type = &mp_type_property, (mp_obj_t)&samd_clock_get_frequency_obj);
.proxy = {(mp_obj_t)&samd_clock_get_frequency_obj,
MP_ROM_NONE,
MP_ROM_NONE,},
};
//| calibration: int //| calibration: int
//| """Clock calibration. Not all clocks can be calibrated.""" //| """Clock calibration. Not all clocks can be calibrated."""
@ -130,12 +118,9 @@ STATIC mp_obj_t samd_clock_set_calibration(mp_obj_t self_in, mp_obj_t calibratio
MP_DEFINE_CONST_FUN_OBJ_2(samd_clock_set_calibration_obj, samd_clock_set_calibration); MP_DEFINE_CONST_FUN_OBJ_2(samd_clock_set_calibration_obj, samd_clock_set_calibration);
const mp_obj_property_t samd_clock_calibration_obj = { MP_PROPERTY_GETSET(samd_clock_calibration_obj,
.base.type = &mp_type_property, (mp_obj_t)&samd_clock_get_calibration_obj,
.proxy = {(mp_obj_t)&samd_clock_get_calibration_obj, (mp_obj_t)&samd_clock_set_calibration_obj);
(mp_obj_t)&samd_clock_set_calibration_obj,
MP_ROM_NONE,},
};
STATIC const mp_rom_map_elem_t samd_clock_locals_dict_table[] = { STATIC const mp_rom_map_elem_t samd_clock_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_enabled), MP_ROM_PTR(&samd_clock_enabled_obj) }, { MP_ROM_QSTR(MP_QSTR_enabled), MP_ROM_PTR(&samd_clock_enabled_obj) },

View File

@ -28,6 +28,13 @@ SECTIONS
_sfixed = .; _sfixed = .;
KEEP(*(.vectors)) /* isr vector table */ KEEP(*(.vectors)) /* isr vector table */
__property_getter_start = .;
*(.property_getter)
__property_getter_end = .;
__property_getset_start = .;
*(.property_getset)
__property_getset_end = .;
/* Sort text sections so that they have fewer *fill* bytes needed. */ /* Sort text sections so that they have fewer *fill* bytes needed. */
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.text))) /* .text sections (code) */ *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.text))) /* .text sections (code) */
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.text*))) /* .text* sections (code) */ *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.text*))) /* .text* sections (code) */

View File

@ -8,6 +8,7 @@ INTERNAL_LIBM = 1
USB_NUM_ENDPOINT_PAIRS = 8 USB_NUM_ENDPOINT_PAIRS = 8
CIRCUITPY_ROTARYIO_SOFTENCODER = 1 CIRCUITPY_ROTARYIO_SOFTENCODER = 1
CIRCUITPY_OPTIMIZE_PROPERTY_FLASH_SIZE ?= 1
###################################################################### ######################################################################
# Put samd21-only choices here. # Put samd21-only choices here.

View File

@ -96,12 +96,8 @@ STATIC mp_obj_t videocore_framebuffer_get_width(mp_obj_t self_in) {
return MP_OBJ_NEW_SMALL_INT(common_hal_videocore_framebuffer_get_width(self)); return MP_OBJ_NEW_SMALL_INT(common_hal_videocore_framebuffer_get_width(self));
} }
MP_DEFINE_CONST_FUN_OBJ_1(videocore_framebuffer_get_width_obj, videocore_framebuffer_get_width); MP_DEFINE_CONST_FUN_OBJ_1(videocore_framebuffer_get_width_obj, videocore_framebuffer_get_width);
const mp_obj_property_t videocore_framebuffer_width_obj = { MP_PROPERTY_GETTER(videocore_framebuffer_width_obj,
.base.type = &mp_type_property, (mp_obj_t)&videocore_framebuffer_get_width_obj);
.proxy = {(mp_obj_t)&videocore_framebuffer_get_width_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| height: int //| height: int
//| """The height of the display, in pixels""" //| """The height of the display, in pixels"""
@ -113,12 +109,8 @@ STATIC mp_obj_t videocore_framebuffer_get_height(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(videocore_framebuffer_get_height_obj, videocore_framebuffer_get_height); MP_DEFINE_CONST_FUN_OBJ_1(videocore_framebuffer_get_height_obj, videocore_framebuffer_get_height);
const mp_obj_property_t videocore_framebuffer_height_obj = { MP_PROPERTY_GETTER(videocore_framebuffer_height_obj,
.base.type = &mp_type_property, (mp_obj_t)&videocore_framebuffer_get_height_obj);
.proxy = {(mp_obj_t)&videocore_framebuffer_get_height_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t videocore_framebuffer_locals_dict_table[] = { STATIC const mp_rom_map_elem_t videocore_framebuffer_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&videocore_framebuffer_deinit_obj) }, { MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&videocore_framebuffer_deinit_obj) },

View File

@ -729,12 +729,9 @@ STATIC mp_obj_t rp2pio_statemachine_obj_set_frequency(mp_obj_t self_in, mp_obj_t
} }
MP_DEFINE_CONST_FUN_OBJ_2(rp2pio_statemachine_set_frequency_obj, rp2pio_statemachine_obj_set_frequency); MP_DEFINE_CONST_FUN_OBJ_2(rp2pio_statemachine_set_frequency_obj, rp2pio_statemachine_obj_set_frequency);
const mp_obj_property_t rp2pio_statemachine_frequency_obj = { MP_PROPERTY_GETSET(rp2pio_statemachine_frequency_obj,
.base.type = &mp_type_property, (mp_obj_t)&rp2pio_statemachine_get_frequency_obj,
.proxy = {(mp_obj_t)&rp2pio_statemachine_get_frequency_obj, (mp_obj_t)&rp2pio_statemachine_set_frequency_obj);
(mp_obj_t)&rp2pio_statemachine_set_frequency_obj,
MP_ROM_NONE},
};
//| rxstall: bool //| rxstall: bool
//| """True when the state machine has stalled due to a full RX FIFO since the last //| """True when the state machine has stalled due to a full RX FIFO since the last
@ -748,12 +745,8 @@ STATIC mp_obj_t rp2pio_statemachine_obj_get_rxstall(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(rp2pio_statemachine_get_rxstall_obj, rp2pio_statemachine_obj_get_rxstall); MP_DEFINE_CONST_FUN_OBJ_1(rp2pio_statemachine_get_rxstall_obj, rp2pio_statemachine_obj_get_rxstall);
const mp_obj_property_t rp2pio_statemachine_rxstall_obj = { MP_PROPERTY_GETTER(rp2pio_statemachine_rxstall_obj,
.base.type = &mp_type_property, (mp_obj_t)&rp2pio_statemachine_get_rxstall_obj);
.proxy = {(mp_obj_t)&rp2pio_statemachine_get_rxstall_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| in_waiting: int //| in_waiting: int
//| """The number of words available to readinto""" //| """The number of words available to readinto"""
@ -766,12 +759,8 @@ STATIC mp_obj_t rp2pio_statemachine_obj_get_in_waiting(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(rp2pio_statemachine_get_in_waiting_obj, rp2pio_statemachine_obj_get_in_waiting); MP_DEFINE_CONST_FUN_OBJ_1(rp2pio_statemachine_get_in_waiting_obj, rp2pio_statemachine_obj_get_in_waiting);
const mp_obj_property_t rp2pio_statemachine_in_waiting_obj = { MP_PROPERTY_GETTER(rp2pio_statemachine_in_waiting_obj,
.base.type = &mp_type_property, (mp_obj_t)&rp2pio_statemachine_get_in_waiting_obj);
.proxy = {(mp_obj_t)&rp2pio_statemachine_get_in_waiting_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t rp2pio_statemachine_locals_dict_table[] = { STATIC const mp_rom_map_elem_t rp2pio_statemachine_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&rp2pio_statemachine_deinit_obj) }, { MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&rp2pio_statemachine_deinit_obj) },

View File

@ -68,6 +68,14 @@ SECTIONS
/* bit of a hack right now to exclude all floating point and time critical (e.g. memset, memcpy) code from /* bit of a hack right now to exclude all floating point and time critical (e.g. memset, memcpy) code from
* FLASH ... we will include any thing excluded here in .data below by default */ * FLASH ... we will include any thing excluded here in .data below by default */
*(.init) *(.init)
__property_getter_start = .;
*(.property_getter)
__property_getter_end = .;
__property_getset_start = .;
*(.property_getset)
__property_getset_end = .;
*(EXCLUDE_FILE(*libgcc.a: *libc.a:*lib_a-mem*.o *libm.a:) .text*) *(EXCLUDE_FILE(*libgcc.a: *libc.a:*lib_a-mem*.o *libm.a:) .text*)
*(.fini) *(.fini)
/* Pull all c'tors into .text */ /* Pull all c'tors into .text */

View File

@ -1,6 +1,7 @@
# All raspberrypi ports have longints. # All raspberrypi ports have longints.
LONGINT_IMPL = MPZ LONGINT_IMPL = MPZ
CIRCUITPY_OPTIMIZE_PROPERTY_FLASH_SIZE ?= 1
CIRCUITPY_ALARM ?= 1 CIRCUITPY_ALARM ?= 1
CIRCUITPY_RP2PIO ?= 1 CIRCUITPY_RP2PIO ?= 1

View File

@ -573,4 +573,6 @@ void supervisor_run_background_tasks_if_tick(void);
#define MICROPY_WRAP_MP_EXECUTE_BYTECODE PLACE_IN_ITCM #define MICROPY_WRAP_MP_EXECUTE_BYTECODE PLACE_IN_ITCM
#endif #endif
#define MICROPY_PY_OPTIMIZE_PROPERTY_FLASH_SIZE (CIRCUITPY_OPTIMIZE_PROPERTY_FLASH_SIZE)
#endif // __INCLUDED_MPCONFIG_CIRCUITPY_H #endif // __INCLUDED_MPCONFIG_CIRCUITPY_H

View File

@ -32,6 +32,11 @@
CIRCUITPY_FULL_BUILD ?= 1 CIRCUITPY_FULL_BUILD ?= 1
CFLAGS += -DCIRCUITPY_FULL_BUILD=$(CIRCUITPY_FULL_BUILD) CFLAGS += -DCIRCUITPY_FULL_BUILD=$(CIRCUITPY_FULL_BUILD)
# Reduce the size of in-flash properties. Requires support in the .ld linker
# file, so not enabled by default.
CIRCUITPY_OPTIMIZE_PROPERTY_FLASH_SIZE ?= 0
CFLAGS += -DCIRCUITPY_OPTIMIZE_PROPERTY_FLASH_SIZE=$(CIRCUITPY_OPTIMIZE_PROPERTY_FLASH_SIZE)
# async/await language keyword support # async/await language keyword support
MICROPY_PY_ASYNC_AWAIT ?= $(CIRCUITPY_FULL_BUILD) MICROPY_PY_ASYNC_AWAIT ?= $(CIRCUITPY_FULL_BUILD)
CFLAGS += -DMICROPY_PY_ASYNC_AWAIT=$(MICROPY_PY_ASYNC_AWAIT) CFLAGS += -DMICROPY_PY_ASYNC_AWAIT=$(MICROPY_PY_ASYNC_AWAIT)

View File

@ -1078,6 +1078,11 @@ typedef double mp_float_t;
#define MICROPY_PY_BUILTINS_PROPERTY (MICROPY_CONFIG_ROM_LEVEL_AT_LEAST_CORE_FEATURES) #define MICROPY_PY_BUILTINS_PROPERTY (MICROPY_CONFIG_ROM_LEVEL_AT_LEAST_CORE_FEATURES)
#endif #endif
// Whether to optimize property flash storage size (requires linker script support)
#ifndef MICROPY_PY_BUILTINS_PROPERTY
#define MICROPY_PY_BUILTINS_PROPERTY (0)
#endif
// Whether to implement the start/stop/step attributes (readback) on // Whether to implement the start/stop/step attributes (readback) on
// the "range" builtin type. Rarely used, and costs ~60 bytes (x86). // the "range" builtin type. Rarely used, and costs ~60 bytes (x86).
#ifndef MICROPY_PY_BUILTINS_RANGE_ATTRS #ifndef MICROPY_PY_BUILTINS_RANGE_ATTRS

View File

@ -356,11 +356,7 @@ typedef struct _mp_rom_obj_t { mp_const_obj_t o; } mp_rom_obj_t;
#define MP_DEFINE_CONST_PROP_GET(obj_name, fun_name) \ #define MP_DEFINE_CONST_PROP_GET(obj_name, fun_name) \
const mp_obj_fun_builtin_fixed_t fun_name##_obj = {{&mp_type_fun_builtin_1}, .fun._1 = fun_name}; \ const mp_obj_fun_builtin_fixed_t fun_name##_obj = {{&mp_type_fun_builtin_1}, .fun._1 = fun_name}; \
const mp_obj_property_t obj_name = { \ MP_PROPERTY_GETTER(obj_name, (mp_obj_t)&fun_name##_obj);
.base.type = &mp_type_property, \
.proxy = {(mp_obj_t)&fun_name##_obj, \
MP_ROM_NONE, \
MP_ROM_NONE}, }
// These macros are used to define constant or mutable map/dict objects // These macros are used to define constant or mutable map/dict objects
// You can put "static" in front of the definition to make it local // You can put "static" in front of the definition to make it local
@ -1111,7 +1107,7 @@ typedef struct _mp_rom_obj_static_class_method_t {
} mp_rom_obj_static_class_method_t; } mp_rom_obj_static_class_method_t;
// property // property
const mp_obj_t *mp_obj_property_get(mp_obj_t self_in); const mp_obj_t *mp_obj_property_get(mp_obj_t self_in, size_t *n_proxy);
// sequence helpers // sequence helpers

View File

@ -95,9 +95,24 @@ const mp_obj_type_t mp_type_property = {
.locals_dict = (mp_obj_dict_t *)&property_locals_dict, .locals_dict = (mp_obj_dict_t *)&property_locals_dict,
}; };
const mp_obj_t *mp_obj_property_get(mp_obj_t self_in) { #if MICROPY_PY_OPTIMIZE_PROPERTY_FLASH_SIZE
extern const mp_obj_property_t __property_getter_start, __property_getter_end, __property_getset_start, __property_getset_end;
#endif
const mp_obj_t *mp_obj_property_get(mp_obj_t self_in, size_t *n_proxy) {
mp_check_self(mp_obj_is_type(self_in, &mp_type_property)); mp_check_self(mp_obj_is_type(self_in, &mp_type_property));
mp_obj_property_t *self = MP_OBJ_TO_PTR(self_in); mp_obj_property_t *self = MP_OBJ_TO_PTR(self_in);
#if MICROPY_PY_OPTIMIZE_PROPERTY_FLASH_SIZE
if (self >= &__property_getter_start && self < &__property_getter_end) {
*n_proxy = 1;
} else if (self >= &__property_getset_start && self < &__property_getset_end) {
*n_proxy = 2;
} else {
*n_proxy = 3;
}
#else
*n_proxy = 3;
#endif
return self->proxy; return self->proxy;
} }

View File

@ -35,6 +35,28 @@ typedef struct _mp_obj_property_t {
mp_obj_t proxy[3]; // getter, setter, deleter mp_obj_t proxy[3]; // getter, setter, deleter
} mp_obj_property_t; } mp_obj_property_t;
#if MICROPY_PY_OPTIMIZE_PROPERTY_FLASH_SIZE
typedef struct _mp_obj_property_getter_t {
mp_obj_base_t base;
mp_obj_t proxy[1]; // getter
} mp_obj_property_getter_t;
typedef struct _mp_obj_property_getset_t {
mp_obj_base_t base;
mp_obj_t proxy[2]; // getter, setter
} mp_obj_property_getset_t;
#define MP_PROPERTY_GETTER(P, G) const mp_obj_property_getter_t P __attribute((section(".property_getter"))) = {.base.type = &mp_type_property, .proxy = {G}}
#define MP_PROPERTY_GETSET(P, G, S) const mp_obj_property_getset_t P __attribute((section(".property_getset"))) = {.base.type = &mp_type_property, .proxy = {G, S}}
#else
typedef struct _mp_obj_property_t mp_obj_property_getter_t;
typedef struct _mp_obj_property_t mp_obj_property_getset_t;
#define MP_PROPERTY_GETTER(P, G) const mp_obj_property_t P = {.base.type = &mp_type_property, .proxy = {G, MP_ROM_NONE, MP_ROM_NONE}}
#define MP_PROPERTY_GETSET(P, G, S) const mp_obj_property_t P = {.base.type = &mp_type_property, .proxy = {G, S, MP_ROM_NONE}}
#endif
#endif // MICROPY_PY_BUILTINS_PROPERTY #endif // MICROPY_PY_BUILTINS_PROPERTY
#endif // MICROPY_INCLUDED_PY_OBJPROPERTY_H #endif // MICROPY_INCLUDED_PY_OBJPROPERTY_H

View File

@ -660,7 +660,8 @@ STATIC void mp_obj_instance_load_attr(mp_obj_t self_in, qstr attr, mp_obj_t *des
// be called by the descriptor code down below. But that way // be called by the descriptor code down below. But that way
// requires overhead for the nested mp_call's and overhead for // requires overhead for the nested mp_call's and overhead for
// the code. // the code.
const mp_obj_t *proxy = mp_obj_property_get(member); size_t n_proxy;
const mp_obj_t *proxy = mp_obj_property_get(member, &n_proxy);
if (proxy[0] == mp_const_none) { if (proxy[0] == mp_const_none) {
mp_raise_AttributeError(MP_ERROR_TEXT("unreadable attribute")); mp_raise_AttributeError(MP_ERROR_TEXT("unreadable attribute"));
} else { } else {
@ -740,11 +741,12 @@ STATIC bool mp_obj_instance_store_attr(mp_obj_t self_in, qstr attr, mp_obj_t val
// would be called by the descriptor code down below. But that way // would be called by the descriptor code down below. But that way
// requires overhead for the nested mp_call's and overhead for // requires overhead for the nested mp_call's and overhead for
// the code. // the code.
const mp_obj_t *proxy = mp_obj_property_get(member[0]); size_t n_proxy;
const mp_obj_t *proxy = mp_obj_property_get(member[0], &n_proxy);
mp_obj_t dest[2] = {self_in, value}; mp_obj_t dest[2] = {self_in, value};
if (value == MP_OBJ_NULL) { if (value == MP_OBJ_NULL) {
// delete attribute // delete attribute
if (proxy[2] == mp_const_none) { if (n_proxy < 3 || proxy[2] == mp_const_none) {
// TODO better error message? // TODO better error message?
return false; return false;
} else { } else {
@ -753,7 +755,7 @@ STATIC bool mp_obj_instance_store_attr(mp_obj_t self_in, qstr attr, mp_obj_t val
} }
} else { } else {
// store attribute // store attribute
if (proxy[1] == mp_const_none) { if (n_proxy < 2 || proxy[1] == mp_const_none) {
// TODO better error message? // TODO better error message?
return false; return false;
} else { } else {
@ -1374,7 +1376,8 @@ STATIC void super_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) {
// here... // here...
#if MICROPY_PY_BUILTINS_PROPERTY #if MICROPY_PY_BUILTINS_PROPERTY
if (mp_obj_is_type(member, &mp_type_property)) { if (mp_obj_is_type(member, &mp_type_property)) {
const mp_obj_t *proxy = mp_obj_property_get(member); size_t n_proxy;
const mp_obj_t *proxy = mp_obj_property_get(member, &n_proxy);
if (proxy[0] == mp_const_none) { if (proxy[0] == mp_const_none) {
mp_raise_AttributeError(MP_ERROR_TEXT("unreadable attribute")); mp_raise_AttributeError(MP_ERROR_TEXT("unreadable attribute"));
} else { } else {

View File

@ -1087,7 +1087,8 @@ void mp_convert_member_lookup(mp_obj_t self, const mp_obj_type_t *type, mp_obj_t
// be called by the descriptor code down below. But that way // be called by the descriptor code down below. But that way
// requires overhead for the nested mp_call's and overhead for // requires overhead for the nested mp_call's and overhead for
// the code. // the code.
const mp_obj_t *proxy = mp_obj_property_get(member); size_t n_proxy;
const mp_obj_t *proxy = mp_obj_property_get(member, &n_proxy);
if (proxy[0] == mp_const_none) { if (proxy[0] == mp_const_none) {
mp_raise_AttributeError(MP_ERROR_TEXT("unreadable attribute")); mp_raise_AttributeError(MP_ERROR_TEXT("unreadable attribute"));
} else { } else {
@ -1226,15 +1227,16 @@ void mp_store_attr(mp_obj_t base, qstr attr, mp_obj_t value) {
// would be called by the descriptor code down below. But that way // would be called by the descriptor code down below. But that way
// requires overhead for the nested mp_call's and overhead for // requires overhead for the nested mp_call's and overhead for
// the code. // the code.
const mp_obj_t *proxy = mp_obj_property_get(elem->value); size_t n_proxy;
const mp_obj_t *proxy = mp_obj_property_get(elem->value, &n_proxy);
mp_obj_t dest[2] = {base, value}; mp_obj_t dest[2] = {base, value};
if (value == MP_OBJ_NULL) { if (value == MP_OBJ_NULL) {
// delete attribute // delete attribute
if (proxy[2] != mp_const_none) { if (n_proxy == 3 && proxy[2] != mp_const_none) {
mp_call_function_n_kw(proxy[2], 1, 0, dest); mp_call_function_n_kw(proxy[2], 1, 0, dest);
return; return;
} }
} else if (proxy[1] != mp_const_none) { } else if (n_proxy > 1 && proxy[1] != mp_const_none) {
mp_call_function_n_kw(proxy[1], 2, 0, dest); mp_call_function_n_kw(proxy[1], 2, 0, dest);
return; return;
} }

View File

@ -128,12 +128,9 @@ static mp_obj_t bleio_adapter_set_enabled(mp_obj_t self, mp_obj_t value) {
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_2(bleio_adapter_set_enabled_obj, bleio_adapter_set_enabled); STATIC MP_DEFINE_CONST_FUN_OBJ_2(bleio_adapter_set_enabled_obj, bleio_adapter_set_enabled);
const mp_obj_property_t bleio_adapter_enabled_obj = { MP_PROPERTY_GETSET(bleio_adapter_enabled_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_adapter_get_enabled_obj,
.proxy = { (mp_obj_t)&bleio_adapter_get_enabled_obj, (mp_obj_t)&bleio_adapter_set_enabled_obj);
(mp_obj_t)&bleio_adapter_set_enabled_obj,
MP_ROM_NONE },
};
//| address: Address //| address: Address
//| """MAC address of the BLE adapter.""" //| """MAC address of the BLE adapter."""
@ -152,12 +149,9 @@ STATIC mp_obj_t bleio_adapter_set_address(mp_obj_t self, mp_obj_t new_address) {
} }
MP_DEFINE_CONST_FUN_OBJ_2(bleio_adapter_set_address_obj, bleio_adapter_set_address); MP_DEFINE_CONST_FUN_OBJ_2(bleio_adapter_set_address_obj, bleio_adapter_set_address);
const mp_obj_property_t bleio_adapter_address_obj = { MP_PROPERTY_GETSET(bleio_adapter_address_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_adapter_get_address_obj,
.proxy = { (mp_obj_t)&bleio_adapter_get_address_obj, (mp_obj_t)&bleio_adapter_set_address_obj);
(mp_obj_t)&bleio_adapter_set_address_obj,
MP_ROM_NONE },
};
//| name: str //| name: str
//| """name of the BLE adapter used once connected. //| """name of the BLE adapter used once connected.
@ -176,12 +170,9 @@ STATIC mp_obj_t bleio_adapter_set_name(mp_obj_t self, mp_obj_t new_name) {
} }
MP_DEFINE_CONST_FUN_OBJ_2(bleio_adapter_set_name_obj, bleio_adapter_set_name); MP_DEFINE_CONST_FUN_OBJ_2(bleio_adapter_set_name_obj, bleio_adapter_set_name);
const mp_obj_property_t bleio_adapter_name_obj = { MP_PROPERTY_GETSET(bleio_adapter_name_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_adapter_get_name_obj,
.proxy = { (mp_obj_t)&bleio_adapter_get_name_obj, (mp_obj_t)&bleio_adapter_set_name_obj);
(mp_obj_t)&bleio_adapter_set_name_obj,
MP_ROM_NONE },
};
//| def start_advertising(self, data: ReadableBuffer, *, //| def start_advertising(self, data: ReadableBuffer, *,
//| scan_response: Optional[ReadableBuffer] = None, connectable: bool = True, //| scan_response: Optional[ReadableBuffer] = None, connectable: bool = True,
@ -380,12 +371,8 @@ STATIC mp_obj_t bleio_adapter_get_advertising(mp_obj_t self) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(bleio_adapter_get_advertising_obj, bleio_adapter_get_advertising); MP_DEFINE_CONST_FUN_OBJ_1(bleio_adapter_get_advertising_obj, bleio_adapter_get_advertising);
const mp_obj_property_t bleio_adapter_advertising_obj = { MP_PROPERTY_GETTER(bleio_adapter_advertising_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_adapter_get_advertising_obj);
.proxy = { (mp_obj_t)&bleio_adapter_get_advertising_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| connected: bool //| connected: bool
//| """True when the adapter is connected to another device regardless of who initiated the //| """True when the adapter is connected to another device regardless of who initiated the
@ -397,12 +384,8 @@ STATIC mp_obj_t bleio_adapter_get_connected(mp_obj_t self) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(bleio_adapter_get_connected_obj, bleio_adapter_get_connected); MP_DEFINE_CONST_FUN_OBJ_1(bleio_adapter_get_connected_obj, bleio_adapter_get_connected);
const mp_obj_property_t bleio_adapter_connected_obj = { MP_PROPERTY_GETTER(bleio_adapter_connected_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_adapter_get_connected_obj);
.proxy = { (mp_obj_t)&bleio_adapter_get_connected_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| connections: Tuple[Connection] //| connections: Tuple[Connection]
//| """Tuple of active connections including those initiated through //| """Tuple of active connections including those initiated through
@ -413,12 +396,8 @@ STATIC mp_obj_t bleio_adapter_get_connections(mp_obj_t self) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(bleio_adapter_get_connections_obj, bleio_adapter_get_connections); MP_DEFINE_CONST_FUN_OBJ_1(bleio_adapter_get_connections_obj, bleio_adapter_get_connections);
const mp_obj_property_t bleio_adapter_connections_obj = { MP_PROPERTY_GETTER(bleio_adapter_connections_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_adapter_get_connections_obj);
.proxy = { (mp_obj_t)&bleio_adapter_get_connections_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| def connect(self, address: Address, *, timeout: float) -> Connection: //| def connect(self, address: Address, *, timeout: float) -> Connection:
//| """Attempts a connection to the device with the given address. //| """Attempts a connection to the device with the given address.

View File

@ -101,12 +101,8 @@ STATIC mp_obj_t bleio_address_get_address_bytes(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(bleio_address_get_address_bytes_obj, bleio_address_get_address_bytes); MP_DEFINE_CONST_FUN_OBJ_1(bleio_address_get_address_bytes_obj, bleio_address_get_address_bytes);
const mp_obj_property_t bleio_address_address_bytes_obj = { MP_PROPERTY_GETTER(bleio_address_address_bytes_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_address_get_address_bytes_obj);
.proxy = {(mp_obj_t)&bleio_address_get_address_bytes_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| type: int //| type: int
//| """The address type (read-only). //| """The address type (read-only).
@ -121,12 +117,8 @@ STATIC mp_obj_t bleio_address_get_type(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(bleio_address_get_type_obj, bleio_address_get_type); MP_DEFINE_CONST_FUN_OBJ_1(bleio_address_get_type_obj, bleio_address_get_type);
const mp_obj_property_t bleio_address_type_obj = { MP_PROPERTY_GETTER(bleio_address_type_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_address_get_type_obj);
.proxy = {(mp_obj_t)&bleio_address_get_type_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| def __eq__(self, other: object) -> bool: //| def __eq__(self, other: object) -> bool:
//| """Two Address objects are equal if their addresses and address types are equal.""" //| """Two Address objects are equal if their addresses and address types are equal."""

View File

@ -167,12 +167,8 @@ STATIC mp_obj_t bleio_characteristic_get_properties(mp_obj_t self_in) {
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_characteristic_get_properties_obj, bleio_characteristic_get_properties); STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_characteristic_get_properties_obj, bleio_characteristic_get_properties);
const mp_obj_property_t bleio_characteristic_properties_obj = { MP_PROPERTY_GETTER(bleio_characteristic_properties_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_characteristic_get_properties_obj);
.proxy = { (mp_obj_t)&bleio_characteristic_get_properties_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| uuid: Optional[UUID] //| uuid: Optional[UUID]
//| """The UUID of this characteristic. (read-only) //| """The UUID of this characteristic. (read-only)
@ -187,12 +183,8 @@ STATIC mp_obj_t bleio_characteristic_get_uuid(mp_obj_t self_in) {
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_characteristic_get_uuid_obj, bleio_characteristic_get_uuid); STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_characteristic_get_uuid_obj, bleio_characteristic_get_uuid);
const mp_obj_property_t bleio_characteristic_uuid_obj = { MP_PROPERTY_GETTER(bleio_characteristic_uuid_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_characteristic_get_uuid_obj);
.proxy = { (mp_obj_t)&bleio_characteristic_get_uuid_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| value: bytearray //| value: bytearray
//| """The value of this characteristic.""" //| """The value of this characteristic."""
@ -218,12 +210,9 @@ STATIC mp_obj_t bleio_characteristic_set_value(mp_obj_t self_in, mp_obj_t value_
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_2(bleio_characteristic_set_value_obj, bleio_characteristic_set_value); STATIC MP_DEFINE_CONST_FUN_OBJ_2(bleio_characteristic_set_value_obj, bleio_characteristic_set_value);
const mp_obj_property_t bleio_characteristic_value_obj = { MP_PROPERTY_GETSET(bleio_characteristic_value_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_characteristic_get_value_obj,
.proxy = { (mp_obj_t)&bleio_characteristic_get_value_obj, (mp_obj_t)&bleio_characteristic_set_value_obj);
(mp_obj_t)&bleio_characteristic_set_value_obj,
MP_ROM_NONE },
};
//| max_length: int //| max_length: int
//| """The max length of this characteristic.""" //| """The max length of this characteristic."""
@ -235,12 +224,8 @@ STATIC mp_obj_t bleio_characteristic_get_max_length(mp_obj_t self_in) {
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_characteristic_get_max_length_obj, bleio_characteristic_get_max_length); STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_characteristic_get_max_length_obj, bleio_characteristic_get_max_length);
const mp_obj_property_t bleio_characteristic_max_length_obj = { MP_PROPERTY_GETTER(bleio_characteristic_max_length_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_characteristic_get_max_length_obj);
.proxy = { (mp_obj_t)&bleio_characteristic_get_max_length_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| descriptors: Descriptor //| descriptors: Descriptor
//| """A tuple of :py:class:`Descriptor` objects related to this characteristic. (read-only)""" //| """A tuple of :py:class:`Descriptor` objects related to this characteristic. (read-only)"""
@ -253,12 +238,8 @@ STATIC mp_obj_t bleio_characteristic_get_descriptors(mp_obj_t self_in) {
STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_characteristic_get_descriptors_obj, bleio_characteristic_get_descriptors); STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_characteristic_get_descriptors_obj, bleio_characteristic_get_descriptors);
const mp_obj_property_t bleio_characteristic_descriptors_obj = { MP_PROPERTY_GETTER(bleio_characteristic_descriptors_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_characteristic_get_descriptors_obj);
.proxy = { (mp_obj_t)&bleio_characteristic_get_descriptors_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| service: Service //| service: Service
//| """The Service this Characteristic is a part of.""" //| """The Service this Characteristic is a part of."""
@ -270,12 +251,8 @@ STATIC mp_obj_t bleio_characteristic_get_service(mp_obj_t self_in) {
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_characteristic_get_service_obj, bleio_characteristic_get_service); STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_characteristic_get_service_obj, bleio_characteristic_get_service);
const mp_obj_property_t bleio_characteristic_service_obj = { MP_PROPERTY_GETTER(bleio_characteristic_service_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_characteristic_get_service_obj);
.proxy = { (mp_obj_t)&bleio_characteristic_get_service_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| def set_cccd(self, *, notify: bool = False, indicate: bool = False) -> None: //| def set_cccd(self, *, notify: bool = False, indicate: bool = False) -> None:
//| """Set the remote characteristic's CCCD to enable or disable notification and indication. //| """Set the remote characteristic's CCCD to enable or disable notification and indication.

View File

@ -173,12 +173,8 @@ STATIC mp_obj_t bleio_characteristic_buffer_obj_get_in_waiting(mp_obj_t self_in)
} }
MP_DEFINE_CONST_FUN_OBJ_1(bleio_characteristic_buffer_get_in_waiting_obj, bleio_characteristic_buffer_obj_get_in_waiting); MP_DEFINE_CONST_FUN_OBJ_1(bleio_characteristic_buffer_get_in_waiting_obj, bleio_characteristic_buffer_obj_get_in_waiting);
const mp_obj_property_t bleio_characteristic_buffer_in_waiting_obj = { MP_PROPERTY_GETTER(bleio_characteristic_buffer_in_waiting_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_characteristic_buffer_get_in_waiting_obj);
.proxy = {(mp_obj_t)&bleio_characteristic_buffer_get_in_waiting_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| def reset_input_buffer(self) -> None: //| def reset_input_buffer(self) -> None:
//| """Discard any unread characters in the input buffer.""" //| """Discard any unread characters in the input buffer."""

View File

@ -161,12 +161,8 @@ STATIC mp_obj_t bleio_connection_get_connected(mp_obj_t self_in) {
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_connection_get_connected_obj, bleio_connection_get_connected); STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_connection_get_connected_obj, bleio_connection_get_connected);
const mp_obj_property_t bleio_connection_connected_obj = { MP_PROPERTY_GETTER(bleio_connection_connected_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_connection_get_connected_obj);
.proxy = { (mp_obj_t)&bleio_connection_get_connected_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| paired: bool //| paired: bool
@ -179,12 +175,8 @@ STATIC mp_obj_t bleio_connection_get_paired(mp_obj_t self_in) {
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_connection_get_paired_obj, bleio_connection_get_paired); STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_connection_get_paired_obj, bleio_connection_get_paired);
const mp_obj_property_t bleio_connection_paired_obj = { MP_PROPERTY_GETTER(bleio_connection_paired_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_connection_get_paired_obj);
.proxy = { (mp_obj_t)&bleio_connection_get_paired_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| connection_interval: float //| connection_interval: float
@ -235,19 +227,12 @@ STATIC mp_obj_t bleio_connection_set_connection_interval(mp_obj_t self_in, mp_ob
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_2(bleio_connection_set_connection_interval_obj, bleio_connection_set_connection_interval); STATIC MP_DEFINE_CONST_FUN_OBJ_2(bleio_connection_set_connection_interval_obj, bleio_connection_set_connection_interval);
const mp_obj_property_t bleio_connection_connection_interval_obj = { MP_PROPERTY_GETSET(bleio_connection_connection_interval_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_connection_get_connection_interval_obj,
.proxy = { (mp_obj_t)&bleio_connection_get_connection_interval_obj, (mp_obj_t)&bleio_connection_set_connection_interval_obj);
(mp_obj_t)&bleio_connection_set_connection_interval_obj,
MP_ROM_NONE },
};
const mp_obj_property_t bleio_connection_max_packet_length_obj = { MP_PROPERTY_GETTER(bleio_connection_max_packet_length_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_connection_get_max_packet_length_obj);
.proxy = { (mp_obj_t)&bleio_connection_get_max_packet_length_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
STATIC const mp_rom_map_elem_t bleio_connection_locals_dict_table[] = { STATIC const mp_rom_map_elem_t bleio_connection_locals_dict_table[] = {
// Methods // Methods

View File

@ -144,12 +144,8 @@ STATIC mp_obj_t bleio_descriptor_get_uuid(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(bleio_descriptor_get_uuid_obj, bleio_descriptor_get_uuid); MP_DEFINE_CONST_FUN_OBJ_1(bleio_descriptor_get_uuid_obj, bleio_descriptor_get_uuid);
const mp_obj_property_t bleio_descriptor_uuid_obj = { MP_PROPERTY_GETTER(bleio_descriptor_uuid_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_descriptor_get_uuid_obj);
.proxy = {(mp_obj_t)&bleio_descriptor_get_uuid_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| characteristic: Characteristic //| characteristic: Characteristic
//| """The Characteristic this Descriptor is a part of.""" //| """The Characteristic this Descriptor is a part of."""
@ -161,12 +157,8 @@ STATIC mp_obj_t bleio_descriptor_get_characteristic(mp_obj_t self_in) {
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_descriptor_get_characteristic_obj, bleio_descriptor_get_characteristic); STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_descriptor_get_characteristic_obj, bleio_descriptor_get_characteristic);
const mp_obj_property_t bleio_descriptor_characteristic_obj = { MP_PROPERTY_GETTER(bleio_descriptor_characteristic_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_descriptor_get_characteristic_obj);
.proxy = { (mp_obj_t)&bleio_descriptor_get_characteristic_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| value: bytearray //| value: bytearray
//| """The value of this descriptor.""" //| """The value of this descriptor."""
@ -192,12 +184,9 @@ STATIC mp_obj_t bleio_descriptor_set_value(mp_obj_t self_in, mp_obj_t value_in)
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_2(bleio_descriptor_set_value_obj, bleio_descriptor_set_value); STATIC MP_DEFINE_CONST_FUN_OBJ_2(bleio_descriptor_set_value_obj, bleio_descriptor_set_value);
const mp_obj_property_t bleio_descriptor_value_obj = { MP_PROPERTY_GETSET(bleio_descriptor_value_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_descriptor_get_value_obj,
.proxy = { (mp_obj_t)&bleio_descriptor_get_value_obj, (mp_obj_t)&bleio_descriptor_set_value_obj);
(mp_obj_t)&bleio_descriptor_set_value_obj,
MP_ROM_NONE },
};
STATIC const mp_rom_map_elem_t bleio_descriptor_locals_dict_table[] = { STATIC const mp_rom_map_elem_t bleio_descriptor_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_add_to_characteristic), MP_ROM_PTR(&bleio_descriptor_add_to_characteristic_obj) }, { MP_ROM_QSTR(MP_QSTR_add_to_characteristic), MP_ROM_PTR(&bleio_descriptor_add_to_characteristic_obj) },

View File

@ -197,12 +197,8 @@ STATIC mp_obj_t bleio_packet_buffer_get_incoming_packet_length(mp_obj_t self_in)
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_packet_buffer_get_incoming_packet_length_obj, bleio_packet_buffer_get_incoming_packet_length); STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_packet_buffer_get_incoming_packet_length_obj, bleio_packet_buffer_get_incoming_packet_length);
const mp_obj_property_t bleio_packet_buffer_incoming_packet_length_obj = { MP_PROPERTY_GETTER(bleio_packet_buffer_incoming_packet_length_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_packet_buffer_get_incoming_packet_length_obj);
.proxy = { (mp_obj_t)&bleio_packet_buffer_get_incoming_packet_length_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| outgoing_packet_length: int //| outgoing_packet_length: int
//| """Maximum length in bytes of a packet we are writing.""" //| """Maximum length in bytes of a packet we are writing."""
@ -218,12 +214,8 @@ STATIC mp_obj_t bleio_packet_buffer_get_outgoing_packet_length(mp_obj_t self_in)
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_packet_buffer_get_outgoing_packet_length_obj, bleio_packet_buffer_get_outgoing_packet_length); STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_packet_buffer_get_outgoing_packet_length_obj, bleio_packet_buffer_get_outgoing_packet_length);
const mp_obj_property_t bleio_packet_buffer_outgoing_packet_length_obj = { MP_PROPERTY_GETTER(bleio_packet_buffer_outgoing_packet_length_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_packet_buffer_get_outgoing_packet_length_obj);
.proxy = { (mp_obj_t)&bleio_packet_buffer_get_outgoing_packet_length_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
STATIC const mp_rom_map_elem_t bleio_packet_buffer_locals_dict_table[] = { STATIC const mp_rom_map_elem_t bleio_packet_buffer_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&bleio_packet_buffer_deinit_obj) }, { MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&bleio_packet_buffer_deinit_obj) },

View File

@ -83,12 +83,8 @@ STATIC mp_obj_t bleio_scanentry_get_address(mp_obj_t self_in) {
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_scanentry_get_address_obj, bleio_scanentry_get_address); STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_scanentry_get_address_obj, bleio_scanentry_get_address);
const mp_obj_property_t bleio_scanentry_address_obj = { MP_PROPERTY_GETTER(bleio_scanentry_address_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_scanentry_get_address_obj);
.proxy = { (mp_obj_t)&bleio_scanentry_get_address_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| advertisement_bytes: bytes //| advertisement_bytes: bytes
//| """All the advertisement data present in the packet, returned as a ``bytes`` object. (read-only)""" //| """All the advertisement data present in the packet, returned as a ``bytes`` object. (read-only)"""
@ -99,12 +95,8 @@ STATIC mp_obj_t scanentry_get_advertisement_bytes(mp_obj_t self_in) {
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_scanentry_get_advertisement_bytes_obj, scanentry_get_advertisement_bytes); STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_scanentry_get_advertisement_bytes_obj, scanentry_get_advertisement_bytes);
const mp_obj_property_t bleio_scanentry_advertisement_bytes_obj = { MP_PROPERTY_GETTER(bleio_scanentry_advertisement_bytes_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_scanentry_get_advertisement_bytes_obj);
.proxy = { (mp_obj_t)&bleio_scanentry_get_advertisement_bytes_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| rssi: int //| rssi: int
//| """The signal strength of the device at the time of the scan, in integer dBm. (read-only)""" //| """The signal strength of the device at the time of the scan, in integer dBm. (read-only)"""
@ -115,12 +107,8 @@ STATIC mp_obj_t scanentry_get_rssi(mp_obj_t self_in) {
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_scanentry_get_rssi_obj, scanentry_get_rssi); STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_scanentry_get_rssi_obj, scanentry_get_rssi);
const mp_obj_property_t bleio_scanentry_rssi_obj = { MP_PROPERTY_GETTER(bleio_scanentry_rssi_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_scanentry_get_rssi_obj);
.proxy = { (mp_obj_t)&bleio_scanentry_get_rssi_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| connectable: bool //| connectable: bool
//| """True if the device can be connected to. (read-only)""" //| """True if the device can be connected to. (read-only)"""
@ -131,12 +119,8 @@ STATIC mp_obj_t scanentry_get_connectable(mp_obj_t self_in) {
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_scanentry_get_connectable_obj, scanentry_get_connectable); STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_scanentry_get_connectable_obj, scanentry_get_connectable);
const mp_obj_property_t bleio_scanentry_connectable_obj = { MP_PROPERTY_GETTER(bleio_scanentry_connectable_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_scanentry_get_connectable_obj);
.proxy = { (mp_obj_t)&bleio_scanentry_get_connectable_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| scan_response: bool //| scan_response: bool
//| """True if the entry was a scan response. (read-only)""" //| """True if the entry was a scan response. (read-only)"""
@ -147,12 +131,8 @@ STATIC mp_obj_t scanentry_get_scan_response(mp_obj_t self_in) {
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_scanentry_get_scan_response_obj, scanentry_get_scan_response); STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_scanentry_get_scan_response_obj, scanentry_get_scan_response);
const mp_obj_property_t bleio_scanentry_scan_response_obj = { MP_PROPERTY_GETTER(bleio_scanentry_scan_response_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_scanentry_get_scan_response_obj);
.proxy = { (mp_obj_t)&bleio_scanentry_get_scan_response_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
STATIC const mp_rom_map_elem_t bleio_scanentry_locals_dict_table[] = { STATIC const mp_rom_map_elem_t bleio_scanentry_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_address), MP_ROM_PTR(&bleio_scanentry_address_obj) }, { MP_ROM_QSTR(MP_QSTR_address), MP_ROM_PTR(&bleio_scanentry_address_obj) },

View File

@ -80,12 +80,8 @@ STATIC mp_obj_t bleio_service_get_characteristics(mp_obj_t self_in) {
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_service_get_characteristics_obj, bleio_service_get_characteristics); STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_service_get_characteristics_obj, bleio_service_get_characteristics);
const mp_obj_property_t bleio_service_characteristics_obj = { MP_PROPERTY_GETTER(bleio_service_characteristics_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_service_get_characteristics_obj);
.proxy = { (mp_obj_t)&bleio_service_get_characteristics_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| remote: bool //| remote: bool
//| """True if this is a service provided by a remote device. (read-only)""" //| """True if this is a service provided by a remote device. (read-only)"""
@ -97,12 +93,8 @@ STATIC mp_obj_t bleio_service_get_remote(mp_obj_t self_in) {
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_service_get_remote_obj, bleio_service_get_remote); STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_service_get_remote_obj, bleio_service_get_remote);
const mp_obj_property_t bleio_service_remote_obj = { MP_PROPERTY_GETTER(bleio_service_remote_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_service_get_remote_obj);
.proxy = { (mp_obj_t)&bleio_service_get_remote_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| secondary: bool //| secondary: bool
//| """True if this is a secondary service. (read-only)""" //| """True if this is a secondary service. (read-only)"""
@ -114,12 +106,8 @@ STATIC mp_obj_t bleio_service_get_secondary(mp_obj_t self_in) {
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_service_get_secondary_obj, bleio_service_get_secondary); STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_service_get_secondary_obj, bleio_service_get_secondary);
const mp_obj_property_t bleio_service_secondary_obj = { MP_PROPERTY_GETTER(bleio_service_secondary_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_service_get_secondary_obj);
.proxy = { (mp_obj_t)&bleio_service_get_secondary_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| uuid: Optional[UUID] //| uuid: Optional[UUID]
//| """The UUID of this service. (read-only) //| """The UUID of this service. (read-only)
@ -134,12 +122,8 @@ STATIC mp_obj_t bleio_service_get_uuid(mp_obj_t self_in) {
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_service_get_uuid_obj, bleio_service_get_uuid); STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_service_get_uuid_obj, bleio_service_get_uuid);
const mp_obj_property_t bleio_service_uuid_obj = { MP_PROPERTY_GETTER(bleio_service_uuid_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_service_get_uuid_obj);
.proxy = { (mp_obj_t)&bleio_service_get_uuid_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
STATIC const mp_rom_map_elem_t bleio_service_locals_dict_table[] = { STATIC const mp_rom_map_elem_t bleio_service_locals_dict_table[] = {

View File

@ -132,12 +132,8 @@ STATIC mp_obj_t bleio_uuid_get_uuid16(mp_obj_t self_in) {
MP_DEFINE_CONST_FUN_OBJ_1(bleio_uuid_get_uuid16_obj, bleio_uuid_get_uuid16); MP_DEFINE_CONST_FUN_OBJ_1(bleio_uuid_get_uuid16_obj, bleio_uuid_get_uuid16);
const mp_obj_property_t bleio_uuid_uuid16_obj = { MP_PROPERTY_GETTER(bleio_uuid_uuid16_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_uuid_get_uuid16_obj);
.proxy = {(mp_obj_t)&bleio_uuid_get_uuid16_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| uuid128: bytes //| uuid128: bytes
//| """The 128-bit value of the UUID //| """The 128-bit value of the UUID
@ -158,12 +154,8 @@ STATIC mp_obj_t bleio_uuid_get_uuid128(mp_obj_t self_in) {
MP_DEFINE_CONST_FUN_OBJ_1(bleio_uuid_get_uuid128_obj, bleio_uuid_get_uuid128); MP_DEFINE_CONST_FUN_OBJ_1(bleio_uuid_get_uuid128_obj, bleio_uuid_get_uuid128);
const mp_obj_property_t bleio_uuid_uuid128_obj = { MP_PROPERTY_GETTER(bleio_uuid_uuid128_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_uuid_get_uuid128_obj);
.proxy = {(mp_obj_t)&bleio_uuid_get_uuid128_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| size: int //| size: int
//| """128 if this UUID represents a 128-bit vendor-specific UUID. 16 if this UUID represents a //| """128 if this UUID represents a 128-bit vendor-specific UUID. 16 if this UUID represents a
@ -178,12 +170,8 @@ STATIC mp_obj_t bleio_uuid_get_size(mp_obj_t self_in) {
MP_DEFINE_CONST_FUN_OBJ_1(bleio_uuid_get_size_obj, bleio_uuid_get_size); MP_DEFINE_CONST_FUN_OBJ_1(bleio_uuid_get_size_obj, bleio_uuid_get_size);
const mp_obj_property_t bleio_uuid_size_obj = { MP_PROPERTY_GETTER(bleio_uuid_size_obj,
.base.type = &mp_type_property, (mp_obj_t)&bleio_uuid_get_size_obj);
.proxy = {(mp_obj_t)&bleio_uuid_get_size_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| def pack_into(self, buffer: WriteableBuffer, offset: int = 0) -> None: //| def pack_into(self, buffer: WriteableBuffer, offset: int = 0) -> None:

View File

@ -161,12 +161,8 @@ STATIC mp_obj_t pixelbuf_pixelbuf_obj_get_bpp(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(pixelbuf_pixelbuf_get_bpp_obj, pixelbuf_pixelbuf_obj_get_bpp); MP_DEFINE_CONST_FUN_OBJ_1(pixelbuf_pixelbuf_get_bpp_obj, pixelbuf_pixelbuf_obj_get_bpp);
const mp_obj_property_t pixelbuf_pixelbuf_bpp_obj = { MP_PROPERTY_GETTER(pixelbuf_pixelbuf_bpp_obj,
.base.type = &mp_type_property, (mp_obj_t)&pixelbuf_pixelbuf_get_bpp_obj);
.proxy = {(mp_obj_t)&pixelbuf_pixelbuf_get_bpp_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| brightness: float //| brightness: float
@ -193,12 +189,9 @@ STATIC mp_obj_t pixelbuf_pixelbuf_obj_set_brightness(mp_obj_t self_in, mp_obj_t
} }
MP_DEFINE_CONST_FUN_OBJ_2(pixelbuf_pixelbuf_set_brightness_obj, pixelbuf_pixelbuf_obj_set_brightness); MP_DEFINE_CONST_FUN_OBJ_2(pixelbuf_pixelbuf_set_brightness_obj, pixelbuf_pixelbuf_obj_set_brightness);
const mp_obj_property_t pixelbuf_pixelbuf_brightness_obj = { MP_PROPERTY_GETSET(pixelbuf_pixelbuf_brightness_obj,
.base.type = &mp_type_property, (mp_obj_t)&pixelbuf_pixelbuf_get_brightness_obj,
.proxy = {(mp_obj_t)&pixelbuf_pixelbuf_get_brightness_obj, (mp_obj_t)&pixelbuf_pixelbuf_set_brightness_obj);
(mp_obj_t)&pixelbuf_pixelbuf_set_brightness_obj,
MP_ROM_NONE},
};
//| auto_write: bool //| auto_write: bool
//| """Whether to automatically write the pixels after each update.""" //| """Whether to automatically write the pixels after each update."""
@ -215,12 +208,9 @@ STATIC mp_obj_t pixelbuf_pixelbuf_obj_set_auto_write(mp_obj_t self_in, mp_obj_t
} }
MP_DEFINE_CONST_FUN_OBJ_2(pixelbuf_pixelbuf_set_auto_write_obj, pixelbuf_pixelbuf_obj_set_auto_write); MP_DEFINE_CONST_FUN_OBJ_2(pixelbuf_pixelbuf_set_auto_write_obj, pixelbuf_pixelbuf_obj_set_auto_write);
const mp_obj_property_t pixelbuf_pixelbuf_auto_write_obj = { MP_PROPERTY_GETSET(pixelbuf_pixelbuf_auto_write_obj,
.base.type = &mp_type_property, (mp_obj_t)&pixelbuf_pixelbuf_get_auto_write_obj,
.proxy = {(mp_obj_t)&pixelbuf_pixelbuf_get_auto_write_obj, (mp_obj_t)&pixelbuf_pixelbuf_set_auto_write_obj);
(mp_obj_t)&pixelbuf_pixelbuf_set_auto_write_obj,
MP_ROM_NONE},
};
//| byteorder: str //| byteorder: str
//| """byteorder string for the buffer (read-only)""" //| """byteorder string for the buffer (read-only)"""
@ -230,12 +220,8 @@ STATIC mp_obj_t pixelbuf_pixelbuf_obj_get_byteorder(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(pixelbuf_pixelbuf_get_byteorder_str, pixelbuf_pixelbuf_obj_get_byteorder); MP_DEFINE_CONST_FUN_OBJ_1(pixelbuf_pixelbuf_get_byteorder_str, pixelbuf_pixelbuf_obj_get_byteorder);
const mp_obj_property_t pixelbuf_pixelbuf_byteorder_str = { MP_PROPERTY_GETTER(pixelbuf_pixelbuf_byteorder_str,
.base.type = &mp_type_property, (mp_obj_t)&pixelbuf_pixelbuf_get_byteorder_str);
.proxy = {(mp_obj_t)&pixelbuf_pixelbuf_get_byteorder_str,
MP_ROM_NONE,
MP_ROM_NONE},
};
STATIC mp_obj_t pixelbuf_pixelbuf_unary_op(mp_unary_op_t op, mp_obj_t self_in) { STATIC mp_obj_t pixelbuf_pixelbuf_unary_op(mp_unary_op_t op, mp_obj_t self_in) {
switch (op) { switch (op) {

View File

@ -246,11 +246,9 @@ STATIC mp_obj_t aesio_aes_set_mode(mp_obj_t aesio_obj, mp_obj_t mode_obj) {
} }
MP_DEFINE_CONST_FUN_OBJ_2(aesio_aes_set_mode_obj, aesio_aes_set_mode); MP_DEFINE_CONST_FUN_OBJ_2(aesio_aes_set_mode_obj, aesio_aes_set_mode);
const mp_obj_property_t aesio_aes_mode_obj = { MP_PROPERTY_GETSET(aesio_aes_mode_obj,
.base.type = &mp_type_property, (mp_obj_t)&aesio_aes_get_mode_obj,
.proxy = {(mp_obj_t)&aesio_aes_get_mode_obj, (mp_obj_t)&aesio_aes_set_mode_obj);
(mp_obj_t)&aesio_aes_set_mode_obj, MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t aesio_locals_dict_table[] = { STATIC const mp_rom_map_elem_t aesio_locals_dict_table[] = {
// Methods // Methods

View File

@ -97,12 +97,8 @@ STATIC mp_obj_t alarm_pin_pinalarm_obj_get_pin(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(alarm_pin_pinalarm_get_pin_obj, alarm_pin_pinalarm_obj_get_pin); MP_DEFINE_CONST_FUN_OBJ_1(alarm_pin_pinalarm_get_pin_obj, alarm_pin_pinalarm_obj_get_pin);
const mp_obj_property_t alarm_pin_pinalarm_pin_obj = { MP_PROPERTY_GETTER(alarm_pin_pinalarm_pin_obj,
.base.type = &mp_type_property, (mp_obj_t)&alarm_pin_pinalarm_get_pin_obj);
.proxy = {(mp_obj_t)&alarm_pin_pinalarm_get_pin_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| value: bool //| value: bool
//| """The value on which to trigger.""" //| """The value on which to trigger."""
@ -113,12 +109,8 @@ STATIC mp_obj_t alarm_pin_pinalarm_obj_get_value(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(alarm_pin_pinalarm_get_value_obj, alarm_pin_pinalarm_obj_get_value); MP_DEFINE_CONST_FUN_OBJ_1(alarm_pin_pinalarm_get_value_obj, alarm_pin_pinalarm_obj_get_value);
const mp_obj_property_t alarm_pin_pinalarm_value_obj = { MP_PROPERTY_GETTER(alarm_pin_pinalarm_value_obj,
.base.type = &mp_type_property, (mp_obj_t)&alarm_pin_pinalarm_get_value_obj);
.proxy = {(mp_obj_t)&alarm_pin_pinalarm_get_value_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t alarm_pin_pinalarm_locals_dict_table[] = { STATIC const mp_rom_map_elem_t alarm_pin_pinalarm_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_pin), MP_ROM_PTR(&alarm_pin_pinalarm_pin_obj) }, { MP_ROM_QSTR(MP_QSTR_pin), MP_ROM_PTR(&alarm_pin_pinalarm_pin_obj) },

View File

@ -123,12 +123,8 @@ STATIC mp_obj_t alarm_time_timealarm_obj_get_monotonic_time(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(alarm_time_timealarm_get_monotonic_time_obj, alarm_time_timealarm_obj_get_monotonic_time); MP_DEFINE_CONST_FUN_OBJ_1(alarm_time_timealarm_get_monotonic_time_obj, alarm_time_timealarm_obj_get_monotonic_time);
const mp_obj_property_t alarm_time_timealarm_monotonic_time_obj = { MP_PROPERTY_GETTER(alarm_time_timealarm_monotonic_time_obj,
.base.type = &mp_type_property, (mp_obj_t)&alarm_time_timealarm_get_monotonic_time_obj);
.proxy = {(mp_obj_t)&alarm_time_timealarm_get_monotonic_time_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t alarm_time_timealarm_locals_dict_table[] = { STATIC const mp_rom_map_elem_t alarm_time_timealarm_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_monotonic_time), MP_ROM_PTR(&alarm_time_timealarm_monotonic_time_obj) }, { MP_ROM_QSTR(MP_QSTR_monotonic_time), MP_ROM_PTR(&alarm_time_timealarm_monotonic_time_obj) },

View File

@ -71,12 +71,8 @@ STATIC mp_obj_t alarm_touch_touchalarm_obj_get_pin(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(alarm_touch_touchalarm_get_pin_obj, alarm_touch_touchalarm_obj_get_pin); MP_DEFINE_CONST_FUN_OBJ_1(alarm_touch_touchalarm_get_pin_obj, alarm_touch_touchalarm_obj_get_pin);
const mp_obj_property_t alarm_touch_touchalarm_pin_obj = { MP_PROPERTY_GETTER(alarm_touch_touchalarm_pin_obj,
.base.type = &mp_type_property, (mp_obj_t)&alarm_touch_touchalarm_get_pin_obj);
.proxy = {(mp_obj_t)&alarm_touch_touchalarm_get_pin_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t alarm_touch_touchalarm_locals_dict_table[] = { STATIC const mp_rom_map_elem_t alarm_touch_touchalarm_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_pin), MP_ROM_PTR(&alarm_touch_touchalarm_pin_obj) }, { MP_ROM_QSTR(MP_QSTR_pin), MP_ROM_PTR(&alarm_touch_touchalarm_pin_obj) },

View File

@ -117,12 +117,8 @@ STATIC mp_obj_t analogio_analogin_obj_get_value(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(analogio_analogin_get_value_obj, analogio_analogin_obj_get_value); MP_DEFINE_CONST_FUN_OBJ_1(analogio_analogin_get_value_obj, analogio_analogin_obj_get_value);
const mp_obj_property_t analogio_analogin_value_obj = { MP_PROPERTY_GETTER(analogio_analogin_value_obj,
.base.type = &mp_type_property, (mp_obj_t)&analogio_analogin_get_value_obj);
.proxy = {(mp_obj_t)&analogio_analogin_get_value_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| reference_voltage: float //| reference_voltage: float
//| """The maximum voltage measurable (also known as the reference voltage) as a //| """The maximum voltage measurable (also known as the reference voltage) as a
@ -143,12 +139,8 @@ STATIC mp_obj_t analogio_analogin_obj_get_reference_voltage(mp_obj_t self_in) {
MP_DEFINE_CONST_FUN_OBJ_1(analogio_analogin_get_reference_voltage_obj, MP_DEFINE_CONST_FUN_OBJ_1(analogio_analogin_get_reference_voltage_obj,
analogio_analogin_obj_get_reference_voltage); analogio_analogin_obj_get_reference_voltage);
const mp_obj_property_t analogio_analogin_reference_voltage_obj = { MP_PROPERTY_GETTER(analogio_analogin_reference_voltage_obj,
.base.type = &mp_type_property, (mp_obj_t)&analogio_analogin_get_reference_voltage_obj);
.proxy = {(mp_obj_t)&analogio_analogin_get_reference_voltage_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t analogio_analogin_locals_dict_table[] = { STATIC const mp_rom_map_elem_t analogio_analogin_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&analogio_analogin_deinit_obj) }, { MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&analogio_analogin_deinit_obj) },

View File

@ -117,12 +117,9 @@ STATIC mp_obj_t analogio_analogout_obj_set_value(mp_obj_t self_in, mp_obj_t valu
} }
MP_DEFINE_CONST_FUN_OBJ_2(analogio_analogout_set_value_obj, analogio_analogout_obj_set_value); MP_DEFINE_CONST_FUN_OBJ_2(analogio_analogout_set_value_obj, analogio_analogout_obj_set_value);
const mp_obj_property_t analogio_analogout_value_obj = { MP_PROPERTY_GETSET(analogio_analogout_value_obj,
.base.type = &mp_type_property, MP_ROM_NONE,
.proxy = {MP_ROM_NONE, (mp_obj_t)&analogio_analogout_set_value_obj);
(mp_obj_t)&analogio_analogout_set_value_obj,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t analogio_analogout_locals_dict_table[] = { STATIC const mp_rom_map_elem_t analogio_analogout_locals_dict_table[] = {
// instance methods // instance methods

View File

@ -203,12 +203,8 @@ STATIC mp_obj_t audiobusio_i2sout_obj_get_playing(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(audiobusio_i2sout_get_playing_obj, audiobusio_i2sout_obj_get_playing); MP_DEFINE_CONST_FUN_OBJ_1(audiobusio_i2sout_get_playing_obj, audiobusio_i2sout_obj_get_playing);
const mp_obj_property_t audiobusio_i2sout_playing_obj = { MP_PROPERTY_GETTER(audiobusio_i2sout_playing_obj,
.base.type = &mp_type_property, (mp_obj_t)&audiobusio_i2sout_get_playing_obj);
.proxy = {(mp_obj_t)&audiobusio_i2sout_get_playing_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| def pause(self) -> None: //| def pause(self) -> None:
//| """Stops playback temporarily while remembering the position. Use `resume` to resume playback.""" //| """Stops playback temporarily while remembering the position. Use `resume` to resume playback."""
@ -252,12 +248,8 @@ STATIC mp_obj_t audiobusio_i2sout_obj_get_paused(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(audiobusio_i2sout_get_paused_obj, audiobusio_i2sout_obj_get_paused); MP_DEFINE_CONST_FUN_OBJ_1(audiobusio_i2sout_get_paused_obj, audiobusio_i2sout_obj_get_paused);
const mp_obj_property_t audiobusio_i2sout_paused_obj = { MP_PROPERTY_GETTER(audiobusio_i2sout_paused_obj,
.base.type = &mp_type_property, (mp_obj_t)&audiobusio_i2sout_get_paused_obj);
.proxy = {(mp_obj_t)&audiobusio_i2sout_get_paused_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
#endif // CIRCUITPY_AUDIOBUSIO_I2SOUT #endif // CIRCUITPY_AUDIOBUSIO_I2SOUT
STATIC const mp_rom_map_elem_t audiobusio_i2sout_locals_dict_table[] = { STATIC const mp_rom_map_elem_t audiobusio_i2sout_locals_dict_table[] = {

View File

@ -226,12 +226,8 @@ STATIC mp_obj_t audiobusio_pdmin_obj_get_sample_rate(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(audiobusio_pdmin_get_sample_rate_obj, audiobusio_pdmin_obj_get_sample_rate); MP_DEFINE_CONST_FUN_OBJ_1(audiobusio_pdmin_get_sample_rate_obj, audiobusio_pdmin_obj_get_sample_rate);
const mp_obj_property_t audiobusio_pdmin_sample_rate_obj = { MP_PROPERTY_GETTER(audiobusio_pdmin_sample_rate_obj,
.base.type = &mp_type_property, (mp_obj_t)&audiobusio_pdmin_get_sample_rate_obj);
.proxy = {(mp_obj_t)&audiobusio_pdmin_get_sample_rate_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t audiobusio_pdmin_locals_dict_table[] = { STATIC const mp_rom_map_elem_t audiobusio_pdmin_locals_dict_table[] = {
// Methods // Methods

View File

@ -153,12 +153,9 @@ STATIC mp_obj_t audioio_rawsample_obj_set_sample_rate(mp_obj_t self_in, mp_obj_t
} }
MP_DEFINE_CONST_FUN_OBJ_2(audioio_rawsample_set_sample_rate_obj, audioio_rawsample_obj_set_sample_rate); MP_DEFINE_CONST_FUN_OBJ_2(audioio_rawsample_set_sample_rate_obj, audioio_rawsample_obj_set_sample_rate);
const mp_obj_property_t audioio_rawsample_sample_rate_obj = { MP_PROPERTY_GETSET(audioio_rawsample_sample_rate_obj,
.base.type = &mp_type_property, (mp_obj_t)&audioio_rawsample_get_sample_rate_obj,
.proxy = {(mp_obj_t)&audioio_rawsample_get_sample_rate_obj, (mp_obj_t)&audioio_rawsample_set_sample_rate_obj);
(mp_obj_t)&audioio_rawsample_set_sample_rate_obj,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t audioio_rawsample_locals_dict_table[] = { STATIC const mp_rom_map_elem_t audioio_rawsample_locals_dict_table[] = {
// Methods // Methods

View File

@ -148,12 +148,9 @@ STATIC mp_obj_t audioio_wavefile_obj_set_sample_rate(mp_obj_t self_in, mp_obj_t
} }
MP_DEFINE_CONST_FUN_OBJ_2(audioio_wavefile_set_sample_rate_obj, audioio_wavefile_obj_set_sample_rate); MP_DEFINE_CONST_FUN_OBJ_2(audioio_wavefile_set_sample_rate_obj, audioio_wavefile_obj_set_sample_rate);
const mp_obj_property_t audioio_wavefile_sample_rate_obj = { MP_PROPERTY_GETSET(audioio_wavefile_sample_rate_obj,
.base.type = &mp_type_property, (mp_obj_t)&audioio_wavefile_get_sample_rate_obj,
.proxy = {(mp_obj_t)&audioio_wavefile_get_sample_rate_obj, (mp_obj_t)&audioio_wavefile_set_sample_rate_obj);
(mp_obj_t)&audioio_wavefile_set_sample_rate_obj,
MP_ROM_NONE},
};
//| bits_per_sample: int //| bits_per_sample: int
//| """Bits per sample. (read only)""" //| """Bits per sample. (read only)"""
@ -165,12 +162,8 @@ STATIC mp_obj_t audioio_wavefile_obj_get_bits_per_sample(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(audioio_wavefile_get_bits_per_sample_obj, audioio_wavefile_obj_get_bits_per_sample); MP_DEFINE_CONST_FUN_OBJ_1(audioio_wavefile_get_bits_per_sample_obj, audioio_wavefile_obj_get_bits_per_sample);
const mp_obj_property_t audioio_wavefile_bits_per_sample_obj = { MP_PROPERTY_GETTER(audioio_wavefile_bits_per_sample_obj,
.base.type = &mp_type_property, (mp_obj_t)&audioio_wavefile_get_bits_per_sample_obj);
.proxy = {(mp_obj_t)&audioio_wavefile_get_bits_per_sample_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| channel_count: int //| channel_count: int
//| """Number of audio channels. (read only)""" //| """Number of audio channels. (read only)"""
//| //|
@ -181,12 +174,8 @@ STATIC mp_obj_t audioio_wavefile_obj_get_channel_count(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(audioio_wavefile_get_channel_count_obj, audioio_wavefile_obj_get_channel_count); MP_DEFINE_CONST_FUN_OBJ_1(audioio_wavefile_get_channel_count_obj, audioio_wavefile_obj_get_channel_count);
const mp_obj_property_t audioio_wavefile_channel_count_obj = { MP_PROPERTY_GETTER(audioio_wavefile_channel_count_obj,
.base.type = &mp_type_property, (mp_obj_t)&audioio_wavefile_get_channel_count_obj);
.proxy = {(mp_obj_t)&audioio_wavefile_get_channel_count_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t audioio_wavefile_locals_dict_table[] = { STATIC const mp_rom_map_elem_t audioio_wavefile_locals_dict_table[] = {

View File

@ -197,12 +197,8 @@ STATIC mp_obj_t audioio_audioout_obj_get_playing(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(audioio_audioout_get_playing_obj, audioio_audioout_obj_get_playing); MP_DEFINE_CONST_FUN_OBJ_1(audioio_audioout_get_playing_obj, audioio_audioout_obj_get_playing);
const mp_obj_property_t audioio_audioout_playing_obj = { MP_PROPERTY_GETTER(audioio_audioout_playing_obj,
.base.type = &mp_type_property, (mp_obj_t)&audioio_audioout_get_playing_obj);
.proxy = {(mp_obj_t)&audioio_audioout_get_playing_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| def pause(self) -> None: //| def pause(self) -> None:
//| """Stops playback temporarily while remembering the position. Use `resume` to resume playback.""" //| """Stops playback temporarily while remembering the position. Use `resume` to resume playback."""
@ -246,12 +242,8 @@ STATIC mp_obj_t audioio_audioout_obj_get_paused(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(audioio_audioout_get_paused_obj, audioio_audioout_obj_get_paused); MP_DEFINE_CONST_FUN_OBJ_1(audioio_audioout_get_paused_obj, audioio_audioout_obj_get_paused);
const mp_obj_property_t audioio_audioout_paused_obj = { MP_PROPERTY_GETTER(audioio_audioout_paused_obj,
.base.type = &mp_type_property, (mp_obj_t)&audioio_audioout_get_paused_obj);
.proxy = {(mp_obj_t)&audioio_audioout_get_paused_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t audioio_audioout_locals_dict_table[] = { STATIC const mp_rom_map_elem_t audioio_audioout_locals_dict_table[] = {
// Methods // Methods

View File

@ -166,12 +166,8 @@ STATIC mp_obj_t audiomixer_mixer_obj_get_playing(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(audiomixer_mixer_get_playing_obj, audiomixer_mixer_obj_get_playing); MP_DEFINE_CONST_FUN_OBJ_1(audiomixer_mixer_get_playing_obj, audiomixer_mixer_obj_get_playing);
const mp_obj_property_t audiomixer_mixer_playing_obj = { MP_PROPERTY_GETTER(audiomixer_mixer_playing_obj,
.base.type = &mp_type_property, (mp_obj_t)&audiomixer_mixer_get_playing_obj);
.proxy = {(mp_obj_t)&audiomixer_mixer_get_playing_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| sample_rate: int //| sample_rate: int
//| """32 bit value that dictates how quickly samples are played in Hertz (cycles per second).""" //| """32 bit value that dictates how quickly samples are played in Hertz (cycles per second)."""
@ -183,12 +179,8 @@ STATIC mp_obj_t audiomixer_mixer_obj_get_sample_rate(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(audiomixer_mixer_get_sample_rate_obj, audiomixer_mixer_obj_get_sample_rate); MP_DEFINE_CONST_FUN_OBJ_1(audiomixer_mixer_get_sample_rate_obj, audiomixer_mixer_obj_get_sample_rate);
const mp_obj_property_t audiomixer_mixer_sample_rate_obj = { MP_PROPERTY_GETTER(audiomixer_mixer_sample_rate_obj,
.base.type = &mp_type_property, (mp_obj_t)&audiomixer_mixer_get_sample_rate_obj);
.proxy = {(mp_obj_t)&audiomixer_mixer_get_sample_rate_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| voice: Tuple[MixerVoice, ...] //| voice: Tuple[MixerVoice, ...]
//| """A tuple of the mixer's `audiomixer.MixerVoice` object(s). //| """A tuple of the mixer's `audiomixer.MixerVoice` object(s).
@ -204,12 +196,8 @@ STATIC mp_obj_t audiomixer_mixer_obj_get_voice(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(audiomixer_mixer_get_voice_obj, audiomixer_mixer_obj_get_voice); MP_DEFINE_CONST_FUN_OBJ_1(audiomixer_mixer_get_voice_obj, audiomixer_mixer_obj_get_voice);
const mp_obj_property_t audiomixer_mixer_voice_obj = { MP_PROPERTY_GETTER(audiomixer_mixer_voice_obj,
.base.type = &mp_type_property, (mp_obj_t)&audiomixer_mixer_get_voice_obj);
.proxy = {(mp_obj_t)&audiomixer_mixer_get_voice_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| def play(self, sample: circuitpython_typing.AudioSample, *, voice: int = 0, loop: bool = False) -> None: //| def play(self, sample: circuitpython_typing.AudioSample, *, voice: int = 0, loop: bool = False) -> None:
//| """Plays the sample once when loop=False and continuously when loop=True. //| """Plays the sample once when loop=False and continuously when loop=True.

View File

@ -130,12 +130,9 @@ STATIC mp_obj_t audiomixer_mixervoice_obj_set_level(size_t n_args, const mp_obj_
} }
MP_DEFINE_CONST_FUN_OBJ_KW(audiomixer_mixervoice_set_level_obj, 1, audiomixer_mixervoice_obj_set_level); MP_DEFINE_CONST_FUN_OBJ_KW(audiomixer_mixervoice_set_level_obj, 1, audiomixer_mixervoice_obj_set_level);
const mp_obj_property_t audiomixer_mixervoice_level_obj = { MP_PROPERTY_GETSET(audiomixer_mixervoice_level_obj,
.base.type = &mp_type_property, (mp_obj_t)&audiomixer_mixervoice_get_level_obj,
.proxy = {(mp_obj_t)&audiomixer_mixervoice_get_level_obj, (mp_obj_t)&audiomixer_mixervoice_set_level_obj);
(mp_obj_t)&audiomixer_mixervoice_set_level_obj,
MP_ROM_NONE},
};
//| playing: bool //| playing: bool
//| """True when this voice is being output. (read-only)""" //| """True when this voice is being output. (read-only)"""
@ -149,12 +146,8 @@ STATIC mp_obj_t audiomixer_mixervoice_obj_get_playing(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(audiomixer_mixervoice_get_playing_obj, audiomixer_mixervoice_obj_get_playing); MP_DEFINE_CONST_FUN_OBJ_1(audiomixer_mixervoice_get_playing_obj, audiomixer_mixervoice_obj_get_playing);
const mp_obj_property_t audiomixer_mixervoice_playing_obj = { MP_PROPERTY_GETTER(audiomixer_mixervoice_playing_obj,
.base.type = &mp_type_property, (mp_obj_t)&audiomixer_mixervoice_get_playing_obj);
.proxy = {(mp_obj_t)&audiomixer_mixervoice_get_playing_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t audiomixer_mixervoice_locals_dict_table[] = { STATIC const mp_rom_map_elem_t audiomixer_mixervoice_locals_dict_table[] = {
// Methods // Methods

View File

@ -166,12 +166,9 @@ STATIC mp_obj_t audiomp3_mp3file_obj_set_file(mp_obj_t self_in, mp_obj_t file) {
} }
MP_DEFINE_CONST_FUN_OBJ_2(audiomp3_mp3file_set_file_obj, audiomp3_mp3file_obj_set_file); MP_DEFINE_CONST_FUN_OBJ_2(audiomp3_mp3file_set_file_obj, audiomp3_mp3file_obj_set_file);
const mp_obj_property_t audiomp3_mp3file_file_obj = { MP_PROPERTY_GETSET(audiomp3_mp3file_file_obj,
.base.type = &mp_type_property, (mp_obj_t)&audiomp3_mp3file_get_file_obj,
.proxy = {(mp_obj_t)&audiomp3_mp3file_get_file_obj, (mp_obj_t)&audiomp3_mp3file_set_file_obj);
(mp_obj_t)&audiomp3_mp3file_set_file_obj,
MP_ROM_NONE},
};
@ -195,12 +192,9 @@ STATIC mp_obj_t audiomp3_mp3file_obj_set_sample_rate(mp_obj_t self_in, mp_obj_t
} }
MP_DEFINE_CONST_FUN_OBJ_2(audiomp3_mp3file_set_sample_rate_obj, audiomp3_mp3file_obj_set_sample_rate); MP_DEFINE_CONST_FUN_OBJ_2(audiomp3_mp3file_set_sample_rate_obj, audiomp3_mp3file_obj_set_sample_rate);
const mp_obj_property_t audiomp3_mp3file_sample_rate_obj = { MP_PROPERTY_GETSET(audiomp3_mp3file_sample_rate_obj,
.base.type = &mp_type_property, (mp_obj_t)&audiomp3_mp3file_get_sample_rate_obj,
.proxy = {(mp_obj_t)&audiomp3_mp3file_get_sample_rate_obj, (mp_obj_t)&audiomp3_mp3file_set_sample_rate_obj);
(mp_obj_t)&audiomp3_mp3file_set_sample_rate_obj,
MP_ROM_NONE},
};
//| bits_per_sample: int //| bits_per_sample: int
//| """Bits per sample. (read only)""" //| """Bits per sample. (read only)"""
@ -212,12 +206,8 @@ STATIC mp_obj_t audiomp3_mp3file_obj_get_bits_per_sample(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(audiomp3_mp3file_get_bits_per_sample_obj, audiomp3_mp3file_obj_get_bits_per_sample); MP_DEFINE_CONST_FUN_OBJ_1(audiomp3_mp3file_get_bits_per_sample_obj, audiomp3_mp3file_obj_get_bits_per_sample);
const mp_obj_property_t audiomp3_mp3file_bits_per_sample_obj = { MP_PROPERTY_GETTER(audiomp3_mp3file_bits_per_sample_obj,
.base.type = &mp_type_property, (mp_obj_t)&audiomp3_mp3file_get_bits_per_sample_obj);
.proxy = {(mp_obj_t)&audiomp3_mp3file_get_bits_per_sample_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| channel_count: int //| channel_count: int
//| """Number of audio channels. (read only)""" //| """Number of audio channels. (read only)"""
@ -229,12 +219,8 @@ STATIC mp_obj_t audiomp3_mp3file_obj_get_channel_count(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(audiomp3_mp3file_get_channel_count_obj, audiomp3_mp3file_obj_get_channel_count); MP_DEFINE_CONST_FUN_OBJ_1(audiomp3_mp3file_get_channel_count_obj, audiomp3_mp3file_obj_get_channel_count);
const mp_obj_property_t audiomp3_mp3file_channel_count_obj = { MP_PROPERTY_GETTER(audiomp3_mp3file_channel_count_obj,
.base.type = &mp_type_property, (mp_obj_t)&audiomp3_mp3file_get_channel_count_obj);
.proxy = {(mp_obj_t)&audiomp3_mp3file_get_channel_count_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| rms_level: float //| rms_level: float
//| """The RMS audio level of a recently played moment of audio. (read only)""" //| """The RMS audio level of a recently played moment of audio. (read only)"""
@ -246,12 +232,8 @@ STATIC mp_obj_t audiomp3_mp3file_obj_get_rms_level(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(audiomp3_mp3file_get_rms_level_obj, audiomp3_mp3file_obj_get_rms_level); MP_DEFINE_CONST_FUN_OBJ_1(audiomp3_mp3file_get_rms_level_obj, audiomp3_mp3file_obj_get_rms_level);
const mp_obj_property_t audiomp3_mp3file_rms_level_obj = { MP_PROPERTY_GETTER(audiomp3_mp3file_rms_level_obj,
.base.type = &mp_type_property, (mp_obj_t)&audiomp3_mp3file_get_rms_level_obj);
.proxy = {(mp_obj_t)&audiomp3_mp3file_get_rms_level_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| samples_decoded: int //| samples_decoded: int
//| """The number of audio samples decoded from the current file. (read only)""" //| """The number of audio samples decoded from the current file. (read only)"""
@ -263,12 +245,8 @@ STATIC mp_obj_t audiomp3_mp3file_obj_get_samples_decoded(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(audiomp3_mp3file_get_samples_decoded_obj, audiomp3_mp3file_obj_get_samples_decoded); MP_DEFINE_CONST_FUN_OBJ_1(audiomp3_mp3file_get_samples_decoded_obj, audiomp3_mp3file_obj_get_samples_decoded);
const mp_obj_property_t audiomp3_mp3file_samples_decoded_obj = { MP_PROPERTY_GETTER(audiomp3_mp3file_samples_decoded_obj,
.base.type = &mp_type_property, (mp_obj_t)&audiomp3_mp3file_get_samples_decoded_obj);
.proxy = {(mp_obj_t)&audiomp3_mp3file_get_samples_decoded_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t audiomp3_mp3file_locals_dict_table[] = { STATIC const mp_rom_map_elem_t audiomp3_mp3file_locals_dict_table[] = {
// Methods // Methods

View File

@ -198,12 +198,8 @@ STATIC mp_obj_t audiopwmio_pwmaudioout_obj_get_playing(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(audiopwmio_pwmaudioout_get_playing_obj, audiopwmio_pwmaudioout_obj_get_playing); MP_DEFINE_CONST_FUN_OBJ_1(audiopwmio_pwmaudioout_get_playing_obj, audiopwmio_pwmaudioout_obj_get_playing);
const mp_obj_property_t audiopwmio_pwmaudioout_playing_obj = { MP_PROPERTY_GETTER(audiopwmio_pwmaudioout_playing_obj,
.base.type = &mp_type_property, (mp_obj_t)&audiopwmio_pwmaudioout_get_playing_obj);
.proxy = {(mp_obj_t)&audiopwmio_pwmaudioout_get_playing_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| def pause(self) -> None: //| def pause(self) -> None:
//| """Stops playback temporarily while remembering the position. Use `resume` to resume playback.""" //| """Stops playback temporarily while remembering the position. Use `resume` to resume playback."""
@ -247,12 +243,8 @@ STATIC mp_obj_t audiopwmio_pwmaudioout_obj_get_paused(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(audiopwmio_pwmaudioout_get_paused_obj, audiopwmio_pwmaudioout_obj_get_paused); MP_DEFINE_CONST_FUN_OBJ_1(audiopwmio_pwmaudioout_get_paused_obj, audiopwmio_pwmaudioout_obj_get_paused);
const mp_obj_property_t audiopwmio_pwmaudioout_paused_obj = { MP_PROPERTY_GETTER(audiopwmio_pwmaudioout_paused_obj,
.base.type = &mp_type_property, (mp_obj_t)&audiopwmio_pwmaudioout_get_paused_obj);
.proxy = {(mp_obj_t)&audiopwmio_pwmaudioout_get_paused_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t audiopwmio_pwmaudioout_locals_dict_table[] = { STATIC const mp_rom_map_elem_t audiopwmio_pwmaudioout_locals_dict_table[] = {
// Methods // Methods

View File

@ -425,12 +425,8 @@ STATIC mp_obj_t busio_spi_obj_get_frequency(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(busio_spi_get_frequency_obj, busio_spi_obj_get_frequency); MP_DEFINE_CONST_FUN_OBJ_1(busio_spi_get_frequency_obj, busio_spi_obj_get_frequency);
const mp_obj_property_t busio_spi_frequency_obj = { MP_PROPERTY_GETTER(busio_spi_frequency_obj,
.base.type = &mp_type_property, (mp_obj_t)&busio_spi_get_frequency_obj);
.proxy = {(mp_obj_t)&busio_spi_get_frequency_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
#endif // CIRCUITPY_BUSIO_SPI #endif // CIRCUITPY_BUSIO_SPI

View File

@ -308,12 +308,9 @@ STATIC mp_obj_t busio_uart_obj_set_baudrate(mp_obj_t self_in, mp_obj_t baudrate)
MP_DEFINE_CONST_FUN_OBJ_2(busio_uart_set_baudrate_obj, busio_uart_obj_set_baudrate); MP_DEFINE_CONST_FUN_OBJ_2(busio_uart_set_baudrate_obj, busio_uart_obj_set_baudrate);
const mp_obj_property_t busio_uart_baudrate_obj = { MP_PROPERTY_GETSET(busio_uart_baudrate_obj,
.base.type = &mp_type_property, (mp_obj_t)&busio_uart_get_baudrate_obj,
.proxy = {(mp_obj_t)&busio_uart_get_baudrate_obj, (mp_obj_t)&busio_uart_set_baudrate_obj);
(mp_obj_t)&busio_uart_set_baudrate_obj,
MP_ROM_NONE},
};
//| in_waiting: int //| in_waiting: int
//| """The number of bytes in the input buffer, available to be read""" //| """The number of bytes in the input buffer, available to be read"""
@ -325,12 +322,8 @@ STATIC mp_obj_t busio_uart_obj_get_in_waiting(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(busio_uart_get_in_waiting_obj, busio_uart_obj_get_in_waiting); MP_DEFINE_CONST_FUN_OBJ_1(busio_uart_get_in_waiting_obj, busio_uart_obj_get_in_waiting);
const mp_obj_property_t busio_uart_in_waiting_obj = { MP_PROPERTY_GETTER(busio_uart_in_waiting_obj,
.base.type = &mp_type_property, (mp_obj_t)&busio_uart_get_in_waiting_obj);
.proxy = {(mp_obj_t)&busio_uart_get_in_waiting_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| timeout: float //| timeout: float
//| """The current timeout, in seconds (float).""" //| """The current timeout, in seconds (float)."""
@ -353,12 +346,9 @@ STATIC mp_obj_t busio_uart_obj_set_timeout(mp_obj_t self_in, mp_obj_t timeout) {
MP_DEFINE_CONST_FUN_OBJ_2(busio_uart_set_timeout_obj, busio_uart_obj_set_timeout); MP_DEFINE_CONST_FUN_OBJ_2(busio_uart_set_timeout_obj, busio_uart_obj_set_timeout);
const mp_obj_property_t busio_uart_timeout_obj = { MP_PROPERTY_GETSET(busio_uart_timeout_obj,
.base.type = &mp_type_property, (mp_obj_t)&busio_uart_get_timeout_obj,
.proxy = {(mp_obj_t)&busio_uart_get_timeout_obj, (mp_obj_t)&busio_uart_set_timeout_obj);
(mp_obj_t)&busio_uart_set_timeout_obj,
MP_ROM_NONE},
};
//| def reset_input_buffer(self) -> None: //| def reset_input_buffer(self) -> None:
//| """Discard any unread characters in the input buffer.""" //| """Discard any unread characters in the input buffer."""

View File

@ -112,12 +112,9 @@ STATIC mp_obj_t canio_can_auto_restart_set(mp_obj_t self_in, mp_obj_t flag_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_2(canio_can_auto_restart_set_obj, canio_can_auto_restart_set); MP_DEFINE_CONST_FUN_OBJ_2(canio_can_auto_restart_set_obj, canio_can_auto_restart_set);
STATIC const mp_obj_property_t canio_can_auto_restart_obj = { MP_PROPERTY_GETSET(canio_can_auto_restart_obj,
.base.type = &mp_type_property, (mp_obj_t)&canio_can_auto_restart_get_obj,
.proxy = {(mp_obj_t)&canio_can_auto_restart_get_obj, (mp_obj_t)&canio_can_auto_restart_set_obj);
(mp_obj_t)&canio_can_auto_restart_set_obj,
(mp_obj_t)mp_const_none},
};
//| baudrate: int //| baudrate: int
@ -130,12 +127,8 @@ STATIC mp_obj_t canio_can_baudrate_get(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(canio_can_baudrate_get_obj, canio_can_baudrate_get); MP_DEFINE_CONST_FUN_OBJ_1(canio_can_baudrate_get_obj, canio_can_baudrate_get);
STATIC const mp_obj_property_t canio_can_baudrate_obj = { MP_PROPERTY_GETTER(canio_can_baudrate_obj,
.base.type = &mp_type_property, (mp_obj_t)&canio_can_baudrate_get_obj);
.proxy = {(mp_obj_t)&canio_can_baudrate_get_obj,
(mp_obj_t)mp_const_none,
(mp_obj_t)mp_const_none},
};
//| transmit_error_count: int //| transmit_error_count: int
//| """The number of transmit errors (read-only). Increased for a detected transmission error, decreased for successful transmission. Limited to the range from 0 to 255 inclusive. Also called TEC.""" //| """The number of transmit errors (read-only). Increased for a detected transmission error, decreased for successful transmission. Limited to the range from 0 to 255 inclusive. Also called TEC."""
@ -147,12 +140,8 @@ STATIC mp_obj_t canio_can_transmit_error_count_get(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(canio_can_transmit_error_count_get_obj, canio_can_transmit_error_count_get); MP_DEFINE_CONST_FUN_OBJ_1(canio_can_transmit_error_count_get_obj, canio_can_transmit_error_count_get);
STATIC const mp_obj_property_t canio_can_transmit_error_count_obj = { MP_PROPERTY_GETTER(canio_can_transmit_error_count_obj,
.base.type = &mp_type_property, (mp_obj_t)&canio_can_transmit_error_count_get_obj);
.proxy = {(mp_obj_t)&canio_can_transmit_error_count_get_obj,
(mp_obj_t)mp_const_none,
(mp_obj_t)mp_const_none},
};
//| receive_error_count: int //| receive_error_count: int
//| """The number of receive errors (read-only). Increased for a detected reception error, decreased for successful reception. Limited to the range from 0 to 255 inclusive. Also called REC.""" //| """The number of receive errors (read-only). Increased for a detected reception error, decreased for successful reception. Limited to the range from 0 to 255 inclusive. Also called REC."""
@ -164,12 +153,8 @@ STATIC mp_obj_t canio_can_receive_error_count_get(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(canio_can_receive_error_count_get_obj, canio_can_receive_error_count_get); MP_DEFINE_CONST_FUN_OBJ_1(canio_can_receive_error_count_get_obj, canio_can_receive_error_count_get);
STATIC const mp_obj_property_t canio_can_receive_error_count_obj = { MP_PROPERTY_GETTER(canio_can_receive_error_count_obj,
.base.type = &mp_type_property, (mp_obj_t)&canio_can_receive_error_count_get_obj);
.proxy = {(mp_obj_t)&canio_can_receive_error_count_get_obj,
(mp_obj_t)mp_const_none,
(mp_obj_t)mp_const_none},
};
//| state: BusState //| state: BusState
//| """The current state of the bus. (read-only)""" //| """The current state of the bus. (read-only)"""
@ -181,12 +166,8 @@ STATIC mp_obj_t canio_can_state_get(mp_obj_t self_in) {
MP_DEFINE_CONST_FUN_OBJ_1(canio_can_state_get_obj, canio_can_state_get); MP_DEFINE_CONST_FUN_OBJ_1(canio_can_state_get_obj, canio_can_state_get);
STATIC const mp_obj_property_t canio_can_state_obj = { MP_PROPERTY_GETTER(canio_can_state_obj,
.base.type = &mp_type_property, (mp_obj_t)&canio_can_state_get_obj);
.proxy = {(mp_obj_t)&canio_can_state_get_obj,
(mp_obj_t)mp_const_none,
(mp_obj_t)mp_const_none},
};
//| def restart(self) -> None: //| def restart(self) -> None:
@ -283,12 +264,8 @@ STATIC mp_obj_t canio_can_loopback_get(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(canio_can_loopback_get_obj, canio_can_loopback_get); MP_DEFINE_CONST_FUN_OBJ_1(canio_can_loopback_get_obj, canio_can_loopback_get);
STATIC const mp_obj_property_t canio_can_loopback_obj = { MP_PROPERTY_GETTER(canio_can_loopback_obj,
.base.type = &mp_type_property, (mp_obj_t)&canio_can_loopback_get_obj);
.proxy = {(mp_obj_t)&canio_can_loopback_get_obj,
(mp_obj_t)mp_const_none,
(mp_obj_t)mp_const_none},
};
//| def send(self, message: Union[RemoteTransmissionRequest, Message]) -> None: //| def send(self, message: Union[RemoteTransmissionRequest, Message]) -> None:
@ -322,12 +299,8 @@ STATIC mp_obj_t canio_can_silent_get(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(canio_can_silent_get_obj, canio_can_silent_get); MP_DEFINE_CONST_FUN_OBJ_1(canio_can_silent_get_obj, canio_can_silent_get);
STATIC const mp_obj_property_t canio_can_silent_obj = { MP_PROPERTY_GETTER(canio_can_silent_obj,
.base.type = &mp_type_property, (mp_obj_t)&canio_can_silent_get_obj);
.proxy = {(mp_obj_t)&canio_can_silent_get_obj,
(mp_obj_t)mp_const_none,
(mp_obj_t)mp_const_none},
};
//| def deinit(self) -> None: //| def deinit(self) -> None:

View File

@ -150,12 +150,9 @@ STATIC mp_obj_t canio_listener_timeout_set(mp_obj_t self_in, mp_obj_t timeout_in
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_2(canio_listener_timeout_set_obj, canio_listener_timeout_set); STATIC MP_DEFINE_CONST_FUN_OBJ_2(canio_listener_timeout_set_obj, canio_listener_timeout_set);
STATIC const mp_obj_property_t canio_listener_timeout_obj = { MP_PROPERTY_GETSET(canio_listener_timeout_obj,
.base.type = &mp_type_property, (mp_obj_t)&canio_listener_timeout_get_obj,
.proxy = {(mp_obj_t)&canio_listener_timeout_get_obj, (mp_obj_t)&canio_listener_timeout_set_obj);
(mp_obj_t)&canio_listener_timeout_set_obj,
(mp_obj_t)mp_const_none},
};

View File

@ -82,12 +82,8 @@ STATIC mp_obj_t canio_match_id_get(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(canio_match_id_get_obj, canio_match_id_get); MP_DEFINE_CONST_FUN_OBJ_1(canio_match_id_get_obj, canio_match_id_get);
const mp_obj_property_t canio_match_id_obj = { MP_PROPERTY_GETTER(canio_match_id_obj,
.base.type = &mp_type_property, (mp_obj_t)&canio_match_id_get_obj);
.proxy = {(mp_obj_t)&canio_match_id_get_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| //|
//| mask: int //| mask: int
@ -100,12 +96,8 @@ STATIC mp_obj_t canio_match_mask_get(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(canio_match_mask_get_obj, canio_match_mask_get); MP_DEFINE_CONST_FUN_OBJ_1(canio_match_mask_get_obj, canio_match_mask_get);
const mp_obj_property_t canio_match_mask_obj = { MP_PROPERTY_GETTER(canio_match_mask_obj,
.base.type = &mp_type_property, (mp_obj_t)&canio_match_mask_get_obj);
.proxy = {(mp_obj_t)&canio_match_mask_get_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| extended: bool //| extended: bool
//| """True to match extended ids, False to match standard ides""" //| """True to match extended ids, False to match standard ides"""
@ -117,12 +109,8 @@ STATIC mp_obj_t canio_match_extended_get(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(canio_match_extended_get_obj, canio_match_extended_get); MP_DEFINE_CONST_FUN_OBJ_1(canio_match_extended_get_obj, canio_match_extended_get);
const mp_obj_property_t canio_match_extended_obj = { MP_PROPERTY_GETTER(canio_match_extended_obj,
.base.type = &mp_type_property, (mp_obj_t)&canio_match_extended_get_obj);
.proxy = {(mp_obj_t)&canio_match_extended_get_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t canio_match_locals_dict_table[] = { STATIC const mp_rom_map_elem_t canio_match_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_id), MP_ROM_PTR(&canio_match_id_obj) }, { MP_ROM_QSTR(MP_QSTR_id), MP_ROM_PTR(&canio_match_id_obj) },

View File

@ -83,12 +83,9 @@ STATIC mp_obj_t canio_message_id_set(const mp_obj_t self_in, const mp_obj_t id)
} }
MP_DEFINE_CONST_FUN_OBJ_2(canio_message_id_set_obj, canio_message_id_set); MP_DEFINE_CONST_FUN_OBJ_2(canio_message_id_set_obj, canio_message_id_set);
STATIC const mp_obj_property_t canio_message_id_obj = { MP_PROPERTY_GETSET(canio_message_id_obj,
.base.type = &mp_type_property, (mp_obj_t)&canio_message_id_get_obj,
.proxy = {(mp_obj_t)&canio_message_id_get_obj, (mp_obj_t)&canio_message_id_set_obj);
(mp_obj_t)&canio_message_id_set_obj,
MP_ROM_NONE},
};
//| data: bytes //| data: bytes
//| """The content of the message""" //| """The content of the message"""
@ -112,12 +109,9 @@ STATIC mp_obj_t canio_message_data_set(const mp_obj_t self_in, const mp_obj_t da
MP_DEFINE_CONST_FUN_OBJ_2(canio_message_data_set_obj, canio_message_data_set); MP_DEFINE_CONST_FUN_OBJ_2(canio_message_data_set_obj, canio_message_data_set);
STATIC const mp_obj_property_t canio_message_data_obj = { MP_PROPERTY_GETSET(canio_message_data_obj,
.base.type = &mp_type_property, (mp_obj_t)&canio_message_data_get_obj,
.proxy = {(mp_obj_t)&canio_message_data_get_obj, (mp_obj_t)&canio_message_data_set_obj);
(mp_obj_t)&canio_message_data_set_obj,
MP_ROM_NONE},
};
//| extended: bool //| extended: bool
@ -137,12 +131,9 @@ STATIC mp_obj_t canio_message_extended_set(const mp_obj_t self_in, const mp_obj_
MP_DEFINE_CONST_FUN_OBJ_2(canio_message_extended_set_obj, canio_message_extended_set); MP_DEFINE_CONST_FUN_OBJ_2(canio_message_extended_set_obj, canio_message_extended_set);
STATIC const mp_obj_property_t canio_message_extended_obj = { MP_PROPERTY_GETSET(canio_message_extended_obj,
.base.type = &mp_type_property, (mp_obj_t)&canio_message_extended_get_obj,
.proxy = {(mp_obj_t)&canio_message_extended_get_obj, (mp_obj_t)&canio_message_extended_set_obj);
(mp_obj_t)&canio_message_extended_set_obj,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t canio_message_locals_dict_table[] = { STATIC const mp_rom_map_elem_t canio_message_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_id), MP_ROM_PTR(&canio_message_id_obj) }, { MP_ROM_QSTR(MP_QSTR_id), MP_ROM_PTR(&canio_message_id_obj) },

View File

@ -82,12 +82,9 @@ STATIC mp_obj_t canio_remote_transmission_request_id_set(const mp_obj_t self_in,
} }
MP_DEFINE_CONST_FUN_OBJ_2(canio_remote_transmission_request_id_set_obj, canio_remote_transmission_request_id_set); MP_DEFINE_CONST_FUN_OBJ_2(canio_remote_transmission_request_id_set_obj, canio_remote_transmission_request_id_set);
STATIC const mp_obj_property_t canio_remote_transmission_request_id_obj = { MP_PROPERTY_GETSET(canio_remote_transmission_request_id_obj,
.base.type = &mp_type_property, (mp_obj_t)&canio_remote_transmission_request_id_get_obj,
.proxy = {(mp_obj_t)&canio_remote_transmission_request_id_get_obj, (mp_obj_t)&canio_remote_transmission_request_id_set_obj);
(mp_obj_t)&canio_remote_transmission_request_id_set_obj,
MP_ROM_NONE},
};
//| extended: bool //| extended: bool
//| """True if the message's id is an extended id""" //| """True if the message's id is an extended id"""
@ -106,12 +103,9 @@ STATIC mp_obj_t canio_remote_transmission_request_extended_set(const mp_obj_t se
MP_DEFINE_CONST_FUN_OBJ_2(canio_remote_transmission_request_extended_set_obj, canio_remote_transmission_request_extended_set); MP_DEFINE_CONST_FUN_OBJ_2(canio_remote_transmission_request_extended_set_obj, canio_remote_transmission_request_extended_set);
STATIC const mp_obj_property_t canio_remote_transmission_request_extended_obj = { MP_PROPERTY_GETSET(canio_remote_transmission_request_extended_obj,
.base.type = &mp_type_property, (mp_obj_t)&canio_remote_transmission_request_extended_get_obj,
.proxy = {(mp_obj_t)&canio_remote_transmission_request_extended_get_obj, (mp_obj_t)&canio_remote_transmission_request_extended_set_obj);
(mp_obj_t)&canio_remote_transmission_request_extended_set_obj,
MP_ROM_NONE},
};
//| length: int //| length: int
//| """The length of the requested message.""" //| """The length of the requested message."""
@ -134,12 +128,9 @@ STATIC mp_obj_t canio_remote_transmission_request_length_set(const mp_obj_t self
MP_DEFINE_CONST_FUN_OBJ_2(canio_remote_transmission_request_length_set_obj, canio_remote_transmission_request_length_set); MP_DEFINE_CONST_FUN_OBJ_2(canio_remote_transmission_request_length_set_obj, canio_remote_transmission_request_length_set);
STATIC const mp_obj_property_t canio_remote_transmission_request_length_obj = { MP_PROPERTY_GETSET(canio_remote_transmission_request_length_obj,
.base.type = &mp_type_property, (mp_obj_t)&canio_remote_transmission_request_length_get_obj,
.proxy = {(mp_obj_t)&canio_remote_transmission_request_length_get_obj, (mp_obj_t)&canio_remote_transmission_request_length_set_obj);
(mp_obj_t)&canio_remote_transmission_request_length_set_obj,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t canio_remote_transmission_request_locals_dict_table[] = { STATIC const mp_rom_map_elem_t canio_remote_transmission_request_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_id), MP_ROM_PTR(&canio_remote_transmission_request_id_obj) }, { MP_ROM_QSTR(MP_QSTR_id), MP_ROM_PTR(&canio_remote_transmission_request_id_obj) },

View File

@ -114,12 +114,9 @@ STATIC mp_obj_t countio_counter_obj_set_count(mp_obj_t self_in, mp_obj_t new_cou
} }
MP_DEFINE_CONST_FUN_OBJ_2(countio_counter_set_count_obj, countio_counter_obj_set_count); MP_DEFINE_CONST_FUN_OBJ_2(countio_counter_set_count_obj, countio_counter_obj_set_count);
const mp_obj_property_t countio_counter_count_obj = { MP_PROPERTY_GETSET(countio_counter_count_obj,
.base.type = &mp_type_property, (mp_obj_t)&countio_counter_get_count_obj,
.proxy = {(mp_obj_t)&countio_counter_get_count_obj, (mp_obj_t)&countio_counter_set_count_obj);
(mp_obj_t)&countio_counter_set_count_obj,
MP_ROM_NONE},
};
//| def reset(self) -> None: //| def reset(self) -> None:
//| """Resets the count back to 0.""" //| """Resets the count back to 0."""

View File

@ -213,12 +213,9 @@ STATIC mp_obj_t digitalio_digitalinout_obj_set_direction(mp_obj_t self_in, mp_ob
} }
MP_DEFINE_CONST_FUN_OBJ_2(digitalio_digitalinout_set_direction_obj, digitalio_digitalinout_obj_set_direction); MP_DEFINE_CONST_FUN_OBJ_2(digitalio_digitalinout_set_direction_obj, digitalio_digitalinout_obj_set_direction);
const mp_obj_property_t digitalio_digitalio_direction_obj = { MP_PROPERTY_GETSET(digitalio_digitalio_direction_obj,
.base.type = &mp_type_property, (mp_obj_t)&digitalio_digitalinout_get_direction_obj,
.proxy = {(mp_obj_t)&digitalio_digitalinout_get_direction_obj, (mp_obj_t)&digitalio_digitalinout_set_direction_obj);
(mp_obj_t)&digitalio_digitalinout_set_direction_obj,
MP_ROM_NONE},
};
//| value: bool //| value: bool
//| """The digital logic level of the pin.""" //| """The digital logic level of the pin."""
@ -243,12 +240,9 @@ STATIC mp_obj_t digitalio_digitalinout_obj_set_value(mp_obj_t self_in, mp_obj_t
} }
MP_DEFINE_CONST_FUN_OBJ_2(digitalio_digitalinout_set_value_obj, digitalio_digitalinout_obj_set_value); MP_DEFINE_CONST_FUN_OBJ_2(digitalio_digitalinout_set_value_obj, digitalio_digitalinout_obj_set_value);
const mp_obj_property_t digitalio_digitalinout_value_obj = { MP_PROPERTY_GETSET(digitalio_digitalinout_value_obj,
.base.type = &mp_type_property, (mp_obj_t)&digitalio_digitalinout_get_value_obj,
.proxy = {(mp_obj_t)&digitalio_digitalinout_get_value_obj, (mp_obj_t)&digitalio_digitalinout_set_value_obj);
(mp_obj_t)&digitalio_digitalinout_set_value_obj,
MP_ROM_NONE},
};
//| drive_mode: DriveMode //| drive_mode: DriveMode
//| """The pin drive mode. One of: //| """The pin drive mode. One of:
@ -287,12 +281,9 @@ STATIC mp_obj_t digitalio_digitalinout_obj_set_drive_mode(mp_obj_t self_in, mp_o
} }
MP_DEFINE_CONST_FUN_OBJ_2(digitalio_digitalinout_set_drive_mode_obj, digitalio_digitalinout_obj_set_drive_mode); MP_DEFINE_CONST_FUN_OBJ_2(digitalio_digitalinout_set_drive_mode_obj, digitalio_digitalinout_obj_set_drive_mode);
const mp_obj_property_t digitalio_digitalio_drive_mode_obj = { MP_PROPERTY_GETSET(digitalio_digitalio_drive_mode_obj,
.base.type = &mp_type_property, (mp_obj_t)&digitalio_digitalinout_get_drive_mode_obj,
.proxy = {(mp_obj_t)&digitalio_digitalinout_get_drive_mode_obj, (mp_obj_t)&digitalio_digitalinout_set_drive_mode_obj);
(mp_obj_t)&digitalio_digitalinout_set_drive_mode_obj,
MP_ROM_NONE},
};
//| pull: Optional[Pull] //| pull: Optional[Pull]
//| """The pin pull direction. One of: //| """The pin pull direction. One of:
@ -333,12 +324,9 @@ STATIC mp_obj_t digitalio_digitalinout_obj_set_pull(mp_obj_t self_in, mp_obj_t p
} }
MP_DEFINE_CONST_FUN_OBJ_2(digitalio_digitalinout_set_pull_obj, digitalio_digitalinout_obj_set_pull); MP_DEFINE_CONST_FUN_OBJ_2(digitalio_digitalinout_set_pull_obj, digitalio_digitalinout_obj_set_pull);
const mp_obj_property_t digitalio_digitalio_pull_obj = { MP_PROPERTY_GETSET(digitalio_digitalio_pull_obj,
.base.type = &mp_type_property, (mp_obj_t)&digitalio_digitalinout_get_pull_obj,
.proxy = {(mp_obj_t)&digitalio_digitalinout_get_pull_obj, (mp_obj_t)&digitalio_digitalinout_set_pull_obj);
(mp_obj_t)&digitalio_digitalinout_set_pull_obj,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t digitalio_digitalinout_locals_dict_table[] = { STATIC const mp_rom_map_elem_t digitalio_digitalinout_locals_dict_table[] = {
// instance methods // instance methods

View File

@ -97,12 +97,8 @@ STATIC mp_obj_t displayio_bitmap_obj_get_width(mp_obj_t self_in) {
MP_DEFINE_CONST_FUN_OBJ_1(displayio_bitmap_get_width_obj, displayio_bitmap_obj_get_width); MP_DEFINE_CONST_FUN_OBJ_1(displayio_bitmap_get_width_obj, displayio_bitmap_obj_get_width);
const mp_obj_property_t displayio_bitmap_width_obj = { MP_PROPERTY_GETTER(displayio_bitmap_width_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_bitmap_get_width_obj);
.proxy = {(mp_obj_t)&displayio_bitmap_get_width_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| height: int //| height: int
//| """Height of the bitmap. (read only)""" //| """Height of the bitmap. (read only)"""
@ -115,12 +111,8 @@ STATIC mp_obj_t displayio_bitmap_obj_get_height(mp_obj_t self_in) {
MP_DEFINE_CONST_FUN_OBJ_1(displayio_bitmap_get_height_obj, displayio_bitmap_obj_get_height); MP_DEFINE_CONST_FUN_OBJ_1(displayio_bitmap_get_height_obj, displayio_bitmap_obj_get_height);
const mp_obj_property_t displayio_bitmap_height_obj = { MP_PROPERTY_GETTER(displayio_bitmap_height_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_bitmap_get_height_obj);
.proxy = {(mp_obj_t)&displayio_bitmap_get_height_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| def __getitem__(self, index: Union[Tuple[int, int], int]) -> int: //| def __getitem__(self, index: Union[Tuple[int, int], int]) -> int:
//| """Returns the value at the given index. The index can either be an x,y tuple or an int equal //| """Returns the value at the given index. The index can either be an x,y tuple or an int equal

View File

@ -103,12 +103,9 @@ STATIC mp_obj_t displayio_colorconverter_obj_set_dither(mp_obj_t self_in, mp_obj
} }
MP_DEFINE_CONST_FUN_OBJ_2(displayio_colorconverter_set_dither_obj, displayio_colorconverter_obj_set_dither); MP_DEFINE_CONST_FUN_OBJ_2(displayio_colorconverter_set_dither_obj, displayio_colorconverter_obj_set_dither);
const mp_obj_property_t displayio_colorconverter_dither_obj = { MP_PROPERTY_GETSET(displayio_colorconverter_dither_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_colorconverter_get_dither_obj,
.proxy = {(mp_obj_t)&displayio_colorconverter_get_dither_obj, (mp_obj_t)&displayio_colorconverter_set_dither_obj);
(mp_obj_t)&displayio_colorconverter_set_dither_obj,
MP_ROM_NONE},
};
//| def make_transparent(self, color: int) -> None: //| def make_transparent(self, color: int) -> None:
//| """Set the transparent color or index for the ColorConverter. This will //| """Set the transparent color or index for the ColorConverter. This will

View File

@ -297,12 +297,9 @@ STATIC mp_obj_t displayio_display_obj_set_auto_refresh(mp_obj_t self_in, mp_obj_
} }
MP_DEFINE_CONST_FUN_OBJ_2(displayio_display_set_auto_refresh_obj, displayio_display_obj_set_auto_refresh); MP_DEFINE_CONST_FUN_OBJ_2(displayio_display_set_auto_refresh_obj, displayio_display_obj_set_auto_refresh);
const mp_obj_property_t displayio_display_auto_refresh_obj = { MP_PROPERTY_GETSET(displayio_display_auto_refresh_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_display_get_auto_refresh_obj,
.proxy = {(mp_obj_t)&displayio_display_get_auto_refresh_obj, (mp_obj_t)&displayio_display_set_auto_refresh_obj);
(mp_obj_t)&displayio_display_set_auto_refresh_obj,
MP_ROM_NONE},
};
//| brightness: float //| brightness: float
//| """The brightness of the display as a float. 0.0 is off and 1.0 is full brightness. When //| """The brightness of the display as a float. 0.0 is off and 1.0 is full brightness. When
@ -334,12 +331,9 @@ STATIC mp_obj_t displayio_display_obj_set_brightness(mp_obj_t self_in, mp_obj_t
} }
MP_DEFINE_CONST_FUN_OBJ_2(displayio_display_set_brightness_obj, displayio_display_obj_set_brightness); MP_DEFINE_CONST_FUN_OBJ_2(displayio_display_set_brightness_obj, displayio_display_obj_set_brightness);
const mp_obj_property_t displayio_display_brightness_obj = { MP_PROPERTY_GETSET(displayio_display_brightness_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_display_get_brightness_obj,
.proxy = {(mp_obj_t)&displayio_display_get_brightness_obj, (mp_obj_t)&displayio_display_set_brightness_obj);
(mp_obj_t)&displayio_display_set_brightness_obj,
MP_ROM_NONE},
};
//| auto_brightness: bool //| auto_brightness: bool
//| """True when the display brightness is adjusted automatically, based on an ambient //| """True when the display brightness is adjusted automatically, based on an ambient
@ -362,12 +356,9 @@ STATIC mp_obj_t displayio_display_obj_set_auto_brightness(mp_obj_t self_in, mp_o
} }
MP_DEFINE_CONST_FUN_OBJ_2(displayio_display_set_auto_brightness_obj, displayio_display_obj_set_auto_brightness); MP_DEFINE_CONST_FUN_OBJ_2(displayio_display_set_auto_brightness_obj, displayio_display_obj_set_auto_brightness);
const mp_obj_property_t displayio_display_auto_brightness_obj = { MP_PROPERTY_GETSET(displayio_display_auto_brightness_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_display_get_auto_brightness_obj,
.proxy = {(mp_obj_t)&displayio_display_get_auto_brightness_obj, (mp_obj_t)&displayio_display_set_auto_brightness_obj);
(mp_obj_t)&displayio_display_set_auto_brightness_obj,
MP_ROM_NONE},
};
@ -381,12 +372,8 @@ STATIC mp_obj_t displayio_display_obj_get_width(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(displayio_display_get_width_obj, displayio_display_obj_get_width); MP_DEFINE_CONST_FUN_OBJ_1(displayio_display_get_width_obj, displayio_display_obj_get_width);
const mp_obj_property_t displayio_display_width_obj = { MP_PROPERTY_GETTER(displayio_display_width_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_display_get_width_obj);
.proxy = {(mp_obj_t)&displayio_display_get_width_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| height: int //| height: int
//| """Gets the height of the board""" //| """Gets the height of the board"""
@ -397,12 +384,8 @@ STATIC mp_obj_t displayio_display_obj_get_height(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(displayio_display_get_height_obj, displayio_display_obj_get_height); MP_DEFINE_CONST_FUN_OBJ_1(displayio_display_get_height_obj, displayio_display_obj_get_height);
const mp_obj_property_t displayio_display_height_obj = { MP_PROPERTY_GETTER(displayio_display_height_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_display_get_height_obj);
.proxy = {(mp_obj_t)&displayio_display_get_height_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| rotation: int //| rotation: int
//| """The rotation of the display as an int in degrees.""" //| """The rotation of the display as an int in degrees."""
@ -420,12 +403,9 @@ STATIC mp_obj_t displayio_display_obj_set_rotation(mp_obj_t self_in, mp_obj_t va
MP_DEFINE_CONST_FUN_OBJ_2(displayio_display_set_rotation_obj, displayio_display_obj_set_rotation); MP_DEFINE_CONST_FUN_OBJ_2(displayio_display_set_rotation_obj, displayio_display_obj_set_rotation);
const mp_obj_property_t displayio_display_rotation_obj = { MP_PROPERTY_GETSET(displayio_display_rotation_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_display_get_rotation_obj,
.proxy = {(mp_obj_t)&displayio_display_get_rotation_obj, (mp_obj_t)&displayio_display_set_rotation_obj);
(mp_obj_t)&displayio_display_set_rotation_obj,
MP_ROM_NONE},
};
//| bus: _DisplayBus //| bus: _DisplayBus
//| """The bus being used by the display""" //| """The bus being used by the display"""
@ -437,12 +417,8 @@ STATIC mp_obj_t displayio_display_obj_get_bus(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(displayio_display_get_bus_obj, displayio_display_obj_get_bus); MP_DEFINE_CONST_FUN_OBJ_1(displayio_display_get_bus_obj, displayio_display_obj_get_bus);
const mp_obj_property_t displayio_display_bus_obj = { MP_PROPERTY_GETTER(displayio_display_bus_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_display_get_bus_obj);
.proxy = {(mp_obj_t)&displayio_display_get_bus_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| root_group: Group //| root_group: Group
//| """The root group on the display.""" //| """The root group on the display."""
@ -454,12 +430,8 @@ STATIC mp_obj_t displayio_display_obj_get_root_group(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(displayio_display_get_root_group_obj, displayio_display_obj_get_root_group); MP_DEFINE_CONST_FUN_OBJ_1(displayio_display_get_root_group_obj, displayio_display_obj_get_root_group);
const mp_obj_property_t displayio_display_root_group_obj = { MP_PROPERTY_GETTER(displayio_display_root_group_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_display_get_root_group_obj);
.proxy = {(mp_obj_t)&displayio_display_get_root_group_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| def fill_row(self, y: int, buffer: WriteableBuffer) -> WriteableBuffer: //| def fill_row(self, y: int, buffer: WriteableBuffer) -> WriteableBuffer:

View File

@ -268,12 +268,8 @@ STATIC mp_obj_t displayio_epaperdisplay_obj_get_time_to_refresh(mp_obj_t self_in
} }
MP_DEFINE_CONST_FUN_OBJ_1(displayio_epaperdisplay_get_time_to_refresh_obj, displayio_epaperdisplay_obj_get_time_to_refresh); MP_DEFINE_CONST_FUN_OBJ_1(displayio_epaperdisplay_get_time_to_refresh_obj, displayio_epaperdisplay_obj_get_time_to_refresh);
const mp_obj_property_t displayio_epaperdisplay_time_to_refresh_obj = { MP_PROPERTY_GETTER(displayio_epaperdisplay_time_to_refresh_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_epaperdisplay_get_time_to_refresh_obj);
.proxy = {(mp_obj_t)&displayio_epaperdisplay_get_time_to_refresh_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| busy: bool //| busy: bool
//| """True when the display is refreshing. This uses the ``busy_pin`` when available or the //| """True when the display is refreshing. This uses the ``busy_pin`` when available or the
@ -285,12 +281,8 @@ STATIC mp_obj_t displayio_epaperdisplay_obj_get_busy(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(displayio_epaperdisplay_get_busy_obj, displayio_epaperdisplay_obj_get_busy); MP_DEFINE_CONST_FUN_OBJ_1(displayio_epaperdisplay_get_busy_obj, displayio_epaperdisplay_obj_get_busy);
const mp_obj_property_t displayio_epaperdisplay_busy_obj = { MP_PROPERTY_GETTER(displayio_epaperdisplay_busy_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_epaperdisplay_get_busy_obj);
.proxy = {(mp_obj_t)&displayio_epaperdisplay_get_busy_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| width: int //| width: int
//| """Gets the width of the display in pixels""" //| """Gets the width of the display in pixels"""
@ -301,12 +293,8 @@ STATIC mp_obj_t displayio_epaperdisplay_obj_get_width(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(displayio_epaperdisplay_get_width_obj, displayio_epaperdisplay_obj_get_width); MP_DEFINE_CONST_FUN_OBJ_1(displayio_epaperdisplay_get_width_obj, displayio_epaperdisplay_obj_get_width);
const mp_obj_property_t displayio_epaperdisplay_width_obj = { MP_PROPERTY_GETTER(displayio_epaperdisplay_width_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_epaperdisplay_get_width_obj);
.proxy = {(mp_obj_t)&displayio_epaperdisplay_get_width_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| height: int //| height: int
//| """Gets the height of the display in pixels""" //| """Gets the height of the display in pixels"""
@ -317,12 +305,8 @@ STATIC mp_obj_t displayio_epaperdisplay_obj_get_height(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(displayio_epaperdisplay_get_height_obj, displayio_epaperdisplay_obj_get_height); MP_DEFINE_CONST_FUN_OBJ_1(displayio_epaperdisplay_get_height_obj, displayio_epaperdisplay_obj_get_height);
const mp_obj_property_t displayio_epaperdisplay_height_obj = { MP_PROPERTY_GETTER(displayio_epaperdisplay_height_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_epaperdisplay_get_height_obj);
.proxy = {(mp_obj_t)&displayio_epaperdisplay_get_height_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| rotation: int //| rotation: int
//| """The rotation of the display as an int in degrees.""" //| """The rotation of the display as an int in degrees."""
@ -340,12 +324,9 @@ STATIC mp_obj_t displayio_epaperdisplay_obj_set_rotation(mp_obj_t self_in, mp_ob
MP_DEFINE_CONST_FUN_OBJ_2(displayio_epaperdisplay_set_rotation_obj, displayio_epaperdisplay_obj_set_rotation); MP_DEFINE_CONST_FUN_OBJ_2(displayio_epaperdisplay_set_rotation_obj, displayio_epaperdisplay_obj_set_rotation);
const mp_obj_property_t displayio_epaperdisplay_rotation_obj = { MP_PROPERTY_GETSET(displayio_epaperdisplay_rotation_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_epaperdisplay_get_rotation_obj,
.proxy = {(mp_obj_t)&displayio_epaperdisplay_get_rotation_obj, (mp_obj_t)&displayio_epaperdisplay_set_rotation_obj);
(mp_obj_t)&displayio_epaperdisplay_set_rotation_obj,
MP_ROM_NONE},
};
//| bus: _DisplayBus //| bus: _DisplayBus
//| """The bus being used by the display""" //| """The bus being used by the display"""
@ -356,12 +337,8 @@ STATIC mp_obj_t displayio_epaperdisplay_obj_get_bus(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(displayio_epaperdisplay_get_bus_obj, displayio_epaperdisplay_obj_get_bus); MP_DEFINE_CONST_FUN_OBJ_1(displayio_epaperdisplay_get_bus_obj, displayio_epaperdisplay_obj_get_bus);
const mp_obj_property_t displayio_epaperdisplay_bus_obj = { MP_PROPERTY_GETTER(displayio_epaperdisplay_bus_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_epaperdisplay_get_bus_obj);
.proxy = {(mp_obj_t)&displayio_epaperdisplay_get_bus_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t displayio_epaperdisplay_locals_dict_table[] = { STATIC const mp_rom_map_elem_t displayio_epaperdisplay_locals_dict_table[] = {

View File

@ -97,12 +97,9 @@ STATIC mp_obj_t displayio_group_obj_set_hidden(mp_obj_t self_in, mp_obj_t hidden
} }
MP_DEFINE_CONST_FUN_OBJ_2(displayio_group_set_hidden_obj, displayio_group_obj_set_hidden); MP_DEFINE_CONST_FUN_OBJ_2(displayio_group_set_hidden_obj, displayio_group_obj_set_hidden);
const mp_obj_property_t displayio_group_hidden_obj = { MP_PROPERTY_GETSET(displayio_group_hidden_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_group_get_hidden_obj,
.proxy = {(mp_obj_t)&displayio_group_get_hidden_obj, (mp_obj_t)&displayio_group_set_hidden_obj);
(mp_obj_t)&displayio_group_set_hidden_obj,
MP_ROM_NONE},
};
//| scale: int //| scale: int
//| """Scales each pixel within the Group in both directions. For example, when scale=2 each pixel //| """Scales each pixel within the Group in both directions. For example, when scale=2 each pixel
@ -126,12 +123,9 @@ STATIC mp_obj_t displayio_group_obj_set_scale(mp_obj_t self_in, mp_obj_t scale_o
} }
MP_DEFINE_CONST_FUN_OBJ_2(displayio_group_set_scale_obj, displayio_group_obj_set_scale); MP_DEFINE_CONST_FUN_OBJ_2(displayio_group_set_scale_obj, displayio_group_obj_set_scale);
const mp_obj_property_t displayio_group_scale_obj = { MP_PROPERTY_GETSET(displayio_group_scale_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_group_get_scale_obj,
.proxy = {(mp_obj_t)&displayio_group_get_scale_obj, (mp_obj_t)&displayio_group_set_scale_obj);
(mp_obj_t)&displayio_group_set_scale_obj,
MP_ROM_NONE},
};
//| x: int //| x: int
//| """X position of the Group in the parent.""" //| """X position of the Group in the parent."""
@ -151,12 +145,9 @@ STATIC mp_obj_t displayio_group_obj_set_x(mp_obj_t self_in, mp_obj_t x_obj) {
} }
MP_DEFINE_CONST_FUN_OBJ_2(displayio_group_set_x_obj, displayio_group_obj_set_x); MP_DEFINE_CONST_FUN_OBJ_2(displayio_group_set_x_obj, displayio_group_obj_set_x);
const mp_obj_property_t displayio_group_x_obj = { MP_PROPERTY_GETSET(displayio_group_x_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_group_get_x_obj,
.proxy = {(mp_obj_t)&displayio_group_get_x_obj, (mp_obj_t)&displayio_group_set_x_obj);
(mp_obj_t)&displayio_group_set_x_obj,
MP_ROM_NONE},
};
//| y: int //| y: int
//| """Y position of the Group in the parent.""" //| """Y position of the Group in the parent."""
@ -176,12 +167,9 @@ STATIC mp_obj_t displayio_group_obj_set_y(mp_obj_t self_in, mp_obj_t y_obj) {
} }
MP_DEFINE_CONST_FUN_OBJ_2(displayio_group_set_y_obj, displayio_group_obj_set_y); MP_DEFINE_CONST_FUN_OBJ_2(displayio_group_set_y_obj, displayio_group_obj_set_y);
const mp_obj_property_t displayio_group_y_obj = { MP_PROPERTY_GETSET(displayio_group_y_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_group_get_y_obj,
.proxy = {(mp_obj_t)&displayio_group_get_y_obj, (mp_obj_t)&displayio_group_set_y_obj);
(mp_obj_t)&displayio_group_set_y_obj,
MP_ROM_NONE},
};
//| def append(self, layer: Union[vectorio.Circle, vectorio.Rectangle, vectorio.Polygon, Group, TileGrid]) -> None: //| def append(self, layer: Union[vectorio.Circle, vectorio.Rectangle, vectorio.Polygon, Group, TileGrid]) -> None:
//| """Append a layer to the group. It will be drawn above other layers.""" //| """Append a layer to the group. It will be drawn above other layers."""

View File

@ -109,13 +109,8 @@ STATIC mp_obj_t displayio_ondiskbitmap_obj_get_width(mp_obj_t self_in) {
MP_DEFINE_CONST_FUN_OBJ_1(displayio_ondiskbitmap_get_width_obj, displayio_ondiskbitmap_obj_get_width); MP_DEFINE_CONST_FUN_OBJ_1(displayio_ondiskbitmap_get_width_obj, displayio_ondiskbitmap_obj_get_width);
const mp_obj_property_t displayio_ondiskbitmap_width_obj = { MP_PROPERTY_GETTER(displayio_ondiskbitmap_width_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_ondiskbitmap_get_width_obj);
.proxy = {(mp_obj_t)&displayio_ondiskbitmap_get_width_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| height: int //| height: int
//| """Height of the bitmap. (read only)""" //| """Height of the bitmap. (read only)"""
@ -128,13 +123,8 @@ STATIC mp_obj_t displayio_ondiskbitmap_obj_get_height(mp_obj_t self_in) {
MP_DEFINE_CONST_FUN_OBJ_1(displayio_ondiskbitmap_get_height_obj, displayio_ondiskbitmap_obj_get_height); MP_DEFINE_CONST_FUN_OBJ_1(displayio_ondiskbitmap_get_height_obj, displayio_ondiskbitmap_obj_get_height);
const mp_obj_property_t displayio_ondiskbitmap_height_obj = { MP_PROPERTY_GETTER(displayio_ondiskbitmap_height_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_ondiskbitmap_get_height_obj);
.proxy = {(mp_obj_t)&displayio_ondiskbitmap_get_height_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| pixel_shader: Union[ColorConverter, Palette] //| pixel_shader: Union[ColorConverter, Palette]
//| """The image's pixel_shader. The type depends on the underlying //| """The image's pixel_shader. The type depends on the underlying

View File

@ -161,12 +161,9 @@ STATIC mp_obj_t displayio_tilegrid_obj_set_hidden(mp_obj_t self_in, mp_obj_t hid
} }
MP_DEFINE_CONST_FUN_OBJ_2(displayio_tilegrid_set_hidden_obj, displayio_tilegrid_obj_set_hidden); MP_DEFINE_CONST_FUN_OBJ_2(displayio_tilegrid_set_hidden_obj, displayio_tilegrid_obj_set_hidden);
const mp_obj_property_t displayio_tilegrid_hidden_obj = { MP_PROPERTY_GETSET(displayio_tilegrid_hidden_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_tilegrid_get_hidden_obj,
.proxy = {(mp_obj_t)&displayio_tilegrid_get_hidden_obj, (mp_obj_t)&displayio_tilegrid_set_hidden_obj);
(mp_obj_t)&displayio_tilegrid_set_hidden_obj,
MP_ROM_NONE},
};
//| x: int //| x: int
//| """X position of the left edge in the parent.""" //| """X position of the left edge in the parent."""
@ -186,12 +183,9 @@ STATIC mp_obj_t displayio_tilegrid_obj_set_x(mp_obj_t self_in, mp_obj_t x_obj) {
} }
MP_DEFINE_CONST_FUN_OBJ_2(displayio_tilegrid_set_x_obj, displayio_tilegrid_obj_set_x); MP_DEFINE_CONST_FUN_OBJ_2(displayio_tilegrid_set_x_obj, displayio_tilegrid_obj_set_x);
const mp_obj_property_t displayio_tilegrid_x_obj = { MP_PROPERTY_GETSET(displayio_tilegrid_x_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_tilegrid_get_x_obj,
.proxy = {(mp_obj_t)&displayio_tilegrid_get_x_obj, (mp_obj_t)&displayio_tilegrid_set_x_obj);
(mp_obj_t)&displayio_tilegrid_set_x_obj,
MP_ROM_NONE},
};
//| y: int //| y: int
//| """Y position of the top edge in the parent.""" //| """Y position of the top edge in the parent."""
@ -211,12 +205,9 @@ STATIC mp_obj_t displayio_tilegrid_obj_set_y(mp_obj_t self_in, mp_obj_t y_obj) {
} }
MP_DEFINE_CONST_FUN_OBJ_2(displayio_tilegrid_set_y_obj, displayio_tilegrid_obj_set_y); MP_DEFINE_CONST_FUN_OBJ_2(displayio_tilegrid_set_y_obj, displayio_tilegrid_obj_set_y);
const mp_obj_property_t displayio_tilegrid_y_obj = { MP_PROPERTY_GETSET(displayio_tilegrid_y_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_tilegrid_get_y_obj,
.proxy = {(mp_obj_t)&displayio_tilegrid_get_y_obj, (mp_obj_t)&displayio_tilegrid_set_y_obj);
(mp_obj_t)&displayio_tilegrid_set_y_obj,
MP_ROM_NONE},
};
//| width: int //| width: int
//| """Width of the tilegrid in tiles.""" //| """Width of the tilegrid in tiles."""
@ -227,11 +218,8 @@ STATIC mp_obj_t displayio_tilegrid_obj_get_width(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(displayio_tilegrid_get_width_obj, displayio_tilegrid_obj_get_width); MP_DEFINE_CONST_FUN_OBJ_1(displayio_tilegrid_get_width_obj, displayio_tilegrid_obj_get_width);
const mp_obj_property_t displayio_tilegrid_width_obj = { MP_PROPERTY_GETTER(displayio_tilegrid_width_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_tilegrid_get_width_obj);
.proxy = {(mp_obj_t)&displayio_tilegrid_get_width_obj,
MP_ROM_NONE},
};
//| height: int //| height: int
//| """Height of the tilegrid in tiles.""" //| """Height of the tilegrid in tiles."""
@ -242,11 +230,8 @@ STATIC mp_obj_t displayio_tilegrid_obj_get_height(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(displayio_tilegrid_get_height_obj, displayio_tilegrid_obj_get_height); MP_DEFINE_CONST_FUN_OBJ_1(displayio_tilegrid_get_height_obj, displayio_tilegrid_obj_get_height);
const mp_obj_property_t displayio_tilegrid_height_obj = { MP_PROPERTY_GETTER(displayio_tilegrid_height_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_tilegrid_get_height_obj);
.proxy = {(mp_obj_t)&displayio_tilegrid_get_height_obj,
MP_ROM_NONE},
};
//| tile_width: int //| tile_width: int
//| """Width of a single tile in pixels.""" //| """Width of a single tile in pixels."""
@ -257,11 +242,8 @@ STATIC mp_obj_t displayio_tilegrid_obj_get_tile_width(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(displayio_tilegrid_get_tile_width_obj, displayio_tilegrid_obj_get_tile_width); MP_DEFINE_CONST_FUN_OBJ_1(displayio_tilegrid_get_tile_width_obj, displayio_tilegrid_obj_get_tile_width);
const mp_obj_property_t displayio_tilegrid_tile_width_obj = { MP_PROPERTY_GETTER(displayio_tilegrid_tile_width_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_tilegrid_get_tile_width_obj);
.proxy = {(mp_obj_t)&displayio_tilegrid_get_tile_width_obj,
MP_ROM_NONE},
};
//| tile_height: int //| tile_height: int
//| """Height of a single tile in pixels.""" //| """Height of a single tile in pixels."""
@ -272,11 +254,8 @@ STATIC mp_obj_t displayio_tilegrid_obj_get_tile_height(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(displayio_tilegrid_get_tile_height_obj, displayio_tilegrid_obj_get_tile_height); MP_DEFINE_CONST_FUN_OBJ_1(displayio_tilegrid_get_tile_height_obj, displayio_tilegrid_obj_get_tile_height);
const mp_obj_property_t displayio_tilegrid_tile_height_obj = { MP_PROPERTY_GETTER(displayio_tilegrid_tile_height_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_tilegrid_get_tile_height_obj);
.proxy = {(mp_obj_t)&displayio_tilegrid_get_tile_height_obj,
MP_ROM_NONE},
};
//| flip_x: bool //| flip_x: bool
//| """If true, the left edge rendered will be the right edge of the right-most tile.""" //| """If true, the left edge rendered will be the right edge of the right-most tile."""
@ -295,12 +274,9 @@ STATIC mp_obj_t displayio_tilegrid_obj_set_flip_x(mp_obj_t self_in, mp_obj_t fli
} }
MP_DEFINE_CONST_FUN_OBJ_2(displayio_tilegrid_set_flip_x_obj, displayio_tilegrid_obj_set_flip_x); MP_DEFINE_CONST_FUN_OBJ_2(displayio_tilegrid_set_flip_x_obj, displayio_tilegrid_obj_set_flip_x);
const mp_obj_property_t displayio_tilegrid_flip_x_obj = { MP_PROPERTY_GETSET(displayio_tilegrid_flip_x_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_tilegrid_get_flip_x_obj,
.proxy = {(mp_obj_t)&displayio_tilegrid_get_flip_x_obj, (mp_obj_t)&displayio_tilegrid_set_flip_x_obj);
(mp_obj_t)&displayio_tilegrid_set_flip_x_obj,
MP_ROM_NONE},
};
//| flip_y: bool //| flip_y: bool
//| """If true, the top edge rendered will be the bottom edge of the bottom-most tile.""" //| """If true, the top edge rendered will be the bottom edge of the bottom-most tile."""
@ -319,12 +295,9 @@ STATIC mp_obj_t displayio_tilegrid_obj_set_flip_y(mp_obj_t self_in, mp_obj_t fli
} }
MP_DEFINE_CONST_FUN_OBJ_2(displayio_tilegrid_set_flip_y_obj, displayio_tilegrid_obj_set_flip_y); MP_DEFINE_CONST_FUN_OBJ_2(displayio_tilegrid_set_flip_y_obj, displayio_tilegrid_obj_set_flip_y);
const mp_obj_property_t displayio_tilegrid_flip_y_obj = { MP_PROPERTY_GETSET(displayio_tilegrid_flip_y_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_tilegrid_get_flip_y_obj,
.proxy = {(mp_obj_t)&displayio_tilegrid_get_flip_y_obj, (mp_obj_t)&displayio_tilegrid_set_flip_y_obj);
(mp_obj_t)&displayio_tilegrid_set_flip_y_obj,
MP_ROM_NONE},
};
//| transpose_xy: bool //| transpose_xy: bool
@ -345,12 +318,9 @@ STATIC mp_obj_t displayio_tilegrid_obj_set_transpose_xy(mp_obj_t self_in, mp_obj
} }
MP_DEFINE_CONST_FUN_OBJ_2(displayio_tilegrid_set_transpose_xy_obj, displayio_tilegrid_obj_set_transpose_xy); MP_DEFINE_CONST_FUN_OBJ_2(displayio_tilegrid_set_transpose_xy_obj, displayio_tilegrid_obj_set_transpose_xy);
const mp_obj_property_t displayio_tilegrid_transpose_xy_obj = { MP_PROPERTY_GETSET(displayio_tilegrid_transpose_xy_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_tilegrid_get_transpose_xy_obj,
.proxy = {(mp_obj_t)&displayio_tilegrid_get_transpose_xy_obj, (mp_obj_t)&displayio_tilegrid_set_transpose_xy_obj);
(mp_obj_t)&displayio_tilegrid_set_transpose_xy_obj,
MP_ROM_NONE},
};
//| pixel_shader: Union[ColorConverter, Palette] //| pixel_shader: Union[ColorConverter, Palette]
//| """The pixel shader of the tilegrid.""" //| """The pixel shader of the tilegrid."""
@ -373,12 +343,9 @@ STATIC mp_obj_t displayio_tilegrid_obj_set_pixel_shader(mp_obj_t self_in, mp_obj
} }
MP_DEFINE_CONST_FUN_OBJ_2(displayio_tilegrid_set_pixel_shader_obj, displayio_tilegrid_obj_set_pixel_shader); MP_DEFINE_CONST_FUN_OBJ_2(displayio_tilegrid_set_pixel_shader_obj, displayio_tilegrid_obj_set_pixel_shader);
const mp_obj_property_t displayio_tilegrid_pixel_shader_obj = { MP_PROPERTY_GETSET(displayio_tilegrid_pixel_shader_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_tilegrid_get_pixel_shader_obj,
.proxy = {(mp_obj_t)&displayio_tilegrid_get_pixel_shader_obj, (mp_obj_t)&displayio_tilegrid_set_pixel_shader_obj);
(mp_obj_t)&displayio_tilegrid_set_pixel_shader_obj,
MP_ROM_NONE},
};
//| bitmap: Union[Bitmap,OnDiskBitmap,Shape] //| bitmap: Union[Bitmap,OnDiskBitmap,Shape]
//| """The bitmap of the tilegrid.""" //| """The bitmap of the tilegrid."""
@ -439,12 +406,9 @@ STATIC mp_obj_t displayio_tilegrid_obj_set_bitmap(mp_obj_t self_in, mp_obj_t bit
} }
MP_DEFINE_CONST_FUN_OBJ_2(displayio_tilegrid_set_bitmap_obj, displayio_tilegrid_obj_set_bitmap); MP_DEFINE_CONST_FUN_OBJ_2(displayio_tilegrid_set_bitmap_obj, displayio_tilegrid_obj_set_bitmap);
const mp_obj_property_t displayio_tilegrid_bitmap_obj = { MP_PROPERTY_GETSET(displayio_tilegrid_bitmap_obj,
.base.type = &mp_type_property, (mp_obj_t)&displayio_tilegrid_get_bitmap_obj,
.proxy = {(mp_obj_t)&displayio_tilegrid_get_bitmap_obj, (mp_obj_t)&displayio_tilegrid_set_bitmap_obj);
(mp_obj_t)&displayio_tilegrid_set_bitmap_obj,
MP_ROM_NONE},
};
//| def __getitem__(self, index: Union[Tuple[int, int], int]) -> int: //| def __getitem__(self, index: Union[Tuple[int, int], int]) -> int:
//| """Returns the tile index at the given index. The index can either be an x,y tuple or an int equal //| """Returns the tile index at the given index. The index can either be an x,y tuple or an int equal

View File

@ -76,12 +76,8 @@ STATIC mp_obj_t fontio_builtinfont_obj_get_bitmap(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(fontio_builtinfont_get_bitmap_obj, fontio_builtinfont_obj_get_bitmap); MP_DEFINE_CONST_FUN_OBJ_1(fontio_builtinfont_get_bitmap_obj, fontio_builtinfont_obj_get_bitmap);
const mp_obj_property_t fontio_builtinfont_bitmap_obj = { MP_PROPERTY_GETTER(fontio_builtinfont_bitmap_obj,
.base.type = &mp_type_property, (mp_obj_t)&fontio_builtinfont_get_bitmap_obj);
.proxy = {(mp_obj_t)&fontio_builtinfont_get_bitmap_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| def get_bounding_box(self) -> Tuple[int, int]: //| def get_bounding_box(self) -> Tuple[int, int]:
//| """Returns the maximum bounds of all glyphs in the font in a tuple of two values: width, height.""" //| """Returns the maximum bounds of all glyphs in the font in a tuple of two values: width, height."""

View File

@ -168,12 +168,9 @@ STATIC mp_obj_t framebufferio_framebufferdisplay_obj_set_auto_refresh(mp_obj_t s
} }
MP_DEFINE_CONST_FUN_OBJ_2(framebufferio_framebufferdisplay_set_auto_refresh_obj, framebufferio_framebufferdisplay_obj_set_auto_refresh); MP_DEFINE_CONST_FUN_OBJ_2(framebufferio_framebufferdisplay_set_auto_refresh_obj, framebufferio_framebufferdisplay_obj_set_auto_refresh);
const mp_obj_property_t framebufferio_framebufferdisplay_auto_refresh_obj = { MP_PROPERTY_GETSET(framebufferio_framebufferdisplay_auto_refresh_obj,
.base.type = &mp_type_property, (mp_obj_t)&framebufferio_framebufferdisplay_get_auto_refresh_obj,
.proxy = {(mp_obj_t)&framebufferio_framebufferdisplay_get_auto_refresh_obj, (mp_obj_t)&framebufferio_framebufferdisplay_set_auto_refresh_obj);
(mp_obj_t)&framebufferio_framebufferdisplay_set_auto_refresh_obj,
MP_ROM_NONE},
};
//| brightness: float //| brightness: float
//| """The brightness of the display as a float. 0.0 is off and 1.0 is full brightness. When //| """The brightness of the display as a float. 0.0 is off and 1.0 is full brightness. When
@ -205,12 +202,9 @@ STATIC mp_obj_t framebufferio_framebufferdisplay_obj_set_brightness(mp_obj_t sel
} }
MP_DEFINE_CONST_FUN_OBJ_2(framebufferio_framebufferdisplay_set_brightness_obj, framebufferio_framebufferdisplay_obj_set_brightness); MP_DEFINE_CONST_FUN_OBJ_2(framebufferio_framebufferdisplay_set_brightness_obj, framebufferio_framebufferdisplay_obj_set_brightness);
const mp_obj_property_t framebufferio_framebufferdisplay_brightness_obj = { MP_PROPERTY_GETSET(framebufferio_framebufferdisplay_brightness_obj,
.base.type = &mp_type_property, (mp_obj_t)&framebufferio_framebufferdisplay_get_brightness_obj,
.proxy = {(mp_obj_t)&framebufferio_framebufferdisplay_get_brightness_obj, (mp_obj_t)&framebufferio_framebufferdisplay_set_brightness_obj);
(mp_obj_t)&framebufferio_framebufferdisplay_set_brightness_obj,
MP_ROM_NONE},
};
//| auto_brightness: bool //| auto_brightness: bool
//| """True when the display brightness is adjusted automatically, based on an ambient //| """True when the display brightness is adjusted automatically, based on an ambient
@ -236,12 +230,9 @@ STATIC mp_obj_t framebufferio_framebufferdisplay_obj_set_auto_brightness(mp_obj_
} }
MP_DEFINE_CONST_FUN_OBJ_2(framebufferio_framebufferdisplay_set_auto_brightness_obj, framebufferio_framebufferdisplay_obj_set_auto_brightness); MP_DEFINE_CONST_FUN_OBJ_2(framebufferio_framebufferdisplay_set_auto_brightness_obj, framebufferio_framebufferdisplay_obj_set_auto_brightness);
const mp_obj_property_t framebufferio_framebufferdisplay_auto_brightness_obj = { MP_PROPERTY_GETSET(framebufferio_framebufferdisplay_auto_brightness_obj,
.base.type = &mp_type_property, (mp_obj_t)&framebufferio_framebufferdisplay_get_auto_brightness_obj,
.proxy = {(mp_obj_t)&framebufferio_framebufferdisplay_get_auto_brightness_obj, (mp_obj_t)&framebufferio_framebufferdisplay_set_auto_brightness_obj);
(mp_obj_t)&framebufferio_framebufferdisplay_set_auto_brightness_obj,
MP_ROM_NONE},
};
//| width: int //| width: int
//| """Gets the width of the framebuffer""" //| """Gets the width of the framebuffer"""
@ -252,12 +243,8 @@ STATIC mp_obj_t framebufferio_framebufferdisplay_obj_get_width(mp_obj_t self_in)
} }
MP_DEFINE_CONST_FUN_OBJ_1(framebufferio_framebufferdisplay_get_width_obj, framebufferio_framebufferdisplay_obj_get_width); MP_DEFINE_CONST_FUN_OBJ_1(framebufferio_framebufferdisplay_get_width_obj, framebufferio_framebufferdisplay_obj_get_width);
const mp_obj_property_t framebufferio_framebufferdisplay_width_obj = { MP_PROPERTY_GETTER(framebufferio_framebufferdisplay_width_obj,
.base.type = &mp_type_property, (mp_obj_t)&framebufferio_framebufferdisplay_get_width_obj);
.proxy = {(mp_obj_t)&framebufferio_framebufferdisplay_get_width_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| height: int //| height: int
//| """Gets the height of the framebuffer""" //| """Gets the height of the framebuffer"""
@ -268,12 +255,8 @@ STATIC mp_obj_t framebufferio_framebufferdisplay_obj_get_height(mp_obj_t self_in
} }
MP_DEFINE_CONST_FUN_OBJ_1(framebufferio_framebufferdisplay_get_height_obj, framebufferio_framebufferdisplay_obj_get_height); MP_DEFINE_CONST_FUN_OBJ_1(framebufferio_framebufferdisplay_get_height_obj, framebufferio_framebufferdisplay_obj_get_height);
const mp_obj_property_t framebufferio_framebufferdisplay_height_obj = { MP_PROPERTY_GETTER(framebufferio_framebufferdisplay_height_obj,
.base.type = &mp_type_property, (mp_obj_t)&framebufferio_framebufferdisplay_get_height_obj);
.proxy = {(mp_obj_t)&framebufferio_framebufferdisplay_get_height_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| rotation: int //| rotation: int
//| """The rotation of the display as an int in degrees.""" //| """The rotation of the display as an int in degrees."""
@ -291,12 +274,9 @@ STATIC mp_obj_t framebufferio_framebufferdisplay_obj_set_rotation(mp_obj_t self_
MP_DEFINE_CONST_FUN_OBJ_2(framebufferio_framebufferdisplay_set_rotation_obj, framebufferio_framebufferdisplay_obj_set_rotation); MP_DEFINE_CONST_FUN_OBJ_2(framebufferio_framebufferdisplay_set_rotation_obj, framebufferio_framebufferdisplay_obj_set_rotation);
const mp_obj_property_t framebufferio_framebufferdisplay_rotation_obj = { MP_PROPERTY_GETSET(framebufferio_framebufferdisplay_rotation_obj,
.base.type = &mp_type_property, (mp_obj_t)&framebufferio_framebufferdisplay_get_rotation_obj,
.proxy = {(mp_obj_t)&framebufferio_framebufferdisplay_get_rotation_obj, (mp_obj_t)&framebufferio_framebufferdisplay_set_rotation_obj);
(mp_obj_t)&framebufferio_framebufferdisplay_set_rotation_obj,
MP_ROM_NONE},
};
//| framebuffer: circuitpython_typing.FrameBuffer //| framebuffer: circuitpython_typing.FrameBuffer
//| """The framebuffer being used by the display""" //| """The framebuffer being used by the display"""
@ -308,12 +288,8 @@ STATIC mp_obj_t framebufferio_framebufferdisplay_obj_get_framebuffer(mp_obj_t se
} }
MP_DEFINE_CONST_FUN_OBJ_1(framebufferio_framebufferdisplay_get_framebuffer_obj, framebufferio_framebufferdisplay_obj_get_framebuffer); MP_DEFINE_CONST_FUN_OBJ_1(framebufferio_framebufferdisplay_get_framebuffer_obj, framebufferio_framebufferdisplay_obj_get_framebuffer);
const mp_obj_property_t framebufferio_framebufferframebuffer_obj = { MP_PROPERTY_GETTER(framebufferio_framebufferframebuffer_obj,
.base.type = &mp_type_property, (mp_obj_t)&framebufferio_framebufferdisplay_get_framebuffer_obj);
.proxy = {(mp_obj_t)&framebufferio_framebufferdisplay_get_framebuffer_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| def fill_row(self, y: int, buffer: WriteableBuffer) -> WriteableBuffer: //| def fill_row(self, y: int, buffer: WriteableBuffer) -> WriteableBuffer:

View File

@ -193,12 +193,9 @@ STATIC mp_obj_t frequencyio_frequencyin_obj_set_capture_period(mp_obj_t self_in,
} }
MP_DEFINE_CONST_FUN_OBJ_2(frequencyio_frequency_set_capture_period_obj, frequencyio_frequencyin_obj_set_capture_period); MP_DEFINE_CONST_FUN_OBJ_2(frequencyio_frequency_set_capture_period_obj, frequencyio_frequencyin_obj_set_capture_period);
const mp_obj_property_t frequencyio_frequencyin_capture_period_obj = { MP_PROPERTY_GETSET(frequencyio_frequencyin_capture_period_obj,
.base.type = &mp_type_property, (mp_obj_t)&frequencyio_frequency_get_capture_period_obj,
.proxy = {(mp_obj_t)&frequencyio_frequency_get_capture_period_obj, (mp_obj_t)&frequencyio_frequency_set_capture_period_obj);
(mp_obj_t)&frequencyio_frequency_set_capture_period_obj,
MP_ROM_NONE},
};
//| def __get__(self, index: int) -> int: //| def __get__(self, index: int) -> int:
//| """Returns the value of the last frequency captured.""" //| """Returns the value of the last frequency captured."""
@ -213,12 +210,8 @@ STATIC mp_obj_t frequencyio_frequencyin_obj_get_value(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(frequencyio_frequencyin_get_value_obj, frequencyio_frequencyin_obj_get_value); MP_DEFINE_CONST_FUN_OBJ_1(frequencyio_frequencyin_get_value_obj, frequencyio_frequencyin_obj_get_value);
const mp_obj_property_t frequencyio_frequencyin_value_obj = { MP_PROPERTY_GETTER(frequencyio_frequencyin_value_obj,
.base.type = &mp_type_property, (mp_obj_t)&frequencyio_frequencyin_get_value_obj);
.proxy = {(mp_obj_t)&frequencyio_frequencyin_get_value_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t frequencyio_frequencyin_locals_dict_table[] = { STATIC const mp_rom_map_elem_t frequencyio_frequencyin_locals_dict_table[] = {
// Methods // Methods

View File

@ -108,12 +108,8 @@ STATIC mp_obj_t gnss_obj_get_latitude(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(gnss_get_latitude_obj, gnss_obj_get_latitude); MP_DEFINE_CONST_FUN_OBJ_1(gnss_get_latitude_obj, gnss_obj_get_latitude);
const mp_obj_property_t gnss_latitude_obj = { MP_PROPERTY_GETTER(gnss_latitude_obj,
.base.type = &mp_type_property, (mp_obj_t)&gnss_get_latitude_obj);
.proxy = {(mp_obj_t)&gnss_get_latitude_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| longitude: float //| longitude: float
//| """Longitude of current position in degrees (float).""" //| """Longitude of current position in degrees (float)."""
@ -125,12 +121,8 @@ STATIC mp_obj_t gnss_obj_get_longitude(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(gnss_get_longitude_obj, gnss_obj_get_longitude); MP_DEFINE_CONST_FUN_OBJ_1(gnss_get_longitude_obj, gnss_obj_get_longitude);
const mp_obj_property_t gnss_longitude_obj = { MP_PROPERTY_GETTER(gnss_longitude_obj,
.base.type = &mp_type_property, (mp_obj_t)&gnss_get_longitude_obj);
.proxy = {(mp_obj_t)&gnss_get_longitude_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| altitude: float //| altitude: float
//| """Altitude of current position in meters (float).""" //| """Altitude of current position in meters (float)."""
@ -142,12 +134,8 @@ STATIC mp_obj_t gnss_obj_get_altitude(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(gnss_get_altitude_obj, gnss_obj_get_altitude); MP_DEFINE_CONST_FUN_OBJ_1(gnss_get_altitude_obj, gnss_obj_get_altitude);
const mp_obj_property_t gnss_altitude_obj = { MP_PROPERTY_GETTER(gnss_altitude_obj,
.base.type = &mp_type_property, (mp_obj_t)&gnss_get_altitude_obj);
.proxy = {(mp_obj_t)&gnss_get_altitude_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| timestamp: time.struct_time //| timestamp: time.struct_time
//| """Time when the position data was updated.""" //| """Time when the position data was updated."""
@ -161,12 +149,8 @@ STATIC mp_obj_t gnss_obj_get_timestamp(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(gnss_get_timestamp_obj, gnss_obj_get_timestamp); MP_DEFINE_CONST_FUN_OBJ_1(gnss_get_timestamp_obj, gnss_obj_get_timestamp);
const mp_obj_property_t gnss_timestamp_obj = { MP_PROPERTY_GETTER(gnss_timestamp_obj,
.base.type = &mp_type_property, (mp_obj_t)&gnss_get_timestamp_obj);
.proxy = {(mp_obj_t)&gnss_get_timestamp_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| fix: PositionFix //| fix: PositionFix
//| """Fix mode.""" //| """Fix mode."""
@ -178,12 +162,8 @@ STATIC mp_obj_t gnss_obj_get_fix(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(gnss_get_fix_obj, gnss_obj_get_fix); MP_DEFINE_CONST_FUN_OBJ_1(gnss_get_fix_obj, gnss_obj_get_fix);
const mp_obj_property_t gnss_fix_obj = { MP_PROPERTY_GETTER(gnss_fix_obj,
.base.type = &mp_type_property, (mp_obj_t)&gnss_get_fix_obj);
.proxy = {(mp_obj_t)&gnss_get_fix_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t gnss_locals_dict_table[] = { STATIC const mp_rom_map_elem_t gnss_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&gnss_deinit_obj) }, { MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&gnss_deinit_obj) },

View File

@ -96,12 +96,8 @@ STATIC mp_obj_t ipaddress_ipv4address_get_packed(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(ipaddress_ipv4address_get_packed_obj, ipaddress_ipv4address_get_packed); MP_DEFINE_CONST_FUN_OBJ_1(ipaddress_ipv4address_get_packed_obj, ipaddress_ipv4address_get_packed);
const mp_obj_property_t ipaddress_ipv4address_packed_obj = { MP_PROPERTY_GETTER(ipaddress_ipv4address_packed_obj,
.base.type = &mp_type_property, (mp_obj_t)&ipaddress_ipv4address_get_packed_obj);
.proxy = {(mp_obj_t)&ipaddress_ipv4address_get_packed_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| version: int //| version: int
//| """4 for IPv4, 6 for IPv6""" //| """4 for IPv4, 6 for IPv6"""
@ -120,12 +116,8 @@ STATIC mp_obj_t ipaddress_ipv4address_get_version(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(ipaddress_ipv4address_get_version_obj, ipaddress_ipv4address_get_version); MP_DEFINE_CONST_FUN_OBJ_1(ipaddress_ipv4address_get_version_obj, ipaddress_ipv4address_get_version);
const mp_obj_property_t ipaddress_ipv4address_version_obj = { MP_PROPERTY_GETTER(ipaddress_ipv4address_version_obj,
.base.type = &mp_type_property, (mp_obj_t)&ipaddress_ipv4address_get_version_obj);
.proxy = {(mp_obj_t)&ipaddress_ipv4address_get_version_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| def __eq__(self, other: object) -> bool: //| def __eq__(self, other: object) -> bool:
//| """Two Address objects are equal if their addresses and address types are equal.""" //| """Two Address objects are equal if their addresses and address types are equal."""

View File

@ -166,12 +166,9 @@ STATIC mp_obj_t is31fl3741_FrameBuffer_set_brightness(mp_obj_t self_in, mp_obj_t
} }
MP_DEFINE_CONST_FUN_OBJ_2(is31fl3741_FrameBuffer_set_brightness_obj, is31fl3741_FrameBuffer_set_brightness); MP_DEFINE_CONST_FUN_OBJ_2(is31fl3741_FrameBuffer_set_brightness_obj, is31fl3741_FrameBuffer_set_brightness);
const mp_obj_property_t is31fl3741_FrameBuffer_brightness_obj = { MP_PROPERTY_GETSET(is31fl3741_FrameBuffer_brightness_obj,
.base.type = &mp_type_property, (mp_obj_t)&is31fl3741_FrameBuffer_get_brightness_obj,
.proxy = {(mp_obj_t)&is31fl3741_FrameBuffer_get_brightness_obj, (mp_obj_t)&is31fl3741_FrameBuffer_set_brightness_obj);
(mp_obj_t)&is31fl3741_FrameBuffer_set_brightness_obj,
MP_ROM_NONE},
};
//| def refresh(self) -> None: //| def refresh(self) -> None:
//| """Transmits the color data in the buffer to the pixels so that //| """Transmits the color data in the buffer to the pixels so that
@ -195,12 +192,8 @@ STATIC mp_obj_t is31fl3741_FrameBuffer_get_width(mp_obj_t self_in) {
return MP_OBJ_NEW_SMALL_INT(common_hal_is31fl3741_FrameBuffer_get_width(self)); return MP_OBJ_NEW_SMALL_INT(common_hal_is31fl3741_FrameBuffer_get_width(self));
} }
MP_DEFINE_CONST_FUN_OBJ_1(is31fl3741_FrameBuffer_get_width_obj, is31fl3741_FrameBuffer_get_width); MP_DEFINE_CONST_FUN_OBJ_1(is31fl3741_FrameBuffer_get_width_obj, is31fl3741_FrameBuffer_get_width);
const mp_obj_property_t is31fl3741_FrameBuffer_width_obj = { MP_PROPERTY_GETTER(is31fl3741_FrameBuffer_width_obj,
.base.type = &mp_type_property, (mp_obj_t)&is31fl3741_FrameBuffer_get_width_obj);
.proxy = {(mp_obj_t)&is31fl3741_FrameBuffer_get_width_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| height: int //| height: int
//| """The height of the display, in pixels""" //| """The height of the display, in pixels"""
@ -211,12 +204,8 @@ STATIC mp_obj_t is31fl3741_FrameBuffer_get_height(mp_obj_t self_in) {
return MP_OBJ_NEW_SMALL_INT(common_hal_is31fl3741_FrameBuffer_get_height(self)); return MP_OBJ_NEW_SMALL_INT(common_hal_is31fl3741_FrameBuffer_get_height(self));
} }
MP_DEFINE_CONST_FUN_OBJ_1(is31fl3741_FrameBuffer_get_height_obj, is31fl3741_FrameBuffer_get_height); MP_DEFINE_CONST_FUN_OBJ_1(is31fl3741_FrameBuffer_get_height_obj, is31fl3741_FrameBuffer_get_height);
const mp_obj_property_t is31fl3741_FrameBuffer_height_obj = { MP_PROPERTY_GETTER(is31fl3741_FrameBuffer_height_obj,
.base.type = &mp_type_property, (mp_obj_t)&is31fl3741_FrameBuffer_get_height_obj);
.proxy = {(mp_obj_t)&is31fl3741_FrameBuffer_get_height_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t is31fl3741_FrameBuffer_locals_dict_table[] = { STATIC const mp_rom_map_elem_t is31fl3741_FrameBuffer_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&is31fl3741_FrameBuffer_deinit_obj) }, { MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&is31fl3741_FrameBuffer_deinit_obj) },

View File

@ -76,12 +76,8 @@ STATIC mp_obj_t keypad_event_get_key_number(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(keypad_event_get_key_number_obj, keypad_event_get_key_number); MP_DEFINE_CONST_FUN_OBJ_1(keypad_event_get_key_number_obj, keypad_event_get_key_number);
const mp_obj_property_t keypad_event_key_number_obj = { MP_PROPERTY_GETTER(keypad_event_key_number_obj,
.base.type = &mp_type_property, (mp_obj_t)&keypad_event_get_key_number_obj);
.proxy = {(mp_obj_t)&keypad_event_get_key_number_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| pressed: bool //| pressed: bool
//| """``True`` if the event represents a key down (pressed) transition. //| """``True`` if the event represents a key down (pressed) transition.
@ -94,12 +90,8 @@ STATIC mp_obj_t keypad_event_get_pressed(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(keypad_event_get_pressed_obj, keypad_event_get_pressed); MP_DEFINE_CONST_FUN_OBJ_1(keypad_event_get_pressed_obj, keypad_event_get_pressed);
const mp_obj_property_t keypad_event_pressed_obj = { MP_PROPERTY_GETTER(keypad_event_pressed_obj,
.base.type = &mp_type_property, (mp_obj_t)&keypad_event_get_pressed_obj);
.proxy = {(mp_obj_t)&keypad_event_get_pressed_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| released: bool //| released: bool
//| """``True`` if the event represents a key up (released) transition. //| """``True`` if the event represents a key up (released) transition.
@ -112,12 +104,8 @@ STATIC mp_obj_t keypad_event_get_released(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(keypad_event_get_released_obj, keypad_event_get_released); MP_DEFINE_CONST_FUN_OBJ_1(keypad_event_get_released_obj, keypad_event_get_released);
const mp_obj_property_t keypad_event_released_obj = { MP_PROPERTY_GETTER(keypad_event_released_obj,
.base.type = &mp_type_property, (mp_obj_t)&keypad_event_get_released_obj);
.proxy = {(mp_obj_t)&keypad_event_get_released_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| timestamp: int //| timestamp: int
//| """The timestamp.""" //| """The timestamp."""
@ -128,12 +116,8 @@ STATIC mp_obj_t keypad_event_get_timestamp(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(keypad_event_get_timestamp_obj, keypad_event_get_timestamp); MP_DEFINE_CONST_FUN_OBJ_1(keypad_event_get_timestamp_obj, keypad_event_get_timestamp);
const mp_obj_property_t keypad_event_timestamp_obj = { MP_PROPERTY_GETTER(keypad_event_timestamp_obj,
.base.type = &mp_type_property, (mp_obj_t)&keypad_event_get_timestamp_obj);
.proxy = {(mp_obj_t)&keypad_event_get_timestamp_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| def __eq__(self, other: object) -> bool: //| def __eq__(self, other: object) -> bool:

View File

@ -129,12 +129,8 @@ STATIC mp_obj_t keypad_eventqueue_get_overflowed(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(keypad_eventqueue_get_overflowed_obj, keypad_eventqueue_get_overflowed); MP_DEFINE_CONST_FUN_OBJ_1(keypad_eventqueue_get_overflowed_obj, keypad_eventqueue_get_overflowed);
const mp_obj_property_t keypad_eventqueue_overflowed_obj = { MP_PROPERTY_GETTER(keypad_eventqueue_overflowed_obj,
.base.type = &mp_type_property, (mp_obj_t)&keypad_eventqueue_get_overflowed_obj);
.proxy = {(mp_obj_t)&keypad_eventqueue_get_overflowed_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t keypad_eventqueue_locals_dict_table[] = { STATIC const mp_rom_map_elem_t keypad_eventqueue_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_clear), MP_ROM_PTR(&keypad_eventqueue_clear_obj) }, { MP_ROM_QSTR(MP_QSTR_clear), MP_ROM_PTR(&keypad_eventqueue_clear_obj) },

View File

@ -52,12 +52,8 @@ STATIC mp_obj_t mdns_remoteservice_get_hostname(mp_obj_t self_in) {
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_1(mdns_remoteservice_get_hostname_obj, mdns_remoteservice_get_hostname); STATIC MP_DEFINE_CONST_FUN_OBJ_1(mdns_remoteservice_get_hostname_obj, mdns_remoteservice_get_hostname);
const mp_obj_property_t mdns_remoteservice_hostname_obj = { MP_PROPERTY_GETTER(mdns_remoteservice_hostname_obj,
.base.type = &mp_type_property, (mp_obj_t)&mdns_remoteservice_get_hostname_obj);
.proxy = { (mp_obj_t)&mdns_remoteservice_get_hostname_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| instance_name: str //| instance_name: str
//| """The human readable instance name for the service. (read-only)""" //| """The human readable instance name for the service. (read-only)"""
@ -69,12 +65,8 @@ STATIC mp_obj_t remoteservice_get_instance_name(mp_obj_t self_in) {
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_1(mdns_remoteservice_get_instance_name_obj, remoteservice_get_instance_name); STATIC MP_DEFINE_CONST_FUN_OBJ_1(mdns_remoteservice_get_instance_name_obj, remoteservice_get_instance_name);
const mp_obj_property_t mdns_remoteservice_instance_name_obj = { MP_PROPERTY_GETTER(mdns_remoteservice_instance_name_obj,
.base.type = &mp_type_property, (mp_obj_t)&mdns_remoteservice_get_instance_name_obj);
.proxy = { (mp_obj_t)&mdns_remoteservice_get_instance_name_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| service_type: str //| service_type: str
//| """The service type string such as ``_http``. (read-only)""" //| """The service type string such as ``_http``. (read-only)"""
@ -86,12 +78,8 @@ STATIC mp_obj_t remoteservice_get_service_type(mp_obj_t self_in) {
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_1(mdns_remoteservice_get_service_type_obj, remoteservice_get_service_type); STATIC MP_DEFINE_CONST_FUN_OBJ_1(mdns_remoteservice_get_service_type_obj, remoteservice_get_service_type);
const mp_obj_property_t mdns_remoteservice_service_type_obj = { MP_PROPERTY_GETTER(mdns_remoteservice_service_type_obj,
.base.type = &mp_type_property, (mp_obj_t)&mdns_remoteservice_get_service_type_obj);
.proxy = { (mp_obj_t)&mdns_remoteservice_get_service_type_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| protocol: str //| protocol: str
//| """The protocol string such as ``_tcp``. (read-only)""" //| """The protocol string such as ``_tcp``. (read-only)"""
@ -103,12 +91,8 @@ STATIC mp_obj_t remoteservice_get_protocol(mp_obj_t self_in) {
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_1(mdns_remoteservice_get_protocol_obj, remoteservice_get_protocol); STATIC MP_DEFINE_CONST_FUN_OBJ_1(mdns_remoteservice_get_protocol_obj, remoteservice_get_protocol);
const mp_obj_property_t mdns_remoteservice_protocol_obj = { MP_PROPERTY_GETTER(mdns_remoteservice_protocol_obj,
.base.type = &mp_type_property, (mp_obj_t)&mdns_remoteservice_get_protocol_obj);
.proxy = { (mp_obj_t)&mdns_remoteservice_get_protocol_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| port: int //| port: int
//| """Port number used for the service. (read-only)""" //| """Port number used for the service. (read-only)"""
@ -119,12 +103,8 @@ STATIC mp_obj_t remoteservice_get_port(mp_obj_t self_in) {
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_1(mdns_remoteservice_get_port_obj, remoteservice_get_port); STATIC MP_DEFINE_CONST_FUN_OBJ_1(mdns_remoteservice_get_port_obj, remoteservice_get_port);
const mp_obj_property_t mdns_remoteservice_port_obj = { MP_PROPERTY_GETTER(mdns_remoteservice_port_obj,
.base.type = &mp_type_property, (mp_obj_t)&mdns_remoteservice_get_port_obj);
.proxy = { (mp_obj_t)&mdns_remoteservice_get_port_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| def __del__(self) -> None: //| def __del__(self) -> None:
//| """Deletes the RemoteService object.""" //| """Deletes the RemoteService object."""

View File

@ -99,12 +99,9 @@ static mp_obj_t mdns_server_set_hostname(mp_obj_t self, mp_obj_t hostname) {
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_2(mdns_server_set_hostname_obj, mdns_server_set_hostname); STATIC MP_DEFINE_CONST_FUN_OBJ_2(mdns_server_set_hostname_obj, mdns_server_set_hostname);
const mp_obj_property_t mdns_server_hostname_obj = { MP_PROPERTY_GETSET(mdns_server_hostname_obj,
.base.type = &mp_type_property, (mp_obj_t)&mdns_server_get_hostname_obj,
.proxy = { (mp_obj_t)&mdns_server_get_hostname_obj, (mp_obj_t)&mdns_server_set_hostname_obj);
(mp_obj_t)&mdns_server_set_hostname_obj,
MP_ROM_NONE },
};
//| instance_name: str //| instance_name: str
//| """Human readable name to describe the device.""" //| """Human readable name to describe the device."""
@ -123,12 +120,9 @@ STATIC mp_obj_t mdns_server_set_instance_name(mp_obj_t self, mp_obj_t new_instan
} }
MP_DEFINE_CONST_FUN_OBJ_2(mdns_server_set_instance_name_obj, mdns_server_set_instance_name); MP_DEFINE_CONST_FUN_OBJ_2(mdns_server_set_instance_name_obj, mdns_server_set_instance_name);
const mp_obj_property_t mdns_server_instance_name_obj = { MP_PROPERTY_GETSET(mdns_server_instance_name_obj,
.base.type = &mp_type_property, (mp_obj_t)&mdns_server_get_instance_name_obj,
.proxy = { (mp_obj_t)&mdns_server_get_instance_name_obj, (mp_obj_t)&mdns_server_set_instance_name_obj);
(mp_obj_t)&mdns_server_set_instance_name_obj,
MP_ROM_NONE },
};
//| def find(self, service_type: str, protocol: str, *, timeout: float = 1) -> Tuple[RemoteService]: //| def find(self, service_type: str, protocol: str, *, timeout: float = 1) -> Tuple[RemoteService]:

View File

@ -105,12 +105,8 @@ STATIC mp_obj_t memorymonitor_allocationsize_obj_get_bytes_per_block(mp_obj_t se
} }
MP_DEFINE_CONST_FUN_OBJ_1(memorymonitor_allocationsize_get_bytes_per_block_obj, memorymonitor_allocationsize_obj_get_bytes_per_block); MP_DEFINE_CONST_FUN_OBJ_1(memorymonitor_allocationsize_get_bytes_per_block_obj, memorymonitor_allocationsize_obj_get_bytes_per_block);
const mp_obj_property_t memorymonitor_allocationsize_bytes_per_block_obj = { MP_PROPERTY_GETTER(memorymonitor_allocationsize_bytes_per_block_obj,
.base.type = &mp_type_property, (mp_obj_t)&memorymonitor_allocationsize_get_bytes_per_block_obj);
.proxy = {(mp_obj_t)&memorymonitor_allocationsize_get_bytes_per_block_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| def __len__(self) -> int: //| def __len__(self) -> int:
//| """Returns the number of allocation buckets. //| """Returns the number of allocation buckets.

View File

@ -88,13 +88,9 @@ STATIC mp_obj_t mcu_processor_get_frequency(mp_obj_t self) {
MP_DEFINE_CONST_FUN_OBJ_1(mcu_processor_get_frequency_obj, mcu_processor_get_frequency); MP_DEFINE_CONST_FUN_OBJ_1(mcu_processor_get_frequency_obj, mcu_processor_get_frequency);
const mp_obj_property_t mcu_processor_frequency_obj = { MP_PROPERTY_GETSET(mcu_processor_frequency_obj,
.base.type = &mp_type_property, (mp_obj_t)&mcu_processor_get_frequency_obj,
.proxy = {(mp_obj_t)&mcu_processor_get_frequency_obj, // getter (mp_obj_t)&mcu_processor_set_frequency_obj);
(mp_obj_t)&mcu_processor_set_frequency_obj, // setter
MP_ROM_NONE, // no deleter
},
};
//| reset_reason: microcontroller.ResetReason //| reset_reason: microcontroller.ResetReason
//| """The reason the microcontroller started up from reset state.""" //| """The reason the microcontroller started up from reset state."""
@ -105,13 +101,8 @@ STATIC mp_obj_t mcu_processor_get_reset_reason(mp_obj_t self) {
MP_DEFINE_CONST_FUN_OBJ_1(mcu_processor_get_reset_reason_obj, mcu_processor_get_reset_reason); MP_DEFINE_CONST_FUN_OBJ_1(mcu_processor_get_reset_reason_obj, mcu_processor_get_reset_reason);
const mp_obj_property_t mcu_processor_reset_reason_obj = { MP_PROPERTY_GETTER(mcu_processor_reset_reason_obj,
.base.type = &mp_type_property, (mp_obj_t)&mcu_processor_get_reset_reason_obj);
.proxy = {(mp_obj_t)&mcu_processor_get_reset_reason_obj, // getter
MP_ROM_NONE, // no setter
MP_ROM_NONE, // no deleter
},
};
//| temperature: Optional[float] //| temperature: Optional[float]
//| """The on-chip temperature, in Celsius, as a float. (read-only) //| """The on-chip temperature, in Celsius, as a float. (read-only)
@ -125,13 +116,8 @@ STATIC mp_obj_t mcu_processor_get_temperature(mp_obj_t self) {
MP_DEFINE_CONST_FUN_OBJ_1(mcu_processor_get_temperature_obj, mcu_processor_get_temperature); MP_DEFINE_CONST_FUN_OBJ_1(mcu_processor_get_temperature_obj, mcu_processor_get_temperature);
const mp_obj_property_t mcu_processor_temperature_obj = { MP_PROPERTY_GETTER(mcu_processor_temperature_obj,
.base.type = &mp_type_property, (mp_obj_t)&mcu_processor_get_temperature_obj);
.proxy = {(mp_obj_t)&mcu_processor_get_temperature_obj, // getter
MP_ROM_NONE, // no setter
MP_ROM_NONE, // no deleter
},
};
//| uid: bytearray //| uid: bytearray
//| """The unique id (aka serial number) of the chip as a `bytearray`. (read-only)""" //| """The unique id (aka serial number) of the chip as a `bytearray`. (read-only)"""
@ -144,13 +130,8 @@ STATIC mp_obj_t mcu_processor_get_uid(mp_obj_t self) {
MP_DEFINE_CONST_FUN_OBJ_1(mcu_processor_get_uid_obj, mcu_processor_get_uid); MP_DEFINE_CONST_FUN_OBJ_1(mcu_processor_get_uid_obj, mcu_processor_get_uid);
const mp_obj_property_t mcu_processor_uid_obj = { MP_PROPERTY_GETTER(mcu_processor_uid_obj,
.base.type = &mp_type_property, (mp_obj_t)&mcu_processor_get_uid_obj);
.proxy = {(mp_obj_t)&mcu_processor_get_uid_obj, // getter
MP_ROM_NONE, // no setter
MP_ROM_NONE, // no deleter
},
};
//| voltage: Optional[float] //| voltage: Optional[float]
//| """The input voltage to the microcontroller, as a float. (read-only) //| """The input voltage to the microcontroller, as a float. (read-only)
@ -164,13 +145,8 @@ STATIC mp_obj_t mcu_processor_get_voltage(mp_obj_t self) {
MP_DEFINE_CONST_FUN_OBJ_1(mcu_processor_get_voltage_obj, mcu_processor_get_voltage); MP_DEFINE_CONST_FUN_OBJ_1(mcu_processor_get_voltage_obj, mcu_processor_get_voltage);
const mp_obj_property_t mcu_processor_voltage_obj = { MP_PROPERTY_GETTER(mcu_processor_voltage_obj,
.base.type = &mp_type_property, (mp_obj_t)&mcu_processor_get_voltage_obj);
.proxy = {(mp_obj_t)&mcu_processor_get_voltage_obj, // getter
MP_ROM_NONE, // no setter
MP_ROM_NONE, // no deleter
},
};
STATIC const mp_rom_map_elem_t mcu_processor_locals_dict_table[] = { STATIC const mp_rom_map_elem_t mcu_processor_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_frequency), MP_ROM_PTR(&mcu_processor_frequency_obj) }, { MP_ROM_QSTR(MP_QSTR_frequency), MP_ROM_PTR(&mcu_processor_frequency_obj) },

View File

@ -80,12 +80,9 @@ STATIC mp_obj_t mod_msgpack_exttype_set_code(mp_obj_t self_in, mp_obj_t code_in)
} }
MP_DEFINE_CONST_FUN_OBJ_2(mod_msgpack_exttype_set_code_obj, mod_msgpack_exttype_set_code); MP_DEFINE_CONST_FUN_OBJ_2(mod_msgpack_exttype_set_code_obj, mod_msgpack_exttype_set_code);
const mp_obj_property_t mod_msgpack_exttype_code_obj = { MP_PROPERTY_GETSET(mod_msgpack_exttype_code_obj,
.base.type = &mp_type_property, (mp_obj_t)&mod_msgpack_exttype_get_code_obj,
.proxy = {(mp_obj_t)&mod_msgpack_exttype_get_code_obj, (mp_obj_t)&mod_msgpack_exttype_set_code_obj);
(mp_obj_t)&mod_msgpack_exttype_set_code_obj,
MP_ROM_NONE},
};
//| data: bytes //| data: bytes
//| """Data.""" //| """Data."""
@ -104,12 +101,9 @@ STATIC mp_obj_t mod_msgpack_exttype_set_data(mp_obj_t self_in, mp_obj_t data_in)
} }
MP_DEFINE_CONST_FUN_OBJ_2(mod_msgpack_exttype_set_data_obj, mod_msgpack_exttype_set_data); MP_DEFINE_CONST_FUN_OBJ_2(mod_msgpack_exttype_set_data_obj, mod_msgpack_exttype_set_data);
const mp_obj_property_t mod_msgpack_exttype_data_obj = { MP_PROPERTY_GETSET(mod_msgpack_exttype_data_obj,
.base.type = &mp_type_property, (mp_obj_t)&mod_msgpack_exttype_get_data_obj,
.proxy = {(mp_obj_t)&mod_msgpack_exttype_get_data_obj, (mp_obj_t)&mod_msgpack_exttype_set_data_obj);
(mp_obj_t)&mod_msgpack_exttype_set_data_obj,
MP_ROM_NONE},
};
STATIC mp_rom_map_elem_t mod_msgpack_exttype_locals_dict_table[] = { STATIC mp_rom_map_elem_t mod_msgpack_exttype_locals_dict_table[] = {
// Properties // Properties

View File

@ -208,12 +208,8 @@ STATIC mp_obj_t pulseio_pulsein_obj_get_maxlen(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(pulseio_pulsein_get_maxlen_obj, pulseio_pulsein_obj_get_maxlen); MP_DEFINE_CONST_FUN_OBJ_1(pulseio_pulsein_get_maxlen_obj, pulseio_pulsein_obj_get_maxlen);
const mp_obj_property_t pulseio_pulsein_maxlen_obj = { MP_PROPERTY_GETTER(pulseio_pulsein_maxlen_obj,
.base.type = &mp_type_property, (mp_obj_t)&pulseio_pulsein_get_maxlen_obj);
.proxy = {(mp_obj_t)&pulseio_pulsein_get_maxlen_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| paused: bool //| paused: bool
//| """True when pulse capture is paused as a result of :py:func:`pause` or an error during capture //| """True when pulse capture is paused as a result of :py:func:`pause` or an error during capture
@ -227,12 +223,8 @@ STATIC mp_obj_t pulseio_pulsein_obj_get_paused(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(pulseio_pulsein_get_paused_obj, pulseio_pulsein_obj_get_paused); MP_DEFINE_CONST_FUN_OBJ_1(pulseio_pulsein_get_paused_obj, pulseio_pulsein_obj_get_paused);
const mp_obj_property_t pulseio_pulsein_paused_obj = { MP_PROPERTY_GETTER(pulseio_pulsein_paused_obj,
.base.type = &mp_type_property, (mp_obj_t)&pulseio_pulsein_get_paused_obj);
.proxy = {(mp_obj_t)&pulseio_pulsein_get_paused_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| def __bool__(self) -> bool: ... //| def __bool__(self) -> bool: ...
//| //|

View File

@ -220,12 +220,9 @@ STATIC mp_obj_t pwmio_pwmout_obj_set_duty_cycle(mp_obj_t self_in, mp_obj_t duty_
} }
MP_DEFINE_CONST_FUN_OBJ_2(pwmio_pwmout_set_duty_cycle_obj, pwmio_pwmout_obj_set_duty_cycle); MP_DEFINE_CONST_FUN_OBJ_2(pwmio_pwmout_set_duty_cycle_obj, pwmio_pwmout_obj_set_duty_cycle);
const mp_obj_property_t pwmio_pwmout_duty_cycle_obj = { MP_PROPERTY_GETSET(pwmio_pwmout_duty_cycle_obj,
.base.type = &mp_type_property, (mp_obj_t)&pwmio_pwmout_get_duty_cycle_obj,
.proxy = {(mp_obj_t)&pwmio_pwmout_get_duty_cycle_obj, (mp_obj_t)&pwmio_pwmout_set_duty_cycle_obj);
(mp_obj_t)&pwmio_pwmout_set_duty_cycle_obj,
MP_ROM_NONE},
};
//| frequency: int //| frequency: int
//| """32 bit value that dictates the PWM frequency in Hertz (cycles per //| """32 bit value that dictates the PWM frequency in Hertz (cycles per
@ -261,12 +258,9 @@ STATIC mp_obj_t pwmio_pwmout_obj_set_frequency(mp_obj_t self_in, mp_obj_t freque
} }
MP_DEFINE_CONST_FUN_OBJ_2(pwmio_pwmout_set_frequency_obj, pwmio_pwmout_obj_set_frequency); MP_DEFINE_CONST_FUN_OBJ_2(pwmio_pwmout_set_frequency_obj, pwmio_pwmout_obj_set_frequency);
const mp_obj_property_t pwmio_pwmout_frequency_obj = { MP_PROPERTY_GETSET(pwmio_pwmout_frequency_obj,
.base.type = &mp_type_property, (mp_obj_t)&pwmio_pwmout_get_frequency_obj,
.proxy = {(mp_obj_t)&pwmio_pwmout_get_frequency_obj, (mp_obj_t)&pwmio_pwmout_set_frequency_obj);
(mp_obj_t)&pwmio_pwmout_set_frequency_obj,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t pwmio_pwmout_locals_dict_table[] = { STATIC const mp_rom_map_elem_t pwmio_pwmout_locals_dict_table[] = {
// Methods // Methods

View File

@ -107,12 +107,9 @@ STATIC mp_obj_t qrio_qrdecoder_set_width(mp_obj_t self_in, mp_obj_t width_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_2(qrio_qrdecoder_set_width_obj, qrio_qrdecoder_set_width); MP_DEFINE_CONST_FUN_OBJ_2(qrio_qrdecoder_set_width_obj, qrio_qrdecoder_set_width);
const mp_obj_property_t qrio_qrdecoder_width_obj = { MP_PROPERTY_GETSET(qrio_qrdecoder_width_obj,
.base.type = &mp_type_property, (mp_obj_t)&qrio_qrdecoder_get_width_obj,
.proxy = {(mp_obj_t)&qrio_qrdecoder_get_width_obj, (mp_obj_t)&qrio_qrdecoder_set_width_obj);
(mp_obj_t)&qrio_qrdecoder_set_width_obj,
MP_ROM_NONE},
};
//| height: int //| height: int
//| """The height of image the decoder expects""" //| """The height of image the decoder expects"""
@ -131,12 +128,9 @@ STATIC mp_obj_t qrio_qrdecoder_set_height(mp_obj_t self_in, mp_obj_t height_in)
} }
MP_DEFINE_CONST_FUN_OBJ_2(qrio_qrdecoder_set_height_obj, qrio_qrdecoder_set_height); MP_DEFINE_CONST_FUN_OBJ_2(qrio_qrdecoder_set_height_obj, qrio_qrdecoder_set_height);
const mp_obj_property_t qrio_qrdecoder_height_obj = { MP_PROPERTY_GETSET(qrio_qrdecoder_height_obj,
.base.type = &mp_type_property, (mp_obj_t)&qrio_qrdecoder_get_height_obj,
.proxy = {(mp_obj_t)&qrio_qrdecoder_get_height_obj, (mp_obj_t)&qrio_qrdecoder_set_height_obj);
(mp_obj_t)&qrio_qrdecoder_set_height_obj,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t qrio_qrdecoder_locals_table[] = { STATIC const mp_rom_map_elem_t qrio_qrdecoder_locals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_QRDecoder) }, { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_QRDecoder) },

View File

@ -310,12 +310,9 @@ STATIC mp_obj_t rgbmatrix_rgbmatrix_set_brightness(mp_obj_t self_in, mp_obj_t va
} }
MP_DEFINE_CONST_FUN_OBJ_2(rgbmatrix_rgbmatrix_set_brightness_obj, rgbmatrix_rgbmatrix_set_brightness); MP_DEFINE_CONST_FUN_OBJ_2(rgbmatrix_rgbmatrix_set_brightness_obj, rgbmatrix_rgbmatrix_set_brightness);
const mp_obj_property_t rgbmatrix_rgbmatrix_brightness_obj = { MP_PROPERTY_GETSET(rgbmatrix_rgbmatrix_brightness_obj,
.base.type = &mp_type_property, (mp_obj_t)&rgbmatrix_rgbmatrix_get_brightness_obj,
.proxy = {(mp_obj_t)&rgbmatrix_rgbmatrix_get_brightness_obj, (mp_obj_t)&rgbmatrix_rgbmatrix_set_brightness_obj);
(mp_obj_t)&rgbmatrix_rgbmatrix_set_brightness_obj,
MP_ROM_NONE},
};
//| def refresh(self) -> None: //| def refresh(self) -> None:
//| """Transmits the color data in the buffer to the pixels so that //| """Transmits the color data in the buffer to the pixels so that
@ -339,12 +336,8 @@ STATIC mp_obj_t rgbmatrix_rgbmatrix_get_width(mp_obj_t self_in) {
return MP_OBJ_NEW_SMALL_INT(common_hal_rgbmatrix_rgbmatrix_get_width(self)); return MP_OBJ_NEW_SMALL_INT(common_hal_rgbmatrix_rgbmatrix_get_width(self));
} }
MP_DEFINE_CONST_FUN_OBJ_1(rgbmatrix_rgbmatrix_get_width_obj, rgbmatrix_rgbmatrix_get_width); MP_DEFINE_CONST_FUN_OBJ_1(rgbmatrix_rgbmatrix_get_width_obj, rgbmatrix_rgbmatrix_get_width);
const mp_obj_property_t rgbmatrix_rgbmatrix_width_obj = { MP_PROPERTY_GETTER(rgbmatrix_rgbmatrix_width_obj,
.base.type = &mp_type_property, (mp_obj_t)&rgbmatrix_rgbmatrix_get_width_obj);
.proxy = {(mp_obj_t)&rgbmatrix_rgbmatrix_get_width_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| height: int //| height: int
//| """The height of the display, in pixels""" //| """The height of the display, in pixels"""
@ -356,12 +349,8 @@ STATIC mp_obj_t rgbmatrix_rgbmatrix_get_height(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(rgbmatrix_rgbmatrix_get_height_obj, rgbmatrix_rgbmatrix_get_height); MP_DEFINE_CONST_FUN_OBJ_1(rgbmatrix_rgbmatrix_get_height_obj, rgbmatrix_rgbmatrix_get_height);
const mp_obj_property_t rgbmatrix_rgbmatrix_height_obj = { MP_PROPERTY_GETTER(rgbmatrix_rgbmatrix_height_obj,
.base.type = &mp_type_property, (mp_obj_t)&rgbmatrix_rgbmatrix_get_height_obj);
.proxy = {(mp_obj_t)&rgbmatrix_rgbmatrix_get_height_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t rgbmatrix_rgbmatrix_locals_dict_table[] = { STATIC const mp_rom_map_elem_t rgbmatrix_rgbmatrix_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&rgbmatrix_rgbmatrix_deinit_obj) }, { MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&rgbmatrix_rgbmatrix_deinit_obj) },

View File

@ -141,12 +141,9 @@ STATIC mp_obj_t rotaryio_incrementalencoder_obj_set_divisor(mp_obj_t self_in, mp
} }
MP_DEFINE_CONST_FUN_OBJ_2(rotaryio_incrementalencoder_set_divisor_obj, rotaryio_incrementalencoder_obj_set_divisor); MP_DEFINE_CONST_FUN_OBJ_2(rotaryio_incrementalencoder_set_divisor_obj, rotaryio_incrementalencoder_obj_set_divisor);
const mp_obj_property_t rotaryio_incrementalencoder_divisor_obj = { MP_PROPERTY_GETSET(rotaryio_incrementalencoder_divisor_obj,
.base.type = &mp_type_property, (mp_obj_t)&rotaryio_incrementalencoder_get_divisor_obj,
.proxy = {(mp_obj_t)&rotaryio_incrementalencoder_get_divisor_obj, (mp_obj_t)&rotaryio_incrementalencoder_set_divisor_obj);
(mp_obj_t)&rotaryio_incrementalencoder_set_divisor_obj,
MP_ROM_NONE},
};
//| position: int //| position: int
//| """The current position in terms of pulses. The number of pulses per rotation is defined by the //| """The current position in terms of pulses. The number of pulses per rotation is defined by the
@ -169,12 +166,9 @@ STATIC mp_obj_t rotaryio_incrementalencoder_obj_set_position(mp_obj_t self_in, m
} }
MP_DEFINE_CONST_FUN_OBJ_2(rotaryio_incrementalencoder_set_position_obj, rotaryio_incrementalencoder_obj_set_position); MP_DEFINE_CONST_FUN_OBJ_2(rotaryio_incrementalencoder_set_position_obj, rotaryio_incrementalencoder_obj_set_position);
const mp_obj_property_t rotaryio_incrementalencoder_position_obj = { MP_PROPERTY_GETSET(rotaryio_incrementalencoder_position_obj,
.base.type = &mp_type_property, (mp_obj_t)&rotaryio_incrementalencoder_get_position_obj,
.proxy = {(mp_obj_t)&rotaryio_incrementalencoder_get_position_obj, (mp_obj_t)&rotaryio_incrementalencoder_set_position_obj);
(mp_obj_t)&rotaryio_incrementalencoder_set_position_obj,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t rotaryio_incrementalencoder_locals_dict_table[] = { STATIC const mp_rom_map_elem_t rotaryio_incrementalencoder_locals_dict_table[] = {
// Methods // Methods

View File

@ -87,12 +87,9 @@ STATIC mp_obj_t rtc_rtc_obj_set_datetime(mp_obj_t self_in, mp_obj_t datetime) {
} }
MP_DEFINE_CONST_FUN_OBJ_2(rtc_rtc_set_datetime_obj, rtc_rtc_obj_set_datetime); MP_DEFINE_CONST_FUN_OBJ_2(rtc_rtc_set_datetime_obj, rtc_rtc_obj_set_datetime);
const mp_obj_property_t rtc_rtc_datetime_obj = { MP_PROPERTY_GETSET(rtc_rtc_datetime_obj,
.base.type = &mp_type_property, (mp_obj_t)&rtc_rtc_get_datetime_obj,
.proxy = {(mp_obj_t)&rtc_rtc_get_datetime_obj, (mp_obj_t)&rtc_rtc_set_datetime_obj);
(mp_obj_t)&rtc_rtc_set_datetime_obj,
MP_ROM_NONE},
};
//| calibration: int //| calibration: int
//| """The RTC calibration value as an `int`. //| """The RTC calibration value as an `int`.
@ -118,12 +115,9 @@ STATIC mp_obj_t rtc_rtc_obj_set_calibration(mp_obj_t self_in, mp_obj_t calibrati
} }
MP_DEFINE_CONST_FUN_OBJ_2(rtc_rtc_set_calibration_obj, rtc_rtc_obj_set_calibration); MP_DEFINE_CONST_FUN_OBJ_2(rtc_rtc_set_calibration_obj, rtc_rtc_obj_set_calibration);
const mp_obj_property_t rtc_rtc_calibration_obj = { MP_PROPERTY_GETSET(rtc_rtc_calibration_obj,
.base.type = &mp_type_property, (mp_obj_t)&rtc_rtc_get_calibration_obj,
.proxy = {(mp_obj_t)&rtc_rtc_get_calibration_obj, (mp_obj_t)&rtc_rtc_set_calibration_obj);
(mp_obj_t)&rtc_rtc_set_calibration_obj,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t rtc_rtc_locals_dict_table[] = { STATIC const mp_rom_map_elem_t rtc_rtc_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_datetime), MP_ROM_PTR(&rtc_rtc_datetime_obj) }, { MP_ROM_QSTR(MP_QSTR_datetime), MP_ROM_PTR(&rtc_rtc_datetime_obj) },

View File

@ -218,12 +218,8 @@ STATIC mp_obj_t sdioio_sdcard_obj_get_frequency(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(sdioio_sdcard_get_frequency_obj, sdioio_sdcard_obj_get_frequency); MP_DEFINE_CONST_FUN_OBJ_1(sdioio_sdcard_get_frequency_obj, sdioio_sdcard_obj_get_frequency);
const mp_obj_property_t sdioio_sdcard_frequency_obj = { MP_PROPERTY_GETTER(sdioio_sdcard_frequency_obj,
.base.type = &mp_type_property, (mp_obj_t)&sdioio_sdcard_get_frequency_obj);
.proxy = {(mp_obj_t)&sdioio_sdcard_get_frequency_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| @property //| @property
//| def width(self) -> int: //| def width(self) -> int:
@ -237,12 +233,8 @@ STATIC mp_obj_t sdioio_sdcard_obj_get_width(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(sdioio_sdcard_get_width_obj, sdioio_sdcard_obj_get_width); MP_DEFINE_CONST_FUN_OBJ_1(sdioio_sdcard_get_width_obj, sdioio_sdcard_obj_get_width);
const mp_obj_property_t sdioio_sdcard_width_obj = { MP_PROPERTY_GETTER(sdioio_sdcard_width_obj,
.base.type = &mp_type_property, (mp_obj_t)&sdioio_sdcard_get_width_obj);
.proxy = {(mp_obj_t)&sdioio_sdcard_get_width_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| def deinit(self) -> None: //| def deinit(self) -> None:
//| """Disable permanently. //| """Disable permanently.

View File

@ -105,12 +105,9 @@ STATIC mp_obj_t ssl_sslcontext_set_check_hostname(mp_obj_t self_in, mp_obj_t val
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_2(ssl_sslcontext_set_check_hostname_obj, ssl_sslcontext_set_check_hostname); STATIC MP_DEFINE_CONST_FUN_OBJ_2(ssl_sslcontext_set_check_hostname_obj, ssl_sslcontext_set_check_hostname);
const mp_obj_property_t ssl_sslcontext_check_hostname_obj = { MP_PROPERTY_GETSET(ssl_sslcontext_check_hostname_obj,
.base.type = &mp_type_property, (mp_obj_t)&ssl_sslcontext_get_check_hostname_obj,
.proxy = {(mp_obj_t)&ssl_sslcontext_get_check_hostname_obj, (mp_obj_t)&ssl_sslcontext_set_check_hostname_obj);
(mp_obj_t)&ssl_sslcontext_set_check_hostname_obj,
MP_ROM_NONE},
};
//| def wrap_socket(self, sock: socketpool.Socket, *, server_side: bool = False, server_hostname: Optional[str] = None) -> ssl.SSLSocket: //| def wrap_socket(self, sock: socketpool.Socket, *, server_side: bool = False, server_hostname: Optional[str] = None) -> ssl.SSLSocket:
//| """Wraps the socket into a socket-compatible class that handles SSL negotiation. //| """Wraps the socket into a socket-compatible class that handles SSL negotiation.

View File

@ -69,12 +69,8 @@ STATIC mp_obj_t supervisor_runtime_get_usb_connected(mp_obj_t self) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(supervisor_runtime_get_usb_connected_obj, supervisor_runtime_get_usb_connected); MP_DEFINE_CONST_FUN_OBJ_1(supervisor_runtime_get_usb_connected_obj, supervisor_runtime_get_usb_connected);
const mp_obj_property_t supervisor_runtime_usb_connected_obj = { MP_PROPERTY_GETTER(supervisor_runtime_usb_connected_obj,
.base.type = &mp_type_property, (mp_obj_t)&supervisor_runtime_get_usb_connected_obj);
.proxy = {(mp_obj_t)&supervisor_runtime_get_usb_connected_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| serial_connected: bool //| serial_connected: bool
//| """Returns the USB serial communication status (read-only).""" //| """Returns the USB serial communication status (read-only)."""
@ -84,12 +80,8 @@ STATIC mp_obj_t supervisor_runtime_get_serial_connected(mp_obj_t self) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(supervisor_runtime_get_serial_connected_obj, supervisor_runtime_get_serial_connected); MP_DEFINE_CONST_FUN_OBJ_1(supervisor_runtime_get_serial_connected_obj, supervisor_runtime_get_serial_connected);
const mp_obj_property_t supervisor_runtime_serial_connected_obj = { MP_PROPERTY_GETTER(supervisor_runtime_serial_connected_obj,
.base.type = &mp_type_property, (mp_obj_t)&supervisor_runtime_get_serial_connected_obj);
.proxy = {(mp_obj_t)&supervisor_runtime_get_serial_connected_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| serial_bytes_available: int //| serial_bytes_available: int
//| """Returns the whether any bytes are available to read //| """Returns the whether any bytes are available to read
@ -101,12 +93,8 @@ STATIC mp_obj_t supervisor_runtime_get_serial_bytes_available(mp_obj_t self) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(supervisor_runtime_get_serial_bytes_available_obj, supervisor_runtime_get_serial_bytes_available); MP_DEFINE_CONST_FUN_OBJ_1(supervisor_runtime_get_serial_bytes_available_obj, supervisor_runtime_get_serial_bytes_available);
const mp_obj_property_t supervisor_runtime_serial_bytes_available_obj = { MP_PROPERTY_GETTER(supervisor_runtime_serial_bytes_available_obj,
.base.type = &mp_type_property, (mp_obj_t)&supervisor_runtime_get_serial_bytes_available_obj);
.proxy = {(mp_obj_t)&supervisor_runtime_get_serial_bytes_available_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
supervisor_run_reason_t supervisor_get_run_reason(void) { supervisor_run_reason_t supervisor_get_run_reason(void) {
return _run_reason; return _run_reason;
@ -124,12 +112,8 @@ STATIC mp_obj_t supervisor_runtime_get_run_reason(mp_obj_t self) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(supervisor_runtime_get_run_reason_obj, supervisor_runtime_get_run_reason); MP_DEFINE_CONST_FUN_OBJ_1(supervisor_runtime_get_run_reason_obj, supervisor_runtime_get_run_reason);
const mp_obj_property_t supervisor_runtime_run_reason_obj = { MP_PROPERTY_GETTER(supervisor_runtime_run_reason_obj,
.base.type = &mp_type_property, (mp_obj_t)&supervisor_runtime_get_run_reason_obj);
.proxy = {(mp_obj_t)&supervisor_runtime_get_run_reason_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t supervisor_runtime_locals_dict_table[] = { STATIC const mp_rom_map_elem_t supervisor_runtime_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_usb_connected), MP_ROM_PTR(&supervisor_runtime_usb_connected_obj) }, { MP_ROM_QSTR(MP_QSTR_usb_connected), MP_ROM_PTR(&supervisor_runtime_usb_connected_obj) },

View File

@ -132,12 +132,8 @@ STATIC mp_obj_t synthio_miditrack_obj_get_sample_rate(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(synthio_miditrack_get_sample_rate_obj, synthio_miditrack_obj_get_sample_rate); MP_DEFINE_CONST_FUN_OBJ_1(synthio_miditrack_get_sample_rate_obj, synthio_miditrack_obj_get_sample_rate);
const mp_obj_property_t synthio_miditrack_sample_rate_obj = { MP_PROPERTY_GETTER(synthio_miditrack_sample_rate_obj,
.base.type = &mp_type_property, (mp_obj_t)&synthio_miditrack_get_sample_rate_obj);
.proxy = {(mp_obj_t)&synthio_miditrack_get_sample_rate_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t synthio_miditrack_locals_dict_table[] = { STATIC const mp_rom_map_elem_t synthio_miditrack_locals_dict_table[] = {
// Methods // Methods

View File

@ -120,12 +120,8 @@ STATIC mp_obj_t touchio_touchin_obj_get_value(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(touchio_touchin_get_value_obj, touchio_touchin_obj_get_value); MP_DEFINE_CONST_FUN_OBJ_1(touchio_touchin_get_value_obj, touchio_touchin_obj_get_value);
const mp_obj_property_t touchio_touchin_value_obj = { MP_PROPERTY_GETTER(touchio_touchin_value_obj,
.base.type = &mp_type_property, (mp_obj_t)&touchio_touchin_get_value_obj);
.proxy = {(mp_obj_t)&touchio_touchin_get_value_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| raw_value: int //| raw_value: int
@ -139,12 +135,8 @@ STATIC mp_obj_t touchio_touchin_obj_get_raw_value(mp_obj_t self_in) {
MP_DEFINE_CONST_FUN_OBJ_1(touchio_touchin_get_raw_value_obj, touchio_touchin_obj_get_raw_value); MP_DEFINE_CONST_FUN_OBJ_1(touchio_touchin_get_raw_value_obj, touchio_touchin_obj_get_raw_value);
const mp_obj_property_t touchio_touchin_raw_value_obj = { MP_PROPERTY_GETTER(touchio_touchin_raw_value_obj,
.base.type = &mp_type_property, (mp_obj_t)&touchio_touchin_get_raw_value_obj);
.proxy = {(mp_obj_t)&touchio_touchin_get_raw_value_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| threshold: Optional[int] //| threshold: Optional[int]
@ -183,12 +175,9 @@ STATIC mp_obj_t touchio_touchin_obj_set_threshold(mp_obj_t self_in, mp_obj_t thr
MP_DEFINE_CONST_FUN_OBJ_2(touchio_touchin_set_threshold_obj, touchio_touchin_obj_set_threshold); MP_DEFINE_CONST_FUN_OBJ_2(touchio_touchin_set_threshold_obj, touchio_touchin_obj_set_threshold);
const mp_obj_property_t touchio_touchin_threshold_obj = { MP_PROPERTY_GETSET(touchio_touchin_threshold_obj,
.base.type = &mp_type_property, (mp_obj_t)&touchio_touchin_get_threshold_obj,
.proxy = {(mp_obj_t)&touchio_touchin_get_threshold_obj, (mp_obj_t)&touchio_touchin_set_threshold_obj);
(mp_obj_t)&touchio_touchin_set_threshold_obj,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t touchio_touchin_locals_dict_table[] = { STATIC const mp_rom_map_elem_t touchio_touchin_locals_dict_table[] = {

View File

@ -79,12 +79,8 @@ STATIC mp_obj_t usb_core_device_obj_get_idVendor(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(usb_core_device_get_idVendor_obj, usb_core_device_obj_get_idVendor); MP_DEFINE_CONST_FUN_OBJ_1(usb_core_device_get_idVendor_obj, usb_core_device_obj_get_idVendor);
const mp_obj_property_t usb_core_device_idVendor_obj = { MP_PROPERTY_GETTER(usb_core_device_idVendor_obj,
.base.type = &mp_type_property, (mp_obj_t)&usb_core_device_get_idVendor_obj);
.proxy = {(mp_obj_t)&usb_core_device_get_idVendor_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| idProduct: int //| idProduct: int
//| """The USB product ID of the device""" //| """The USB product ID of the device"""
@ -95,12 +91,8 @@ STATIC mp_obj_t usb_core_device_obj_get_idProduct(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(usb_core_device_get_idProduct_obj, usb_core_device_obj_get_idProduct); MP_DEFINE_CONST_FUN_OBJ_1(usb_core_device_get_idProduct_obj, usb_core_device_obj_get_idProduct);
const mp_obj_property_t usb_core_device_idProduct_obj = { MP_PROPERTY_GETTER(usb_core_device_idProduct_obj,
.base.type = &mp_type_property, (mp_obj_t)&usb_core_device_get_idProduct_obj);
.proxy = {(mp_obj_t)&usb_core_device_get_idProduct_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| serial_number: str //| serial_number: str
//| """The USB device's serial number string.""" //| """The USB device's serial number string."""
@ -111,12 +103,8 @@ STATIC mp_obj_t usb_core_device_obj_get_serial_number(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(usb_core_device_get_serial_number_obj, usb_core_device_obj_get_serial_number); MP_DEFINE_CONST_FUN_OBJ_1(usb_core_device_get_serial_number_obj, usb_core_device_obj_get_serial_number);
const mp_obj_property_t usb_core_device_serial_number_obj = { MP_PROPERTY_GETTER(usb_core_device_serial_number_obj,
.base.type = &mp_type_property, (mp_obj_t)&usb_core_device_get_serial_number_obj);
.proxy = {(mp_obj_t)&usb_core_device_get_serial_number_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| product: str //| product: str
//| """The USB device's product string.""" //| """The USB device's product string."""
@ -127,12 +115,8 @@ STATIC mp_obj_t usb_core_device_obj_get_product(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(usb_core_device_get_product_obj, usb_core_device_obj_get_product); MP_DEFINE_CONST_FUN_OBJ_1(usb_core_device_get_product_obj, usb_core_device_obj_get_product);
const mp_obj_property_t usb_core_device_product_obj = { MP_PROPERTY_GETTER(usb_core_device_product_obj,
.base.type = &mp_type_property, (mp_obj_t)&usb_core_device_get_product_obj);
.proxy = {(mp_obj_t)&usb_core_device_get_product_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| manufacturer: str //| manufacturer: str
//| """The USB device's manufacturer string.""" //| """The USB device's manufacturer string."""
@ -143,12 +127,8 @@ STATIC mp_obj_t usb_core_device_obj_get_manufacturer(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(usb_core_device_get_manufacturer_obj, usb_core_device_obj_get_manufacturer); MP_DEFINE_CONST_FUN_OBJ_1(usb_core_device_get_manufacturer_obj, usb_core_device_obj_get_manufacturer);
const mp_obj_property_t usb_core_device_manufacturer_obj = { MP_PROPERTY_GETTER(usb_core_device_manufacturer_obj,
.base.type = &mp_type_property, (mp_obj_t)&usb_core_device_get_manufacturer_obj);
.proxy = {(mp_obj_t)&usb_core_device_get_manufacturer_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| def write(self, endpoint: int, data: ReadableBuffer, timeout = None) -> int: //| def write(self, endpoint: int, data: ReadableBuffer, timeout = None) -> int:
//| """Write data to a specific endpoint on the device. //| """Write data to a specific endpoint on the device.

View File

@ -157,12 +157,8 @@ STATIC mp_obj_t usb_cdc_serial_get_connected(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(usb_cdc_serial_get_connected_obj, usb_cdc_serial_get_connected); MP_DEFINE_CONST_FUN_OBJ_1(usb_cdc_serial_get_connected_obj, usb_cdc_serial_get_connected);
const mp_obj_property_t usb_cdc_serial_connected_obj = { MP_PROPERTY_GETTER(usb_cdc_serial_connected_obj,
.base.type = &mp_type_property, (mp_obj_t)&usb_cdc_serial_get_connected_obj);
.proxy = {(mp_obj_t)&usb_cdc_serial_get_connected_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| in_waiting: int //| in_waiting: int
//| """Returns the number of bytes waiting to be read on the USB serial input. (read-only)""" //| """Returns the number of bytes waiting to be read on the USB serial input. (read-only)"""
@ -173,12 +169,8 @@ STATIC mp_obj_t usb_cdc_serial_get_in_waiting(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(usb_cdc_serial_get_in_waiting_obj, usb_cdc_serial_get_in_waiting); MP_DEFINE_CONST_FUN_OBJ_1(usb_cdc_serial_get_in_waiting_obj, usb_cdc_serial_get_in_waiting);
const mp_obj_property_t usb_cdc_serial_in_waiting_obj = { MP_PROPERTY_GETTER(usb_cdc_serial_in_waiting_obj,
.base.type = &mp_type_property, (mp_obj_t)&usb_cdc_serial_get_in_waiting_obj);
.proxy = {(mp_obj_t)&usb_cdc_serial_get_in_waiting_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| out_waiting: int //| out_waiting: int
//| """Returns the number of bytes waiting to be written on the USB serial output. (read-only)""" //| """Returns the number of bytes waiting to be written on the USB serial output. (read-only)"""
@ -189,12 +181,8 @@ STATIC mp_obj_t usb_cdc_serial_get_out_waiting(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(usb_cdc_serial_get_out_waiting_obj, usb_cdc_serial_get_out_waiting); MP_DEFINE_CONST_FUN_OBJ_1(usb_cdc_serial_get_out_waiting_obj, usb_cdc_serial_get_out_waiting);
const mp_obj_property_t usb_cdc_serial_out_waiting_obj = { MP_PROPERTY_GETTER(usb_cdc_serial_out_waiting_obj,
.base.type = &mp_type_property, (mp_obj_t)&usb_cdc_serial_get_out_waiting_obj);
.proxy = {(mp_obj_t)&usb_cdc_serial_get_out_waiting_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| def reset_input_buffer(self) -> None: //| def reset_input_buffer(self) -> None:
//| """Clears any unread bytes.""" //| """Clears any unread bytes."""
@ -237,12 +225,9 @@ STATIC mp_obj_t usb_cdc_serial_set_timeout(mp_obj_t self_in, mp_obj_t timeout_in
} }
MP_DEFINE_CONST_FUN_OBJ_2(usb_cdc_serial_set_timeout_obj, usb_cdc_serial_set_timeout); MP_DEFINE_CONST_FUN_OBJ_2(usb_cdc_serial_set_timeout_obj, usb_cdc_serial_set_timeout);
const mp_obj_property_t usb_cdc_serial_timeout_obj = { MP_PROPERTY_GETSET(usb_cdc_serial_timeout_obj,
.base.type = &mp_type_property, (mp_obj_t)&usb_cdc_serial_get_timeout_obj,
.proxy = {(mp_obj_t)&usb_cdc_serial_get_timeout_obj, (mp_obj_t)&usb_cdc_serial_set_timeout_obj);
(mp_obj_t)&usb_cdc_serial_set_timeout_obj,
MP_ROM_NONE},
};
//| write_timeout: Optional[float] //| write_timeout: Optional[float]
//| """The initial value of `write_timeout` is ``None``. If ``None``, wait indefinitely to finish //| """The initial value of `write_timeout` is ``None``. If ``None``, wait indefinitely to finish
@ -264,12 +249,9 @@ STATIC mp_obj_t usb_cdc_serial_set_write_timeout(mp_obj_t self_in, mp_obj_t writ
} }
MP_DEFINE_CONST_FUN_OBJ_2(usb_cdc_serial_set_write_timeout_obj, usb_cdc_serial_set_write_timeout); MP_DEFINE_CONST_FUN_OBJ_2(usb_cdc_serial_set_write_timeout_obj, usb_cdc_serial_set_write_timeout);
const mp_obj_property_t usb_cdc_serial_write_timeout_obj = { MP_PROPERTY_GETSET(usb_cdc_serial_write_timeout_obj,
.base.type = &mp_type_property, (mp_obj_t)&usb_cdc_serial_get_write_timeout_obj,
.proxy = {(mp_obj_t)&usb_cdc_serial_get_write_timeout_obj, (mp_obj_t)&usb_cdc_serial_set_write_timeout_obj);
(mp_obj_t)&usb_cdc_serial_set_write_timeout_obj,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t usb_cdc_serial_locals_dict_table[] = { STATIC const mp_rom_map_elem_t usb_cdc_serial_locals_dict_table[] = {

View File

@ -236,12 +236,8 @@ STATIC mp_obj_t usb_hid_device_obj_get_last_received_report_property(mp_obj_t se
} }
MP_DEFINE_CONST_FUN_OBJ_1(usb_hid_device_get_last_received_report_property_obj, usb_hid_device_obj_get_last_received_report_property); MP_DEFINE_CONST_FUN_OBJ_1(usb_hid_device_get_last_received_report_property_obj, usb_hid_device_obj_get_last_received_report_property);
const mp_obj_property_t usb_hid_device_last_received_report_obj = { MP_PROPERTY_GETTER(usb_hid_device_last_received_report_obj,
.base.type = &mp_type_property, (mp_obj_t)&usb_hid_device_get_last_received_report_property_obj);
.proxy = {(mp_obj_t)&usb_hid_device_get_last_received_report_property_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| usage_page: int //| usage_page: int
//| """The device usage page identifier, which designates a category of device. (read-only)""" //| """The device usage page identifier, which designates a category of device. (read-only)"""
@ -252,12 +248,8 @@ STATIC mp_obj_t usb_hid_device_obj_get_usage_page(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(usb_hid_device_get_usage_page_obj, usb_hid_device_obj_get_usage_page); MP_DEFINE_CONST_FUN_OBJ_1(usb_hid_device_get_usage_page_obj, usb_hid_device_obj_get_usage_page);
const mp_obj_property_t usb_hid_device_usage_page_obj = { MP_PROPERTY_GETTER(usb_hid_device_usage_page_obj,
.base.type = &mp_type_property, (mp_obj_t)&usb_hid_device_get_usage_page_obj);
.proxy = {(mp_obj_t)&usb_hid_device_get_usage_page_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
//| usage: int //| usage: int
//| """The device usage identifier, which designates a specific kind of device. (read-only) //| """The device usage identifier, which designates a specific kind of device. (read-only)
@ -272,12 +264,8 @@ STATIC mp_obj_t usb_hid_device_obj_get_usage(mp_obj_t self_in) {
MP_DEFINE_CONST_FUN_OBJ_1(usb_hid_device_get_usage_obj, MP_DEFINE_CONST_FUN_OBJ_1(usb_hid_device_get_usage_obj,
usb_hid_device_obj_get_usage); usb_hid_device_obj_get_usage);
const mp_obj_property_t usb_hid_device_usage_obj = { MP_PROPERTY_GETTER(usb_hid_device_usage_obj,
.base.type = &mp_type_property, (mp_obj_t)&usb_hid_device_get_usage_obj);
.proxy = {(mp_obj_t)&usb_hid_device_get_usage_obj,
MP_ROM_NONE,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t usb_hid_device_locals_dict_table[] = { STATIC const mp_rom_map_elem_t usb_hid_device_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_send_report), MP_ROM_PTR(&usb_hid_device_send_report_obj) }, { MP_ROM_QSTR(MP_QSTR_send_report), MP_ROM_PTR(&usb_hid_device_send_report_obj) },

View File

@ -76,12 +76,9 @@ STATIC mp_obj_t vectorio_circle_obj_set_radius(mp_obj_t self_in, mp_obj_t radius
} }
MP_DEFINE_CONST_FUN_OBJ_2(vectorio_circle_set_radius_obj, vectorio_circle_obj_set_radius); MP_DEFINE_CONST_FUN_OBJ_2(vectorio_circle_set_radius_obj, vectorio_circle_obj_set_radius);
const mp_obj_property_t vectorio_circle_radius_obj = { MP_PROPERTY_GETSET(vectorio_circle_radius_obj,
.base.type = &mp_type_property, (mp_obj_t)&vectorio_circle_get_radius_obj,
.proxy = {(mp_obj_t)&vectorio_circle_get_radius_obj, (mp_obj_t)&vectorio_circle_set_radius_obj);
(mp_obj_t)&vectorio_circle_set_radius_obj,
MP_ROM_NONE},
};
//| color_index : int //| color_index : int
//| """The color_index of the circle as 0 based index of the palette.""" //| """The color_index of the circle as 0 based index of the palette."""
@ -99,12 +96,9 @@ STATIC mp_obj_t vectorio_circle_obj_set_color_index(mp_obj_t self_in, mp_obj_t c
} }
MP_DEFINE_CONST_FUN_OBJ_2(vectorio_circle_set_color_index_obj, vectorio_circle_obj_set_color_index); MP_DEFINE_CONST_FUN_OBJ_2(vectorio_circle_set_color_index_obj, vectorio_circle_obj_set_color_index);
const mp_obj_property_t vectorio_circle_color_index_obj = { MP_PROPERTY_GETSET(vectorio_circle_color_index_obj,
.base.type = &mp_type_property, (mp_obj_t)&vectorio_circle_get_color_index_obj,
.proxy = {(mp_obj_t)&vectorio_circle_get_color_index_obj, (mp_obj_t)&vectorio_circle_set_color_index_obj);
(mp_obj_t)&vectorio_circle_set_color_index_obj,
MP_ROM_NONE},
};
// Documentation for properties inherited from VectorShape. // Documentation for properties inherited from VectorShape.

View File

@ -82,12 +82,9 @@ STATIC mp_obj_t vectorio_polygon_obj_set_points(mp_obj_t self_in, mp_obj_t point
} }
MP_DEFINE_CONST_FUN_OBJ_2(vectorio_polygon_set_points_obj, vectorio_polygon_obj_set_points); MP_DEFINE_CONST_FUN_OBJ_2(vectorio_polygon_set_points_obj, vectorio_polygon_obj_set_points);
const mp_obj_property_t vectorio_polygon_points_obj = { MP_PROPERTY_GETSET(vectorio_polygon_points_obj,
.base.type = &mp_type_property, (mp_obj_t)&vectorio_polygon_get_points_obj,
.proxy = {(mp_obj_t)&vectorio_polygon_get_points_obj, (mp_obj_t)&vectorio_polygon_set_points_obj);
(mp_obj_t)&vectorio_polygon_set_points_obj,
MP_ROM_NONE},
};
//| color_index : int //| color_index : int
//| """The color_index of the polygon as 0 based index of the palette.""" //| """The color_index of the polygon as 0 based index of the palette."""
@ -105,12 +102,9 @@ STATIC mp_obj_t vectorio_polygon_obj_set_color_index(mp_obj_t self_in, mp_obj_t
} }
MP_DEFINE_CONST_FUN_OBJ_2(vectorio_polygon_set_color_index_obj, vectorio_polygon_obj_set_color_index); MP_DEFINE_CONST_FUN_OBJ_2(vectorio_polygon_set_color_index_obj, vectorio_polygon_obj_set_color_index);
const mp_obj_property_t vectorio_polygon_color_index_obj = { MP_PROPERTY_GETSET(vectorio_polygon_color_index_obj,
.base.type = &mp_type_property, (mp_obj_t)&vectorio_polygon_get_color_index_obj,
.proxy = {(mp_obj_t)&vectorio_polygon_get_color_index_obj, (mp_obj_t)&vectorio_polygon_set_color_index_obj);
(mp_obj_t)&vectorio_polygon_set_color_index_obj,
MP_ROM_NONE},
};
// Documentation for properties inherited from VectorShape. // Documentation for properties inherited from VectorShape.

View File

@ -120,12 +120,9 @@ STATIC mp_obj_t vectorio_vector_shape_obj_set_x(mp_obj_t wrapper_shape, mp_obj_t
} }
MP_DEFINE_CONST_FUN_OBJ_2(vectorio_vector_shape_set_x_obj, vectorio_vector_shape_obj_set_x); MP_DEFINE_CONST_FUN_OBJ_2(vectorio_vector_shape_set_x_obj, vectorio_vector_shape_obj_set_x);
const mp_obj_property_t vectorio_vector_shape_x_obj = { MP_PROPERTY_GETSET(vectorio_vector_shape_x_obj,
.base.type = &mp_type_property, (mp_obj_t)&vectorio_vector_shape_get_x_obj,
.proxy = {(mp_obj_t)&vectorio_vector_shape_get_x_obj, (mp_obj_t)&vectorio_vector_shape_set_x_obj);
(mp_obj_t)&vectorio_vector_shape_set_x_obj,
MP_ROM_NONE},
};
// y: int // y: int
@ -151,12 +148,9 @@ STATIC mp_obj_t vectorio_vector_shape_obj_set_y(mp_obj_t wrapper_shape, mp_obj_t
} }
MP_DEFINE_CONST_FUN_OBJ_2(vectorio_vector_shape_set_y_obj, vectorio_vector_shape_obj_set_y); MP_DEFINE_CONST_FUN_OBJ_2(vectorio_vector_shape_set_y_obj, vectorio_vector_shape_obj_set_y);
const mp_obj_property_t vectorio_vector_shape_y_obj = { MP_PROPERTY_GETSET(vectorio_vector_shape_y_obj,
.base.type = &mp_type_property, (mp_obj_t)&vectorio_vector_shape_get_y_obj,
.proxy = {(mp_obj_t)&vectorio_vector_shape_get_y_obj, (mp_obj_t)&vectorio_vector_shape_set_y_obj);
(mp_obj_t)&vectorio_vector_shape_set_y_obj,
MP_ROM_NONE},
};
// location: Tuple[int, int] // location: Tuple[int, int]
@ -181,12 +175,9 @@ STATIC mp_obj_t vectorio_vector_shape_obj_set_location(mp_obj_t wrapper_shape, m
} }
MP_DEFINE_CONST_FUN_OBJ_2(vectorio_vector_shape_set_location_obj, vectorio_vector_shape_obj_set_location); MP_DEFINE_CONST_FUN_OBJ_2(vectorio_vector_shape_set_location_obj, vectorio_vector_shape_obj_set_location);
const mp_obj_property_t vectorio_vector_shape_location_obj = { MP_PROPERTY_GETSET(vectorio_vector_shape_location_obj,
.base.type = &mp_type_property, (mp_obj_t)&vectorio_vector_shape_get_location_obj,
.proxy = {(mp_obj_t)&vectorio_vector_shape_get_location_obj, (mp_obj_t)&vectorio_vector_shape_set_location_obj);
(mp_obj_t)&vectorio_vector_shape_set_location_obj,
MP_ROM_NONE},
};
// pixel_shader: Union[ColorConverter, Palette] // pixel_shader: Union[ColorConverter, Palette]
@ -216,12 +207,9 @@ STATIC mp_obj_t vectorio_vector_shape_obj_set_pixel_shader(mp_obj_t wrapper_shap
} }
MP_DEFINE_CONST_FUN_OBJ_2(vectorio_vector_shape_set_pixel_shader_obj, vectorio_vector_shape_obj_set_pixel_shader); MP_DEFINE_CONST_FUN_OBJ_2(vectorio_vector_shape_set_pixel_shader_obj, vectorio_vector_shape_obj_set_pixel_shader);
const mp_obj_property_t vectorio_vector_shape_pixel_shader_obj = { MP_PROPERTY_GETSET(vectorio_vector_shape_pixel_shader_obj,
.base.type = &mp_type_property, (mp_obj_t)&vectorio_vector_shape_get_pixel_shader_obj,
.proxy = {(mp_obj_t)&vectorio_vector_shape_get_pixel_shader_obj, (mp_obj_t)&vectorio_vector_shape_set_pixel_shader_obj);
(mp_obj_t)&vectorio_vector_shape_set_pixel_shader_obj,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t vectorio_vector_shape_locals_dict_table[] = { STATIC const mp_rom_map_elem_t vectorio_vector_shape_locals_dict_table[] = {

View File

@ -38,10 +38,10 @@ void vectorio_vector_shape_update_transform(vectorio_vector_shape_t *self, displ
// Composable property definition for shapes that use VectorShape // Composable property definition for shapes that use VectorShape
extern vectorio_draw_protocol_impl_t vectorio_vector_shape_draw_protocol_impl; extern vectorio_draw_protocol_impl_t vectorio_vector_shape_draw_protocol_impl;
extern const mp_obj_property_t vectorio_vector_shape_x_obj; extern const mp_obj_property_getset_t vectorio_vector_shape_x_obj;
extern const mp_obj_property_t vectorio_vector_shape_y_obj; extern const mp_obj_property_getset_t vectorio_vector_shape_y_obj;
extern const mp_obj_property_t vectorio_vector_shape_location_obj; extern const mp_obj_property_getset_t vectorio_vector_shape_location_obj;
extern const mp_obj_property_t vectorio_vector_shape_pixel_shader_obj; extern const mp_obj_property_getset_t vectorio_vector_shape_pixel_shader_obj;
extern const mp_obj_fun_builtin_fixed_t vectorio_vector_shape_contains_obj; extern const mp_obj_fun_builtin_fixed_t vectorio_vector_shape_contains_obj;
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_SHAPE_H #endif // MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_SHAPE_H

View File

@ -107,12 +107,9 @@ STATIC mp_obj_t watchdog_watchdogtimer_obj_set_timeout(mp_obj_t self_in, mp_obj_
} }
MP_DEFINE_CONST_FUN_OBJ_2(watchdog_watchdogtimer_set_timeout_obj, watchdog_watchdogtimer_obj_set_timeout); MP_DEFINE_CONST_FUN_OBJ_2(watchdog_watchdogtimer_set_timeout_obj, watchdog_watchdogtimer_obj_set_timeout);
const mp_obj_property_t watchdog_watchdogtimer_timeout_obj = { MP_PROPERTY_GETSET(watchdog_watchdogtimer_timeout_obj,
.base.type = &mp_type_property, (mp_obj_t)&watchdog_watchdogtimer_get_timeout_obj,
.proxy = {(mp_obj_t)&watchdog_watchdogtimer_get_timeout_obj, (mp_obj_t)&watchdog_watchdogtimer_set_timeout_obj);
(mp_obj_t)&watchdog_watchdogtimer_set_timeout_obj,
MP_ROM_NONE},
};
//| mode: WatchDogMode //| mode: WatchDogMode
//| """The current operating mode of the WatchDogTimer `watchdog.WatchDogMode`. //| """The current operating mode of the WatchDogTimer `watchdog.WatchDogMode`.
@ -158,12 +155,9 @@ STATIC mp_obj_t watchdog_watchdogtimer_obj_set_mode(mp_obj_t self_in, mp_obj_t m
} }
MP_DEFINE_CONST_FUN_OBJ_2(watchdog_watchdogtimer_set_mode_obj, watchdog_watchdogtimer_obj_set_mode); MP_DEFINE_CONST_FUN_OBJ_2(watchdog_watchdogtimer_set_mode_obj, watchdog_watchdogtimer_obj_set_mode);
const mp_obj_property_t watchdog_watchdogtimer_mode_obj = { MP_PROPERTY_GETSET(watchdog_watchdogtimer_mode_obj,
.base.type = &mp_type_property, (mp_obj_t)&watchdog_watchdogtimer_get_mode_obj,
.proxy = {(mp_obj_t)&watchdog_watchdogtimer_get_mode_obj, (mp_obj_t)&watchdog_watchdogtimer_set_mode_obj);
(mp_obj_t)&watchdog_watchdogtimer_set_mode_obj,
MP_ROM_NONE},
};
STATIC const mp_rom_map_elem_t watchdog_watchdogtimer_locals_dict_table[] = { STATIC const mp_rom_map_elem_t watchdog_watchdogtimer_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_feed), MP_ROM_PTR(&watchdog_watchdogtimer_feed_obj) }, { MP_ROM_QSTR(MP_QSTR_feed), MP_ROM_PTR(&watchdog_watchdogtimer_feed_obj) },

View File

@ -92,12 +92,9 @@ STATIC mp_obj_t wifi_monitor_obj_set_channel(mp_obj_t self_in, mp_obj_t channel)
} }
MP_DEFINE_CONST_FUN_OBJ_2(wifi_monitor_set_channel_obj, wifi_monitor_obj_set_channel); MP_DEFINE_CONST_FUN_OBJ_2(wifi_monitor_set_channel_obj, wifi_monitor_obj_set_channel);
const mp_obj_property_t wifi_monitor_channel_obj = { MP_PROPERTY_GETSET(wifi_monitor_channel_obj,
.base.type = &mp_type_property, (mp_obj_t)&wifi_monitor_get_channel_obj,
.proxy = { (mp_obj_t)&wifi_monitor_get_channel_obj, (mp_obj_t)&wifi_monitor_set_channel_obj);
(mp_obj_t)&wifi_monitor_set_channel_obj,
MP_ROM_NONE },
};
//| queue: int //| queue: int
//| """The queue size for buffering the packet.""" //| """The queue size for buffering the packet."""
@ -107,12 +104,8 @@ STATIC mp_obj_t wifi_monitor_obj_get_queue(mp_obj_t self_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(wifi_monitor_get_queue_obj, wifi_monitor_obj_get_queue); MP_DEFINE_CONST_FUN_OBJ_1(wifi_monitor_get_queue_obj, wifi_monitor_obj_get_queue);
const mp_obj_property_t wifi_monitor_queue_obj = { MP_PROPERTY_GETTER(wifi_monitor_queue_obj,
.base.type = &mp_type_property, (mp_obj_t)&wifi_monitor_get_queue_obj);
.proxy = { (mp_obj_t)&wifi_monitor_get_queue_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| def deinit(self) -> None: //| def deinit(self) -> None:
//| """De-initialize `wifi.Monitor` singleton.""" //| """De-initialize `wifi.Monitor` singleton."""

View File

@ -50,12 +50,8 @@ STATIC mp_obj_t wifi_network_get_ssid(mp_obj_t self) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(wifi_network_get_ssid_obj, wifi_network_get_ssid); MP_DEFINE_CONST_FUN_OBJ_1(wifi_network_get_ssid_obj, wifi_network_get_ssid);
const mp_obj_property_t wifi_network_ssid_obj = { MP_PROPERTY_GETTER(wifi_network_ssid_obj,
.base.type = &mp_type_property, (mp_obj_t)&wifi_network_get_ssid_obj);
.proxy = { (mp_obj_t)&wifi_network_get_ssid_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| bssid: bytes //| bssid: bytes
@ -67,12 +63,8 @@ STATIC mp_obj_t wifi_network_get_bssid(mp_obj_t self) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(wifi_network_get_bssid_obj, wifi_network_get_bssid); MP_DEFINE_CONST_FUN_OBJ_1(wifi_network_get_bssid_obj, wifi_network_get_bssid);
const mp_obj_property_t wifi_network_bssid_obj = { MP_PROPERTY_GETTER(wifi_network_bssid_obj,
.base.type = &mp_type_property, (mp_obj_t)&wifi_network_get_bssid_obj);
.proxy = { (mp_obj_t)&wifi_network_get_bssid_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| rssi: int //| rssi: int
@ -84,12 +76,8 @@ STATIC mp_obj_t wifi_network_get_rssi(mp_obj_t self) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(wifi_network_get_rssi_obj, wifi_network_get_rssi); MP_DEFINE_CONST_FUN_OBJ_1(wifi_network_get_rssi_obj, wifi_network_get_rssi);
const mp_obj_property_t wifi_network_rssi_obj = { MP_PROPERTY_GETTER(wifi_network_rssi_obj,
.base.type = &mp_type_property, (mp_obj_t)&wifi_network_get_rssi_obj);
.proxy = { (mp_obj_t)&wifi_network_get_rssi_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| channel: int //| channel: int
@ -101,12 +89,8 @@ STATIC mp_obj_t wifi_network_get_channel(mp_obj_t self) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(wifi_network_get_channel_obj, wifi_network_get_channel); MP_DEFINE_CONST_FUN_OBJ_1(wifi_network_get_channel_obj, wifi_network_get_channel);
const mp_obj_property_t wifi_network_channel_obj = { MP_PROPERTY_GETTER(wifi_network_channel_obj,
.base.type = &mp_type_property, (mp_obj_t)&wifi_network_get_channel_obj);
.proxy = { (mp_obj_t)&wifi_network_get_channel_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| country: str //| country: str
//| """String id of the country code""" //| """String id of the country code"""
@ -117,12 +101,8 @@ STATIC mp_obj_t wifi_network_get_country(mp_obj_t self) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(wifi_network_get_country_obj, wifi_network_get_country); MP_DEFINE_CONST_FUN_OBJ_1(wifi_network_get_country_obj, wifi_network_get_country);
const mp_obj_property_t wifi_network_country_obj = { MP_PROPERTY_GETTER(wifi_network_country_obj,
.base.type = &mp_type_property, (mp_obj_t)&wifi_network_get_country_obj);
.proxy = { (mp_obj_t)&wifi_network_get_country_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| authmode: str //| authmode: str
//| """String id of the authmode""" //| """String id of the authmode"""
@ -133,12 +113,8 @@ STATIC mp_obj_t wifi_network_get_authmode(mp_obj_t self) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(wifi_network_get_authmode_obj, wifi_network_get_authmode); MP_DEFINE_CONST_FUN_OBJ_1(wifi_network_get_authmode_obj, wifi_network_get_authmode);
const mp_obj_property_t wifi_network_authmode_obj = { MP_PROPERTY_GETTER(wifi_network_authmode_obj,
.base.type = &mp_type_property, (mp_obj_t)&wifi_network_get_authmode_obj);
.proxy = { (mp_obj_t)&wifi_network_get_authmode_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
STATIC const mp_rom_map_elem_t wifi_network_locals_dict_table[] = { STATIC const mp_rom_map_elem_t wifi_network_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_ssid), MP_ROM_PTR(&wifi_network_ssid_obj) }, { MP_ROM_QSTR(MP_QSTR_ssid), MP_ROM_PTR(&wifi_network_ssid_obj) },

View File

@ -69,12 +69,9 @@ static mp_obj_t wifi_radio_set_enabled(mp_obj_t self, mp_obj_t value) {
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_2(wifi_radio_set_enabled_obj, wifi_radio_set_enabled); STATIC MP_DEFINE_CONST_FUN_OBJ_2(wifi_radio_set_enabled_obj, wifi_radio_set_enabled);
const mp_obj_property_t wifi_radio_enabled_obj = { MP_PROPERTY_GETSET(wifi_radio_enabled_obj,
.base.type = &mp_type_property, (mp_obj_t)&wifi_radio_get_enabled_obj,
.proxy = { (mp_obj_t)&wifi_radio_get_enabled_obj, (mp_obj_t)&wifi_radio_set_enabled_obj);
(mp_obj_t)&wifi_radio_set_enabled_obj,
MP_ROM_NONE },
};
//| hostname: Union[str | ReadableBuffer] //| hostname: Union[str | ReadableBuffer]
//| """Hostname for wifi interface. When the hostname is altered after interface started/connected //| """Hostname for wifi interface. When the hostname is altered after interface started/connected
@ -110,12 +107,9 @@ STATIC mp_obj_t wifi_radio_set_hostname(mp_obj_t self_in, mp_obj_t hostname_in)
} }
MP_DEFINE_CONST_FUN_OBJ_2(wifi_radio_set_hostname_obj, wifi_radio_set_hostname); MP_DEFINE_CONST_FUN_OBJ_2(wifi_radio_set_hostname_obj, wifi_radio_set_hostname);
const mp_obj_property_t wifi_radio_hostname_obj = { MP_PROPERTY_GETSET(wifi_radio_hostname_obj,
.base.type = &mp_type_property, (mp_obj_t)&wifi_radio_get_hostname_obj,
.proxy = {(mp_obj_t)&wifi_radio_get_hostname_obj, (mp_obj_t)&wifi_radio_set_hostname_obj);
(mp_obj_t)&wifi_radio_set_hostname_obj,
MP_ROM_NONE},
};
//| mac_address: ReadableBuffer //| mac_address: ReadableBuffer
//| """MAC address for the station. When the address is altered after interface is connected //| """MAC address for the station. When the address is altered after interface is connected
@ -142,12 +136,9 @@ STATIC mp_obj_t wifi_radio_set_mac_address(mp_obj_t self_in, mp_obj_t mac_addres
} }
MP_DEFINE_CONST_FUN_OBJ_2(wifi_radio_set_mac_address_obj, wifi_radio_set_mac_address); MP_DEFINE_CONST_FUN_OBJ_2(wifi_radio_set_mac_address_obj, wifi_radio_set_mac_address);
const mp_obj_property_t wifi_radio_mac_address_obj = { MP_PROPERTY_GETSET(wifi_radio_mac_address_obj,
.base.type = &mp_type_property, (mp_obj_t)&wifi_radio_get_mac_address_obj,
.proxy = { (mp_obj_t)&wifi_radio_get_mac_address_obj, (mp_obj_t)&wifi_radio_set_mac_address_obj);
(mp_obj_t)&wifi_radio_set_mac_address_obj,
MP_ROM_NONE },
};
//| mac_address_ap: ReadableBuffer //| mac_address_ap: ReadableBuffer
//| """MAC address for the AP. When the address is altered after interface is started //| """MAC address for the AP. When the address is altered after interface is started
@ -174,12 +165,9 @@ STATIC mp_obj_t wifi_radio_set_mac_address_ap(mp_obj_t self_in, mp_obj_t mac_add
} }
MP_DEFINE_CONST_FUN_OBJ_2(wifi_radio_set_mac_address_ap_obj, wifi_radio_set_mac_address_ap); MP_DEFINE_CONST_FUN_OBJ_2(wifi_radio_set_mac_address_ap_obj, wifi_radio_set_mac_address_ap);
const mp_obj_property_t wifi_radio_mac_address_ap_obj = { MP_PROPERTY_GETSET(wifi_radio_mac_address_ap_obj,
.base.type = &mp_type_property, (mp_obj_t)&wifi_radio_get_mac_address_ap_obj,
.proxy = { (mp_obj_t)&wifi_radio_get_mac_address_ap_obj, (mp_obj_t)&wifi_radio_set_mac_address_ap_obj);
(mp_obj_t)&wifi_radio_set_mac_address_ap_obj,
MP_ROM_NONE },
};
//| def start_scanning_networks(self, *, start_channel: int = 1, stop_channel: int = 11) -> Iterable[Network]: //| def start_scanning_networks(self, *, start_channel: int = 1, stop_channel: int = 11) -> Iterable[Network]:
//| """Scans for available wifi networks over the given channel range. Make sure the channels are allowed in your country.""" //| """Scans for available wifi networks over the given channel range. Make sure the channels are allowed in your country."""
@ -393,12 +381,8 @@ STATIC mp_obj_t wifi_radio_get_ipv4_gateway(mp_obj_t self) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ipv4_gateway_obj, wifi_radio_get_ipv4_gateway); MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ipv4_gateway_obj, wifi_radio_get_ipv4_gateway);
const mp_obj_property_t wifi_radio_ipv4_gateway_obj = { MP_PROPERTY_GETTER(wifi_radio_ipv4_gateway_obj,
.base.type = &mp_type_property, (mp_obj_t)&wifi_radio_get_ipv4_gateway_obj);
.proxy = { (mp_obj_t)&wifi_radio_get_ipv4_gateway_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| ipv4_gateway_ap: Optional[ipaddress.IPv4Address] //| ipv4_gateway_ap: Optional[ipaddress.IPv4Address]
//| """IP v4 Address of the access point gateway, when enabled. None otherwise.""" //| """IP v4 Address of the access point gateway, when enabled. None otherwise."""
@ -409,12 +393,8 @@ STATIC mp_obj_t wifi_radio_get_ipv4_gateway_ap(mp_obj_t self) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ipv4_gateway_ap_obj, wifi_radio_get_ipv4_gateway_ap); MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ipv4_gateway_ap_obj, wifi_radio_get_ipv4_gateway_ap);
const mp_obj_property_t wifi_radio_ipv4_gateway_ap_obj = { MP_PROPERTY_GETTER(wifi_radio_ipv4_gateway_ap_obj,
.base.type = &mp_type_property, (mp_obj_t)&wifi_radio_get_ipv4_gateway_ap_obj);
.proxy = { (mp_obj_t)&wifi_radio_get_ipv4_gateway_ap_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| ipv4_subnet: Optional[ipaddress.IPv4Address] //| ipv4_subnet: Optional[ipaddress.IPv4Address]
//| """IP v4 Address of the station subnet when connected to an access point. None otherwise.""" //| """IP v4 Address of the station subnet when connected to an access point. None otherwise."""
@ -425,12 +405,8 @@ STATIC mp_obj_t wifi_radio_get_ipv4_subnet(mp_obj_t self) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ipv4_subnet_obj, wifi_radio_get_ipv4_subnet); MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ipv4_subnet_obj, wifi_radio_get_ipv4_subnet);
const mp_obj_property_t wifi_radio_ipv4_subnet_obj = { MP_PROPERTY_GETTER(wifi_radio_ipv4_subnet_obj,
.base.type = &mp_type_property, (mp_obj_t)&wifi_radio_get_ipv4_subnet_obj);
.proxy = { (mp_obj_t)&wifi_radio_get_ipv4_subnet_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| ipv4_subnet_ap: Optional[ipaddress.IPv4Address] //| ipv4_subnet_ap: Optional[ipaddress.IPv4Address]
//| """IP v4 Address of the access point subnet, when enabled. None otherwise.""" //| """IP v4 Address of the access point subnet, when enabled. None otherwise."""
@ -441,12 +417,8 @@ STATIC mp_obj_t wifi_radio_get_ipv4_subnet_ap(mp_obj_t self) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ipv4_subnet_ap_obj, wifi_radio_get_ipv4_subnet_ap); MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ipv4_subnet_ap_obj, wifi_radio_get_ipv4_subnet_ap);
const mp_obj_property_t wifi_radio_ipv4_subnet_ap_obj = { MP_PROPERTY_GETTER(wifi_radio_ipv4_subnet_ap_obj,
.base.type = &mp_type_property, (mp_obj_t)&wifi_radio_get_ipv4_subnet_ap_obj);
.proxy = { (mp_obj_t)&wifi_radio_get_ipv4_subnet_ap_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| ipv4_address: Optional[ipaddress.IPv4Address] //| ipv4_address: Optional[ipaddress.IPv4Address]
//| """IP v4 Address of the station when connected to an access point. None otherwise.""" //| """IP v4 Address of the station when connected to an access point. None otherwise."""
@ -457,12 +429,8 @@ STATIC mp_obj_t wifi_radio_get_ipv4_address(mp_obj_t self) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ipv4_address_obj, wifi_radio_get_ipv4_address); MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ipv4_address_obj, wifi_radio_get_ipv4_address);
const mp_obj_property_t wifi_radio_ipv4_address_obj = { MP_PROPERTY_GETTER(wifi_radio_ipv4_address_obj,
.base.type = &mp_type_property, (mp_obj_t)&wifi_radio_get_ipv4_address_obj);
.proxy = { (mp_obj_t)&wifi_radio_get_ipv4_address_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| ipv4_address_ap: Optional[ipaddress.IPv4Address] //| ipv4_address_ap: Optional[ipaddress.IPv4Address]
//| """IP v4 Address of the access point, when enabled. None otherwise.""" //| """IP v4 Address of the access point, when enabled. None otherwise."""
@ -473,12 +441,8 @@ STATIC mp_obj_t wifi_radio_get_ipv4_address_ap(mp_obj_t self) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ipv4_address_ap_obj, wifi_radio_get_ipv4_address_ap); MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ipv4_address_ap_obj, wifi_radio_get_ipv4_address_ap);
const mp_obj_property_t wifi_radio_ipv4_address_ap_obj = { MP_PROPERTY_GETTER(wifi_radio_ipv4_address_ap_obj,
.base.type = &mp_type_property, (mp_obj_t)&wifi_radio_get_ipv4_address_ap_obj);
.proxy = { (mp_obj_t)&wifi_radio_get_ipv4_address_ap_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| ipv4_dns: Optional[ipaddress.IPv4Address] //| ipv4_dns: Optional[ipaddress.IPv4Address]
//| """IP v4 Address of the DNS server in use when connected to an access point. None otherwise.""" //| """IP v4 Address of the DNS server in use when connected to an access point. None otherwise."""
@ -489,12 +453,8 @@ STATIC mp_obj_t wifi_radio_get_ipv4_dns(mp_obj_t self) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ipv4_dns_obj, wifi_radio_get_ipv4_dns); MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ipv4_dns_obj, wifi_radio_get_ipv4_dns);
const mp_obj_property_t wifi_radio_ipv4_dns_obj = { MP_PROPERTY_GETTER(wifi_radio_ipv4_dns_obj,
.base.type = &mp_type_property, (mp_obj_t)&wifi_radio_get_ipv4_dns_obj);
.proxy = { (mp_obj_t)&wifi_radio_get_ipv4_dns_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| ap_info: Optional[Network] //| ap_info: Optional[Network]
//| """Network object containing BSSID, SSID, authmode, channel, country and RSSI when connected to an access point. None otherwise.""" //| """Network object containing BSSID, SSID, authmode, channel, country and RSSI when connected to an access point. None otherwise."""
@ -505,12 +465,8 @@ STATIC mp_obj_t wifi_radio_get_ap_info(mp_obj_t self) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ap_info_obj, wifi_radio_get_ap_info); MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ap_info_obj, wifi_radio_get_ap_info);
const mp_obj_property_t wifi_radio_ap_info_obj = { MP_PROPERTY_GETTER(wifi_radio_ap_info_obj,
.base.type = &mp_type_property, (mp_obj_t)&wifi_radio_get_ap_info_obj);
.proxy = { (mp_obj_t)&wifi_radio_get_ap_info_obj,
MP_ROM_NONE,
MP_ROM_NONE },
};
//| def ping(self, ip: ipaddress.IPv4Address, *, timeout: Optional[float] = 0.5) -> Optional[float]: //| def ping(self, ip: ipaddress.IPv4Address, *, timeout: Optional[float] = 0.5) -> Optional[float]:
//| """Ping an IP to test connectivity. Returns echo time in seconds. //| """Ping an IP to test connectivity. Returns echo time in seconds.