summaryrefslogtreecommitdiff
path: root/shared-bindings/busio/UART.c
diff options
context:
space:
mode:
authordherrada <dylan.herrada@gmail.com>2020-04-29 15:45:19 -0400
committerdherrada <dylan.herrada@gmail.com>2020-04-29 15:45:19 -0400
commit093461e81670d8ad635d8f893a44426a46b9779c (patch)
treeb3ee41f3d3bb21a940faff20bac059db84188e34 /shared-bindings/busio/UART.c
parentdeccdcc1d668a9e65036872aa0a3064ae9ec959c (diff)
Fixed indentation
Diffstat (limited to 'shared-bindings/busio/UART.c')
-rw-r--r--shared-bindings/busio/UART.c88
1 files changed, 44 insertions, 44 deletions
diff --git a/shared-bindings/busio/UART.c b/shared-bindings/busio/UART.c
index e5d123ce7..7c5c6ec2b 100644
--- a/shared-bindings/busio/UART.c
+++ b/shared-bindings/busio/UART.c
@@ -141,9 +141,9 @@ STATIC mp_obj_t busio_uart_make_new(const mp_obj_type_t *type, size_t n_args, co
return (mp_obj_t)self;
}
-//| def deinit(self, ) -> Any:
-//| """Deinitialises the UART and releases any hardware resources for reuse."""
-//| ...
+//| def deinit(self, ) -> Any:
+//| """Deinitialises the UART and releases any hardware resources for reuse."""
+//| ...
STATIC mp_obj_t busio_uart_obj_deinit(mp_obj_t self_in) {
busio_uart_obj_t *self = MP_OBJ_TO_PTR(self_in);
common_hal_busio_uart_deinit(self);
@@ -157,15 +157,15 @@ STATIC void check_for_deinit(busio_uart_obj_t *self) {
}
}
-//| def __enter__(self, ) -> Any:
-//| """No-op used by Context Managers."""
-//| ...
+//| def __enter__(self, ) -> Any:
+//| """No-op used by Context Managers."""
+//| ...
// Provided by context manager helper.
-//| def __exit__(self, ) -> Any:
-//| """Automatically deinitializes the hardware when exiting a context. See
-//| :ref:`lifetime-and-contextmanagers` for more info."""
-//| ...
+//| def __exit__(self, ) -> Any:
+//| """Automatically deinitializes the hardware when exiting a context. See
+//| :ref:`lifetime-and-contextmanagers` for more info."""
+//| ...
STATIC mp_obj_t busio_uart_obj___exit__(size_t n_args, const mp_obj_t *args) {
(void)n_args;
common_hal_busio_uart_deinit(args[0]);
@@ -175,40 +175,40 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(busio_uart___exit___obj, 4, 4, busio_
// These are standard stream methods. Code is in py/stream.c.
//
-//| 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.
+//| 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.
//|
-//| :return: Data read
-//| :rtype: bytes or None"""
-//| ...
+//| :return: Data read
+//| :rtype: bytes or None"""
+//| ...
-//| def readinto(self, buf: Any) -> Any:
-//| """Read bytes into the ``buf``. Read at most ``len(buf)`` bytes.
+//| def readinto(self, buf: Any) -> Any:
+//| """Read bytes into the ``buf``. Read at most ``len(buf)`` bytes.
//|
-//| :return: number of bytes read and stored into ``buf``
-//| :rtype: int or None (on a non-blocking error)
+//| :return: number of bytes read and stored into ``buf``
+//| :rtype: int or None (on a non-blocking error)
//|
-//| *New in CircuitPython 4.0:* No length parameter is permitted."""
-//| ...
+//| *New in CircuitPython 4.0:* No length parameter is permitted."""
+//| ...
-//| def readline(self, ) -> Any:
-//| """Read a line, ending in a newline character.
+//| def readline(self, ) -> Any:
+//| """Read a line, ending in a newline character.
//|
-//| :return: the line read
-//| :rtype: int or None"""
-//| ...
+//| :return: the line read
+//| :rtype: int or None"""
+//| ...
-//| def write(self, buf: Any) -> Any:
-//| """Write the buffer of bytes to the bus.
+//| def write(self, buf: Any) -> Any:
+//| """Write the buffer of bytes to the bus.
//|
-//| *New in CircuitPython 4.0:* ``buf`` must be bytes, not a string.
+//| *New in CircuitPython 4.0:* ``buf`` must be bytes, not a string.
//|
-//| :return: the number of bytes written
-//| :rtype: int or None"""
-//| ...
+//| :return: the number of bytes written
+//| :rtype: int or None"""
+//| ...
// These three methods are used by the shared stream methods.
STATIC mp_uint_t busio_uart_read(mp_obj_t self_in, void *buf_in, mp_uint_t size, int *errcode) {
@@ -252,8 +252,8 @@ STATIC mp_uint_t busio_uart_ioctl(mp_obj_t self_in, mp_uint_t request, mp_uint_t
return ret;
}
-//| baudrate: Any = ...
-//| """The current baudrate."""
+//| baudrate: Any = ...
+//| """The current baudrate."""
//|
STATIC mp_obj_t busio_uart_obj_get_baudrate(mp_obj_t self_in) {
busio_uart_obj_t *self = MP_OBJ_TO_PTR(self_in);
@@ -278,8 +278,8 @@ const mp_obj_property_t busio_uart_baudrate_obj = {
(mp_obj_t)&mp_const_none_obj},
};
-//| in_waiting: Any = ...
-//| """The number of bytes in the input buffer, available to be read"""
+//| in_waiting: Any = ...
+//| """The number of bytes in the input buffer, available to be read"""
//|
STATIC mp_obj_t busio_uart_obj_get_in_waiting(mp_obj_t self_in) {
busio_uart_obj_t *self = MP_OBJ_TO_PTR(self_in);
@@ -295,8 +295,8 @@ const mp_obj_property_t busio_uart_in_waiting_obj = {
(mp_obj_t)&mp_const_none_obj},
};
-//| timeout: Any = ...
-//| """The current timeout, in seconds (float)."""
+//| timeout: Any = ...
+//| """The current timeout, in seconds (float)."""
//|
STATIC mp_obj_t busio_uart_obj_get_timeout(mp_obj_t self_in) {
busio_uart_obj_t *self = MP_OBJ_TO_PTR(self_in);
@@ -323,8 +323,8 @@ const mp_obj_property_t busio_uart_timeout_obj = {
(mp_obj_t)&mp_const_none_obj},
};
-//| def reset_input_buffer(self, ) -> Any: ...
-//| """Discard any unread characters in the input buffer."""
+//| def reset_input_buffer(self, ) -> Any: ...
+//| """Discard any unread characters in the input buffer."""
//|
STATIC mp_obj_t busio_uart_obj_reset_input_buffer(mp_obj_t self_in) {
busio_uart_obj_t *self = MP_OBJ_TO_PTR(self_in);
@@ -334,7 +334,7 @@ STATIC mp_obj_t busio_uart_obj_reset_input_buffer(mp_obj_t self_in) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(busio_uart_reset_input_buffer_obj, busio_uart_obj_reset_input_buffer);
-//| class busio:
+//| class Parity:
//| """Enum-like class to define the parity used to verify correct data transfer."""
//|
//| def __init__(self, ):