diff --git a/shared-bindings/usb_midi/PortIn.c b/shared-bindings/usb_midi/PortIn.c index 6177cfa8d7..356a81d52c 100644 --- a/shared-bindings/usb_midi/PortIn.c +++ b/shared-bindings/usb_midi/PortIn.c @@ -43,16 +43,12 @@ //| //| .. class:: PortIn() //| -//| Not currently dynamically supported. +//| You cannot create an instance of `usb_midi.PortIn`. //| -//| PortIn objects are constructed for every corresponding entry in the USB descriptor and added -//| to the ``usb_midi.ports`` tuple. +//| PortIn objects are constructed for every corresponding entry in the USB +//| descriptor and added to the ``usb_midi.ports`` tuple. //| -STATIC mp_obj_t usb_midi_portin_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { - return mp_const_none; -} - // These are standard stream methods. Code is in py/stream.c. // //| .. method:: read(nbytes=None) @@ -120,7 +116,6 @@ STATIC const mp_stream_p_t usb_midi_portin_stream_p = { const mp_obj_type_t usb_midi_portin_type = { { &mp_type_type }, .name = MP_QSTR_PortIn, - .make_new = usb_midi_portin_make_new, .getiter = mp_identity_getiter, .iternext = mp_stream_unbuffered_iter, .protocol = &usb_midi_portin_stream_p, diff --git a/shared-bindings/usb_midi/PortIn.h b/shared-bindings/usb_midi/PortIn.h index 89bb59b712..58d017fa02 100644 --- a/shared-bindings/usb_midi/PortIn.h +++ b/shared-bindings/usb_midi/PortIn.h @@ -31,9 +31,6 @@ extern const mp_obj_type_t usb_midi_portin_type; -// Construct an underlying UART object. -extern void common_hal_usb_midi_portin_construct(usb_midi_portin_obj_t *self, - uint8_t receiver_buffer_size); // Read characters. extern size_t common_hal_usb_midi_portin_read(usb_midi_portin_obj_t *self, uint8_t *data, size_t len, int *errcode); diff --git a/shared-bindings/usb_midi/PortOut.c b/shared-bindings/usb_midi/PortOut.c index e8cea56e86..6f4ce67165 100644 --- a/shared-bindings/usb_midi/PortOut.c +++ b/shared-bindings/usb_midi/PortOut.c @@ -43,16 +43,12 @@ //| //| .. class:: PortOut() //| -//| Not currently dynamically supported. +//| You cannot create an instance of `usb_midi.PortOut`. //| -//| PortOut objects are constructed for every corresponding entry in the USB descriptor and added -//| to the ``usb_midi.ports`` tuple. +//| PortOut objects are constructed for every corresponding entry in the USB +//| descriptor and added to the ``usb_midi.ports`` tuple. //| -STATIC mp_obj_t usb_midi_portout_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { - return mp_const_none; -} - // These are standard stream methods. Code is in py/stream.c. // //| .. method:: write(buf) @@ -102,7 +98,6 @@ STATIC const mp_stream_p_t usb_midi_portout_stream_p = { const mp_obj_type_t usb_midi_portout_type = { { &mp_type_type }, .name = MP_QSTR_PortOut, - .make_new = usb_midi_portout_make_new, .getiter = mp_identity_getiter, .iternext = mp_stream_unbuffered_iter, .protocol = &usb_midi_portout_stream_p, diff --git a/shared-bindings/usb_midi/PortOut.h b/shared-bindings/usb_midi/PortOut.h index dd42d7cdb9..1eac2fa985 100644 --- a/shared-bindings/usb_midi/PortOut.h +++ b/shared-bindings/usb_midi/PortOut.h @@ -31,10 +31,6 @@ extern const mp_obj_type_t usb_midi_portout_type; -// Construct an underlying UART object. -extern void common_hal_usb_midi_portout_construct(usb_midi_portout_obj_t *self, - uint8_t receiver_buffer_size); - // Write characters. len is in characters NOT bytes! extern size_t common_hal_usb_midi_portout_write(usb_midi_portout_obj_t *self, const uint8_t *data, size_t len, int *errcode); diff --git a/shared-module/usb_midi/PortIn.c b/shared-module/usb_midi/PortIn.c index b256c59370..31e320baab 100644 --- a/shared-module/usb_midi/PortIn.c +++ b/shared-module/usb_midi/PortIn.c @@ -28,9 +28,6 @@ #include "supervisor/shared/translate.h" #include "tusb.h" -void common_hal_usb_midi_portin_construct(usb_midi_portin_obj_t *self, uint8_t receiver_buffer_size) { -} - size_t common_hal_usb_midi_portin_read(usb_midi_portin_obj_t *self, uint8_t *data, size_t len, int *errcode) { return tud_midi_read(data, len); } diff --git a/shared-module/usb_midi/PortOut.c b/shared-module/usb_midi/PortOut.c index 3b9998c73a..99a4fad438 100644 --- a/shared-module/usb_midi/PortOut.c +++ b/shared-module/usb_midi/PortOut.c @@ -28,9 +28,6 @@ #include "supervisor/shared/translate.h" #include "tusb.h" -void common_hal_usb_midi_portout_construct(usb_midi_portout_obj_t *self) { -} - size_t common_hal_usb_midi_portout_write(usb_midi_portout_obj_t *self, const uint8_t *data, size_t len, int *errcode) { return tud_midi_write(0, data, len); }