Introduce, use MP_PROPERTY_GETTER, _GETSET
Later, these can be changed in cunning ways to save flash storage.
This commit is contained in:
parent
dddf541ede
commit
31da335cac
|
@ -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);
|
||||
|
||||
const mp_obj_property_t samd_clock_enabled_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&samd_clock_get_enabled_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE,},
|
||||
};
|
||||
const mp_obj_property_getter_t samd_clock_enabled_obj = MP_PROPERTY_GETTER(samd_clock_enabled_obj,
|
||||
(mp_obj_t)&samd_clock_get_enabled_obj);
|
||||
|
||||
//| parent: Union[Clock, None]
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t samd_clock_parent_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&samd_clock_get_parent_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE,},
|
||||
};
|
||||
const mp_obj_property_getter_t samd_clock_parent_obj = MP_PROPERTY_GETTER(samd_clock_parent_obj,
|
||||
(mp_obj_t)&samd_clock_get_parent_obj);
|
||||
|
||||
//| frequency: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t samd_clock_frequency_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&samd_clock_get_frequency_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE,},
|
||||
};
|
||||
const mp_obj_property_getter_t samd_clock_frequency_obj = MP_PROPERTY_GETTER(samd_clock_frequency_obj,
|
||||
(mp_obj_t)&samd_clock_get_frequency_obj);
|
||||
|
||||
//| calibration: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t samd_clock_calibration_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&samd_clock_get_calibration_obj,
|
||||
(mp_obj_t)&samd_clock_set_calibration_obj,
|
||||
MP_ROM_NONE,},
|
||||
};
|
||||
const mp_obj_property_getset_t samd_clock_calibration_obj = MP_PROPERTY_GETSET(samd_clock_calibration_obj,
|
||||
(mp_obj_t)&samd_clock_get_calibration_obj,
|
||||
(mp_obj_t)&samd_clock_set_calibration_obj);
|
||||
|
||||
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) },
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(videocore_framebuffer_get_width_obj, videocore_framebuffer_get_width);
|
||||
const mp_obj_property_t videocore_framebuffer_width_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&videocore_framebuffer_get_width_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t videocore_framebuffer_width_obj = MP_PROPERTY_GETTER(videocore_framebuffer_width_obj,
|
||||
(mp_obj_t)&videocore_framebuffer_get_width_obj);
|
||||
|
||||
//| height: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t videocore_framebuffer_height_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&videocore_framebuffer_get_height_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t videocore_framebuffer_height_obj = MP_PROPERTY_GETTER(videocore_framebuffer_height_obj,
|
||||
(mp_obj_t)&videocore_framebuffer_get_height_obj);
|
||||
|
||||
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) },
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t rp2pio_statemachine_frequency_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&rp2pio_statemachine_get_frequency_obj,
|
||||
(mp_obj_t)&rp2pio_statemachine_set_frequency_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t rp2pio_statemachine_frequency_obj = MP_PROPERTY_GETSET(rp2pio_statemachine_frequency_obj,
|
||||
(mp_obj_t)&rp2pio_statemachine_get_frequency_obj,
|
||||
(mp_obj_t)&rp2pio_statemachine_set_frequency_obj);
|
||||
|
||||
//| rxstall: bool
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t rp2pio_statemachine_rxstall_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&rp2pio_statemachine_get_rxstall_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t rp2pio_statemachine_rxstall_obj = MP_PROPERTY_GETTER(rp2pio_statemachine_rxstall_obj,
|
||||
(mp_obj_t)&rp2pio_statemachine_get_rxstall_obj);
|
||||
|
||||
//| in_waiting: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t rp2pio_statemachine_in_waiting_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&rp2pio_statemachine_get_in_waiting_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t rp2pio_statemachine_in_waiting_obj = MP_PROPERTY_GETTER(rp2pio_statemachine_in_waiting_obj,
|
||||
(mp_obj_t)&rp2pio_statemachine_get_in_waiting_obj);
|
||||
|
||||
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) },
|
||||
|
|
|
@ -35,6 +35,12 @@ typedef struct _mp_obj_property_t {
|
|||
mp_obj_t proxy[3]; // getter, setter, deleter
|
||||
} mp_obj_property_t;
|
||||
|
||||
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) {.base.type = &mp_type_property, .proxy = {G, MP_ROM_NONE, MP_ROM_NONE}}
|
||||
#define MP_PROPERTY_GETSET(P, G, S) {.base.type = &mp_type_property, .proxy = {G, S, MP_ROM_NONE}}
|
||||
|
||||
#endif // MICROPY_PY_BUILTINS_PROPERTY
|
||||
|
||||
#endif // MICROPY_INCLUDED_PY_OBJPROPERTY_H
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t bleio_adapter_enabled_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&bleio_adapter_get_enabled_obj,
|
||||
(mp_obj_t)&bleio_adapter_set_enabled_obj,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getset_t bleio_adapter_enabled_obj = MP_PROPERTY_GETSET(bleio_adapter_enabled_obj,
|
||||
(mp_obj_t)&bleio_adapter_get_enabled_obj,
|
||||
(mp_obj_t)&bleio_adapter_set_enabled_obj);
|
||||
|
||||
//| address: Address
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t bleio_adapter_address_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&bleio_adapter_get_address_obj,
|
||||
(mp_obj_t)&bleio_adapter_set_address_obj,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getset_t bleio_adapter_address_obj = MP_PROPERTY_GETSET(bleio_adapter_address_obj,
|
||||
(mp_obj_t)&bleio_adapter_get_address_obj,
|
||||
(mp_obj_t)&bleio_adapter_set_address_obj);
|
||||
|
||||
//| name: str
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t bleio_adapter_name_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&bleio_adapter_get_name_obj,
|
||||
(mp_obj_t)&bleio_adapter_set_name_obj,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getset_t bleio_adapter_name_obj = MP_PROPERTY_GETSET(bleio_adapter_name_obj,
|
||||
(mp_obj_t)&bleio_adapter_get_name_obj,
|
||||
(mp_obj_t)&bleio_adapter_set_name_obj);
|
||||
|
||||
//| def start_advertising(self, data: ReadableBuffer, *,
|
||||
//| 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);
|
||||
|
||||
const mp_obj_property_t bleio_adapter_advertising_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&bleio_adapter_get_advertising_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t bleio_adapter_advertising_obj = MP_PROPERTY_GETTER(bleio_adapter_advertising_obj,
|
||||
(mp_obj_t)&bleio_adapter_get_advertising_obj);
|
||||
|
||||
//| connected: bool
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t bleio_adapter_connected_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&bleio_adapter_get_connected_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t bleio_adapter_connected_obj = MP_PROPERTY_GETTER(bleio_adapter_connected_obj,
|
||||
(mp_obj_t)&bleio_adapter_get_connected_obj);
|
||||
|
||||
//| connections: Tuple[Connection]
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t bleio_adapter_connections_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&bleio_adapter_get_connections_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t bleio_adapter_connections_obj = MP_PROPERTY_GETTER(bleio_adapter_connections_obj,
|
||||
(mp_obj_t)&bleio_adapter_get_connections_obj);
|
||||
|
||||
//| def connect(self, address: Address, *, timeout: float) -> Connection:
|
||||
//| """Attempts a connection to the device with the given address.
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t bleio_address_address_bytes_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&bleio_address_get_address_bytes_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t bleio_address_address_bytes_obj = MP_PROPERTY_GETTER(bleio_address_address_bytes_obj,
|
||||
(mp_obj_t)&bleio_address_get_address_bytes_obj);
|
||||
|
||||
//| type: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t bleio_address_type_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&bleio_address_get_type_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t bleio_address_type_obj = MP_PROPERTY_GETTER(bleio_address_type_obj,
|
||||
(mp_obj_t)&bleio_address_get_type_obj);
|
||||
|
||||
//| def __eq__(self, other: object) -> bool:
|
||||
//| """Two Address objects are equal if their addresses and address types are equal."""
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t bleio_characteristic_properties_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&bleio_characteristic_get_properties_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t bleio_characteristic_properties_obj = MP_PROPERTY_GETTER(bleio_characteristic_properties_obj,
|
||||
(mp_obj_t)&bleio_characteristic_get_properties_obj);
|
||||
|
||||
//| uuid: Optional[UUID]
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t bleio_characteristic_uuid_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&bleio_characteristic_get_uuid_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t bleio_characteristic_uuid_obj = MP_PROPERTY_GETTER(bleio_characteristic_uuid_obj,
|
||||
(mp_obj_t)&bleio_characteristic_get_uuid_obj);
|
||||
|
||||
//| value: bytearray
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t bleio_characteristic_value_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&bleio_characteristic_get_value_obj,
|
||||
(mp_obj_t)&bleio_characteristic_set_value_obj,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getset_t bleio_characteristic_value_obj = MP_PROPERTY_GETSET(bleio_characteristic_value_obj,
|
||||
(mp_obj_t)&bleio_characteristic_get_value_obj,
|
||||
(mp_obj_t)&bleio_characteristic_set_value_obj);
|
||||
|
||||
//| max_length: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t bleio_characteristic_max_length_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&bleio_characteristic_get_max_length_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t bleio_characteristic_max_length_obj = MP_PROPERTY_GETTER(bleio_characteristic_max_length_obj,
|
||||
(mp_obj_t)&bleio_characteristic_get_max_length_obj);
|
||||
|
||||
//| descriptors: Descriptor
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t bleio_characteristic_descriptors_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&bleio_characteristic_get_descriptors_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t bleio_characteristic_descriptors_obj = MP_PROPERTY_GETTER(bleio_characteristic_descriptors_obj,
|
||||
(mp_obj_t)&bleio_characteristic_get_descriptors_obj);
|
||||
|
||||
//| service: Service
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t bleio_characteristic_service_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&bleio_characteristic_get_service_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t bleio_characteristic_service_obj = MP_PROPERTY_GETTER(bleio_characteristic_service_obj,
|
||||
(mp_obj_t)&bleio_characteristic_get_service_obj);
|
||||
|
||||
//| def set_cccd(self, *, notify: bool = False, indicate: bool = False) -> None:
|
||||
//| """Set the remote characteristic's CCCD to enable or disable notification and indication.
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t bleio_characteristic_buffer_in_waiting_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&bleio_characteristic_buffer_get_in_waiting_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t bleio_characteristic_buffer_in_waiting_obj = MP_PROPERTY_GETTER(bleio_characteristic_buffer_in_waiting_obj,
|
||||
(mp_obj_t)&bleio_characteristic_buffer_get_in_waiting_obj);
|
||||
|
||||
//| def reset_input_buffer(self) -> None:
|
||||
//| """Discard any unread characters in the input buffer."""
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t bleio_connection_connected_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&bleio_connection_get_connected_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t bleio_connection_connected_obj = MP_PROPERTY_GETTER(bleio_connection_connected_obj,
|
||||
(mp_obj_t)&bleio_connection_get_connected_obj);
|
||||
|
||||
|
||||
//| 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);
|
||||
|
||||
const mp_obj_property_t bleio_connection_paired_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&bleio_connection_get_paired_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t bleio_connection_paired_obj = MP_PROPERTY_GETTER(bleio_connection_paired_obj,
|
||||
(mp_obj_t)&bleio_connection_get_paired_obj);
|
||||
|
||||
|
||||
//| 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);
|
||||
|
||||
const mp_obj_property_t bleio_connection_connection_interval_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&bleio_connection_get_connection_interval_obj,
|
||||
(mp_obj_t)&bleio_connection_set_connection_interval_obj,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getset_t bleio_connection_connection_interval_obj = MP_PROPERTY_GETSET(bleio_connection_connection_interval_obj,
|
||||
(mp_obj_t)&bleio_connection_get_connection_interval_obj,
|
||||
(mp_obj_t)&bleio_connection_set_connection_interval_obj);
|
||||
|
||||
const mp_obj_property_t bleio_connection_max_packet_length_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&bleio_connection_get_max_packet_length_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t bleio_connection_max_packet_length_obj = MP_PROPERTY_GETTER(bleio_connection_max_packet_length_obj,
|
||||
(mp_obj_t)&bleio_connection_get_max_packet_length_obj);
|
||||
|
||||
STATIC const mp_rom_map_elem_t bleio_connection_locals_dict_table[] = {
|
||||
// Methods
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t bleio_descriptor_uuid_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&bleio_descriptor_get_uuid_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t bleio_descriptor_uuid_obj = MP_PROPERTY_GETTER(bleio_descriptor_uuid_obj,
|
||||
(mp_obj_t)&bleio_descriptor_get_uuid_obj);
|
||||
|
||||
//| characteristic: Characteristic
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t bleio_descriptor_characteristic_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&bleio_descriptor_get_characteristic_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t bleio_descriptor_characteristic_obj = MP_PROPERTY_GETTER(bleio_descriptor_characteristic_obj,
|
||||
(mp_obj_t)&bleio_descriptor_get_characteristic_obj);
|
||||
|
||||
//| value: bytearray
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t bleio_descriptor_value_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&bleio_descriptor_get_value_obj,
|
||||
(mp_obj_t)&bleio_descriptor_set_value_obj,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getset_t bleio_descriptor_value_obj = MP_PROPERTY_GETSET(bleio_descriptor_value_obj,
|
||||
(mp_obj_t)&bleio_descriptor_get_value_obj,
|
||||
(mp_obj_t)&bleio_descriptor_set_value_obj);
|
||||
|
||||
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) },
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t bleio_packet_buffer_incoming_packet_length_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&bleio_packet_buffer_get_incoming_packet_length_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t bleio_packet_buffer_incoming_packet_length_obj = MP_PROPERTY_GETTER(bleio_packet_buffer_incoming_packet_length_obj,
|
||||
(mp_obj_t)&bleio_packet_buffer_get_incoming_packet_length_obj);
|
||||
|
||||
//| outgoing_packet_length: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t bleio_packet_buffer_outgoing_packet_length_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&bleio_packet_buffer_get_outgoing_packet_length_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t bleio_packet_buffer_outgoing_packet_length_obj = MP_PROPERTY_GETTER(bleio_packet_buffer_outgoing_packet_length_obj,
|
||||
(mp_obj_t)&bleio_packet_buffer_get_outgoing_packet_length_obj);
|
||||
|
||||
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) },
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t bleio_scanentry_address_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&bleio_scanentry_get_address_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t bleio_scanentry_address_obj = MP_PROPERTY_GETTER(bleio_scanentry_address_obj,
|
||||
(mp_obj_t)&bleio_scanentry_get_address_obj);
|
||||
|
||||
//| advertisement_bytes: bytes
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t bleio_scanentry_advertisement_bytes_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&bleio_scanentry_get_advertisement_bytes_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t bleio_scanentry_advertisement_bytes_obj = MP_PROPERTY_GETTER(bleio_scanentry_advertisement_bytes_obj,
|
||||
(mp_obj_t)&bleio_scanentry_get_advertisement_bytes_obj);
|
||||
|
||||
//| rssi: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t bleio_scanentry_rssi_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&bleio_scanentry_get_rssi_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t bleio_scanentry_rssi_obj = MP_PROPERTY_GETTER(bleio_scanentry_rssi_obj,
|
||||
(mp_obj_t)&bleio_scanentry_get_rssi_obj);
|
||||
|
||||
//| connectable: bool
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t bleio_scanentry_connectable_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&bleio_scanentry_get_connectable_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t bleio_scanentry_connectable_obj = MP_PROPERTY_GETTER(bleio_scanentry_connectable_obj,
|
||||
(mp_obj_t)&bleio_scanentry_get_connectable_obj);
|
||||
|
||||
//| scan_response: bool
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t bleio_scanentry_scan_response_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&bleio_scanentry_get_scan_response_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t bleio_scanentry_scan_response_obj = MP_PROPERTY_GETTER(bleio_scanentry_scan_response_obj,
|
||||
(mp_obj_t)&bleio_scanentry_get_scan_response_obj);
|
||||
|
||||
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) },
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t bleio_service_characteristics_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&bleio_service_get_characteristics_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t bleio_service_characteristics_obj = MP_PROPERTY_GETTER(bleio_service_characteristics_obj,
|
||||
(mp_obj_t)&bleio_service_get_characteristics_obj);
|
||||
|
||||
//| remote: bool
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t bleio_service_remote_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&bleio_service_get_remote_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t bleio_service_remote_obj = MP_PROPERTY_GETTER(bleio_service_remote_obj,
|
||||
(mp_obj_t)&bleio_service_get_remote_obj);
|
||||
|
||||
//| secondary: bool
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t bleio_service_secondary_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&bleio_service_get_secondary_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t bleio_service_secondary_obj = MP_PROPERTY_GETTER(bleio_service_secondary_obj,
|
||||
(mp_obj_t)&bleio_service_get_secondary_obj);
|
||||
|
||||
//| uuid: Optional[UUID]
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t bleio_service_uuid_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&bleio_service_get_uuid_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t bleio_service_uuid_obj = MP_PROPERTY_GETTER(bleio_service_uuid_obj,
|
||||
(mp_obj_t)&bleio_service_get_uuid_obj);
|
||||
|
||||
|
||||
STATIC const mp_rom_map_elem_t bleio_service_locals_dict_table[] = {
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t bleio_uuid_uuid16_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&bleio_uuid_get_uuid16_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t bleio_uuid_uuid16_obj = MP_PROPERTY_GETTER(bleio_uuid_uuid16_obj,
|
||||
(mp_obj_t)&bleio_uuid_get_uuid16_obj);
|
||||
|
||||
//| uuid128: bytes
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t bleio_uuid_uuid128_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&bleio_uuid_get_uuid128_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t bleio_uuid_uuid128_obj = MP_PROPERTY_GETTER(bleio_uuid_uuid128_obj,
|
||||
(mp_obj_t)&bleio_uuid_get_uuid128_obj);
|
||||
|
||||
//| size: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t bleio_uuid_size_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&bleio_uuid_get_size_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t bleio_uuid_size_obj = MP_PROPERTY_GETTER(bleio_uuid_size_obj,
|
||||
(mp_obj_t)&bleio_uuid_get_size_obj);
|
||||
|
||||
|
||||
//| def pack_into(self, buffer: WriteableBuffer, offset: int = 0) -> None:
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t pixelbuf_pixelbuf_bpp_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&pixelbuf_pixelbuf_get_bpp_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t pixelbuf_pixelbuf_bpp_obj = MP_PROPERTY_GETTER(pixelbuf_pixelbuf_bpp_obj,
|
||||
(mp_obj_t)&pixelbuf_pixelbuf_get_bpp_obj);
|
||||
|
||||
|
||||
//| 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);
|
||||
|
||||
const mp_obj_property_t pixelbuf_pixelbuf_brightness_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&pixelbuf_pixelbuf_get_brightness_obj,
|
||||
(mp_obj_t)&pixelbuf_pixelbuf_set_brightness_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t pixelbuf_pixelbuf_brightness_obj = MP_PROPERTY_GETSET(pixelbuf_pixelbuf_brightness_obj,
|
||||
(mp_obj_t)&pixelbuf_pixelbuf_get_brightness_obj,
|
||||
(mp_obj_t)&pixelbuf_pixelbuf_set_brightness_obj);
|
||||
|
||||
//| auto_write: bool
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t pixelbuf_pixelbuf_auto_write_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&pixelbuf_pixelbuf_get_auto_write_obj,
|
||||
(mp_obj_t)&pixelbuf_pixelbuf_set_auto_write_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t pixelbuf_pixelbuf_auto_write_obj = MP_PROPERTY_GETSET(pixelbuf_pixelbuf_auto_write_obj,
|
||||
(mp_obj_t)&pixelbuf_pixelbuf_get_auto_write_obj,
|
||||
(mp_obj_t)&pixelbuf_pixelbuf_set_auto_write_obj);
|
||||
|
||||
//| byteorder: str
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t pixelbuf_pixelbuf_byteorder_str = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&pixelbuf_pixelbuf_get_byteorder_str,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t pixelbuf_pixelbuf_byteorder_str = MP_PROPERTY_GETTER(pixelbuf_pixelbuf_byteorder_str,
|
||||
(mp_obj_t)&pixelbuf_pixelbuf_get_byteorder_str);
|
||||
|
||||
STATIC mp_obj_t pixelbuf_pixelbuf_unary_op(mp_unary_op_t op, mp_obj_t self_in) {
|
||||
switch (op) {
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t aesio_aes_mode_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&aesio_aes_get_mode_obj,
|
||||
(mp_obj_t)&aesio_aes_set_mode_obj, MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t aesio_aes_mode_obj = MP_PROPERTY_GETSET(aesio_aes_mode_obj,
|
||||
(mp_obj_t)&aesio_aes_get_mode_obj,
|
||||
(mp_obj_t)&aesio_aes_set_mode_obj);
|
||||
|
||||
STATIC const mp_rom_map_elem_t aesio_locals_dict_table[] = {
|
||||
// Methods
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t alarm_pin_pinalarm_pin_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&alarm_pin_pinalarm_get_pin_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t alarm_pin_pinalarm_pin_obj = MP_PROPERTY_GETTER(alarm_pin_pinalarm_pin_obj,
|
||||
(mp_obj_t)&alarm_pin_pinalarm_get_pin_obj);
|
||||
|
||||
//| value: bool
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t alarm_pin_pinalarm_value_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&alarm_pin_pinalarm_get_value_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t alarm_pin_pinalarm_value_obj = MP_PROPERTY_GETTER(alarm_pin_pinalarm_value_obj,
|
||||
(mp_obj_t)&alarm_pin_pinalarm_get_value_obj);
|
||||
|
||||
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) },
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t alarm_time_timealarm_monotonic_time_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&alarm_time_timealarm_get_monotonic_time_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t alarm_time_timealarm_monotonic_time_obj = MP_PROPERTY_GETTER(alarm_time_timealarm_monotonic_time_obj,
|
||||
(mp_obj_t)&alarm_time_timealarm_get_monotonic_time_obj);
|
||||
|
||||
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) },
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t alarm_touch_touchalarm_pin_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&alarm_touch_touchalarm_get_pin_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t alarm_touch_touchalarm_pin_obj = MP_PROPERTY_GETTER(alarm_touch_touchalarm_pin_obj,
|
||||
(mp_obj_t)&alarm_touch_touchalarm_get_pin_obj);
|
||||
|
||||
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) },
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t analogio_analogin_value_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&analogio_analogin_get_value_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t analogio_analogin_value_obj = MP_PROPERTY_GETTER(analogio_analogin_value_obj,
|
||||
(mp_obj_t)&analogio_analogin_get_value_obj);
|
||||
|
||||
//| reference_voltage: float
|
||||
//| """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,
|
||||
analogio_analogin_obj_get_reference_voltage);
|
||||
|
||||
const mp_obj_property_t analogio_analogin_reference_voltage_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&analogio_analogin_get_reference_voltage_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t analogio_analogin_reference_voltage_obj = MP_PROPERTY_GETTER(analogio_analogin_reference_voltage_obj,
|
||||
(mp_obj_t)&analogio_analogin_get_reference_voltage_obj);
|
||||
|
||||
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) },
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t analogio_analogout_value_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {MP_ROM_NONE,
|
||||
(mp_obj_t)&analogio_analogout_set_value_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t analogio_analogout_value_obj = MP_PROPERTY_GETSET(analogio_analogout_value_obj,
|
||||
MP_ROM_NONE,
|
||||
(mp_obj_t)&analogio_analogout_set_value_obj);
|
||||
|
||||
STATIC const mp_rom_map_elem_t analogio_analogout_locals_dict_table[] = {
|
||||
// instance methods
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t audiobusio_i2sout_playing_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&audiobusio_i2sout_get_playing_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t audiobusio_i2sout_playing_obj = MP_PROPERTY_GETTER(audiobusio_i2sout_playing_obj,
|
||||
(mp_obj_t)&audiobusio_i2sout_get_playing_obj);
|
||||
|
||||
//| def pause(self) -> None:
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t audiobusio_i2sout_paused_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&audiobusio_i2sout_get_paused_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t audiobusio_i2sout_paused_obj = MP_PROPERTY_GETTER(audiobusio_i2sout_paused_obj,
|
||||
(mp_obj_t)&audiobusio_i2sout_get_paused_obj);
|
||||
#endif // CIRCUITPY_AUDIOBUSIO_I2SOUT
|
||||
|
||||
STATIC const mp_rom_map_elem_t audiobusio_i2sout_locals_dict_table[] = {
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t audiobusio_pdmin_sample_rate_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&audiobusio_pdmin_get_sample_rate_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t audiobusio_pdmin_sample_rate_obj = MP_PROPERTY_GETTER(audiobusio_pdmin_sample_rate_obj,
|
||||
(mp_obj_t)&audiobusio_pdmin_get_sample_rate_obj);
|
||||
|
||||
STATIC const mp_rom_map_elem_t audiobusio_pdmin_locals_dict_table[] = {
|
||||
// Methods
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t audioio_rawsample_sample_rate_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&audioio_rawsample_get_sample_rate_obj,
|
||||
(mp_obj_t)&audioio_rawsample_set_sample_rate_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t audioio_rawsample_sample_rate_obj = MP_PROPERTY_GETSET(audioio_rawsample_sample_rate_obj,
|
||||
(mp_obj_t)&audioio_rawsample_get_sample_rate_obj,
|
||||
(mp_obj_t)&audioio_rawsample_set_sample_rate_obj);
|
||||
|
||||
STATIC const mp_rom_map_elem_t audioio_rawsample_locals_dict_table[] = {
|
||||
// Methods
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t audioio_wavefile_sample_rate_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&audioio_wavefile_get_sample_rate_obj,
|
||||
(mp_obj_t)&audioio_wavefile_set_sample_rate_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t audioio_wavefile_sample_rate_obj = MP_PROPERTY_GETSET(audioio_wavefile_sample_rate_obj,
|
||||
(mp_obj_t)&audioio_wavefile_get_sample_rate_obj,
|
||||
(mp_obj_t)&audioio_wavefile_set_sample_rate_obj);
|
||||
|
||||
//| bits_per_sample: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t audioio_wavefile_bits_per_sample_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&audioio_wavefile_get_bits_per_sample_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t audioio_wavefile_bits_per_sample_obj = MP_PROPERTY_GETTER(audioio_wavefile_bits_per_sample_obj,
|
||||
(mp_obj_t)&audioio_wavefile_get_bits_per_sample_obj);
|
||||
//| channel_count: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t audioio_wavefile_channel_count_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&audioio_wavefile_get_channel_count_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t audioio_wavefile_channel_count_obj = MP_PROPERTY_GETTER(audioio_wavefile_channel_count_obj,
|
||||
(mp_obj_t)&audioio_wavefile_get_channel_count_obj);
|
||||
|
||||
|
||||
STATIC const mp_rom_map_elem_t audioio_wavefile_locals_dict_table[] = {
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t audioio_audioout_playing_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&audioio_audioout_get_playing_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t audioio_audioout_playing_obj = MP_PROPERTY_GETTER(audioio_audioout_playing_obj,
|
||||
(mp_obj_t)&audioio_audioout_get_playing_obj);
|
||||
|
||||
//| def pause(self) -> None:
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t audioio_audioout_paused_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&audioio_audioout_get_paused_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t audioio_audioout_paused_obj = MP_PROPERTY_GETTER(audioio_audioout_paused_obj,
|
||||
(mp_obj_t)&audioio_audioout_get_paused_obj);
|
||||
|
||||
STATIC const mp_rom_map_elem_t audioio_audioout_locals_dict_table[] = {
|
||||
// Methods
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t audiomixer_mixer_playing_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&audiomixer_mixer_get_playing_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t audiomixer_mixer_playing_obj = MP_PROPERTY_GETTER(audiomixer_mixer_playing_obj,
|
||||
(mp_obj_t)&audiomixer_mixer_get_playing_obj);
|
||||
|
||||
//| sample_rate: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t audiomixer_mixer_sample_rate_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&audiomixer_mixer_get_sample_rate_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t audiomixer_mixer_sample_rate_obj = MP_PROPERTY_GETTER(audiomixer_mixer_sample_rate_obj,
|
||||
(mp_obj_t)&audiomixer_mixer_get_sample_rate_obj);
|
||||
|
||||
//| voice: Tuple[MixerVoice, ...]
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t audiomixer_mixer_voice_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&audiomixer_mixer_get_voice_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t audiomixer_mixer_voice_obj = MP_PROPERTY_GETTER(audiomixer_mixer_voice_obj,
|
||||
(mp_obj_t)&audiomixer_mixer_get_voice_obj);
|
||||
|
||||
//| 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.
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t audiomixer_mixervoice_level_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&audiomixer_mixervoice_get_level_obj,
|
||||
(mp_obj_t)&audiomixer_mixervoice_set_level_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t audiomixer_mixervoice_level_obj = MP_PROPERTY_GETSET(audiomixer_mixervoice_level_obj,
|
||||
(mp_obj_t)&audiomixer_mixervoice_get_level_obj,
|
||||
(mp_obj_t)&audiomixer_mixervoice_set_level_obj);
|
||||
|
||||
//| playing: bool
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t audiomixer_mixervoice_playing_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&audiomixer_mixervoice_get_playing_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t audiomixer_mixervoice_playing_obj = MP_PROPERTY_GETTER(audiomixer_mixervoice_playing_obj,
|
||||
(mp_obj_t)&audiomixer_mixervoice_get_playing_obj);
|
||||
|
||||
STATIC const mp_rom_map_elem_t audiomixer_mixervoice_locals_dict_table[] = {
|
||||
// Methods
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t audiomp3_mp3file_file_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&audiomp3_mp3file_get_file_obj,
|
||||
(mp_obj_t)&audiomp3_mp3file_set_file_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t audiomp3_mp3file_file_obj = MP_PROPERTY_GETSET(audiomp3_mp3file_file_obj,
|
||||
(mp_obj_t)&audiomp3_mp3file_get_file_obj,
|
||||
(mp_obj_t)&audiomp3_mp3file_set_file_obj);
|
||||
|
||||
|
||||
|
||||
|
@ -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);
|
||||
|
||||
const mp_obj_property_t audiomp3_mp3file_sample_rate_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&audiomp3_mp3file_get_sample_rate_obj,
|
||||
(mp_obj_t)&audiomp3_mp3file_set_sample_rate_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t audiomp3_mp3file_sample_rate_obj = MP_PROPERTY_GETSET(audiomp3_mp3file_sample_rate_obj,
|
||||
(mp_obj_t)&audiomp3_mp3file_get_sample_rate_obj,
|
||||
(mp_obj_t)&audiomp3_mp3file_set_sample_rate_obj);
|
||||
|
||||
//| bits_per_sample: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t audiomp3_mp3file_bits_per_sample_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&audiomp3_mp3file_get_bits_per_sample_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t audiomp3_mp3file_bits_per_sample_obj = MP_PROPERTY_GETTER(audiomp3_mp3file_bits_per_sample_obj,
|
||||
(mp_obj_t)&audiomp3_mp3file_get_bits_per_sample_obj);
|
||||
|
||||
//| channel_count: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t audiomp3_mp3file_channel_count_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&audiomp3_mp3file_get_channel_count_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t audiomp3_mp3file_channel_count_obj = MP_PROPERTY_GETTER(audiomp3_mp3file_channel_count_obj,
|
||||
(mp_obj_t)&audiomp3_mp3file_get_channel_count_obj);
|
||||
|
||||
//| rms_level: float
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t audiomp3_mp3file_rms_level_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&audiomp3_mp3file_get_rms_level_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t audiomp3_mp3file_rms_level_obj = MP_PROPERTY_GETTER(audiomp3_mp3file_rms_level_obj,
|
||||
(mp_obj_t)&audiomp3_mp3file_get_rms_level_obj);
|
||||
|
||||
//| samples_decoded: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t audiomp3_mp3file_samples_decoded_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&audiomp3_mp3file_get_samples_decoded_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t audiomp3_mp3file_samples_decoded_obj = MP_PROPERTY_GETTER(audiomp3_mp3file_samples_decoded_obj,
|
||||
(mp_obj_t)&audiomp3_mp3file_get_samples_decoded_obj);
|
||||
|
||||
STATIC const mp_rom_map_elem_t audiomp3_mp3file_locals_dict_table[] = {
|
||||
// Methods
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t audiopwmio_pwmaudioout_playing_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&audiopwmio_pwmaudioout_get_playing_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t audiopwmio_pwmaudioout_playing_obj = MP_PROPERTY_GETTER(audiopwmio_pwmaudioout_playing_obj,
|
||||
(mp_obj_t)&audiopwmio_pwmaudioout_get_playing_obj);
|
||||
|
||||
//| def pause(self) -> None:
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t audiopwmio_pwmaudioout_paused_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&audiopwmio_pwmaudioout_get_paused_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t audiopwmio_pwmaudioout_paused_obj = MP_PROPERTY_GETTER(audiopwmio_pwmaudioout_paused_obj,
|
||||
(mp_obj_t)&audiopwmio_pwmaudioout_get_paused_obj);
|
||||
|
||||
STATIC const mp_rom_map_elem_t audiopwmio_pwmaudioout_locals_dict_table[] = {
|
||||
// Methods
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t busio_spi_frequency_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&busio_spi_get_frequency_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t busio_spi_frequency_obj = MP_PROPERTY_GETTER(busio_spi_frequency_obj,
|
||||
(mp_obj_t)&busio_spi_get_frequency_obj);
|
||||
#endif // CIRCUITPY_BUSIO_SPI
|
||||
|
||||
|
||||
|
|
|
@ -303,12 +303,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);
|
||||
|
||||
|
||||
const mp_obj_property_t busio_uart_baudrate_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&busio_uart_get_baudrate_obj,
|
||||
(mp_obj_t)&busio_uart_set_baudrate_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t busio_uart_baudrate_obj = MP_PROPERTY_GETSET(busio_uart_baudrate_obj,
|
||||
(mp_obj_t)&busio_uart_get_baudrate_obj,
|
||||
(mp_obj_t)&busio_uart_set_baudrate_obj);
|
||||
|
||||
//| in_waiting: int
|
||||
//| """The number of bytes in the input buffer, available to be read"""
|
||||
|
@ -320,12 +317,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);
|
||||
|
||||
const mp_obj_property_t busio_uart_in_waiting_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&busio_uart_get_in_waiting_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t busio_uart_in_waiting_obj = MP_PROPERTY_GETTER(busio_uart_in_waiting_obj,
|
||||
(mp_obj_t)&busio_uart_get_in_waiting_obj);
|
||||
|
||||
//| timeout: float
|
||||
//| """The current timeout, in seconds (float)."""
|
||||
|
@ -348,12 +341,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);
|
||||
|
||||
|
||||
const mp_obj_property_t busio_uart_timeout_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&busio_uart_get_timeout_obj,
|
||||
(mp_obj_t)&busio_uart_set_timeout_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t busio_uart_timeout_obj = MP_PROPERTY_GETSET(busio_uart_timeout_obj,
|
||||
(mp_obj_t)&busio_uart_get_timeout_obj,
|
||||
(mp_obj_t)&busio_uart_set_timeout_obj);
|
||||
|
||||
//| def reset_input_buffer(self) -> None:
|
||||
//| """Discard any unread characters in the input buffer."""
|
||||
|
|
|
@ -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);
|
||||
|
||||
STATIC const mp_obj_property_t canio_can_auto_restart_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&canio_can_auto_restart_get_obj,
|
||||
(mp_obj_t)&canio_can_auto_restart_set_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
STATIC const mp_obj_property_getset_t canio_can_auto_restart_obj = MP_PROPERTY_GETSET(canio_can_auto_restart_obj,
|
||||
(mp_obj_t)&canio_can_auto_restart_get_obj,
|
||||
(mp_obj_t)&canio_can_auto_restart_set_obj);
|
||||
|
||||
|
||||
//| baudrate: int
|
||||
|
@ -130,11 +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);
|
||||
|
||||
STATIC const mp_obj_property_t canio_can_baudrate_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&canio_can_baudrate_get_obj,
|
||||
MP_ROM_NONE, MP_ROM_NONE},
|
||||
};
|
||||
STATIC const mp_obj_property_getter_t canio_can_baudrate_obj = MP_PROPERTY_GETTER(canio_can_baudrate_obj,
|
||||
(mp_obj_t)&canio_can_baudrate_get_obj);
|
||||
|
||||
//| 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."""
|
||||
|
@ -146,10 +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);
|
||||
|
||||
STATIC const mp_obj_property_t canio_can_transmit_error_count_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&canio_can_transmit_error_count_get_obj, MP_ROM_NONE, MP_ROM_NONE},
|
||||
};
|
||||
STATIC const mp_obj_property_getter_t canio_can_transmit_error_count_obj = MP_PROPERTY_GETTER(canio_can_transmit_error_count_obj,
|
||||
(mp_obj_t)&canio_can_transmit_error_count_get_obj);
|
||||
|
||||
//| 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."""
|
||||
|
@ -161,10 +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);
|
||||
|
||||
STATIC const mp_obj_property_t canio_can_receive_error_count_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&canio_can_receive_error_count_get_obj, MP_ROM_NONE, MP_ROM_NONE},
|
||||
};
|
||||
STATIC const mp_obj_property_getter_t canio_can_receive_error_count_obj = MP_PROPERTY_GETTER(canio_can_receive_error_count_obj,
|
||||
(mp_obj_t)&canio_can_receive_error_count_get_obj);
|
||||
|
||||
//| state: BusState
|
||||
//| """The current state of the bus. (read-only)"""
|
||||
|
@ -176,10 +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);
|
||||
|
||||
STATIC const mp_obj_property_t canio_can_state_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&canio_can_state_get_obj, MP_ROM_NONE, MP_ROM_NONE},
|
||||
};
|
||||
STATIC const mp_obj_property_getter_t canio_can_state_obj = MP_PROPERTY_GETTER(canio_can_state_obj,
|
||||
(mp_obj_t)&canio_can_state_get_obj);
|
||||
|
||||
|
||||
//| def restart(self) -> None:
|
||||
|
@ -276,10 +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);
|
||||
|
||||
STATIC const mp_obj_property_t canio_can_loopback_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&canio_can_loopback_get_obj, MP_ROM_NONE, MP_ROM_NONE},
|
||||
};
|
||||
STATIC const mp_obj_property_getter_t canio_can_loopback_obj = MP_PROPERTY_GETTER(canio_can_loopback_obj,
|
||||
(mp_obj_t)&canio_can_loopback_get_obj);
|
||||
|
||||
|
||||
//| def send(self, message: Union[RemoteTransmissionRequest, Message]) -> None:
|
||||
|
@ -313,10 +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);
|
||||
|
||||
STATIC const mp_obj_property_t canio_can_silent_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&canio_can_silent_get_obj, MP_ROM_NONE, MP_ROM_NONE},
|
||||
};
|
||||
STATIC const mp_obj_property_getter_t canio_can_silent_obj = MP_PROPERTY_GETTER(canio_can_silent_obj,
|
||||
(mp_obj_t)&canio_can_silent_get_obj);
|
||||
|
||||
|
||||
//| def deinit(self) -> None:
|
||||
|
|
|
@ -150,11 +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 const mp_obj_property_t canio_listener_timeout_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&canio_listener_timeout_get_obj,
|
||||
(mp_obj_t)&canio_listener_timeout_set_obj, MP_ROM_NONE},
|
||||
};
|
||||
STATIC const mp_obj_property_getset_t canio_listener_timeout_obj = MP_PROPERTY_GETSET(canio_listener_timeout_obj,
|
||||
(mp_obj_t)&canio_listener_timeout_get_obj,
|
||||
(mp_obj_t)&canio_listener_timeout_set_obj);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t canio_match_id_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&canio_match_id_get_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t canio_match_id_obj = MP_PROPERTY_GETTER(canio_match_id_obj,
|
||||
(mp_obj_t)&canio_match_id_get_obj);
|
||||
|
||||
//|
|
||||
//| 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);
|
||||
|
||||
const mp_obj_property_t canio_match_mask_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&canio_match_mask_get_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t canio_match_mask_obj = MP_PROPERTY_GETTER(canio_match_mask_obj,
|
||||
(mp_obj_t)&canio_match_mask_get_obj);
|
||||
|
||||
//| extended: bool
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t canio_match_extended_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&canio_match_extended_get_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t canio_match_extended_obj = MP_PROPERTY_GETTER(canio_match_extended_obj,
|
||||
(mp_obj_t)&canio_match_extended_get_obj);
|
||||
|
||||
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) },
|
||||
|
|
|
@ -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);
|
||||
|
||||
STATIC const mp_obj_property_t canio_message_id_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&canio_message_id_get_obj,
|
||||
(mp_obj_t)&canio_message_id_set_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
STATIC const mp_obj_property_getset_t canio_message_id_obj = MP_PROPERTY_GETSET(canio_message_id_obj,
|
||||
(mp_obj_t)&canio_message_id_get_obj,
|
||||
(mp_obj_t)&canio_message_id_set_obj);
|
||||
|
||||
//| data: bytes
|
||||
//| """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);
|
||||
|
||||
|
||||
STATIC const mp_obj_property_t canio_message_data_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&canio_message_data_get_obj,
|
||||
(mp_obj_t)&canio_message_data_set_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
STATIC const mp_obj_property_getset_t canio_message_data_obj = MP_PROPERTY_GETSET(canio_message_data_obj,
|
||||
(mp_obj_t)&canio_message_data_get_obj,
|
||||
(mp_obj_t)&canio_message_data_set_obj);
|
||||
|
||||
|
||||
//| 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);
|
||||
|
||||
|
||||
STATIC const mp_obj_property_t canio_message_extended_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&canio_message_extended_get_obj,
|
||||
(mp_obj_t)&canio_message_extended_set_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
STATIC const mp_obj_property_getset_t canio_message_extended_obj = MP_PROPERTY_GETSET(canio_message_extended_obj,
|
||||
(mp_obj_t)&canio_message_extended_get_obj,
|
||||
(mp_obj_t)&canio_message_extended_set_obj);
|
||||
|
||||
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) },
|
||||
|
|
|
@ -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);
|
||||
|
||||
STATIC const mp_obj_property_t canio_remote_transmission_request_id_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&canio_remote_transmission_request_id_get_obj,
|
||||
(mp_obj_t)&canio_remote_transmission_request_id_set_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
STATIC const mp_obj_property_getset_t canio_remote_transmission_request_id_obj = MP_PROPERTY_GETSET(canio_remote_transmission_request_id_obj,
|
||||
(mp_obj_t)&canio_remote_transmission_request_id_get_obj,
|
||||
(mp_obj_t)&canio_remote_transmission_request_id_set_obj);
|
||||
|
||||
//| extended: bool
|
||||
//| """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);
|
||||
|
||||
|
||||
STATIC const mp_obj_property_t canio_remote_transmission_request_extended_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&canio_remote_transmission_request_extended_get_obj,
|
||||
(mp_obj_t)&canio_remote_transmission_request_extended_set_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
STATIC const mp_obj_property_getset_t canio_remote_transmission_request_extended_obj = MP_PROPERTY_GETSET(canio_remote_transmission_request_extended_obj,
|
||||
(mp_obj_t)&canio_remote_transmission_request_extended_get_obj,
|
||||
(mp_obj_t)&canio_remote_transmission_request_extended_set_obj);
|
||||
|
||||
//| length: int
|
||||
//| """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);
|
||||
|
||||
|
||||
STATIC const mp_obj_property_t canio_remote_transmission_request_length_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&canio_remote_transmission_request_length_get_obj,
|
||||
(mp_obj_t)&canio_remote_transmission_request_length_set_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
STATIC const mp_obj_property_getset_t canio_remote_transmission_request_length_obj = MP_PROPERTY_GETSET(canio_remote_transmission_request_length_obj,
|
||||
(mp_obj_t)&canio_remote_transmission_request_length_get_obj,
|
||||
(mp_obj_t)&canio_remote_transmission_request_length_set_obj);
|
||||
|
||||
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) },
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t countio_counter_count_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&countio_counter_get_count_obj,
|
||||
(mp_obj_t)&countio_counter_set_count_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t countio_counter_count_obj = MP_PROPERTY_GETSET(countio_counter_count_obj,
|
||||
(mp_obj_t)&countio_counter_get_count_obj,
|
||||
(mp_obj_t)&countio_counter_set_count_obj);
|
||||
|
||||
//| def reset(self) -> None:
|
||||
//| """Resets the count back to 0."""
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t digitalio_digitalio_direction_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&digitalio_digitalinout_get_direction_obj,
|
||||
(mp_obj_t)&digitalio_digitalinout_set_direction_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t digitalio_digitalio_direction_obj = MP_PROPERTY_GETSET(digitalio_digitalio_direction_obj,
|
||||
(mp_obj_t)&digitalio_digitalinout_get_direction_obj,
|
||||
(mp_obj_t)&digitalio_digitalinout_set_direction_obj);
|
||||
|
||||
//| value: bool
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t digitalio_digitalinout_value_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&digitalio_digitalinout_get_value_obj,
|
||||
(mp_obj_t)&digitalio_digitalinout_set_value_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t digitalio_digitalinout_value_obj = MP_PROPERTY_GETSET(digitalio_digitalinout_value_obj,
|
||||
(mp_obj_t)&digitalio_digitalinout_get_value_obj,
|
||||
(mp_obj_t)&digitalio_digitalinout_set_value_obj);
|
||||
|
||||
//| drive_mode: DriveMode
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t digitalio_digitalio_drive_mode_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&digitalio_digitalinout_get_drive_mode_obj,
|
||||
(mp_obj_t)&digitalio_digitalinout_set_drive_mode_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t digitalio_digitalio_drive_mode_obj = MP_PROPERTY_GETSET(digitalio_digitalio_drive_mode_obj,
|
||||
(mp_obj_t)&digitalio_digitalinout_get_drive_mode_obj,
|
||||
(mp_obj_t)&digitalio_digitalinout_set_drive_mode_obj);
|
||||
|
||||
//| pull: Optional[Pull]
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t digitalio_digitalio_pull_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&digitalio_digitalinout_get_pull_obj,
|
||||
(mp_obj_t)&digitalio_digitalinout_set_pull_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t digitalio_digitalio_pull_obj = MP_PROPERTY_GETSET(digitalio_digitalio_pull_obj,
|
||||
(mp_obj_t)&digitalio_digitalinout_get_pull_obj,
|
||||
(mp_obj_t)&digitalio_digitalinout_set_pull_obj);
|
||||
|
||||
STATIC const mp_rom_map_elem_t digitalio_digitalinout_locals_dict_table[] = {
|
||||
// instance methods
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t displayio_bitmap_width_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_bitmap_get_width_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t displayio_bitmap_width_obj = MP_PROPERTY_GETTER(displayio_bitmap_width_obj,
|
||||
(mp_obj_t)&displayio_bitmap_get_width_obj);
|
||||
|
||||
//| height: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t displayio_bitmap_height_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_bitmap_get_height_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t displayio_bitmap_height_obj = MP_PROPERTY_GETTER(displayio_bitmap_height_obj,
|
||||
(mp_obj_t)&displayio_bitmap_get_height_obj);
|
||||
|
||||
//| 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
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t displayio_colorconverter_dither_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_colorconverter_get_dither_obj,
|
||||
(mp_obj_t)&displayio_colorconverter_set_dither_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t displayio_colorconverter_dither_obj = MP_PROPERTY_GETSET(displayio_colorconverter_dither_obj,
|
||||
(mp_obj_t)&displayio_colorconverter_get_dither_obj,
|
||||
(mp_obj_t)&displayio_colorconverter_set_dither_obj);
|
||||
|
||||
//| def make_transparent(self, color: int) -> None:
|
||||
//| """Set the transparent color or index for the ColorConverter. This will
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t displayio_display_auto_refresh_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_display_get_auto_refresh_obj,
|
||||
(mp_obj_t)&displayio_display_set_auto_refresh_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t displayio_display_auto_refresh_obj = MP_PROPERTY_GETSET(displayio_display_auto_refresh_obj,
|
||||
(mp_obj_t)&displayio_display_get_auto_refresh_obj,
|
||||
(mp_obj_t)&displayio_display_set_auto_refresh_obj);
|
||||
|
||||
//| brightness: float
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t displayio_display_brightness_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_display_get_brightness_obj,
|
||||
(mp_obj_t)&displayio_display_set_brightness_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t displayio_display_brightness_obj = MP_PROPERTY_GETSET(displayio_display_brightness_obj,
|
||||
(mp_obj_t)&displayio_display_get_brightness_obj,
|
||||
(mp_obj_t)&displayio_display_set_brightness_obj);
|
||||
|
||||
//| auto_brightness: bool
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t displayio_display_auto_brightness_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_display_get_auto_brightness_obj,
|
||||
(mp_obj_t)&displayio_display_set_auto_brightness_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t displayio_display_auto_brightness_obj = MP_PROPERTY_GETSET(displayio_display_auto_brightness_obj,
|
||||
(mp_obj_t)&displayio_display_get_auto_brightness_obj,
|
||||
(mp_obj_t)&displayio_display_set_auto_brightness_obj);
|
||||
|
||||
|
||||
|
||||
|
@ -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);
|
||||
|
||||
const mp_obj_property_t displayio_display_width_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_display_get_width_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t displayio_display_width_obj = MP_PROPERTY_GETTER(displayio_display_width_obj,
|
||||
(mp_obj_t)&displayio_display_get_width_obj);
|
||||
|
||||
//| height: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t displayio_display_height_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_display_get_height_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t displayio_display_height_obj = MP_PROPERTY_GETTER(displayio_display_height_obj,
|
||||
(mp_obj_t)&displayio_display_get_height_obj);
|
||||
|
||||
//| rotation: int
|
||||
//| """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);
|
||||
|
||||
|
||||
const mp_obj_property_t displayio_display_rotation_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_display_get_rotation_obj,
|
||||
(mp_obj_t)&displayio_display_set_rotation_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t displayio_display_rotation_obj = MP_PROPERTY_GETSET(displayio_display_rotation_obj,
|
||||
(mp_obj_t)&displayio_display_get_rotation_obj,
|
||||
(mp_obj_t)&displayio_display_set_rotation_obj);
|
||||
|
||||
//| bus: _DisplayBus
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t displayio_display_bus_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_display_get_bus_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t displayio_display_bus_obj = MP_PROPERTY_GETTER(displayio_display_bus_obj,
|
||||
(mp_obj_t)&displayio_display_get_bus_obj);
|
||||
|
||||
//| root_group: Group
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t displayio_display_root_group_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_display_get_root_group_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t displayio_display_root_group_obj = MP_PROPERTY_GETTER(displayio_display_root_group_obj,
|
||||
(mp_obj_t)&displayio_display_get_root_group_obj);
|
||||
|
||||
|
||||
//| def fill_row(self, y: int, buffer: WriteableBuffer) -> WriteableBuffer:
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t displayio_epaperdisplay_time_to_refresh_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_epaperdisplay_get_time_to_refresh_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t displayio_epaperdisplay_time_to_refresh_obj = MP_PROPERTY_GETTER(displayio_epaperdisplay_time_to_refresh_obj,
|
||||
(mp_obj_t)&displayio_epaperdisplay_get_time_to_refresh_obj);
|
||||
|
||||
//| busy: bool
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t displayio_epaperdisplay_busy_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_epaperdisplay_get_busy_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t displayio_epaperdisplay_busy_obj = MP_PROPERTY_GETTER(displayio_epaperdisplay_busy_obj,
|
||||
(mp_obj_t)&displayio_epaperdisplay_get_busy_obj);
|
||||
|
||||
//| width: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t displayio_epaperdisplay_width_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_epaperdisplay_get_width_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t displayio_epaperdisplay_width_obj = MP_PROPERTY_GETTER(displayio_epaperdisplay_width_obj,
|
||||
(mp_obj_t)&displayio_epaperdisplay_get_width_obj);
|
||||
|
||||
//| height: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t displayio_epaperdisplay_height_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_epaperdisplay_get_height_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t displayio_epaperdisplay_height_obj = MP_PROPERTY_GETTER(displayio_epaperdisplay_height_obj,
|
||||
(mp_obj_t)&displayio_epaperdisplay_get_height_obj);
|
||||
|
||||
//| rotation: int
|
||||
//| """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);
|
||||
|
||||
|
||||
const mp_obj_property_t displayio_epaperdisplay_rotation_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_epaperdisplay_get_rotation_obj,
|
||||
(mp_obj_t)&displayio_epaperdisplay_set_rotation_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t displayio_epaperdisplay_rotation_obj = MP_PROPERTY_GETSET(displayio_epaperdisplay_rotation_obj,
|
||||
(mp_obj_t)&displayio_epaperdisplay_get_rotation_obj,
|
||||
(mp_obj_t)&displayio_epaperdisplay_set_rotation_obj);
|
||||
|
||||
//| bus: _DisplayBus
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t displayio_epaperdisplay_bus_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_epaperdisplay_get_bus_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t displayio_epaperdisplay_bus_obj = MP_PROPERTY_GETTER(displayio_epaperdisplay_bus_obj,
|
||||
(mp_obj_t)&displayio_epaperdisplay_get_bus_obj);
|
||||
|
||||
|
||||
STATIC const mp_rom_map_elem_t displayio_epaperdisplay_locals_dict_table[] = {
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t displayio_group_hidden_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_group_get_hidden_obj,
|
||||
(mp_obj_t)&displayio_group_set_hidden_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t displayio_group_hidden_obj = MP_PROPERTY_GETSET(displayio_group_hidden_obj,
|
||||
(mp_obj_t)&displayio_group_get_hidden_obj,
|
||||
(mp_obj_t)&displayio_group_set_hidden_obj);
|
||||
|
||||
//| scale: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t displayio_group_scale_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_group_get_scale_obj,
|
||||
(mp_obj_t)&displayio_group_set_scale_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t displayio_group_scale_obj = MP_PROPERTY_GETSET(displayio_group_scale_obj,
|
||||
(mp_obj_t)&displayio_group_get_scale_obj,
|
||||
(mp_obj_t)&displayio_group_set_scale_obj);
|
||||
|
||||
//| x: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t displayio_group_x_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_group_get_x_obj,
|
||||
(mp_obj_t)&displayio_group_set_x_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t displayio_group_x_obj = MP_PROPERTY_GETSET(displayio_group_x_obj,
|
||||
(mp_obj_t)&displayio_group_get_x_obj,
|
||||
(mp_obj_t)&displayio_group_set_x_obj);
|
||||
|
||||
//| y: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t displayio_group_y_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_group_get_y_obj,
|
||||
(mp_obj_t)&displayio_group_set_y_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t displayio_group_y_obj = MP_PROPERTY_GETSET(displayio_group_y_obj,
|
||||
(mp_obj_t)&displayio_group_get_y_obj,
|
||||
(mp_obj_t)&displayio_group_set_y_obj);
|
||||
|
||||
//| 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."""
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t displayio_ondiskbitmap_width_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_ondiskbitmap_get_width_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
|
||||
};
|
||||
const mp_obj_property_getter_t displayio_ondiskbitmap_width_obj = MP_PROPERTY_GETTER(displayio_ondiskbitmap_width_obj,
|
||||
(mp_obj_t)&displayio_ondiskbitmap_get_width_obj);
|
||||
|
||||
//| height: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t displayio_ondiskbitmap_height_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_ondiskbitmap_get_height_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
|
||||
};
|
||||
const mp_obj_property_getter_t displayio_ondiskbitmap_height_obj = MP_PROPERTY_GETTER(displayio_ondiskbitmap_height_obj,
|
||||
(mp_obj_t)&displayio_ondiskbitmap_get_height_obj);
|
||||
|
||||
//| pixel_shader: Union[ColorConverter, Palette]
|
||||
//| """The image's pixel_shader. The type depends on the underlying
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t displayio_tilegrid_hidden_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_tilegrid_get_hidden_obj,
|
||||
(mp_obj_t)&displayio_tilegrid_set_hidden_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t displayio_tilegrid_hidden_obj = MP_PROPERTY_GETSET(displayio_tilegrid_hidden_obj,
|
||||
(mp_obj_t)&displayio_tilegrid_get_hidden_obj,
|
||||
(mp_obj_t)&displayio_tilegrid_set_hidden_obj);
|
||||
|
||||
//| x: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t displayio_tilegrid_x_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_tilegrid_get_x_obj,
|
||||
(mp_obj_t)&displayio_tilegrid_set_x_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t displayio_tilegrid_x_obj = MP_PROPERTY_GETSET(displayio_tilegrid_x_obj,
|
||||
(mp_obj_t)&displayio_tilegrid_get_x_obj,
|
||||
(mp_obj_t)&displayio_tilegrid_set_x_obj);
|
||||
|
||||
//| y: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t displayio_tilegrid_y_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_tilegrid_get_y_obj,
|
||||
(mp_obj_t)&displayio_tilegrid_set_y_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t displayio_tilegrid_y_obj = MP_PROPERTY_GETSET(displayio_tilegrid_y_obj,
|
||||
(mp_obj_t)&displayio_tilegrid_get_y_obj,
|
||||
(mp_obj_t)&displayio_tilegrid_set_y_obj);
|
||||
|
||||
//| width: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t displayio_tilegrid_width_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_tilegrid_get_width_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t displayio_tilegrid_width_obj = MP_PROPERTY_GETTER(displayio_tilegrid_width_obj,
|
||||
(mp_obj_t)&displayio_tilegrid_get_width_obj);
|
||||
|
||||
//| height: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t displayio_tilegrid_height_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_tilegrid_get_height_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t displayio_tilegrid_height_obj = MP_PROPERTY_GETTER(displayio_tilegrid_height_obj,
|
||||
(mp_obj_t)&displayio_tilegrid_get_height_obj);
|
||||
|
||||
//| tile_width: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t displayio_tilegrid_tile_width_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_tilegrid_get_tile_width_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t displayio_tilegrid_tile_width_obj = MP_PROPERTY_GETTER(displayio_tilegrid_tile_width_obj,
|
||||
(mp_obj_t)&displayio_tilegrid_get_tile_width_obj);
|
||||
|
||||
//| tile_height: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t displayio_tilegrid_tile_height_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_tilegrid_get_tile_height_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t displayio_tilegrid_tile_height_obj = MP_PROPERTY_GETTER(displayio_tilegrid_tile_height_obj,
|
||||
(mp_obj_t)&displayio_tilegrid_get_tile_height_obj);
|
||||
|
||||
//| flip_x: bool
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t displayio_tilegrid_flip_x_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_tilegrid_get_flip_x_obj,
|
||||
(mp_obj_t)&displayio_tilegrid_set_flip_x_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t displayio_tilegrid_flip_x_obj = MP_PROPERTY_GETSET(displayio_tilegrid_flip_x_obj,
|
||||
(mp_obj_t)&displayio_tilegrid_get_flip_x_obj,
|
||||
(mp_obj_t)&displayio_tilegrid_set_flip_x_obj);
|
||||
|
||||
//| flip_y: bool
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t displayio_tilegrid_flip_y_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_tilegrid_get_flip_y_obj,
|
||||
(mp_obj_t)&displayio_tilegrid_set_flip_y_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t displayio_tilegrid_flip_y_obj = MP_PROPERTY_GETSET(displayio_tilegrid_flip_y_obj,
|
||||
(mp_obj_t)&displayio_tilegrid_get_flip_y_obj,
|
||||
(mp_obj_t)&displayio_tilegrid_set_flip_y_obj);
|
||||
|
||||
|
||||
//| 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);
|
||||
|
||||
const mp_obj_property_t displayio_tilegrid_transpose_xy_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_tilegrid_get_transpose_xy_obj,
|
||||
(mp_obj_t)&displayio_tilegrid_set_transpose_xy_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t displayio_tilegrid_transpose_xy_obj = MP_PROPERTY_GETSET(displayio_tilegrid_transpose_xy_obj,
|
||||
(mp_obj_t)&displayio_tilegrid_get_transpose_xy_obj,
|
||||
(mp_obj_t)&displayio_tilegrid_set_transpose_xy_obj);
|
||||
|
||||
//| pixel_shader: Union[ColorConverter, Palette]
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t displayio_tilegrid_pixel_shader_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_tilegrid_get_pixel_shader_obj,
|
||||
(mp_obj_t)&displayio_tilegrid_set_pixel_shader_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t displayio_tilegrid_pixel_shader_obj = MP_PROPERTY_GETSET(displayio_tilegrid_pixel_shader_obj,
|
||||
(mp_obj_t)&displayio_tilegrid_get_pixel_shader_obj,
|
||||
(mp_obj_t)&displayio_tilegrid_set_pixel_shader_obj);
|
||||
|
||||
//| bitmap: Union[Bitmap,OnDiskBitmap,Shape]
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t displayio_tilegrid_bitmap_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&displayio_tilegrid_get_bitmap_obj,
|
||||
(mp_obj_t)&displayio_tilegrid_set_bitmap_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t displayio_tilegrid_bitmap_obj = MP_PROPERTY_GETSET(displayio_tilegrid_bitmap_obj,
|
||||
(mp_obj_t)&displayio_tilegrid_get_bitmap_obj,
|
||||
(mp_obj_t)&displayio_tilegrid_set_bitmap_obj);
|
||||
|
||||
//| 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
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t fontio_builtinfont_bitmap_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&fontio_builtinfont_get_bitmap_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t fontio_builtinfont_bitmap_obj = MP_PROPERTY_GETTER(fontio_builtinfont_bitmap_obj,
|
||||
(mp_obj_t)&fontio_builtinfont_get_bitmap_obj);
|
||||
|
||||
//| 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."""
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t framebufferio_framebufferdisplay_auto_refresh_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&framebufferio_framebufferdisplay_get_auto_refresh_obj,
|
||||
(mp_obj_t)&framebufferio_framebufferdisplay_set_auto_refresh_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t framebufferio_framebufferdisplay_auto_refresh_obj = MP_PROPERTY_GETSET(framebufferio_framebufferdisplay_auto_refresh_obj,
|
||||
(mp_obj_t)&framebufferio_framebufferdisplay_get_auto_refresh_obj,
|
||||
(mp_obj_t)&framebufferio_framebufferdisplay_set_auto_refresh_obj);
|
||||
|
||||
//| brightness: float
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t framebufferio_framebufferdisplay_brightness_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&framebufferio_framebufferdisplay_get_brightness_obj,
|
||||
(mp_obj_t)&framebufferio_framebufferdisplay_set_brightness_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t framebufferio_framebufferdisplay_brightness_obj = MP_PROPERTY_GETSET(framebufferio_framebufferdisplay_brightness_obj,
|
||||
(mp_obj_t)&framebufferio_framebufferdisplay_get_brightness_obj,
|
||||
(mp_obj_t)&framebufferio_framebufferdisplay_set_brightness_obj);
|
||||
|
||||
//| auto_brightness: bool
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t framebufferio_framebufferdisplay_auto_brightness_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&framebufferio_framebufferdisplay_get_auto_brightness_obj,
|
||||
(mp_obj_t)&framebufferio_framebufferdisplay_set_auto_brightness_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t framebufferio_framebufferdisplay_auto_brightness_obj = MP_PROPERTY_GETSET(framebufferio_framebufferdisplay_auto_brightness_obj,
|
||||
(mp_obj_t)&framebufferio_framebufferdisplay_get_auto_brightness_obj,
|
||||
(mp_obj_t)&framebufferio_framebufferdisplay_set_auto_brightness_obj);
|
||||
|
||||
//| width: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t framebufferio_framebufferdisplay_width_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&framebufferio_framebufferdisplay_get_width_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t framebufferio_framebufferdisplay_width_obj = MP_PROPERTY_GETTER(framebufferio_framebufferdisplay_width_obj,
|
||||
(mp_obj_t)&framebufferio_framebufferdisplay_get_width_obj);
|
||||
|
||||
//| height: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t framebufferio_framebufferdisplay_height_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&framebufferio_framebufferdisplay_get_height_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t framebufferio_framebufferdisplay_height_obj = MP_PROPERTY_GETTER(framebufferio_framebufferdisplay_height_obj,
|
||||
(mp_obj_t)&framebufferio_framebufferdisplay_get_height_obj);
|
||||
|
||||
//| rotation: int
|
||||
//| """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);
|
||||
|
||||
|
||||
const mp_obj_property_t framebufferio_framebufferdisplay_rotation_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&framebufferio_framebufferdisplay_get_rotation_obj,
|
||||
(mp_obj_t)&framebufferio_framebufferdisplay_set_rotation_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t framebufferio_framebufferdisplay_rotation_obj = MP_PROPERTY_GETSET(framebufferio_framebufferdisplay_rotation_obj,
|
||||
(mp_obj_t)&framebufferio_framebufferdisplay_get_rotation_obj,
|
||||
(mp_obj_t)&framebufferio_framebufferdisplay_set_rotation_obj);
|
||||
|
||||
//| framebuffer: circuitpython_typing.FrameBuffer
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t framebufferio_framebufferframebuffer_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&framebufferio_framebufferdisplay_get_framebuffer_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t framebufferio_framebufferframebuffer_obj = MP_PROPERTY_GETTER(framebufferio_framebufferframebuffer_obj,
|
||||
(mp_obj_t)&framebufferio_framebufferdisplay_get_framebuffer_obj);
|
||||
|
||||
|
||||
//| def fill_row(self, y: int, buffer: WriteableBuffer) -> WriteableBuffer:
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t frequencyio_frequencyin_capture_period_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&frequencyio_frequency_get_capture_period_obj,
|
||||
(mp_obj_t)&frequencyio_frequency_set_capture_period_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t frequencyio_frequencyin_capture_period_obj = MP_PROPERTY_GETSET(frequencyio_frequencyin_capture_period_obj,
|
||||
(mp_obj_t)&frequencyio_frequency_get_capture_period_obj,
|
||||
(mp_obj_t)&frequencyio_frequency_set_capture_period_obj);
|
||||
|
||||
//| def __get__(self, index: int) -> int:
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t frequencyio_frequencyin_value_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&frequencyio_frequencyin_get_value_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t frequencyio_frequencyin_value_obj = MP_PROPERTY_GETTER(frequencyio_frequencyin_value_obj,
|
||||
(mp_obj_t)&frequencyio_frequencyin_get_value_obj);
|
||||
|
||||
STATIC const mp_rom_map_elem_t frequencyio_frequencyin_locals_dict_table[] = {
|
||||
// Methods
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t gnss_latitude_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&gnss_get_latitude_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t gnss_latitude_obj = MP_PROPERTY_GETTER(gnss_latitude_obj,
|
||||
(mp_obj_t)&gnss_get_latitude_obj);
|
||||
|
||||
//| longitude: 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);
|
||||
|
||||
const mp_obj_property_t gnss_longitude_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&gnss_get_longitude_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t gnss_longitude_obj = MP_PROPERTY_GETTER(gnss_longitude_obj,
|
||||
(mp_obj_t)&gnss_get_longitude_obj);
|
||||
|
||||
//| altitude: 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);
|
||||
|
||||
const mp_obj_property_t gnss_altitude_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&gnss_get_altitude_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t gnss_altitude_obj = MP_PROPERTY_GETTER(gnss_altitude_obj,
|
||||
(mp_obj_t)&gnss_get_altitude_obj);
|
||||
|
||||
//| timestamp: time.struct_time
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t gnss_timestamp_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&gnss_get_timestamp_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t gnss_timestamp_obj = MP_PROPERTY_GETTER(gnss_timestamp_obj,
|
||||
(mp_obj_t)&gnss_get_timestamp_obj);
|
||||
|
||||
//| fix: PositionFix
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t gnss_fix_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&gnss_get_fix_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t gnss_fix_obj = MP_PROPERTY_GETTER(gnss_fix_obj,
|
||||
(mp_obj_t)&gnss_get_fix_obj);
|
||||
|
||||
STATIC const mp_rom_map_elem_t gnss_locals_dict_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&gnss_deinit_obj) },
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t ipaddress_ipv4address_packed_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&ipaddress_ipv4address_get_packed_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t ipaddress_ipv4address_packed_obj = MP_PROPERTY_GETTER(ipaddress_ipv4address_packed_obj,
|
||||
(mp_obj_t)&ipaddress_ipv4address_get_packed_obj);
|
||||
|
||||
//| version: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t ipaddress_ipv4address_version_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&ipaddress_ipv4address_get_version_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t ipaddress_ipv4address_version_obj = MP_PROPERTY_GETTER(ipaddress_ipv4address_version_obj,
|
||||
(mp_obj_t)&ipaddress_ipv4address_get_version_obj);
|
||||
|
||||
//| def __eq__(self, other: object) -> bool:
|
||||
//| """Two Address objects are equal if their addresses and address types are equal."""
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t is31fl3741_FrameBuffer_brightness_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&is31fl3741_FrameBuffer_get_brightness_obj,
|
||||
(mp_obj_t)&is31fl3741_FrameBuffer_set_brightness_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t is31fl3741_FrameBuffer_brightness_obj = MP_PROPERTY_GETSET(is31fl3741_FrameBuffer_brightness_obj,
|
||||
(mp_obj_t)&is31fl3741_FrameBuffer_get_brightness_obj,
|
||||
(mp_obj_t)&is31fl3741_FrameBuffer_set_brightness_obj);
|
||||
|
||||
//| def refresh(self) -> None:
|
||||
//| """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));
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(is31fl3741_FrameBuffer_get_width_obj, is31fl3741_FrameBuffer_get_width);
|
||||
const mp_obj_property_t is31fl3741_FrameBuffer_width_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&is31fl3741_FrameBuffer_get_width_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t is31fl3741_FrameBuffer_width_obj = MP_PROPERTY_GETTER(is31fl3741_FrameBuffer_width_obj,
|
||||
(mp_obj_t)&is31fl3741_FrameBuffer_get_width_obj);
|
||||
|
||||
//| height: int
|
||||
//| """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));
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(is31fl3741_FrameBuffer_get_height_obj, is31fl3741_FrameBuffer_get_height);
|
||||
const mp_obj_property_t is31fl3741_FrameBuffer_height_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&is31fl3741_FrameBuffer_get_height_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t is31fl3741_FrameBuffer_height_obj = MP_PROPERTY_GETTER(is31fl3741_FrameBuffer_height_obj,
|
||||
(mp_obj_t)&is31fl3741_FrameBuffer_get_height_obj);
|
||||
|
||||
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) },
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t keypad_event_key_number_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&keypad_event_get_key_number_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t keypad_event_key_number_obj = MP_PROPERTY_GETTER(keypad_event_key_number_obj,
|
||||
(mp_obj_t)&keypad_event_get_key_number_obj);
|
||||
|
||||
//| pressed: bool
|
||||
//| """``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);
|
||||
|
||||
const mp_obj_property_t keypad_event_pressed_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&keypad_event_get_pressed_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t keypad_event_pressed_obj = MP_PROPERTY_GETTER(keypad_event_pressed_obj,
|
||||
(mp_obj_t)&keypad_event_get_pressed_obj);
|
||||
|
||||
//| released: bool
|
||||
//| """``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);
|
||||
|
||||
const mp_obj_property_t keypad_event_released_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&keypad_event_get_released_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t keypad_event_released_obj = MP_PROPERTY_GETTER(keypad_event_released_obj,
|
||||
(mp_obj_t)&keypad_event_get_released_obj);
|
||||
|
||||
//| timestamp: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t keypad_event_timestamp_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&keypad_event_get_timestamp_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t keypad_event_timestamp_obj = MP_PROPERTY_GETTER(keypad_event_timestamp_obj,
|
||||
(mp_obj_t)&keypad_event_get_timestamp_obj);
|
||||
|
||||
|
||||
//| def __eq__(self, other: object) -> bool:
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t keypad_eventqueue_overflowed_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&keypad_eventqueue_get_overflowed_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t keypad_eventqueue_overflowed_obj = MP_PROPERTY_GETTER(keypad_eventqueue_overflowed_obj,
|
||||
(mp_obj_t)&keypad_eventqueue_get_overflowed_obj);
|
||||
|
||||
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) },
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t mdns_remoteservice_hostname_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&mdns_remoteservice_get_hostname_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t mdns_remoteservice_hostname_obj = MP_PROPERTY_GETTER(mdns_remoteservice_hostname_obj,
|
||||
(mp_obj_t)&mdns_remoteservice_get_hostname_obj);
|
||||
|
||||
//| instance_name: str
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t mdns_remoteservice_instance_name_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&mdns_remoteservice_get_instance_name_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t mdns_remoteservice_instance_name_obj = MP_PROPERTY_GETTER(mdns_remoteservice_instance_name_obj,
|
||||
(mp_obj_t)&mdns_remoteservice_get_instance_name_obj);
|
||||
|
||||
//| service_type: str
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t mdns_remoteservice_service_type_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&mdns_remoteservice_get_service_type_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t mdns_remoteservice_service_type_obj = MP_PROPERTY_GETTER(mdns_remoteservice_service_type_obj,
|
||||
(mp_obj_t)&mdns_remoteservice_get_service_type_obj);
|
||||
|
||||
//| protocol: str
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t mdns_remoteservice_protocol_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&mdns_remoteservice_get_protocol_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t mdns_remoteservice_protocol_obj = MP_PROPERTY_GETTER(mdns_remoteservice_protocol_obj,
|
||||
(mp_obj_t)&mdns_remoteservice_get_protocol_obj);
|
||||
|
||||
//| port: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t mdns_remoteservice_port_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&mdns_remoteservice_get_port_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t mdns_remoteservice_port_obj = MP_PROPERTY_GETTER(mdns_remoteservice_port_obj,
|
||||
(mp_obj_t)&mdns_remoteservice_get_port_obj);
|
||||
|
||||
//| def __del__(self) -> None:
|
||||
//| """Deletes the RemoteService object."""
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t mdns_server_hostname_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&mdns_server_get_hostname_obj,
|
||||
(mp_obj_t)&mdns_server_set_hostname_obj,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getset_t mdns_server_hostname_obj = MP_PROPERTY_GETSET(mdns_server_hostname_obj,
|
||||
(mp_obj_t)&mdns_server_get_hostname_obj,
|
||||
(mp_obj_t)&mdns_server_set_hostname_obj);
|
||||
|
||||
//| instance_name: str
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t mdns_server_instance_name_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&mdns_server_get_instance_name_obj,
|
||||
(mp_obj_t)&mdns_server_set_instance_name_obj,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getset_t mdns_server_instance_name_obj = MP_PROPERTY_GETSET(mdns_server_instance_name_obj,
|
||||
(mp_obj_t)&mdns_server_get_instance_name_obj,
|
||||
(mp_obj_t)&mdns_server_set_instance_name_obj);
|
||||
|
||||
|
||||
//| def find(self, service_type: str, protocol: str, *, timeout: float = 1) -> Tuple[RemoteService]:
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t memorymonitor_allocationsize_bytes_per_block_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&memorymonitor_allocationsize_get_bytes_per_block_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t memorymonitor_allocationsize_bytes_per_block_obj = MP_PROPERTY_GETTER(memorymonitor_allocationsize_bytes_per_block_obj,
|
||||
(mp_obj_t)&memorymonitor_allocationsize_get_bytes_per_block_obj);
|
||||
|
||||
//| def __len__(self) -> int:
|
||||
//| """Returns the number of allocation buckets.
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t mcu_processor_frequency_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&mcu_processor_get_frequency_obj, // getter
|
||||
(mp_obj_t)&mcu_processor_set_frequency_obj, // setter
|
||||
MP_ROM_NONE, // no deleter
|
||||
},
|
||||
};
|
||||
const mp_obj_property_getset_t mcu_processor_frequency_obj = MP_PROPERTY_GETSET(mcu_processor_frequency_obj,
|
||||
(mp_obj_t)&mcu_processor_get_frequency_obj,
|
||||
(mp_obj_t)&mcu_processor_set_frequency_obj);
|
||||
|
||||
//| reset_reason: microcontroller.ResetReason
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t mcu_processor_reset_reason_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&mcu_processor_get_reset_reason_obj, // getter
|
||||
MP_ROM_NONE, // no setter
|
||||
MP_ROM_NONE, // no deleter
|
||||
},
|
||||
};
|
||||
const mp_obj_property_getter_t mcu_processor_reset_reason_obj = MP_PROPERTY_GETTER(mcu_processor_reset_reason_obj,
|
||||
(mp_obj_t)&mcu_processor_get_reset_reason_obj);
|
||||
|
||||
//| temperature: Optional[float]
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t mcu_processor_temperature_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&mcu_processor_get_temperature_obj, // getter
|
||||
MP_ROM_NONE, // no setter
|
||||
MP_ROM_NONE, // no deleter
|
||||
},
|
||||
};
|
||||
const mp_obj_property_getter_t mcu_processor_temperature_obj = MP_PROPERTY_GETTER(mcu_processor_temperature_obj,
|
||||
(mp_obj_t)&mcu_processor_get_temperature_obj);
|
||||
|
||||
//| uid: bytearray
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t mcu_processor_uid_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&mcu_processor_get_uid_obj, // getter
|
||||
MP_ROM_NONE, // no setter
|
||||
MP_ROM_NONE, // no deleter
|
||||
},
|
||||
};
|
||||
const mp_obj_property_getter_t mcu_processor_uid_obj = MP_PROPERTY_GETTER(mcu_processor_uid_obj,
|
||||
(mp_obj_t)&mcu_processor_get_uid_obj);
|
||||
|
||||
//| voltage: Optional[float]
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t mcu_processor_voltage_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&mcu_processor_get_voltage_obj, // getter
|
||||
MP_ROM_NONE, // no setter
|
||||
MP_ROM_NONE, // no deleter
|
||||
},
|
||||
};
|
||||
const mp_obj_property_getter_t mcu_processor_voltage_obj = MP_PROPERTY_GETTER(mcu_processor_voltage_obj,
|
||||
(mp_obj_t)&mcu_processor_get_voltage_obj);
|
||||
|
||||
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) },
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t mod_msgpack_exttype_code_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&mod_msgpack_exttype_get_code_obj,
|
||||
(mp_obj_t)&mod_msgpack_exttype_set_code_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t mod_msgpack_exttype_code_obj = MP_PROPERTY_GETSET(mod_msgpack_exttype_code_obj,
|
||||
(mp_obj_t)&mod_msgpack_exttype_get_code_obj,
|
||||
(mp_obj_t)&mod_msgpack_exttype_set_code_obj);
|
||||
|
||||
//| data: bytes
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t mod_msgpack_exttype_data_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&mod_msgpack_exttype_get_data_obj,
|
||||
(mp_obj_t)&mod_msgpack_exttype_set_data_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t mod_msgpack_exttype_data_obj = MP_PROPERTY_GETSET(mod_msgpack_exttype_data_obj,
|
||||
(mp_obj_t)&mod_msgpack_exttype_get_data_obj,
|
||||
(mp_obj_t)&mod_msgpack_exttype_set_data_obj);
|
||||
|
||||
STATIC mp_rom_map_elem_t mod_msgpack_exttype_locals_dict_table[] = {
|
||||
// Properties
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t pulseio_pulsein_maxlen_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&pulseio_pulsein_get_maxlen_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t pulseio_pulsein_maxlen_obj = MP_PROPERTY_GETTER(pulseio_pulsein_maxlen_obj,
|
||||
(mp_obj_t)&pulseio_pulsein_get_maxlen_obj);
|
||||
|
||||
//| paused: bool
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t pulseio_pulsein_paused_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&pulseio_pulsein_get_paused_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t pulseio_pulsein_paused_obj = MP_PROPERTY_GETTER(pulseio_pulsein_paused_obj,
|
||||
(mp_obj_t)&pulseio_pulsein_get_paused_obj);
|
||||
|
||||
//| def __bool__(self) -> bool: ...
|
||||
//|
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t pwmio_pwmout_duty_cycle_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&pwmio_pwmout_get_duty_cycle_obj,
|
||||
(mp_obj_t)&pwmio_pwmout_set_duty_cycle_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t pwmio_pwmout_duty_cycle_obj = MP_PROPERTY_GETSET(pwmio_pwmout_duty_cycle_obj,
|
||||
(mp_obj_t)&pwmio_pwmout_get_duty_cycle_obj,
|
||||
(mp_obj_t)&pwmio_pwmout_set_duty_cycle_obj);
|
||||
|
||||
//| frequency: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t pwmio_pwmout_frequency_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&pwmio_pwmout_get_frequency_obj,
|
||||
(mp_obj_t)&pwmio_pwmout_set_frequency_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t pwmio_pwmout_frequency_obj = MP_PROPERTY_GETSET(pwmio_pwmout_frequency_obj,
|
||||
(mp_obj_t)&pwmio_pwmout_get_frequency_obj,
|
||||
(mp_obj_t)&pwmio_pwmout_set_frequency_obj);
|
||||
|
||||
STATIC const mp_rom_map_elem_t pwmio_pwmout_locals_dict_table[] = {
|
||||
// Methods
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t qrio_qrdecoder_width_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&qrio_qrdecoder_get_width_obj,
|
||||
(mp_obj_t)&qrio_qrdecoder_set_width_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t qrio_qrdecoder_width_obj = MP_PROPERTY_GETSET(qrio_qrdecoder_width_obj,
|
||||
(mp_obj_t)&qrio_qrdecoder_get_width_obj,
|
||||
(mp_obj_t)&qrio_qrdecoder_set_width_obj);
|
||||
|
||||
//| height: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t qrio_qrdecoder_height_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&qrio_qrdecoder_get_height_obj,
|
||||
(mp_obj_t)&qrio_qrdecoder_set_height_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t qrio_qrdecoder_height_obj = MP_PROPERTY_GETSET(qrio_qrdecoder_height_obj,
|
||||
(mp_obj_t)&qrio_qrdecoder_get_height_obj,
|
||||
(mp_obj_t)&qrio_qrdecoder_set_height_obj);
|
||||
|
||||
STATIC const mp_rom_map_elem_t qrio_qrdecoder_locals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_QRDecoder) },
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t rgbmatrix_rgbmatrix_brightness_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&rgbmatrix_rgbmatrix_get_brightness_obj,
|
||||
(mp_obj_t)&rgbmatrix_rgbmatrix_set_brightness_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t rgbmatrix_rgbmatrix_brightness_obj = MP_PROPERTY_GETSET(rgbmatrix_rgbmatrix_brightness_obj,
|
||||
(mp_obj_t)&rgbmatrix_rgbmatrix_get_brightness_obj,
|
||||
(mp_obj_t)&rgbmatrix_rgbmatrix_set_brightness_obj);
|
||||
|
||||
//| def refresh(self) -> None:
|
||||
//| """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));
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(rgbmatrix_rgbmatrix_get_width_obj, rgbmatrix_rgbmatrix_get_width);
|
||||
const mp_obj_property_t rgbmatrix_rgbmatrix_width_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&rgbmatrix_rgbmatrix_get_width_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t rgbmatrix_rgbmatrix_width_obj = MP_PROPERTY_GETTER(rgbmatrix_rgbmatrix_width_obj,
|
||||
(mp_obj_t)&rgbmatrix_rgbmatrix_get_width_obj);
|
||||
|
||||
//| height: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t rgbmatrix_rgbmatrix_height_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&rgbmatrix_rgbmatrix_get_height_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t rgbmatrix_rgbmatrix_height_obj = MP_PROPERTY_GETTER(rgbmatrix_rgbmatrix_height_obj,
|
||||
(mp_obj_t)&rgbmatrix_rgbmatrix_get_height_obj);
|
||||
|
||||
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) },
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t rotaryio_incrementalencoder_divisor_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&rotaryio_incrementalencoder_get_divisor_obj,
|
||||
(mp_obj_t)&rotaryio_incrementalencoder_set_divisor_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t rotaryio_incrementalencoder_divisor_obj = MP_PROPERTY_GETSET(rotaryio_incrementalencoder_divisor_obj,
|
||||
(mp_obj_t)&rotaryio_incrementalencoder_get_divisor_obj,
|
||||
(mp_obj_t)&rotaryio_incrementalencoder_set_divisor_obj);
|
||||
|
||||
//| position: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t rotaryio_incrementalencoder_position_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&rotaryio_incrementalencoder_get_position_obj,
|
||||
(mp_obj_t)&rotaryio_incrementalencoder_set_position_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t rotaryio_incrementalencoder_position_obj = MP_PROPERTY_GETSET(rotaryio_incrementalencoder_position_obj,
|
||||
(mp_obj_t)&rotaryio_incrementalencoder_get_position_obj,
|
||||
(mp_obj_t)&rotaryio_incrementalencoder_set_position_obj);
|
||||
|
||||
STATIC const mp_rom_map_elem_t rotaryio_incrementalencoder_locals_dict_table[] = {
|
||||
// Methods
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t rtc_rtc_datetime_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&rtc_rtc_get_datetime_obj,
|
||||
(mp_obj_t)&rtc_rtc_set_datetime_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t rtc_rtc_datetime_obj = MP_PROPERTY_GETSET(rtc_rtc_datetime_obj,
|
||||
(mp_obj_t)&rtc_rtc_get_datetime_obj,
|
||||
(mp_obj_t)&rtc_rtc_set_datetime_obj);
|
||||
|
||||
//| calibration: 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);
|
||||
|
||||
const mp_obj_property_t rtc_rtc_calibration_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&rtc_rtc_get_calibration_obj,
|
||||
(mp_obj_t)&rtc_rtc_set_calibration_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t rtc_rtc_calibration_obj = MP_PROPERTY_GETSET(rtc_rtc_calibration_obj,
|
||||
(mp_obj_t)&rtc_rtc_get_calibration_obj,
|
||||
(mp_obj_t)&rtc_rtc_set_calibration_obj);
|
||||
|
||||
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) },
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t sdioio_sdcard_frequency_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&sdioio_sdcard_get_frequency_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t sdioio_sdcard_frequency_obj = MP_PROPERTY_GETTER(sdioio_sdcard_frequency_obj,
|
||||
(mp_obj_t)&sdioio_sdcard_get_frequency_obj);
|
||||
|
||||
//| @property
|
||||
//| 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);
|
||||
|
||||
const mp_obj_property_t sdioio_sdcard_width_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&sdioio_sdcard_get_width_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t sdioio_sdcard_width_obj = MP_PROPERTY_GETTER(sdioio_sdcard_width_obj,
|
||||
(mp_obj_t)&sdioio_sdcard_get_width_obj);
|
||||
|
||||
//| def deinit(self) -> None:
|
||||
//| """Disable permanently.
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t ssl_sslcontext_check_hostname_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&ssl_sslcontext_get_check_hostname_obj,
|
||||
(mp_obj_t)&ssl_sslcontext_set_check_hostname_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t ssl_sslcontext_check_hostname_obj = MP_PROPERTY_GETSET(ssl_sslcontext_check_hostname_obj,
|
||||
(mp_obj_t)&ssl_sslcontext_get_check_hostname_obj,
|
||||
(mp_obj_t)&ssl_sslcontext_set_check_hostname_obj);
|
||||
|
||||
//| 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.
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t supervisor_runtime_usb_connected_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&supervisor_runtime_get_usb_connected_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t supervisor_runtime_usb_connected_obj = MP_PROPERTY_GETTER(supervisor_runtime_usb_connected_obj,
|
||||
(mp_obj_t)&supervisor_runtime_get_usb_connected_obj);
|
||||
|
||||
//| serial_connected: bool
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t supervisor_runtime_serial_connected_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&supervisor_runtime_get_serial_connected_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t supervisor_runtime_serial_connected_obj = MP_PROPERTY_GETTER(supervisor_runtime_serial_connected_obj,
|
||||
(mp_obj_t)&supervisor_runtime_get_serial_connected_obj);
|
||||
|
||||
//| serial_bytes_available: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t supervisor_runtime_serial_bytes_available_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&supervisor_runtime_get_serial_bytes_available_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t supervisor_runtime_serial_bytes_available_obj = MP_PROPERTY_GETTER(supervisor_runtime_serial_bytes_available_obj,
|
||||
(mp_obj_t)&supervisor_runtime_get_serial_bytes_available_obj);
|
||||
|
||||
supervisor_run_reason_t supervisor_get_run_reason(void) {
|
||||
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);
|
||||
|
||||
const mp_obj_property_t supervisor_runtime_run_reason_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&supervisor_runtime_get_run_reason_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t supervisor_runtime_run_reason_obj = MP_PROPERTY_GETTER(supervisor_runtime_run_reason_obj,
|
||||
(mp_obj_t)&supervisor_runtime_get_run_reason_obj);
|
||||
|
||||
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) },
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t synthio_miditrack_sample_rate_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&synthio_miditrack_get_sample_rate_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t synthio_miditrack_sample_rate_obj = MP_PROPERTY_GETTER(synthio_miditrack_sample_rate_obj,
|
||||
(mp_obj_t)&synthio_miditrack_get_sample_rate_obj);
|
||||
|
||||
STATIC const mp_rom_map_elem_t synthio_miditrack_locals_dict_table[] = {
|
||||
// Methods
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t touchio_touchin_value_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&touchio_touchin_get_value_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t touchio_touchin_value_obj = MP_PROPERTY_GETTER(touchio_touchin_value_obj,
|
||||
(mp_obj_t)&touchio_touchin_get_value_obj);
|
||||
|
||||
|
||||
//| 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);
|
||||
|
||||
const mp_obj_property_t touchio_touchin_raw_value_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&touchio_touchin_get_raw_value_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t touchio_touchin_raw_value_obj = MP_PROPERTY_GETTER(touchio_touchin_raw_value_obj,
|
||||
(mp_obj_t)&touchio_touchin_get_raw_value_obj);
|
||||
|
||||
|
||||
//| 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);
|
||||
|
||||
const mp_obj_property_t touchio_touchin_threshold_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&touchio_touchin_get_threshold_obj,
|
||||
(mp_obj_t)&touchio_touchin_set_threshold_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t touchio_touchin_threshold_obj = MP_PROPERTY_GETSET(touchio_touchin_threshold_obj,
|
||||
(mp_obj_t)&touchio_touchin_get_threshold_obj,
|
||||
(mp_obj_t)&touchio_touchin_set_threshold_obj);
|
||||
|
||||
|
||||
STATIC const mp_rom_map_elem_t touchio_touchin_locals_dict_table[] = {
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t usb_core_device_idVendor_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&usb_core_device_get_idVendor_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t usb_core_device_idVendor_obj = MP_PROPERTY_GETTER(usb_core_device_idVendor_obj,
|
||||
(mp_obj_t)&usb_core_device_get_idVendor_obj);
|
||||
|
||||
//| idProduct: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t usb_core_device_idProduct_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&usb_core_device_get_idProduct_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t usb_core_device_idProduct_obj = MP_PROPERTY_GETTER(usb_core_device_idProduct_obj,
|
||||
(mp_obj_t)&usb_core_device_get_idProduct_obj);
|
||||
|
||||
//| serial_number: str
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t usb_core_device_serial_number_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&usb_core_device_get_serial_number_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t usb_core_device_serial_number_obj = MP_PROPERTY_GETTER(usb_core_device_serial_number_obj,
|
||||
(mp_obj_t)&usb_core_device_get_serial_number_obj);
|
||||
|
||||
//| product: str
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t usb_core_device_product_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&usb_core_device_get_product_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t usb_core_device_product_obj = MP_PROPERTY_GETTER(usb_core_device_product_obj,
|
||||
(mp_obj_t)&usb_core_device_get_product_obj);
|
||||
|
||||
//| manufacturer: str
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t usb_core_device_manufacturer_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&usb_core_device_get_manufacturer_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t usb_core_device_manufacturer_obj = MP_PROPERTY_GETTER(usb_core_device_manufacturer_obj,
|
||||
(mp_obj_t)&usb_core_device_get_manufacturer_obj);
|
||||
|
||||
//| def write(self, endpoint: int, data: ReadableBuffer, timeout = None) -> int:
|
||||
//| """Write data to a specific endpoint on the device.
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t usb_cdc_serial_connected_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&usb_cdc_serial_get_connected_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t usb_cdc_serial_connected_obj = MP_PROPERTY_GETTER(usb_cdc_serial_connected_obj,
|
||||
(mp_obj_t)&usb_cdc_serial_get_connected_obj);
|
||||
|
||||
//| in_waiting: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t usb_cdc_serial_in_waiting_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&usb_cdc_serial_get_in_waiting_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t usb_cdc_serial_in_waiting_obj = MP_PROPERTY_GETTER(usb_cdc_serial_in_waiting_obj,
|
||||
(mp_obj_t)&usb_cdc_serial_get_in_waiting_obj);
|
||||
|
||||
//| out_waiting: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t usb_cdc_serial_out_waiting_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&usb_cdc_serial_get_out_waiting_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t usb_cdc_serial_out_waiting_obj = MP_PROPERTY_GETTER(usb_cdc_serial_out_waiting_obj,
|
||||
(mp_obj_t)&usb_cdc_serial_get_out_waiting_obj);
|
||||
|
||||
//| def reset_input_buffer(self) -> None:
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t usb_cdc_serial_timeout_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&usb_cdc_serial_get_timeout_obj,
|
||||
(mp_obj_t)&usb_cdc_serial_set_timeout_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t usb_cdc_serial_timeout_obj = MP_PROPERTY_GETSET(usb_cdc_serial_timeout_obj,
|
||||
(mp_obj_t)&usb_cdc_serial_get_timeout_obj,
|
||||
(mp_obj_t)&usb_cdc_serial_set_timeout_obj);
|
||||
|
||||
//| write_timeout: Optional[float]
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t usb_cdc_serial_write_timeout_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&usb_cdc_serial_get_write_timeout_obj,
|
||||
(mp_obj_t)&usb_cdc_serial_set_write_timeout_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t usb_cdc_serial_write_timeout_obj = MP_PROPERTY_GETSET(usb_cdc_serial_write_timeout_obj,
|
||||
(mp_obj_t)&usb_cdc_serial_get_write_timeout_obj,
|
||||
(mp_obj_t)&usb_cdc_serial_set_write_timeout_obj);
|
||||
|
||||
|
||||
STATIC const mp_rom_map_elem_t usb_cdc_serial_locals_dict_table[] = {
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t usb_hid_device_last_received_report_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&usb_hid_device_get_last_received_report_property_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t usb_hid_device_last_received_report_obj = MP_PROPERTY_GETTER(usb_hid_device_last_received_report_obj,
|
||||
(mp_obj_t)&usb_hid_device_get_last_received_report_property_obj);
|
||||
|
||||
//| usage_page: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t usb_hid_device_usage_page_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&usb_hid_device_get_usage_page_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t usb_hid_device_usage_page_obj = MP_PROPERTY_GETTER(usb_hid_device_usage_page_obj,
|
||||
(mp_obj_t)&usb_hid_device_get_usage_page_obj);
|
||||
|
||||
//| usage: int
|
||||
//| """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,
|
||||
usb_hid_device_obj_get_usage);
|
||||
|
||||
const mp_obj_property_t usb_hid_device_usage_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&usb_hid_device_get_usage_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getter_t usb_hid_device_usage_obj = MP_PROPERTY_GETTER(usb_hid_device_usage_obj,
|
||||
(mp_obj_t)&usb_hid_device_get_usage_obj);
|
||||
|
||||
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) },
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t vectorio_circle_radius_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&vectorio_circle_get_radius_obj,
|
||||
(mp_obj_t)&vectorio_circle_set_radius_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t vectorio_circle_radius_obj = MP_PROPERTY_GETSET(vectorio_circle_radius_obj,
|
||||
(mp_obj_t)&vectorio_circle_get_radius_obj,
|
||||
(mp_obj_t)&vectorio_circle_set_radius_obj);
|
||||
|
||||
//| color_index : int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t vectorio_circle_color_index_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&vectorio_circle_get_color_index_obj,
|
||||
(mp_obj_t)&vectorio_circle_set_color_index_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t vectorio_circle_color_index_obj = MP_PROPERTY_GETSET(vectorio_circle_color_index_obj,
|
||||
(mp_obj_t)&vectorio_circle_get_color_index_obj,
|
||||
(mp_obj_t)&vectorio_circle_set_color_index_obj);
|
||||
|
||||
|
||||
// Documentation for properties inherited from VectorShape.
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t vectorio_polygon_points_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&vectorio_polygon_get_points_obj,
|
||||
(mp_obj_t)&vectorio_polygon_set_points_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t vectorio_polygon_points_obj = MP_PROPERTY_GETSET(vectorio_polygon_points_obj,
|
||||
(mp_obj_t)&vectorio_polygon_get_points_obj,
|
||||
(mp_obj_t)&vectorio_polygon_set_points_obj);
|
||||
|
||||
//| color_index : int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t vectorio_polygon_color_index_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&vectorio_polygon_get_color_index_obj,
|
||||
(mp_obj_t)&vectorio_polygon_set_color_index_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t vectorio_polygon_color_index_obj = MP_PROPERTY_GETSET(vectorio_polygon_color_index_obj,
|
||||
(mp_obj_t)&vectorio_polygon_get_color_index_obj,
|
||||
(mp_obj_t)&vectorio_polygon_set_color_index_obj);
|
||||
|
||||
|
||||
// Documentation for properties inherited from VectorShape.
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t vectorio_vector_shape_x_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&vectorio_vector_shape_get_x_obj,
|
||||
(mp_obj_t)&vectorio_vector_shape_set_x_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t vectorio_vector_shape_x_obj = MP_PROPERTY_GETSET(vectorio_vector_shape_x_obj,
|
||||
(mp_obj_t)&vectorio_vector_shape_get_x_obj,
|
||||
(mp_obj_t)&vectorio_vector_shape_set_x_obj);
|
||||
|
||||
|
||||
// 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);
|
||||
|
||||
const mp_obj_property_t vectorio_vector_shape_y_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&vectorio_vector_shape_get_y_obj,
|
||||
(mp_obj_t)&vectorio_vector_shape_set_y_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t vectorio_vector_shape_y_obj = MP_PROPERTY_GETSET(vectorio_vector_shape_y_obj,
|
||||
(mp_obj_t)&vectorio_vector_shape_get_y_obj,
|
||||
(mp_obj_t)&vectorio_vector_shape_set_y_obj);
|
||||
|
||||
|
||||
// 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);
|
||||
|
||||
const mp_obj_property_t vectorio_vector_shape_location_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&vectorio_vector_shape_get_location_obj,
|
||||
(mp_obj_t)&vectorio_vector_shape_set_location_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t vectorio_vector_shape_location_obj = MP_PROPERTY_GETSET(vectorio_vector_shape_location_obj,
|
||||
(mp_obj_t)&vectorio_vector_shape_get_location_obj,
|
||||
(mp_obj_t)&vectorio_vector_shape_set_location_obj);
|
||||
|
||||
|
||||
// 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);
|
||||
|
||||
const mp_obj_property_t vectorio_vector_shape_pixel_shader_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&vectorio_vector_shape_get_pixel_shader_obj,
|
||||
(mp_obj_t)&vectorio_vector_shape_set_pixel_shader_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t vectorio_vector_shape_pixel_shader_obj = MP_PROPERTY_GETSET(vectorio_vector_shape_pixel_shader_obj,
|
||||
(mp_obj_t)&vectorio_vector_shape_get_pixel_shader_obj,
|
||||
(mp_obj_t)&vectorio_vector_shape_set_pixel_shader_obj);
|
||||
|
||||
|
||||
STATIC const mp_rom_map_elem_t vectorio_vector_shape_locals_dict_table[] = {
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t watchdog_watchdogtimer_timeout_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&watchdog_watchdogtimer_get_timeout_obj,
|
||||
(mp_obj_t)&watchdog_watchdogtimer_set_timeout_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t watchdog_watchdogtimer_timeout_obj = MP_PROPERTY_GETSET(watchdog_watchdogtimer_timeout_obj,
|
||||
(mp_obj_t)&watchdog_watchdogtimer_get_timeout_obj,
|
||||
(mp_obj_t)&watchdog_watchdogtimer_set_timeout_obj);
|
||||
|
||||
//| mode: 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);
|
||||
|
||||
const mp_obj_property_t watchdog_watchdogtimer_mode_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&watchdog_watchdogtimer_get_mode_obj,
|
||||
(mp_obj_t)&watchdog_watchdogtimer_set_mode_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t watchdog_watchdogtimer_mode_obj = MP_PROPERTY_GETSET(watchdog_watchdogtimer_mode_obj,
|
||||
(mp_obj_t)&watchdog_watchdogtimer_get_mode_obj,
|
||||
(mp_obj_t)&watchdog_watchdogtimer_set_mode_obj);
|
||||
|
||||
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) },
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t wifi_monitor_channel_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&wifi_monitor_get_channel_obj,
|
||||
(mp_obj_t)&wifi_monitor_set_channel_obj,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getset_t wifi_monitor_channel_obj = MP_PROPERTY_GETSET(wifi_monitor_channel_obj,
|
||||
(mp_obj_t)&wifi_monitor_get_channel_obj,
|
||||
(mp_obj_t)&wifi_monitor_set_channel_obj);
|
||||
|
||||
//| queue: int
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t wifi_monitor_queue_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&wifi_monitor_get_queue_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t wifi_monitor_queue_obj = MP_PROPERTY_GETTER(wifi_monitor_queue_obj,
|
||||
(mp_obj_t)&wifi_monitor_get_queue_obj);
|
||||
|
||||
//| def deinit(self) -> None:
|
||||
//| """De-initialize `wifi.Monitor` singleton."""
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t wifi_network_ssid_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&wifi_network_get_ssid_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t wifi_network_ssid_obj = MP_PROPERTY_GETTER(wifi_network_ssid_obj,
|
||||
(mp_obj_t)&wifi_network_get_ssid_obj);
|
||||
|
||||
|
||||
//| 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);
|
||||
|
||||
const mp_obj_property_t wifi_network_bssid_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&wifi_network_get_bssid_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t wifi_network_bssid_obj = MP_PROPERTY_GETTER(wifi_network_bssid_obj,
|
||||
(mp_obj_t)&wifi_network_get_bssid_obj);
|
||||
|
||||
|
||||
//| 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);
|
||||
|
||||
const mp_obj_property_t wifi_network_rssi_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&wifi_network_get_rssi_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t wifi_network_rssi_obj = MP_PROPERTY_GETTER(wifi_network_rssi_obj,
|
||||
(mp_obj_t)&wifi_network_get_rssi_obj);
|
||||
|
||||
|
||||
//| 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);
|
||||
|
||||
const mp_obj_property_t wifi_network_channel_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&wifi_network_get_channel_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t wifi_network_channel_obj = MP_PROPERTY_GETTER(wifi_network_channel_obj,
|
||||
(mp_obj_t)&wifi_network_get_channel_obj);
|
||||
|
||||
//| country: str
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t wifi_network_country_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&wifi_network_get_country_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t wifi_network_country_obj = MP_PROPERTY_GETTER(wifi_network_country_obj,
|
||||
(mp_obj_t)&wifi_network_get_country_obj);
|
||||
|
||||
//| authmode: str
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t wifi_network_authmode_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&wifi_network_get_authmode_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t wifi_network_authmode_obj = MP_PROPERTY_GETTER(wifi_network_authmode_obj,
|
||||
(mp_obj_t)&wifi_network_get_authmode_obj);
|
||||
|
||||
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) },
|
||||
|
|
|
@ -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);
|
||||
|
||||
const mp_obj_property_t wifi_radio_enabled_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&wifi_radio_get_enabled_obj,
|
||||
(mp_obj_t)&wifi_radio_set_enabled_obj,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getset_t wifi_radio_enabled_obj = MP_PROPERTY_GETSET(wifi_radio_enabled_obj,
|
||||
(mp_obj_t)&wifi_radio_get_enabled_obj,
|
||||
(mp_obj_t)&wifi_radio_set_enabled_obj);
|
||||
|
||||
//| hostname: Union[str | ReadableBuffer]
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t wifi_radio_hostname_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = {(mp_obj_t)&wifi_radio_get_hostname_obj,
|
||||
(mp_obj_t)&wifi_radio_set_hostname_obj,
|
||||
MP_ROM_NONE},
|
||||
};
|
||||
const mp_obj_property_getset_t wifi_radio_hostname_obj = MP_PROPERTY_GETSET(wifi_radio_hostname_obj,
|
||||
(mp_obj_t)&wifi_radio_get_hostname_obj,
|
||||
(mp_obj_t)&wifi_radio_set_hostname_obj);
|
||||
|
||||
//| mac_address: ReadableBuffer
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t wifi_radio_mac_address_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&wifi_radio_get_mac_address_obj,
|
||||
(mp_obj_t)&wifi_radio_set_mac_address_obj,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getset_t wifi_radio_mac_address_obj = MP_PROPERTY_GETSET(wifi_radio_mac_address_obj,
|
||||
(mp_obj_t)&wifi_radio_get_mac_address_obj,
|
||||
(mp_obj_t)&wifi_radio_set_mac_address_obj);
|
||||
|
||||
//| mac_address_ap: ReadableBuffer
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t wifi_radio_mac_address_ap_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&wifi_radio_get_mac_address_ap_obj,
|
||||
(mp_obj_t)&wifi_radio_set_mac_address_ap_obj,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getset_t wifi_radio_mac_address_ap_obj = MP_PROPERTY_GETSET(wifi_radio_mac_address_ap_obj,
|
||||
(mp_obj_t)&wifi_radio_get_mac_address_ap_obj,
|
||||
(mp_obj_t)&wifi_radio_set_mac_address_ap_obj);
|
||||
|
||||
//| 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."""
|
||||
|
@ -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);
|
||||
|
||||
const mp_obj_property_t wifi_radio_ipv4_gateway_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&wifi_radio_get_ipv4_gateway_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t wifi_radio_ipv4_gateway_obj = MP_PROPERTY_GETTER(wifi_radio_ipv4_gateway_obj,
|
||||
(mp_obj_t)&wifi_radio_get_ipv4_gateway_obj);
|
||||
|
||||
//| ipv4_gateway_ap: Optional[ipaddress.IPv4Address]
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t wifi_radio_ipv4_gateway_ap_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&wifi_radio_get_ipv4_gateway_ap_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t wifi_radio_ipv4_gateway_ap_obj = MP_PROPERTY_GETTER(wifi_radio_ipv4_gateway_ap_obj,
|
||||
(mp_obj_t)&wifi_radio_get_ipv4_gateway_ap_obj);
|
||||
|
||||
//| ipv4_subnet: Optional[ipaddress.IPv4Address]
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t wifi_radio_ipv4_subnet_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&wifi_radio_get_ipv4_subnet_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t wifi_radio_ipv4_subnet_obj = MP_PROPERTY_GETTER(wifi_radio_ipv4_subnet_obj,
|
||||
(mp_obj_t)&wifi_radio_get_ipv4_subnet_obj);
|
||||
|
||||
//| ipv4_subnet_ap: Optional[ipaddress.IPv4Address]
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t wifi_radio_ipv4_subnet_ap_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&wifi_radio_get_ipv4_subnet_ap_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t wifi_radio_ipv4_subnet_ap_obj = MP_PROPERTY_GETTER(wifi_radio_ipv4_subnet_ap_obj,
|
||||
(mp_obj_t)&wifi_radio_get_ipv4_subnet_ap_obj);
|
||||
|
||||
//| ipv4_address: Optional[ipaddress.IPv4Address]
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t wifi_radio_ipv4_address_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&wifi_radio_get_ipv4_address_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t wifi_radio_ipv4_address_obj = MP_PROPERTY_GETTER(wifi_radio_ipv4_address_obj,
|
||||
(mp_obj_t)&wifi_radio_get_ipv4_address_obj);
|
||||
|
||||
//| ipv4_address_ap: Optional[ipaddress.IPv4Address]
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t wifi_radio_ipv4_address_ap_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&wifi_radio_get_ipv4_address_ap_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t wifi_radio_ipv4_address_ap_obj = MP_PROPERTY_GETTER(wifi_radio_ipv4_address_ap_obj,
|
||||
(mp_obj_t)&wifi_radio_get_ipv4_address_ap_obj);
|
||||
|
||||
//| ipv4_dns: Optional[ipaddress.IPv4Address]
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t wifi_radio_ipv4_dns_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&wifi_radio_get_ipv4_dns_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t wifi_radio_ipv4_dns_obj = MP_PROPERTY_GETTER(wifi_radio_ipv4_dns_obj,
|
||||
(mp_obj_t)&wifi_radio_get_ipv4_dns_obj);
|
||||
|
||||
//| ap_info: Optional[Network]
|
||||
//| """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);
|
||||
|
||||
const mp_obj_property_t wifi_radio_ap_info_obj = {
|
||||
.base.type = &mp_type_property,
|
||||
.proxy = { (mp_obj_t)&wifi_radio_get_ap_info_obj,
|
||||
MP_ROM_NONE,
|
||||
MP_ROM_NONE },
|
||||
};
|
||||
const mp_obj_property_getter_t wifi_radio_ap_info_obj = MP_PROPERTY_GETTER(wifi_radio_ap_info_obj,
|
||||
(mp_obj_t)&wifi_radio_get_ap_info_obj);
|
||||
|
||||
//| def ping(self, ip: ipaddress.IPv4Address, *, timeout: Optional[float] = 0.5) -> Optional[float]:
|
||||
//| """Ping an IP to test connectivity. Returns echo time in seconds.
|
||||
|
|
Loading…
Reference in New Issue