diff options
| author | Scott Shawcroft <scott.shawcroft@gmail.com> | 2017-02-22 20:10:10 +0100 |
|---|---|---|
| committer | Scott Shawcroft <scott.shawcroft@gmail.com> | 2017-02-22 20:10:10 +0100 |
| commit | 4c05086661bd486490442318934a57b93304aa0e (patch) | |
| tree | 1986e043ecc710e377b76fcf39cfb53fcb198300 /shared-bindings/microcontroller/Pin.c | |
| parent | fc718d943794d294a5f80d1a041f13f1522a81ab (diff) | |
Check that neopixel write is actually given a DigitalInOut.
Diffstat (limited to 'shared-bindings/microcontroller/Pin.c')
| -rw-r--r-- | shared-bindings/microcontroller/Pin.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shared-bindings/microcontroller/Pin.c b/shared-bindings/microcontroller/Pin.c index ca717fe23..fd5285192 100644 --- a/shared-bindings/microcontroller/Pin.c +++ b/shared-bindings/microcontroller/Pin.c @@ -74,7 +74,7 @@ const mp_obj_type_t mcu_pin_type = { void assert_pin(mp_obj_t obj, bool none_ok) { if ((obj != mp_const_none || !none_ok) && !MP_OBJ_IS_TYPE(obj, &mcu_pin_type)) { - nlr_raise(mp_obj_new_exception_msg(&mp_type_TypeError, "Expected a Pin")); + nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_TypeError, "Expected a %q", mcu_pin_type.name)); } } |
