Skip to content

Commit

Permalink
fix typos (partial) detected by codepell
Browse files Browse the repository at this point in the history
  • Loading branch information
hathach committed Mar 18, 2023
1 parent d9fee4c commit fecc1bd
Show file tree
Hide file tree
Showing 137 changed files with 253 additions and 243 deletions.
13 changes: 13 additions & 0 deletions .codespell/ignore-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,16 @@ ans
ure
clen
ser
endianess
pris
synopsys
reenable
dout
wel
iput
hsi
astroid
busses
cyphertext
dum
extint
2 changes: 1 addition & 1 deletion .codespellrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ exclude-file = .codespell/exclude-file.txt
check-filenames =
check-hidden =
count =
skip = .cproject,.git,./lib,./locale
skip = .cproject,.git,./lib,./locale,ACKNOWLEDGEMENTS
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repos:
hooks:
- id: codespell
#args: [-w]
exclude: ^locale/
exclude: ^(locale/|lib/)
- repo: local
hooks:
- id: translations
Expand Down
2 changes: 1 addition & 1 deletion devices/ble_hci/common-hal/_bleio/Adapter.c
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ mp_obj_t common_hal_bleio_adapter_start_scan(bleio_adapter_obj_t *self, uint8_t

if (self->scan_results != NULL) {
if (!shared_module_bleio_scanresults_get_done(self->scan_results)) {
mp_raise_bleio_BluetoothError(translate("Scan already in progess. Stop with stop_scan."));
mp_raise_bleio_BluetoothError(translate("Scan already in progress. Stop with stop_scan."));
}
self->scan_results = NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion devices/ble_hci/common-hal/_bleio/Adapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ typedef struct _bleio_adapter_obj_t {
uint16_t manufacturer;
uint16_t lmp_subversion;

// Used to monitor advertising timeout for legacy avertising.
// Used to monitor advertising timeout for legacy advertising.
uint64_t advertising_start_ticks;
uint64_t advertising_timeout_msecs; // If zero, do not check.

Expand Down
2 changes: 1 addition & 1 deletion devices/ble_hci/common-hal/_bleio/Connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ void common_hal_bleio_connection_set_connection_interval(bleio_connection_intern
// (gattc_char->char_props.write ? CHAR_PROP_WRITE : 0) |
// (gattc_char->char_props.write_wo_resp ? CHAR_PROP_WRITE_NO_RESPONSE : 0);

// // Call common_hal_bleio_characteristic_construct() to initalize some fields and set up evt handler.
// // Call common_hal_bleio_characteristic_construct() to initialize some fields and set up evt handler.
// common_hal_bleio_characteristic_construct(
// characteristic, m_char_discovery_service, gattc_char->handle_value, uuid,
// props, SECURITY_MODE_OPEN, SECURITY_MODE_OPEN,
Expand Down
4 changes: 2 additions & 2 deletions devices/ble_hci/common-hal/_bleio/att.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ STATIC uint8_t bleio_properties_to_ble_spec_properties(uint8_t bleio_properties)
return ble_spec_properties;
}

// FIX not currently used; reenable when used.
// FIX not currently used; re-enable when used.
#if 0
STATIC uint8_t ble_spec_properties_to_bleio_properties(uint8_t ble_spec_properties) {
uint8_t bleio_properties = 0;
Expand Down Expand Up @@ -964,7 +964,7 @@ static void process_read_group_req(uint16_t conn_handle, uint16_t mtu, uint8_t d
// Keep track of the first one to make sure.
size_t sizeof_first_service_uuid = 0;

// Size of a single bt_att_group_data chunk. Start with the intial size, and
// Size of a single bt_att_group_data chunk. Start with the initial size, and
// add the uuid size in the loop below.
size_t data_length = sizeof(struct bt_att_group_data);

Expand Down
4 changes: 2 additions & 2 deletions devices/ble_hci/common-hal/_bleio/hci_include/att_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ struct bt_att_read_mult_req {
uint16_t handles[];
} __packed;

/* Read Multiple Respose */
/* Read Multiple Response */
#define BT_ATT_OP_READ_MULT_RSP 0x0f
struct bt_att_read_mult_rsp {
uint8_t _dummy[0];
Expand Down Expand Up @@ -243,7 +243,7 @@ struct bt_att_read_mult_vl_req {
uint16_t handles[];
} __packed;

/* Read Multiple Respose */
/* Read Multiple Response */
#define BT_ATT_OP_READ_MULT_VL_RSP 0x21
struct bt_att_read_mult_vl_rsp {
uint16_t len;
Expand Down
4 changes: 2 additions & 2 deletions docs/library/collections.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Classes

.. function:: deque(iterable, maxlen[, flags])

Deques (double-ended queues) are a list-like container that support O(1)
appends and pops from either side of the deque. New deques are created
Dequeues (double-ended queues) are a list-like container that support O(1)
appends and pops from either side of the deque. New dequeues are created
using the following arguments:

- *iterable* must be the empty tuple, and the new deque is created empty.
Expand Down
2 changes: 1 addition & 1 deletion examples/natmod/features1/features1.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ mp_obj_t mpy_init(mp_obj_fun_bc_t *self, size_t n_args, size_t n_kw, mp_obj_t *a
// This must be first, it sets up the globals dict and other things
MP_DYNRUNTIME_INIT_ENTRY

// Messages can be printed as usualy
// Messages can be printed as usually
mp_printf(&mp_plat_print, "initialising module self=%p\n", self);

// Make the functions available in the module's namespace
Expand Down
4 changes: 2 additions & 2 deletions lib/cmsis/inc/core_armv81mml.h
Original file line number Diff line number Diff line change
Expand Up @@ -2162,7 +2162,7 @@ __STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */
reg_value = (reg_value |
((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
(PriorityGroupTmp << 8U) ); /* Insert write key and priorty group */
(PriorityGroupTmp << 8U) ); /* Insert write key and priority group */
SCB->AIRCR = reg_value;
}

Expand Down Expand Up @@ -2536,7 +2536,7 @@ __STATIC_INLINE void TZ_NVIC_SetPriorityGrouping_NS(uint32_t PriorityGroup)
reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */
reg_value = (reg_value |
((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
(PriorityGroupTmp << 8U) ); /* Insert write key and priorty group */
(PriorityGroupTmp << 8U) ); /* Insert write key and priority group */
SCB_NS->AIRCR = reg_value;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/cmsis/inc/core_sc300.h
Original file line number Diff line number Diff line change
Expand Up @@ -1467,7 +1467,7 @@ __STATIC_INLINE void __NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */
reg_value = (reg_value |
((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) |
(PriorityGroupTmp << 8U) ); /* Insert write key and priorty group */
(PriorityGroupTmp << 8U) ); /* Insert write key and priority group */
SCB->AIRCR = reg_value;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/cmsis/inc/mpu_armv8.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
* \param SH Defines the Shareability domain for this memory region.
* \param RO Read-Only: Set to 1 for a read-only memory region.
* \param NP Non-Privileged: Set to 1 for a non-privileged memory region.
* \oaram XN eXecute Never: Set to 1 for a non-executable memory region.
* \param XN eXecute Never: Set to 1 for a non-executable memory region.
*/
#define ARM_MPU_RBAR(BASE, SH, RO, NP, XN) \
((BASE & MPU_RBAR_BASE_Msk) | \
Expand Down
6 changes: 3 additions & 3 deletions lib/libm_dbl/__rem_pio2_large.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@
* z = (z-x[i])*2**24
*
*
* y[] ouput result in an array of double precision numbers.
* y[] output result in an array of double precision numbers.
* The dimension of y[] is:
* 24-bit precision 1
* 53-bit precision 2
* 64-bit precision 2
* 113-bit precision 3
* The actual value is the sum of them. Thus for 113-bit
* precison, one may have to do something like:
* precision, one may have to do something like:
*
* long double t,w,r_head, r_tail;
* t = (long double)y[2] + (long double)y[1];
Expand Down Expand Up @@ -78,7 +78,7 @@
* jk+1 must be 2 larger than you might expect so that our
* recomputation test works. (Up to 24 bits in the integer
* part (the 24 bits of it that we compute) and 23 bits in
* the fraction part may be lost to cancelation before we
* the fraction part may be lost to cancellation before we
* recompute.)
*
* jz local integer variable indicating the number of
Expand Down
2 changes: 1 addition & 1 deletion lib/libm_dbl/fmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ double fmod(double x, double y)
int sx = ux.i>>63;
uint64_t i;

/* in the followings uxi should be ux.i, but then gcc wrongly adds */
/* in the following uxi should be ux.i, but then gcc wrongly adds */
/* float load/store to inner loops ruining performance and code size */
uint64_t uxi = ux.i;

Expand Down
2 changes: 1 addition & 1 deletion lib/libm_dbl/sqrt.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* If (2) is false, then q = q ; otherwise q = q + 2 .
* i+1 i i+1 i
*
* With some algebric manipulation, it is not difficult to see
* With some algebraic manipulation, it is not difficult to see
* that (2) is equivalent to
* -(i+1)
* s + 2 <= y (3)
Expand Down
12 changes: 6 additions & 6 deletions lib/littlefs/lfs1.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ enum lfs1_open_flags {
LFS1_F_DIRTY = 0x10000, // File does not match storage
LFS1_F_WRITING = 0x20000, // File has been written since last flush
LFS1_F_READING = 0x40000, // File has been read since last flush
LFS1_F_ERRED = 0x80000, // An error occured during write
LFS1_F_ERRED = 0x80000, // An error occurred during write
};

// File seek flags
Expand All @@ -111,25 +111,25 @@ struct lfs1_config {
// information to the block device operations
void *context;

// Read a region in a block. Negative error codes are propogated
// Read a region in a block. Negative error codes are propagated
// to the user.
int (*read)(const struct lfs1_config *c, lfs1_block_t block,
lfs1_off_t off, void *buffer, lfs1_size_t size);

// Program a region in a block. The block must have previously
// been erased. Negative error codes are propogated to the user.
// been erased. Negative error codes are propagated to the user.
// May return LFS1_ERR_CORRUPT if the block should be considered bad.
int (*prog)(const struct lfs1_config *c, lfs1_block_t block,
lfs1_off_t off, const void *buffer, lfs1_size_t size);

// Erase a block. A block must be erased before being programmed.
// The state of an erased block is undefined. Negative error codes
// are propogated to the user.
// are propagated to the user.
// May return LFS1_ERR_CORRUPT if the block should be considered bad.
int (*erase)(const struct lfs1_config *c, lfs1_block_t block);

// Sync the state of the underlying block device. Negative error codes
// are propogated to the user.
// are propagated to the user.
int (*sync)(const struct lfs1_config *c);

// Minimum size of a block read. This determines the size of read buffers.
Expand Down Expand Up @@ -484,7 +484,7 @@ int lfs1_dir_rewind(lfs1_t *lfs1, lfs1_dir_t *dir);
// Returns a negative error code on failure.
int lfs1_traverse(lfs1_t *lfs1, int (*cb)(void*, lfs1_block_t), void *data);

// Prunes any recoverable errors that may have occured in the filesystem
// Prunes any recoverable errors that may have occurred in the filesystem
//
// Not needed to be called by user unless an operation is interrupted
// but the filesystem is still mounted. This is already called on first
Expand Down
6 changes: 3 additions & 3 deletions lib/littlefs/lfs2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1449,7 +1449,7 @@ static int lfs2_dir_alloc(lfs2_t *lfs2, lfs2_mdir_t *dir) {
}
}

// zero for reproducability in case initial block is unreadable
// zero for reproducibility in case initial block is unreadable
dir->rev = 0;

// rather than clobbering one of the blocks we just pretend
Expand Down Expand Up @@ -1643,7 +1643,7 @@ static int lfs2_dir_compact(lfs2_t *lfs2,
return err;
}

// welp, we tried, if we ran out of space there's not much
// whelp, we tried, if we ran out of space there's not much
// we can do, we'll error later if we've become frozen
if (!err) {
end = begin;
Expand Down Expand Up @@ -4037,7 +4037,7 @@ static int lfs2_fs_relocate(lfs2_t *lfs2,
lfs2_fs_prepmove(lfs2, 0x3ff, NULL);
}

// replace bad pair, either we clean up desync, or no desync occured
// replace bad pair, either we clean up desync, or no desync occurred
lfs2_pair_tole32(newpair);
err = lfs2_dir_commit(lfs2, &parent, LFS2_MKATTRS(
{LFS2_MKTAG_IF(moveid != 0x3ff,
Expand Down
14 changes: 7 additions & 7 deletions lib/littlefs/lfs2.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,34 +159,34 @@ struct lfs2_config {
// information to the block device operations
void *context;

// Read a region in a block. Negative error codes are propogated
// Read a region in a block. Negative error codes are propagated
// to the user.
int (*read)(const struct lfs2_config *c, lfs2_block_t block,
lfs2_off_t off, void *buffer, lfs2_size_t size);

// Program a region in a block. The block must have previously
// been erased. Negative error codes are propogated to the user.
// been erased. Negative error codes are propagated to the user.
// May return LFS2_ERR_CORRUPT if the block should be considered bad.
int (*prog)(const struct lfs2_config *c, lfs2_block_t block,
lfs2_off_t off, const void *buffer, lfs2_size_t size);

// Erase a block. A block must be erased before being programmed.
// The state of an erased block is undefined. Negative error codes
// are propogated to the user.
// are propagated to the user.
// May return LFS2_ERR_CORRUPT if the block should be considered bad.
int (*erase)(const struct lfs2_config *c, lfs2_block_t block);

// Sync the state of the underlying block device. Negative error codes
// are propogated to the user.
// are propagated to the user.
int (*sync)(const struct lfs2_config *c);

#ifdef LFS2_THREADSAFE
// Lock the underlying block device. Negative error codes
// are propogated to the user.
// are propagated to the user.
int (*lock)(const struct lfs2_config *c);

// Unlock the underlying block device. Negative error codes
// are propogated to the user.
// are propagated to the user.
int (*unlock)(const struct lfs2_config *c);
#endif

Expand Down Expand Up @@ -479,7 +479,7 @@ int lfs2_stat(lfs2_t *lfs2, const char *path, struct lfs2_info *info);
// Returns the size of the attribute, or a negative error code on failure.
// Note, the returned size is the size of the attribute on disk, irrespective
// of the size of the buffer. This can be used to dynamically allocate a buffer
// or check for existance.
// or check for existence.
lfs2_ssize_t lfs2_getattr(lfs2_t *lfs2, const char *path,
uint8_t type, void *buffer, lfs2_size_t size);

Expand Down
4 changes: 2 additions & 2 deletions lib/oofatfs/diskio.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

/*-----------------------------------------------------------------------/
/ Low level disk interface modlue include file (C)ChaN, 2014 /
/ Low level disk interface module include file (C)ChaN, 2014 /
/-----------------------------------------------------------------------*/

#ifndef _DISKIO_DEFINED
Expand Down Expand Up @@ -42,7 +42,7 @@ DRESULT disk_ioctl (void *drv, BYTE cmd, void* buff);
#define STA_PROTECT 0x04 /* Write protected */


/* Command code for disk_ioctrl fucntion */
/* Command code for disk_ioctrl function */

/* Generic command (Used by FatFs) */
#define CTRL_SYNC 0 /* Complete pending write process (needed at FF_FS_READONLY == 0) */
Expand Down
Loading

0 comments on commit fecc1bd

Please sign in to comment.