Skip to content

Commit 9fe8d61

Browse files
committed
Fix broken MP macros from 1.11 merge
1 parent 9feef41 commit 9fe8d61

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

ports/nrf/common-hal/alarm/pin/PinAlarm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ bool alarm_pin_pinalarm_woke_us_up(void) {
9393
mp_obj_t alarm_pin_pinalarm_get_wakeup_alarm(size_t n_alarms, const mp_obj_t *alarms) {
9494
// First, check to see if we match any given alarms.
9595
for (size_t i = 0; i < n_alarms; i++) {
96-
if (!MP_OBJ_IS_TYPE(alarms[i], &alarm_pin_pinalarm_type)) {
96+
if (!mp_obj_is_type(alarms[i], &alarm_pin_pinalarm_type)) {
9797
continue;
9898
}
9999
alarm_pin_pinalarm_obj_t *alarm = MP_OBJ_TO_PTR(alarms[i]);
@@ -197,7 +197,7 @@ void alarm_pin_pinalarm_set_alarms(bool deep_sleep, size_t n_alarms, const mp_ob
197197
int pin_number = -1;
198198

199199
for (size_t i = 0; i < n_alarms; i++) {
200-
if (!MP_OBJ_IS_TYPE(alarms[i], &alarm_pin_pinalarm_type)) {
200+
if (!mp_obj_is_type(alarms[i], &alarm_pin_pinalarm_type)) {
201201
continue;
202202
}
203203
alarm_pin_pinalarm_obj_t *alarm = MP_OBJ_TO_PTR(alarms[i]);

ports/nrf/common-hal/alarm/time/TimeAlarm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ mp_float_t common_hal_alarm_time_timealarm_get_monotonic_time(alarm_time_timeala
4343
mp_obj_t alarm_time_timealarm_get_wakeup_alarm(size_t n_alarms, const mp_obj_t *alarms) {
4444
// First, check to see if we match
4545
for (size_t i = 0; i < n_alarms; i++) {
46-
if (MP_OBJ_IS_TYPE(alarms[i], &alarm_time_timealarm_type)) {
46+
if (mp_obj_is_type(alarms[i], &alarm_time_timealarm_type)) {
4747
return alarms[i];
4848
}
4949
}
@@ -82,7 +82,7 @@ void alarm_time_timealarm_set_alarms(bool deep_sleep, size_t n_alarms, const mp_
8282
wakeup_time_saved = 0;
8383

8484
for (size_t i = 0; i < n_alarms; i++) {
85-
if (!MP_OBJ_IS_TYPE(alarms[i], &alarm_time_timealarm_type)) {
85+
if (!mp_obj_is_type(alarms[i], &alarm_time_timealarm_type)) {
8686
continue;
8787
}
8888
if (timealarm_set) {

ports/stm/common-hal/alarm/pin/PinAlarm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ bool alarm_pin_pinalarm_woke_us_up(void) {
9191

9292
mp_obj_t alarm_pin_pinalarm_get_wakeup_alarm(size_t n_alarms, const mp_obj_t *alarms) {
9393
for (size_t i = 0; i < n_alarms; i++) {
94-
if (!MP_OBJ_IS_TYPE(alarms[i], &alarm_pin_pinalarm_type)) {
94+
if (!mp_obj_is_type(alarms[i], &alarm_pin_pinalarm_type)) {
9595
continue;
9696
}
9797
alarm_pin_pinalarm_obj_t *alarm = MP_OBJ_TO_PTR(alarms[i]);
@@ -124,7 +124,7 @@ void alarm_pin_pinalarm_reset(void) {
124124
// Deep sleep alarms don't actually make use of EXTI, but we pretend they're the same.
125125
void alarm_pin_pinalarm_set_alarms(bool deep_sleep, size_t n_alarms, const mp_obj_t *alarms) {
126126
for (size_t i = 0; i < n_alarms; i++) {
127-
if (MP_OBJ_IS_TYPE(alarms[i], &alarm_pin_pinalarm_type)) {
127+
if (mp_obj_is_type(alarms[i], &alarm_pin_pinalarm_type)) {
128128
alarm_pin_pinalarm_obj_t *alarm = MP_OBJ_TO_PTR(alarms[i]);
129129
if (deep_sleep) {
130130
// Deep sleep only wakes on a rising edge from one pin, WKUP (PA00)

ports/stm/common-hal/alarm/time/TimeAlarm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ mp_float_t common_hal_alarm_time_timealarm_get_monotonic_time(alarm_time_timeala
4747
mp_obj_t alarm_time_timealarm_get_wakeup_alarm(size_t n_alarms, const mp_obj_t *alarms) {
4848
// First, check to see if we match
4949
for (size_t i = 0; i < n_alarms; i++) {
50-
if (MP_OBJ_IS_TYPE(alarms[i], &alarm_time_timealarm_type)) {
50+
if (mp_obj_is_type(alarms[i], &alarm_time_timealarm_type)) {
5151
return alarms[i];
5252
}
5353
}
@@ -76,7 +76,7 @@ void alarm_time_timealarm_set_alarms(bool deep_sleep, size_t n_alarms, const mp_
7676
bool timealarm_set = false;
7777
alarm_time_timealarm_obj_t *timealarm = MP_OBJ_NULL;
7878
for (size_t i = 0; i < n_alarms; i++) {
79-
if (!MP_OBJ_IS_TYPE(alarms[i], &alarm_time_timealarm_type)) {
79+
if (!mp_obj_is_type(alarms[i], &alarm_time_timealarm_type)) {
8080
continue;
8181
}
8282
if (timealarm_set) {

0 commit comments

Comments
 (0)