check_for_deinit() more places in scanners
This commit is contained in:
parent
4f538b6c09
commit
2e67d6708d
|
@ -150,6 +150,7 @@ STATIC void check_for_deinit(keypad_keymatrix_obj_t *self) {
|
|||
//|
|
||||
STATIC mp_obj_t keypad_keymatrix_reset(mp_obj_t self_in) {
|
||||
keypad_keymatrix_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
check_for_deinit(self);
|
||||
|
||||
common_hal_keypad_keymatrix_reset(self);
|
||||
return MP_ROM_NONE;
|
||||
|
@ -162,6 +163,8 @@ MP_DEFINE_CONST_FUN_OBJ_1(keypad_keymatrix_reset_obj, keypad_keymatrix_reset);
|
|||
//|
|
||||
STATIC mp_obj_t keypad_keymatrix_get_key_count(mp_obj_t self_in) {
|
||||
keypad_keymatrix_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
check_for_deinit(self);
|
||||
|
||||
return MP_OBJ_NEW_SMALL_INT(common_hal_keypad_keymatrix_get_key_count(self));
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(keypad_keymatrix_get_key_count_obj, keypad_keymatrix_get_key_count);
|
||||
|
@ -231,6 +234,8 @@ MP_DEFINE_CONST_FUN_OBJ_3(keypad_keymatrix_row_column_to_key_number_obj, keypad_
|
|||
//|
|
||||
STATIC mp_obj_t keypad_keymatrix_get_events(mp_obj_t self_in) {
|
||||
keypad_keymatrix_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
check_for_deinit(self);
|
||||
|
||||
return common_hal_keypad_keymatrix_get_events(self);
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(keypad_keymatrix_get_events_obj, keypad_keymatrix_get_events);
|
||||
|
|
|
@ -144,6 +144,7 @@ STATIC void check_for_deinit(keypad_keys_obj_t *self) {
|
|||
//|
|
||||
STATIC mp_obj_t keypad_keys_reset(mp_obj_t self_in) {
|
||||
keypad_keys_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
check_for_deinit(self);
|
||||
|
||||
common_hal_keypad_keys_reset(self);
|
||||
return MP_ROM_NONE;
|
||||
|
@ -156,6 +157,8 @@ MP_DEFINE_CONST_FUN_OBJ_1(keypad_keys_reset_obj, keypad_keys_reset);
|
|||
//|
|
||||
STATIC mp_obj_t keypad_keys_get_key_count(mp_obj_t self_in) {
|
||||
keypad_keys_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
check_for_deinit(self);
|
||||
|
||||
return MP_OBJ_NEW_SMALL_INT(common_hal_keypad_keys_get_key_count(self));
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(keypad_keys_get_key_count_obj, keypad_keys_get_key_count);
|
||||
|
@ -173,6 +176,8 @@ const mp_obj_property_t keypad_keys_key_count_obj = {
|
|||
//|
|
||||
STATIC mp_obj_t keypad_keys_get_events(mp_obj_t self_in) {
|
||||
keypad_keys_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
check_for_deinit(self);
|
||||
|
||||
return common_hal_keypad_keys_get_events(self);
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(keypad_keys_get_events_obj, keypad_keys_get_events);
|
||||
|
|
|
@ -148,6 +148,7 @@ STATIC void check_for_deinit(keypad_shiftregisterkeys_obj_t *self) {
|
|||
//|
|
||||
STATIC mp_obj_t keypad_shiftregisterkeys_reset(mp_obj_t self_in) {
|
||||
keypad_shiftregisterkeys_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
check_for_deinit(self);
|
||||
|
||||
common_hal_keypad_shiftregisterkeys_reset(self);
|
||||
return MP_ROM_NONE;
|
||||
|
@ -160,6 +161,8 @@ MP_DEFINE_CONST_FUN_OBJ_1(keypad_shiftregisterkeys_reset_obj, keypad_shiftregist
|
|||
//|
|
||||
STATIC mp_obj_t keypad_shiftregisterkeys_get_key_count(mp_obj_t self_in) {
|
||||
keypad_shiftregisterkeys_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
check_for_deinit(self);
|
||||
|
||||
return MP_OBJ_NEW_SMALL_INT(common_hal_keypad_shiftregisterkeys_get_key_count(self));
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(keypad_shiftregisterkeys_get_key_count_obj, keypad_shiftregisterkeys_get_key_count);
|
||||
|
@ -177,6 +180,8 @@ const mp_obj_property_t keypad_shiftregisterkeys_key_count_obj = {
|
|||
//|
|
||||
STATIC mp_obj_t keypad_shiftregisterkeys_get_events(mp_obj_t self_in) {
|
||||
keypad_shiftregisterkeys_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
check_for_deinit(self);
|
||||
|
||||
return common_hal_keypad_shiftregisterkeys_get_events(self);
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(keypad_shiftregisterkeys_get_events_obj, keypad_shiftregisterkeys_get_events);
|
||||
|
|
Loading…
Reference in New Issue