Skip to content

Commit 7cf9076

Browse files
committed
return consistent data type from JD shared bindings
1 parent 54184f2 commit 7cf9076

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

shared-bindings/busio/JACDAC.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ STATIC mp_obj_t busio_jacdac_send(size_t n_args, const mp_obj_t *pos_args, mp_ma
136136

137137
// empty buffer
138138
if (length == 0) {
139-
return mp_const_none;
139+
return mp_obj_new_bool(0);
140140
}
141141

142142
return mp_obj_new_bool(common_hal_busio_jacdac_send(self, ((uint8_t*)bufinfo.buf) + start, length));
@@ -168,7 +168,7 @@ STATIC mp_obj_t busio_jacdac_receive(size_t n_args, const mp_obj_t *pos_args, mp
168168

169169
// empty buffer
170170
if (length == 0) {
171-
return 0;
171+
return mp_obj_new_bool(0);
172172
}
173173

174174
return mp_obj_new_bool(common_hal_busio_jacdac_receive(self, ((uint8_t*)bufinfo.buf) + start, length));

0 commit comments

Comments
 (0)