summaryrefslogtreecommitdiff
path: root/extmod
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2023-03-08 14:10:02 +1100
committerDamien George <damien@micropython.org>2023-04-27 18:03:06 +1000
commitb1229efbd1509654dec6053865ab828d769e29db (patch)
treee1a65606dd1f0a8cfe2af08f9c4ff821fb575b02 /extmod
parente160fe7bc64212a3ce56f5478f208e2b4d343a8b (diff)
all: Fix spelling mistakes based on codespell check.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'extmod')
-rw-r--r--extmod/btstack/modbluetooth_btstack.c2
-rw-r--r--extmod/moduplatform.h2
-rw-r--r--extmod/modussl_axtls.c2
-rw-r--r--extmod/modussl_mbedtls.c4
-rw-r--r--extmod/nimble/hal/hal_uart.c2
-rw-r--r--extmod/nimble/modbluetooth_nimble.c8
6 files changed, 10 insertions, 10 deletions
diff --git a/extmod/btstack/modbluetooth_btstack.c b/extmod/btstack/modbluetooth_btstack.c
index 0e29c38ef..183c85a44 100644
--- a/extmod/btstack/modbluetooth_btstack.c
+++ b/extmod/btstack/modbluetooth_btstack.c
@@ -883,7 +883,7 @@ int mp_bluetooth_gatts_register_service_begin(bool append) {
if (!append) {
// This will reset the DB.
- // Becase the DB is statically allocated, there's no problem with just re-initing it.
+ // Because the DB is statically allocated, there's no problem with just re-initing it.
// Note this would be a memory leak if we enabled HAVE_MALLOC (there's no API to free the existing db).
att_db_util_init();
diff --git a/extmod/moduplatform.h b/extmod/moduplatform.h
index 42ed4de24..3597f7559 100644
--- a/extmod/moduplatform.h
+++ b/extmod/moduplatform.h
@@ -29,7 +29,7 @@
#include "py/misc.h" // For MP_STRINGIFY.
#include "py/mpconfig.h"
-// Preprocessor directives indentifying the platform.
+// Preprocessor directives identifying the platform.
// The (u)platform module itself is guarded by MICROPY_PY_UPLATFORM, see the
// .c file, but these are made available because they're generally usable.
// TODO: Add more architectures, compilers and libraries.
diff --git a/extmod/modussl_axtls.c b/extmod/modussl_axtls.c
index 2eae46504..77e942ec1 100644
--- a/extmod/modussl_axtls.c
+++ b/extmod/modussl_axtls.c
@@ -208,7 +208,7 @@ STATIC mp_uint_t ussl_socket_read(mp_obj_t o_in, void *buf, mp_uint_t size, int
// default is to perform complete handshake in constructor, so
// this should not happen in blocking mode. On the other hand,
// in nonblocking mode EAGAIN (comparing to the alternative of
- // looping) is really preferrable.
+ // looping) is really preferable.
if (o->blocking) {
continue;
} else {
diff --git a/extmod/modussl_mbedtls.c b/extmod/modussl_mbedtls.c
index eea2d7953..74a59fdb6 100644
--- a/extmod/modussl_mbedtls.c
+++ b/extmod/modussl_mbedtls.c
@@ -333,7 +333,7 @@ STATIC mp_uint_t socket_read(mp_obj_t o_in, void *buf, mp_uint_t size, int *errc
} else if (ret == MBEDTLS_ERR_SSL_WANT_WRITE) {
// If handshake is not finished, read attempt may end up in protocol
// wanting to write next handshake message. The same may happen with
- // renegotation.
+ // renegotiation.
ret = MP_EWOULDBLOCK;
o->poll_mask = MP_STREAM_POLL_WR;
} else {
@@ -361,7 +361,7 @@ STATIC mp_uint_t socket_write(mp_obj_t o_in, const void *buf, mp_uint_t size, in
} else if (ret == MBEDTLS_ERR_SSL_WANT_READ) {
// If handshake is not finished, write attempt may end up in protocol
// wanting to read next handshake message. The same may happen with
- // renegotation.
+ // renegotiation.
ret = MP_EWOULDBLOCK;
o->poll_mask = MP_STREAM_POLL_RD;
} else {
diff --git a/extmod/nimble/hal/hal_uart.c b/extmod/nimble/hal/hal_uart.c
index 7713f75d8..f4a9319c8 100644
--- a/extmod/nimble/hal/hal_uart.c
+++ b/extmod/nimble/hal/hal_uart.c
@@ -84,7 +84,7 @@ void hal_uart_start_tx(uint32_t port) {
mp_bluetooth_hci_uart_write(mp_bluetooth_hci_cmd_buf, len);
if (len > 0) {
- // Allow modbluetooth bindings to hook "sent packet" (e.g. to unstall l2cap channels).
+ // Allow modbluetooth bindings to hook "sent packet" (e.g. to un-stall l2cap channels).
mp_bluetooth_nimble_sent_hci_packet();
}
}
diff --git a/extmod/nimble/modbluetooth_nimble.c b/extmod/nimble/modbluetooth_nimble.c
index d9d4c1322..e23ffbf0f 100644
--- a/extmod/nimble/modbluetooth_nimble.c
+++ b/extmod/nimble/modbluetooth_nimble.c
@@ -652,7 +652,7 @@ int mp_bluetooth_init(void) {
// By default, just register the default gap/gatt service.
ble_svc_gap_init();
ble_svc_gatt_init();
- // The preceeding two calls allocate service definitions on the heap,
+ // The preceding two calls allocate service definitions on the heap,
// then we must now call gatts_start to register those services
// and free the heap memory.
// Otherwise it will be realloc'ed on the next stack startup.
@@ -1537,7 +1537,7 @@ STATIC void destroy_l2cap_channel() {
STATIC void unstall_l2cap_channel(void) {
// Whenever we send an HCI packet and the sys mempool is now less than 1/4 full,
- // we can unstall the L2CAP channel if it was marked as "mem_stalled" by
+ // we can un-stall the L2CAP channel if it was marked as "mem_stalled" by
// mp_bluetooth_l2cap_send. (This happens if the pool is half-empty).
mp_bluetooth_nimble_l2cap_channel_t *chan = MP_STATE_PORT(bluetooth_nimble_root_pointers)->l2cap_chan;
if (!chan || !chan->mem_stalled) {
@@ -1644,7 +1644,7 @@ STATIC int l2cap_channel_event(struct ble_l2cap_event *event, void *arg) {
case BLE_L2CAP_EVENT_COC_TX_UNSTALLED: {
DEBUG_printf("l2cap_channel_event: tx_unstalled: conn_handle=%d status=%d\n", event->tx_unstalled.conn_handle, event->tx_unstalled.status);
assert(event->tx_unstalled.conn_handle == chan->chan->conn_handle);
- // Don't unstall if we're still waiting for room in the sys pool.
+ // Don't un-stall if we're still waiting for room in the sys pool.
if (!chan->mem_stalled) {
ble_l2cap_get_chan_info(event->receive.chan, &info);
// Map status to {0,1} (i.e. "sent everything", or "partial send").
@@ -1802,7 +1802,7 @@ int mp_bluetooth_l2cap_send(uint16_t conn_handle, uint16_t cid, const uint8_t *b
err = ble_l2cap_send(chan->chan, sdu_tx);
if (err == BLE_HS_ESTALLED) {
// Stalled means that this one will still send but any future ones
- // will fail until we receive an unstalled event.
+ // will fail until we receive an un-stalled event.
DEBUG_printf("mp_bluetooth_l2cap_send: credit stall\n");
*stalled = true;
err = 0;