Skip to content

Commit 4933fa1

Browse files
committed
shared-bindings: Ensure pin objects are actually pins.
Fixes #12
1 parent 72455e4 commit 4933fa1

File tree

11 files changed

+111
-78
lines changed

11 files changed

+111
-78
lines changed

atmel-samd/common-hal/nativeio/AnalogOut.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
void common_hal_nativeio_analogout_construct(nativeio_analogout_obj_t* self,
3737
const mcu_pin_obj_t *pin) {
3838
if (pin->pin != PIN_PA02) {
39-
nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError,
40-
"DAC only supported on pin PA02."));
39+
nlr_raise(mp_obj_new_exception_msg(&mp_type_ValueError,
40+
"AnalogOut only supported on pin PA02."));
4141
return;
4242
}
4343
struct dac_config config_dac;

shared-bindings/bitbangio/I2C.c

Lines changed: 37 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
// bitbangio.I2C class.
2929

3030
#include "shared-bindings/bitbangio/I2C.h"
31+
#include "shared-bindings/microcontroller/Pin.h"
3132

3233
#include "py/runtime.h"
3334
//| .. currentmodule:: bitbangio
@@ -46,33 +47,35 @@
4647
//| :param int freq: The clock frequency
4748
//|
4849
STATIC mp_obj_t bitbangio_i2c_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *pos_args) {
49-
mp_arg_check_num(n_args, n_kw, 0, MP_OBJ_FUN_ARGS_MAX, true);
50-
bitbangio_i2c_obj_t *self = m_new_obj(bitbangio_i2c_obj_t);
51-
self->base.type = &bitbangio_i2c_type;
52-
mp_map_t kw_args;
53-
mp_map_init_fixed_table(&kw_args, n_kw, pos_args + n_args);
54-
enum { ARG_scl, ARG_sda, ARG_freq };
55-
static const mp_arg_t allowed_args[] = {
56-
{ MP_QSTR_scl, MP_ARG_REQUIRED | MP_ARG_OBJ },
57-
{ MP_QSTR_sda, MP_ARG_REQUIRED | MP_ARG_OBJ },
58-
{ MP_QSTR_freq, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 400000} },
59-
};
60-
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
61-
mp_arg_parse_all(n_args, pos_args, &kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
62-
const mcu_pin_obj_t* scl = MP_OBJ_TO_PTR(args[ARG_scl].u_obj);
63-
const mcu_pin_obj_t* sda = MP_OBJ_TO_PTR(args[ARG_sda].u_obj);
64-
shared_module_bitbangio_i2c_construct(self, scl, sda, args[ARG_freq].u_int);
65-
return (mp_obj_t)self;
50+
mp_arg_check_num(n_args, n_kw, 0, MP_OBJ_FUN_ARGS_MAX, true);
51+
bitbangio_i2c_obj_t *self = m_new_obj(bitbangio_i2c_obj_t);
52+
self->base.type = &bitbangio_i2c_type;
53+
mp_map_t kw_args;
54+
mp_map_init_fixed_table(&kw_args, n_kw, pos_args + n_args);
55+
enum { ARG_scl, ARG_sda, ARG_freq };
56+
static const mp_arg_t allowed_args[] = {
57+
{ MP_QSTR_scl, MP_ARG_REQUIRED | MP_ARG_OBJ },
58+
{ MP_QSTR_sda, MP_ARG_REQUIRED | MP_ARG_OBJ },
59+
{ MP_QSTR_freq, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 400000} },
60+
};
61+
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
62+
mp_arg_parse_all(n_args, pos_args, &kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
63+
assert_pin(args[ARG_scl].u_obj, false);
64+
assert_pin(args[ARG_sda].u_obj, false);
65+
const mcu_pin_obj_t* scl = MP_OBJ_TO_PTR(args[ARG_scl].u_obj);
66+
const mcu_pin_obj_t* sda = MP_OBJ_TO_PTR(args[ARG_sda].u_obj);
67+
shared_module_bitbangio_i2c_construct(self, scl, sda, args[ARG_freq].u_int);
68+
return (mp_obj_t)self;
6669
}
6770

6871
//| .. method:: I2C.deinit()
6972
//|
7073
//| Releases control of the underlying hardware so other classes can use it.
7174
//|
7275
STATIC mp_obj_t bitbangio_i2c_obj_deinit(mp_obj_t self_in) {
73-
bitbangio_i2c_obj_t *self = MP_OBJ_TO_PTR(self_in);
74-
shared_module_bitbangio_i2c_deinit(self);
75-
return mp_const_none;
76+
bitbangio_i2c_obj_t *self = MP_OBJ_TO_PTR(self_in);
77+
shared_module_bitbangio_i2c_deinit(self);
78+
return mp_const_none;
7679
}
7780
MP_DEFINE_CONST_FUN_OBJ_1(bitbangio_i2c_deinit_obj, bitbangio_i2c_obj_deinit);
7881

@@ -81,7 +84,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(bitbangio_i2c_deinit_obj, bitbangio_i2c_obj_deinit);
8184
//| No-op used in Context Managers.
8285
//|
8386
STATIC mp_obj_t bitbangio_i2c_obj___enter__(mp_obj_t self_in) {
84-
return self_in;
87+
return self_in;
8588
}
8689
MP_DEFINE_CONST_FUN_OBJ_1(bitbangio_i2c___enter___obj, bitbangio_i2c_obj___enter__);
8790

@@ -103,16 +106,16 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(bitbangio_i2c_obj___exit___obj, 4, 4,
103106
//| its address (including a read bit) is sent on the bus.
104107
//|
105108
STATIC mp_obj_t bitbangio_i2c_scan(mp_obj_t self_in) {
106-
bitbangio_i2c_obj_t *self = MP_OBJ_TO_PTR(self_in);
107-
mp_obj_t list = mp_obj_new_list(0, NULL);
108-
// 7-bit addresses 0b0000xxx and 0b1111xxx are reserved
109-
for (int addr = 0x08; addr < 0x78; ++addr) {
110-
bool success = shared_module_bitbangio_i2c_probe(self, addr);
111-
if (success) {
109+
bitbangio_i2c_obj_t *self = MP_OBJ_TO_PTR(self_in);
110+
mp_obj_t list = mp_obj_new_list(0, NULL);
111+
// 7-bit addresses 0b0000xxx and 0b1111xxx are reserved
112+
for (int addr = 0x08; addr < 0x78; ++addr) {
113+
bool success = shared_module_bitbangio_i2c_probe(self, addr);
114+
if (success) {
112115
mp_obj_list_append(list, MP_OBJ_NEW_SMALL_INT(addr));
113-
}
114-
}
115-
return list;
116+
}
117+
}
118+
return list;
116119
}
117120
MP_DEFINE_CONST_FUN_OBJ_1(bitbangio_i2c_scan_obj, bitbangio_i2c_scan);
118121

@@ -174,8 +177,8 @@ STATIC const mp_rom_map_elem_t bitbangio_i2c_locals_dict_table[] = {
174177
STATIC MP_DEFINE_CONST_DICT(bitbangio_i2c_locals_dict, bitbangio_i2c_locals_dict_table);
175178

176179
const mp_obj_type_t bitbangio_i2c_type = {
177-
{ &mp_type_type },
178-
.name = MP_QSTR_I2C,
179-
.make_new = bitbangio_i2c_make_new,
180-
.locals_dict = (mp_obj_dict_t*)&bitbangio_i2c_locals_dict,
180+
{ &mp_type_type },
181+
.name = MP_QSTR_I2C,
182+
.make_new = bitbangio_i2c_make_new,
183+
.locals_dict = (mp_obj_dict_t*)&bitbangio_i2c_locals_dict,
181184
};

shared-bindings/bitbangio/SPI.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include <string.h>
3131

3232
#include "shared-bindings/bitbangio/SPI.h"
33+
#include "shared-bindings/microcontroller/Pin.h"
3334

3435
#include "py/runtime.h"
3536

@@ -76,8 +77,11 @@ STATIC mp_obj_t bitbangio_spi_make_new(const mp_obj_type_t *type, size_t n_args,
7677
};
7778
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
7879
mp_arg_parse_all(n_args, pos_args, &kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
80+
assert_pin(args[ARG_clock].u_obj, false);
81+
assert_pin(args[ARG_MOSI].u_obj, true);
82+
assert_pin(args[ARG_MISO].u_obj, true);
7983
const mcu_pin_obj_t* clock = MP_OBJ_TO_PTR(args[ARG_clock].u_obj);
80-
const mcu_pin_obj_t* mosi = MP_OBJ_TO_PTR(args[ARG_MOSI].u_obj);
84+
const mcu_pin_obj_t* mosi = MP_OBJ_TO_PTR(args[ARG_MOSI].u_obj);
8185
const mcu_pin_obj_t* miso = MP_OBJ_TO_PTR(args[ARG_MISO].u_obj);
8286
shared_module_bitbangio_spi_construct(self, clock, mosi, miso, args[ARG_baudrate].u_int);
8387
return (mp_obj_t)self;

shared-bindings/microcontroller/Pin.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626

2727
#include "shared-bindings/microcontroller/Pin.h"
2828

29+
#include "py/nlr.h"
30+
#include "py/obj.h"
31+
2932
//| .. currentmodule:: microcontroller
3033
//|
3134
//| :class:`Pin` --- Pin reference
@@ -44,3 +47,9 @@ const mp_obj_type_t mcu_pin_type = {
4447
{ &mp_type_type },
4548
.name = MP_QSTR_Pin,
4649
};
50+
51+
void assert_pin(mp_obj_t obj, bool none_ok) {
52+
if ((obj != mp_const_none || !none_ok) && !MP_OBJ_IS_TYPE(obj, &mcu_pin_type)) {
53+
nlr_raise(mp_obj_new_exception_msg(&mp_type_TypeError, "Expected a Pin"));
54+
}
55+
}

shared-bindings/microcontroller/Pin.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,6 @@
3232
// Type object used in Python. Should be shared between ports.
3333
extern const mp_obj_type_t mcu_pin_type;
3434

35+
void assert_pin(mp_obj_t obj, bool none_ok);
36+
3537
#endif // __MICROPY_INCLUDED_SHARED_BINDINGS_MICROCONTROLLER_PIN_H__

shared-bindings/nativeio/AnalogIn.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include "py/nlr.h"
3232
#include "py/objproperty.h"
3333
#include "py/runtime.h"
34+
#include "shared-bindings/microcontroller/Pin.h"
3435
#include "shared-bindings/nativeio/AnalogIn.h"
3536

3637
//| .. currentmodule:: nativeio
@@ -60,6 +61,7 @@ STATIC mp_obj_t nativeio_analogin_make_new(const mp_obj_type_t *type,
6061

6162
// 1st argument is the pin
6263
mp_obj_t pin_obj = args[0];
64+
assert_pin(pin_obj, false);
6365

6466
nativeio_analogin_obj_t *self = m_new_obj(nativeio_analogin_obj_t);
6567
self->base.type = &nativeio_analogin_type;

shared-bindings/nativeio/AnalogOut.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
#include "py/objproperty.h"
3131
#include "py/runtime.h"
32+
#include "shared-bindings/microcontroller/Pin.h"
3233
#include "shared-bindings/nativeio/AnalogOut.h"
3334

3435
//| .. currentmodule:: nativeio
@@ -57,11 +58,12 @@ STATIC mp_obj_t nativeio_analogout_make_new(const mp_obj_type_t *type, mp_uint_t
5758
// check arguments
5859
mp_arg_check_num(n_args, n_kw, 1, MP_OBJ_FUN_ARGS_MAX, true);
5960

61+
assert_pin(args[0], false);
62+
const mcu_pin_obj_t *pin = MP_OBJ_TO_PTR(args[0]);
63+
6064
nativeio_analogout_obj_t *self = m_new_obj(nativeio_analogout_obj_t);
6165
self->base.type = &nativeio_analogout_type;
6266

63-
const mcu_pin_obj_t *pin = MP_OBJ_TO_PTR(args[0]);
64-
6567
common_hal_nativeio_analogout_construct(self, pin);
6668

6769
return self;

shared-bindings/nativeio/DigitalInOut.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include "py/runtime.h"
3434
#include "py/mphal.h"
3535

36+
#include "shared-bindings/microcontroller/Pin.h"
3637
#include "shared-bindings/nativeio/DigitalInOut.h"
3738

3839
//| .. currentmodule:: nativeio
@@ -60,6 +61,7 @@ STATIC mp_obj_t nativeio_digitalinout_make_new(const mp_obj_type_t *type,
6061
nativeio_digitalinout_obj_t *self = m_new_obj(nativeio_digitalinout_obj_t);
6162
self->base.type = &nativeio_digitalinout_type;
6263

64+
assert_pin(args[0], false);
6365
mcu_pin_obj_t *pin = MP_OBJ_TO_PTR(args[0]);
6466
common_hal_nativeio_digitalinout_construct(self, pin);
6567

shared-bindings/nativeio/I2C.c

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
// This file contains all of the Python API definitions for the
2828
// nativeio.I2C class.
2929

30+
#include "shared-bindings/microcontroller/Pin.h"
3031
#include "shared-bindings/nativeio/I2C.h"
3132

3233
#include "py/runtime.h"
@@ -46,23 +47,25 @@
4647
//| :param int freq: The clock frequency
4748
//|
4849
STATIC mp_obj_t nativeio_i2c_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *pos_args) {
49-
mp_arg_check_num(n_args, n_kw, 0, MP_OBJ_FUN_ARGS_MAX, true);
50-
nativeio_i2c_obj_t *self = m_new_obj(nativeio_i2c_obj_t);
51-
self->base.type = &nativeio_i2c_type;
52-
mp_map_t kw_args;
53-
mp_map_init_fixed_table(&kw_args, n_kw, pos_args + n_args);
54-
enum { ARG_scl, ARG_sda, ARG_freq };
55-
static const mp_arg_t allowed_args[] = {
56-
{ MP_QSTR_scl, MP_ARG_REQUIRED | MP_ARG_OBJ },
57-
{ MP_QSTR_sda, MP_ARG_REQUIRED | MP_ARG_OBJ },
58-
{ MP_QSTR_freq, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 400000} },
59-
};
60-
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
61-
mp_arg_parse_all(n_args, pos_args, &kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
62-
const mcu_pin_obj_t* scl = MP_OBJ_TO_PTR(args[ARG_scl].u_obj);
63-
const mcu_pin_obj_t* sda = MP_OBJ_TO_PTR(args[ARG_sda].u_obj);
64-
common_hal_nativeio_i2c_construct(self, scl, sda, args[ARG_freq].u_int);
65-
return (mp_obj_t)self;
50+
mp_arg_check_num(n_args, n_kw, 0, MP_OBJ_FUN_ARGS_MAX, true);
51+
nativeio_i2c_obj_t *self = m_new_obj(nativeio_i2c_obj_t);
52+
self->base.type = &nativeio_i2c_type;
53+
mp_map_t kw_args;
54+
mp_map_init_fixed_table(&kw_args, n_kw, pos_args + n_args);
55+
enum { ARG_scl, ARG_sda, ARG_freq };
56+
static const mp_arg_t allowed_args[] = {
57+
{ MP_QSTR_scl, MP_ARG_REQUIRED | MP_ARG_OBJ },
58+
{ MP_QSTR_sda, MP_ARG_REQUIRED | MP_ARG_OBJ },
59+
{ MP_QSTR_freq, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 400000} },
60+
};
61+
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
62+
mp_arg_parse_all(n_args, pos_args, &kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
63+
assert_pin(args[ARG_scl].u_obj, false);
64+
assert_pin(args[ARG_sda].u_obj, false);
65+
const mcu_pin_obj_t* scl = MP_OBJ_TO_PTR(args[ARG_scl].u_obj);
66+
const mcu_pin_obj_t* sda = MP_OBJ_TO_PTR(args[ARG_sda].u_obj);
67+
common_hal_nativeio_i2c_construct(self, scl, sda, args[ARG_freq].u_int);
68+
return (mp_obj_t)self;
6669
}
6770

6871
//| .. method:: I2C.deinit()

shared-bindings/nativeio/PWMOut.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
#include "py/objproperty.h"
3030
#include "py/runtime.h"
31+
#include "shared-bindings/microcontroller/Pin.h"
3132
#include "shared-bindings/nativeio/PWMOut.h"
3233

3334
//| .. currentmodule:: nativeio
@@ -48,6 +49,7 @@
4849
STATIC mp_obj_t nativeio_pwmout_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
4950
mp_arg_check_num(n_args, n_kw, 1, MP_OBJ_FUN_ARGS_MAX, true);
5051
mp_obj_t pin_obj = args[0];
52+
assert_pin(pin_obj, false);
5153
const mcu_pin_obj_t *pin = MP_OBJ_TO_PTR(pin_obj);
5254

5355
// create PWM object from the given pin

shared-bindings/nativeio/SPI.c

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
#include <string.h>
3131

32+
#include "shared-bindings/microcontroller/Pin.h"
3233
#include "shared-bindings/nativeio/SPI.h"
3334

3435
#include "py/runtime.h"
@@ -59,28 +60,31 @@
5960
// TODO(tannewt): Support LSB SPI.
6061
// TODO(tannewt): Support phase, polarity and bit order.
6162
STATIC mp_obj_t nativeio_spi_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *pos_args) {
62-
mp_arg_check_num(n_args, n_kw, 0, MP_OBJ_FUN_ARGS_MAX, true);
63-
nativeio_spi_obj_t *self = m_new_obj(nativeio_spi_obj_t);
64-
self->base.type = &nativeio_spi_type;
65-
mp_map_t kw_args;
66-
mp_map_init_fixed_table(&kw_args, n_kw, pos_args + n_args);
67-
enum { ARG_clock, ARG_MOSI, ARG_MISO, ARG_baudrate, ARG_polarity, ARG_phase, ARG_bits, ARG_firstbit };
68-
static const mp_arg_t allowed_args[] = {
69-
{ MP_QSTR_clock, MP_ARG_REQUIRED | MP_ARG_OBJ },
70-
{ MP_QSTR_MOSI, MP_ARG_REQUIRED | MP_ARG_OBJ },
71-
{ MP_QSTR_MISO, MP_ARG_REQUIRED | MP_ARG_OBJ },
72-
{ MP_QSTR_baudrate, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 100000} },
73-
{ MP_QSTR_polarity, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 400000} },
74-
{ MP_QSTR_phase, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 400000} },
75-
{ MP_QSTR_bits, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 8} },
76-
};
77-
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
78-
mp_arg_parse_all(n_args, pos_args, &kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
79-
const mcu_pin_obj_t* clock = MP_OBJ_TO_PTR(args[ARG_clock].u_obj);
80-
const mcu_pin_obj_t* mosi = MP_OBJ_TO_PTR(args[ARG_MOSI].u_obj);
81-
const mcu_pin_obj_t* miso = MP_OBJ_TO_PTR(args[ARG_MISO].u_obj);
82-
common_hal_nativeio_spi_construct(self, clock, mosi, miso, args[ARG_baudrate].u_int);
83-
return (mp_obj_t)self;
63+
mp_arg_check_num(n_args, n_kw, 0, MP_OBJ_FUN_ARGS_MAX, true);
64+
nativeio_spi_obj_t *self = m_new_obj(nativeio_spi_obj_t);
65+
self->base.type = &nativeio_spi_type;
66+
mp_map_t kw_args;
67+
mp_map_init_fixed_table(&kw_args, n_kw, pos_args + n_args);
68+
enum { ARG_clock, ARG_MOSI, ARG_MISO, ARG_baudrate, ARG_polarity, ARG_phase, ARG_bits, ARG_firstbit };
69+
static const mp_arg_t allowed_args[] = {
70+
{ MP_QSTR_clock, MP_ARG_REQUIRED | MP_ARG_OBJ },
71+
{ MP_QSTR_MOSI, MP_ARG_REQUIRED | MP_ARG_OBJ },
72+
{ MP_QSTR_MISO, MP_ARG_REQUIRED | MP_ARG_OBJ },
73+
{ MP_QSTR_baudrate, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 100000} },
74+
{ MP_QSTR_polarity, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 400000} },
75+
{ MP_QSTR_phase, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 400000} },
76+
{ MP_QSTR_bits, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 8} },
77+
};
78+
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
79+
mp_arg_parse_all(n_args, pos_args, &kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
80+
assert_pin(args[ARG_clock].u_obj, false);
81+
assert_pin(args[ARG_MOSI].u_obj, true);
82+
assert_pin(args[ARG_MISO].u_obj, true);
83+
const mcu_pin_obj_t* clock = MP_OBJ_TO_PTR(args[ARG_clock].u_obj);
84+
const mcu_pin_obj_t* mosi = MP_OBJ_TO_PTR(args[ARG_MOSI].u_obj);
85+
const mcu_pin_obj_t* miso = MP_OBJ_TO_PTR(args[ARG_MISO].u_obj);
86+
common_hal_nativeio_spi_construct(self, clock, mosi, miso, args[ARG_baudrate].u_int);
87+
return (mp_obj_t)self;
8488
}
8589

8690
//| .. method:: SPI.deinit()

0 commit comments

Comments
 (0)