From 338af99a7f3b8f2231be7475500a2bbf6a2bd723 Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 18 Jun 2018 13:42:05 +1000 Subject: [PATCH] stm32/can: Use MP_OBJ_ARRAY_TYPECODE_FLAG_RW where appropriate. --- ports/stm32/can.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/stm32/can.c b/ports/stm32/can.c index 22ac5509c2..7680b0de42 100644 --- a/ports/stm32/can.c +++ b/ports/stm32/can.c @@ -723,8 +723,8 @@ STATIC mp_obj_t pyb_can_recv(size_t n_args, const mp_obj_t *pos_args, mp_map_t * mp_raise_TypeError(NULL); } mp_obj_array_t *mv = MP_OBJ_TO_PTR(items[3]); - if (!(mv->typecode == (0x80 | BYTEARRAY_TYPECODE) - || (mv->typecode | 0x20) == (0x80 | 'b'))) { + if (!(mv->typecode == (MP_OBJ_ARRAY_TYPECODE_FLAG_RW | BYTEARRAY_TYPECODE) + || (mv->typecode | 0x20) == (MP_OBJ_ARRAY_TYPECODE_FLAG_RW | 'b'))) { mp_raise_ValueError(NULL); } mv->len = rx_msg.DLC;