Skip to content

Commit 338af99

Browse files
committed
stm32/can: Use MP_OBJ_ARRAY_TYPECODE_FLAG_RW where appropriate.
1 parent c00ee20 commit 338af99

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ports/stm32/can.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -723,8 +723,8 @@ STATIC mp_obj_t pyb_can_recv(size_t n_args, const mp_obj_t *pos_args, mp_map_t *
723723
mp_raise_TypeError(NULL);
724724
}
725725
mp_obj_array_t *mv = MP_OBJ_TO_PTR(items[3]);
726-
if (!(mv->typecode == (0x80 | BYTEARRAY_TYPECODE)
727-
|| (mv->typecode | 0x20) == (0x80 | 'b'))) {
726+
if (!(mv->typecode == (MP_OBJ_ARRAY_TYPECODE_FLAG_RW | BYTEARRAY_TYPECODE)
727+
|| (mv->typecode | 0x20) == (MP_OBJ_ARRAY_TYPECODE_FLAG_RW | 'b'))) {
728728
mp_raise_ValueError(NULL);
729729
}
730730
mv->len = rx_msg.DLC;

0 commit comments

Comments
 (0)