summaryrefslogtreecommitdiff
path: root/shared-bindings/usb_midi/PortIn.c
diff options
context:
space:
mode:
Diffstat (limited to 'shared-bindings/usb_midi/PortIn.c')
-rw-r--r--shared-bindings/usb_midi/PortIn.c45
1 files changed, 21 insertions, 24 deletions
diff --git a/shared-bindings/usb_midi/PortIn.c b/shared-bindings/usb_midi/PortIn.c
index e2df56e95..9d9310b47 100644
--- a/shared-bindings/usb_midi/PortIn.c
+++ b/shared-bindings/usb_midi/PortIn.c
@@ -35,39 +35,36 @@
#include "py/stream.h"
#include "supervisor/shared/translate.h"
-
-//| .. currentmodule:: usb_midi
-//|
-//| :class:`PortIn` -- receives midi commands over USB
-//| ===================================================
-//|
-//| .. class:: PortIn()
+//| class PortIn:
+//| """Receives midi commands over USB"""
//|
-//| You cannot create an instance of `usb_midi.PortIn`.
+//| def __init__(self):
+//| """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."""
+//| ...
//|
// These are standard stream methods. Code is in py/stream.c.
//
-//| .. method:: read(nbytes=None)
-//|
-//| Read characters. If ``nbytes`` is specified then read at most that many
-//| bytes. Otherwise, read everything that arrives until the connection
-//| times out. Providing the number of bytes expected is highly recommended
-//| because it will be faster.
-//|
-//| :return: Data read
-//| :rtype: bytes or None
+//| def read(self, nbytes: Any = None) -> Any:
+//| """Read characters. If ``nbytes`` is specified then read at most that many
+//| bytes. Otherwise, read everything that arrives until the connection
+//| times out. Providing the number of bytes expected is highly recommended
+//| because it will be faster.
//|
-//| .. method:: readinto(buf, nbytes=None)
+//| :return: Data read
+//| :rtype: bytes or None"""
+//| ...
//|
-//| Read bytes into the ``buf``. If ``nbytes`` is specified then read at most
-//| that many bytes. Otherwise, read at most ``len(buf)`` bytes.
+//| def readinto(self, buf: Any, nbytes: Any = None) -> Any:
+//| """Read bytes into the ``buf``. If ``nbytes`` is specified then read at most
+//| that many bytes. Otherwise, read at most ``len(buf)`` bytes.
//|
-//| :return: number of bytes read and stored into ``buf``
-//| :rtype: bytes or None
+//| :return: number of bytes read and stored into ``buf``
+//| :rtype: bytes or None"""
+//| ...
//|
// These three methods are used by the shared stream methods.