summaryrefslogtreecommitdiff
path: root/shared-bindings
diff options
context:
space:
mode:
authorCraig Forbes <cpforbes@starlake.org>2019-02-06 22:22:15 -0600
committerCraig Forbes <cpforbes@starlake.org>2019-02-06 22:22:15 -0600
commitde43911a6870eaeb3a8e18d6a5698c77d4e3c6fb (patch)
tree5db4160608e2b3f7522e5655f8aa3e6c47478717 /shared-bindings
parent041a84e8f962e3591d1aa565cd6cea5a73d6d882 (diff)
Remove usb_midi.PortIn and PortOut constructors.
Diffstat (limited to 'shared-bindings')
-rw-r--r--shared-bindings/usb_midi/PortIn.c11
-rw-r--r--shared-bindings/usb_midi/PortIn.h3
-rw-r--r--shared-bindings/usb_midi/PortOut.c11
-rw-r--r--shared-bindings/usb_midi/PortOut.h4
4 files changed, 6 insertions, 23 deletions
diff --git a/shared-bindings/usb_midi/PortIn.c b/shared-bindings/usb_midi/PortIn.c
index 6177cfa8d..356a81d52 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 89bb59b71..58d017fa0 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 e8cea56e8..6f4ce6716 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 dd42d7cdb..1eac2fa98 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);