fix typos (partial) detected by codepell

This commit is contained in:
hathach 2023-03-18 22:17:02 +07:00
parent d9fee4c354
commit fecc1bdedb
No known key found for this signature in database
GPG Key ID: F5D50C6D51D17CBA
137 changed files with 253 additions and 243 deletions

View File

@ -2,3 +2,16 @@ ans
ure ure
clen clen
ser ser
endianess
pris
synopsys
reenable
dout
wel
iput
hsi
astroid
busses
cyphertext
dum
extint

View File

@ -7,4 +7,4 @@ exclude-file = .codespell/exclude-file.txt
check-filenames = check-filenames =
check-hidden = check-hidden =
count = count =
skip = .cproject,.git,./lib,./locale skip = .cproject,.git,./lib,./locale,ACKNOWLEDGEMENTS

View File

@ -16,7 +16,7 @@ repos:
hooks: hooks:
- id: codespell - id: codespell
#args: [-w] #args: [-w]
exclude: ^locale/ exclude: ^(locale/|lib/)
- repo: local - repo: local
hooks: hooks:
- id: translations - id: translations

View File

@ -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 (self->scan_results != NULL) {
if (!shared_module_bleio_scanresults_get_done(self->scan_results)) { 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; self->scan_results = NULL;
} }

View File

@ -65,7 +65,7 @@ typedef struct _bleio_adapter_obj_t {
uint16_t manufacturer; uint16_t manufacturer;
uint16_t lmp_subversion; 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_start_ticks;
uint64_t advertising_timeout_msecs; // If zero, do not check. uint64_t advertising_timeout_msecs; // If zero, do not check.

View File

@ -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 ? CHAR_PROP_WRITE : 0) |
// (gattc_char->char_props.write_wo_resp ? CHAR_PROP_WRITE_NO_RESPONSE : 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( // common_hal_bleio_characteristic_construct(
// characteristic, m_char_discovery_service, gattc_char->handle_value, uuid, // characteristic, m_char_discovery_service, gattc_char->handle_value, uuid,
// props, SECURITY_MODE_OPEN, SECURITY_MODE_OPEN, // props, SECURITY_MODE_OPEN, SECURITY_MODE_OPEN,

View File

@ -96,7 +96,7 @@ STATIC uint8_t bleio_properties_to_ble_spec_properties(uint8_t bleio_properties)
return ble_spec_properties; return ble_spec_properties;
} }
// FIX not currently used; reenable when used. // FIX not currently used; re-enable when used.
#if 0 #if 0
STATIC uint8_t ble_spec_properties_to_bleio_properties(uint8_t ble_spec_properties) { STATIC uint8_t ble_spec_properties_to_bleio_properties(uint8_t ble_spec_properties) {
uint8_t bleio_properties = 0; uint8_t bleio_properties = 0;
@ -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. // Keep track of the first one to make sure.
size_t sizeof_first_service_uuid = 0; 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. // add the uuid size in the loop below.
size_t data_length = sizeof(struct bt_att_group_data); size_t data_length = sizeof(struct bt_att_group_data);

View File

@ -150,7 +150,7 @@ struct bt_att_read_mult_req {
uint16_t handles[]; uint16_t handles[];
} __packed; } __packed;
/* Read Multiple Respose */ /* Read Multiple Response */
#define BT_ATT_OP_READ_MULT_RSP 0x0f #define BT_ATT_OP_READ_MULT_RSP 0x0f
struct bt_att_read_mult_rsp { struct bt_att_read_mult_rsp {
uint8_t _dummy[0]; uint8_t _dummy[0];
@ -243,7 +243,7 @@ struct bt_att_read_mult_vl_req {
uint16_t handles[]; uint16_t handles[];
} __packed; } __packed;
/* Read Multiple Respose */ /* Read Multiple Response */
#define BT_ATT_OP_READ_MULT_VL_RSP 0x21 #define BT_ATT_OP_READ_MULT_VL_RSP 0x21
struct bt_att_read_mult_vl_rsp { struct bt_att_read_mult_vl_rsp {
uint16_t len; uint16_t len;

View File

@ -16,8 +16,8 @@ Classes
.. function:: deque(iterable, maxlen[, flags]) .. function:: deque(iterable, maxlen[, flags])
Deques (double-ended queues) are a list-like container that support O(1) Dequeues (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 appends and pops from either side of the deque. New dequeues are created
using the following arguments: using the following arguments:
- *iterable* must be the empty tuple, and the new deque is created empty. - *iterable* must be the empty tuple, and the new deque is created empty.

View File

@ -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 // This must be first, it sets up the globals dict and other things
MP_DYNRUNTIME_INIT_ENTRY 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); mp_printf(&mp_plat_print, "initialising module self=%p\n", self);
// Make the functions available in the module's namespace // Make the functions available in the module's namespace

View File

@ -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 &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */
reg_value = (reg_value | reg_value = (reg_value |
((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | ((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; SCB->AIRCR = reg_value;
} }
@ -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 &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */
reg_value = (reg_value | reg_value = (reg_value |
((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | ((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; SCB_NS->AIRCR = reg_value;
} }

View File

@ -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 &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */
reg_value = (reg_value | reg_value = (reg_value |
((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | ((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; SCB->AIRCR = reg_value;
} }

View File

@ -84,7 +84,7 @@
* \param SH Defines the Shareability domain for this memory region. * \param SH Defines the Shareability domain for this memory region.
* \param RO Read-Only: Set to 1 for a read-only 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. * \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) \ #define ARM_MPU_RBAR(BASE, SH, RO, NP, XN) \
((BASE & MPU_RBAR_BASE_Msk) | \ ((BASE & MPU_RBAR_BASE_Msk) | \

View File

@ -40,14 +40,14 @@
* z = (z-x[i])*2**24 * 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: * The dimension of y[] is:
* 24-bit precision 1 * 24-bit precision 1
* 53-bit precision 2 * 53-bit precision 2
* 64-bit precision 2 * 64-bit precision 2
* 113-bit precision 3 * 113-bit precision 3
* The actual value is the sum of them. Thus for 113-bit * 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; * long double t,w,r_head, r_tail;
* t = (long double)y[2] + (long double)y[1]; * t = (long double)y[2] + (long double)y[1];
@ -78,7 +78,7 @@
* jk+1 must be 2 larger than you might expect so that our * jk+1 must be 2 larger than you might expect so that our
* recomputation test works. (Up to 24 bits in the integer * recomputation test works. (Up to 24 bits in the integer
* part (the 24 bits of it that we compute) and 23 bits in * 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.) * recompute.)
* *
* jz local integer variable indicating the number of * jz local integer variable indicating the number of

View File

@ -9,7 +9,7 @@ double fmod(double x, double y)
int sx = ux.i>>63; int sx = ux.i>>63;
uint64_t i; 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 */ /* float load/store to inner loops ruining performance and code size */
uint64_t uxi = ux.i; uint64_t uxi = ux.i;

View File

@ -37,7 +37,7 @@
* If (2) is false, then q = q ; otherwise q = q + 2 . * If (2) is false, then q = q ; otherwise q = q + 2 .
* i+1 i i+1 i * 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 * that (2) is equivalent to
* -(i+1) * -(i+1)
* s + 2 <= y (3) * s + 2 <= y (3)

View File

@ -94,7 +94,7 @@ enum lfs1_open_flags {
LFS1_F_DIRTY = 0x10000, // File does not match storage LFS1_F_DIRTY = 0x10000, // File does not match storage
LFS1_F_WRITING = 0x20000, // File has been written since last flush LFS1_F_WRITING = 0x20000, // File has been written since last flush
LFS1_F_READING = 0x40000, // File has been read 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 // File seek flags
@ -111,25 +111,25 @@ struct lfs1_config {
// information to the block device operations // information to the block device operations
void *context; 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. // to the user.
int (*read)(const struct lfs1_config *c, lfs1_block_t block, int (*read)(const struct lfs1_config *c, lfs1_block_t block,
lfs1_off_t off, void *buffer, lfs1_size_t size); lfs1_off_t off, void *buffer, lfs1_size_t size);
// Program a region in a block. The block must have previously // 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. // May return LFS1_ERR_CORRUPT if the block should be considered bad.
int (*prog)(const struct lfs1_config *c, lfs1_block_t block, int (*prog)(const struct lfs1_config *c, lfs1_block_t block,
lfs1_off_t off, const void *buffer, lfs1_size_t size); lfs1_off_t off, const void *buffer, lfs1_size_t size);
// Erase a block. A block must be erased before being programmed. // Erase a block. A block must be erased before being programmed.
// The state of an erased block is undefined. Negative error codes // 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. // May return LFS1_ERR_CORRUPT if the block should be considered bad.
int (*erase)(const struct lfs1_config *c, lfs1_block_t block); int (*erase)(const struct lfs1_config *c, lfs1_block_t block);
// Sync the state of the underlying block device. Negative error codes // 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); int (*sync)(const struct lfs1_config *c);
// Minimum size of a block read. This determines the size of read buffers. // Minimum size of a block read. This determines the size of read buffers.
@ -484,7 +484,7 @@ int lfs1_dir_rewind(lfs1_t *lfs1, lfs1_dir_t *dir);
// Returns a negative error code on failure. // Returns a negative error code on failure.
int lfs1_traverse(lfs1_t *lfs1, int (*cb)(void*, lfs1_block_t), void *data); 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 // Not needed to be called by user unless an operation is interrupted
// but the filesystem is still mounted. This is already called on first // but the filesystem is still mounted. This is already called on first

View File

@ -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; dir->rev = 0;
// rather than clobbering one of the blocks we just pretend // rather than clobbering one of the blocks we just pretend
@ -1643,7 +1643,7 @@ static int lfs2_dir_compact(lfs2_t *lfs2,
return err; 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 // we can do, we'll error later if we've become frozen
if (!err) { if (!err) {
end = begin; end = begin;
@ -4037,7 +4037,7 @@ static int lfs2_fs_relocate(lfs2_t *lfs2,
lfs2_fs_prepmove(lfs2, 0x3ff, NULL); 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); lfs2_pair_tole32(newpair);
err = lfs2_dir_commit(lfs2, &parent, LFS2_MKATTRS( err = lfs2_dir_commit(lfs2, &parent, LFS2_MKATTRS(
{LFS2_MKTAG_IF(moveid != 0x3ff, {LFS2_MKTAG_IF(moveid != 0x3ff,

View File

@ -159,34 +159,34 @@ struct lfs2_config {
// information to the block device operations // information to the block device operations
void *context; 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. // to the user.
int (*read)(const struct lfs2_config *c, lfs2_block_t block, int (*read)(const struct lfs2_config *c, lfs2_block_t block,
lfs2_off_t off, void *buffer, lfs2_size_t size); lfs2_off_t off, void *buffer, lfs2_size_t size);
// Program a region in a block. The block must have previously // 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. // May return LFS2_ERR_CORRUPT if the block should be considered bad.
int (*prog)(const struct lfs2_config *c, lfs2_block_t block, int (*prog)(const struct lfs2_config *c, lfs2_block_t block,
lfs2_off_t off, const void *buffer, lfs2_size_t size); lfs2_off_t off, const void *buffer, lfs2_size_t size);
// Erase a block. A block must be erased before being programmed. // Erase a block. A block must be erased before being programmed.
// The state of an erased block is undefined. Negative error codes // 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. // May return LFS2_ERR_CORRUPT if the block should be considered bad.
int (*erase)(const struct lfs2_config *c, lfs2_block_t block); int (*erase)(const struct lfs2_config *c, lfs2_block_t block);
// Sync the state of the underlying block device. Negative error codes // 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); int (*sync)(const struct lfs2_config *c);
#ifdef LFS2_THREADSAFE #ifdef LFS2_THREADSAFE
// Lock the underlying block device. Negative error codes // 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); int (*lock)(const struct lfs2_config *c);
// Unlock the underlying block device. Negative error codes // 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); int (*unlock)(const struct lfs2_config *c);
#endif #endif
@ -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. // 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 // 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 // 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, lfs2_ssize_t lfs2_getattr(lfs2_t *lfs2, const char *path,
uint8_t type, void *buffer, lfs2_size_t size); uint8_t type, void *buffer, lfs2_size_t size);

View File

@ -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 #ifndef _DISKIO_DEFINED
@ -42,7 +42,7 @@ DRESULT disk_ioctl (void *drv, BYTE cmd, void* buff);
#define STA_PROTECT 0x04 /* Write protected */ #define STA_PROTECT 0x04 /* Write protected */
/* Command code for disk_ioctrl fucntion */ /* Command code for disk_ioctrl function */
/* Generic command (Used by FatFs) */ /* Generic command (Used by FatFs) */
#define CTRL_SYNC 0 /* Complete pending write process (needed at FF_FS_READONLY == 0) */ #define CTRL_SYNC 0 /* Complete pending write process (needed at FF_FS_READONLY == 0) */

View File

@ -996,7 +996,7 @@ static FRESULT dec_lock ( /* Decrement object open counter */
if (n == 0) Files[i].fs = 0; /* Delete the entry if open count gets zero */ if (n == 0) Files[i].fs = 0; /* Delete the entry if open count gets zero */
res = FR_OK; res = FR_OK;
} else { } else {
res = FR_INT_ERR; /* Invalid index nunber */ res = FR_INT_ERR; /* Invalid index number */
} }
return res; return res;
} }
@ -1990,7 +1990,7 @@ static void gen_numname (
seq = (UINT)sr; seq = (UINT)sr;
} }
/* itoa (hexdecimal) */ /* itoa (hexadecimal) */
i = 7; i = 7;
do { do {
c = (BYTE)((seq % 16) + '0'); c = (BYTE)((seq % 16) + '0');
@ -2098,7 +2098,7 @@ static DWORD xsum32 ( /* Returns 32-bit checksum */
/*------------------------------------------------------*/ /*------------------------------------------------------*/
static void get_xfileinfo ( static void get_xfileinfo (
BYTE* dirb, /* Pointer to the direcotry entry block 85+C0+C1s */ BYTE* dirb, /* Pointer to the directory entry block 85+C0+C1s */
FILINFO* fno /* Buffer to store the extracted file information */ FILINFO* fno /* Buffer to store the extracted file information */
) )
{ {
@ -2135,16 +2135,16 @@ static void get_xfileinfo (
/*-----------------------------------*/ /*-----------------------------------*/
/* exFAT: Get a directry entry block */ /* exFAT: Get a directory entry block */
/*-----------------------------------*/ /*-----------------------------------*/
static FRESULT load_xdir ( /* FR_INT_ERR: invalid entry block */ static FRESULT load_xdir ( /* FR_INT_ERR: invalid entry block */
DIR* dp /* Reading direcotry object pointing top of the entry block to load */ DIR* dp /* Reading directory object pointing top of the entry block to load */
) )
{ {
FRESULT res; FRESULT res;
UINT i, sz_ent; UINT i, sz_ent;
BYTE* dirb = dp->obj.fs->dirbuf; /* Pointer to the on-memory direcotry entry block 85+C0+C1s */ BYTE* dirb = dp->obj.fs->dirbuf; /* Pointer to the on-memory directory entry block 85+C0+C1s */
/* Load file-directory entry */ /* Load file-directory entry */
@ -2208,7 +2208,7 @@ static void init_alloc_info (
/*------------------------------------------------*/ /*------------------------------------------------*/
static FRESULT load_obj_xdir ( static FRESULT load_obj_xdir (
DIR* dp, /* Blank directory object to be used to access containing direcotry */ DIR* dp, /* Blank directory object to be used to access containing directory */
const FFOBJID* obj /* Object with its containing directory information */ const FFOBJID* obj /* Object with its containing directory information */
) )
{ {
@ -2237,18 +2237,18 @@ static FRESULT load_obj_xdir (
/*----------------------------------------*/ /*----------------------------------------*/
static FRESULT store_xdir ( static FRESULT store_xdir (
DIR* dp /* Pointer to the direcotry object */ DIR* dp /* Pointer to the directory object */
) )
{ {
FRESULT res; FRESULT res;
UINT nent; UINT nent;
BYTE* dirb = dp->obj.fs->dirbuf; /* Pointer to the direcotry entry block 85+C0+C1s */ BYTE* dirb = dp->obj.fs->dirbuf; /* Pointer to the directory entry block 85+C0+C1s */
/* Create set sum */ /* Create set sum */
st_word(dirb + XDIR_SetSum, xdir_sum(dirb)); st_word(dirb + XDIR_SetSum, xdir_sum(dirb));
nent = dirb[XDIR_NumSec] + 1; nent = dirb[XDIR_NumSec] + 1;
/* Store the direcotry entry block to the directory */ /* Store the directory entry block to the directory */
res = dir_sdi(dp, dp->blk_ofs); res = dir_sdi(dp, dp->blk_ofs);
while (res == FR_OK) { while (res == FR_OK) {
res = move_window(dp->obj.fs, dp->sect); res = move_window(dp->obj.fs, dp->sect);
@ -2265,11 +2265,11 @@ static FRESULT store_xdir (
/*-------------------------------------------*/ /*-------------------------------------------*/
/* exFAT: Create a new directory enrty block */ /* exFAT: Create a new directory entry block */
/*-------------------------------------------*/ /*-------------------------------------------*/
static void create_xdir ( static void create_xdir (
BYTE* dirb, /* Pointer to the direcotry entry block buffer */ BYTE* dirb, /* Pointer to the directory entry block buffer */
const WCHAR* lfn /* Pointer to the object name */ const WCHAR* lfn /* Pointer to the object name */
) )
{ {
@ -2690,7 +2690,7 @@ static void get_fileinfo (
fno->altname[di] = 0; /* Terminate the SFN (null string means SFN is invalid) */ fno->altname[di] = 0; /* Terminate the SFN (null string means SFN is invalid) */
if (fno->fname[0] == 0) { /* If LFN is invalid, altname[] needs to be copied to fname[] */ if (fno->fname[0] == 0) { /* If LFN is invalid, altname[] needs to be copied to fname[] */
if (di == 0) { /* If LFN and SFN both are invalid, this object is inaccesible */ if (di == 0) { /* If LFN and SFN both are invalid, this object is inaccessible */
fno->fname[di++] = '?'; fno->fname[di++] = '?';
} else { } else {
for (si = di = 0, lcf = NS_BODY; fno->altname[si]; si++, di++) { /* Copy altname[] to fname[] with case information */ for (si = di = 0, lcf = NS_BODY; fno->altname[si]; si++, di++) { /* Copy altname[] to fname[] with case information */
@ -2764,7 +2764,7 @@ static DWORD get_achar ( /* Get a character and advances ptr */
static int pattern_matching ( /* 0:not matched, 1:matched */ static int pattern_matching ( /* 0:not matched, 1:matched */
const TCHAR* pat, /* Matching pattern */ const TCHAR* pat, /* Matching pattern */
const TCHAR* nam, /* String to be tested */ const TCHAR* name, /* String to be tested */
int skip, /* Number of pre-skip chars (number of ?s) */ int skip, /* Number of pre-skip chars (number of ?s) */
int inf /* Infinite search (* specified) */ int inf /* Infinite search (* specified) */
) )
@ -2775,12 +2775,12 @@ static int pattern_matching ( /* 0:not matched, 1:matched */
while (skip--) { /* Pre-skip name chars */ while (skip--) { /* Pre-skip name chars */
if (!get_achar(&nam)) return 0; /* Branch mismatched if less name chars */ if (!get_achar(&name)) return 0; /* Branch mismatched if less name chars */
} }
if (*pat == 0 && inf) return 1; /* (short circuit) */ if (*pat == 0 && inf) return 1; /* (short circuit) */
do { do {
pp = pat; np = nam; /* Top of pattern and name to match */ pp = pat; np = name; /* Top of pattern and name to match */
for (;;) { for (;;) {
if (*pp == '?' || *pp == '*') { /* Wildcard? */ if (*pp == '?' || *pp == '*') { /* Wildcard? */
nm = nx = 0; nm = nx = 0;
@ -2795,7 +2795,7 @@ static int pattern_matching ( /* 0:not matched, 1:matched */
if (pc != nc) break; /* Branch mismatched? */ if (pc != nc) break; /* Branch mismatched? */
if (pc == 0) return 1; /* Branch matched? (matched at end of both strings) */ if (pc == 0) return 1; /* Branch matched? (matched at end of both strings) */
} }
get_achar(&nam); /* nam++ */ get_achar(&name); /* name++ */
} while (inf && nc); /* Retry until end of name if infinite search is specified */ } while (inf && nc); /* Retry until end of name if infinite search is specified */
return 0; return 0;
@ -3183,7 +3183,7 @@ static FRESULT find_volume ( /* FR_OK(0): successful, !=0: an error occurred
fmt = bsect ? check_fs(fs, bsect) : 3; /* Check the partition */ fmt = bsect ? check_fs(fs, bsect) : 3; /* Check the partition */
} while (LD2PT(fs) == 0 && fmt >= 2 && ++i < 4); } while (LD2PT(fs) == 0 && fmt >= 2 && ++i < 4);
} }
if (fmt == 4) return FR_DISK_ERR; /* An error occured in the disk I/O layer */ if (fmt == 4) return FR_DISK_ERR; /* An error occurred in the disk I/O layer */
if (fmt >= 2) return FR_NO_FILESYSTEM; /* No FAT volume is found */ if (fmt >= 2) return FR_NO_FILESYSTEM; /* No FAT volume is found */
/* An FAT volume is found (bsect). Following code initializes the filesystem object */ /* An FAT volume is found (bsect). Following code initializes the filesystem object */
@ -3221,7 +3221,7 @@ static FRESULT find_volume ( /* FR_OK(0): successful, !=0: an error occurred
fs->volbase = bsect; fs->volbase = bsect;
fs->database = bsect + ld_dword(fs->win + BPB_DataOfsEx); fs->database = bsect + ld_dword(fs->win + BPB_DataOfsEx);
fs->fatbase = bsect + ld_dword(fs->win + BPB_FatOfsEx); fs->fatbase = bsect + ld_dword(fs->win + BPB_FatOfsEx);
if (maxlba < (QWORD)fs->database + nclst * fs->csize) return FR_NO_FILESYSTEM; /* (Volume size must not be smaller than the size requiered) */ if (maxlba < (QWORD)fs->database + nclst * fs->csize) return FR_NO_FILESYSTEM; /* (Volume size must not be smaller than the size required) */
fs->dirbase = ld_dword(fs->win + BPB_RootClusEx); fs->dirbase = ld_dword(fs->win + BPB_RootClusEx);
/* Get bitmap location and check if it is contiguous (implementation assumption) */ /* Get bitmap location and check if it is contiguous (implementation assumption) */
@ -3365,7 +3365,7 @@ static FRESULT validate ( /* Returns FR_OK or FR_INVALID_OBJECT */
if (obj && obj->fs && obj->fs->fs_type && obj->id == obj->fs->id) { /* Test if the object is valid */ if (obj && obj->fs && obj->fs->fs_type && obj->id == obj->fs->id) { /* Test if the object is valid */
#if FF_FS_REENTRANT #if FF_FS_REENTRANT
if (lock_fs(obj->fs)) { /* Obtain the filesystem object */ if (lock_fs(obj->fs)) { /* Obtain the filesystem object */
if (disk_ioctl(obj->fs->drv, IOCTL_STATUS, &stat) == RES_OK && !(stat & STA_NOINIT)) { /* Test if the phsical drive is kept initialized */ if (disk_ioctl(obj->fs->drv, IOCTL_STATUS, &stat) == RES_OK && !(stat & STA_NOINIT)) { /* Test if the physical drive is kept initialized */
res = FR_OK; res = FR_OK;
} else { } else {
unlock_fs(obj->fs, FR_OK); unlock_fs(obj->fs, FR_OK);
@ -3374,7 +3374,7 @@ static FRESULT validate ( /* Returns FR_OK or FR_INVALID_OBJECT */
res = FR_TIMEOUT; res = FR_TIMEOUT;
} }
#else #else
if (disk_ioctl(obj->fs->drv, IOCTL_STATUS, &stat) == RES_OK && !(stat & STA_NOINIT)) { /* Test if the phsical drive is kept initialized */ if (disk_ioctl(obj->fs->drv, IOCTL_STATUS, &stat) == RES_OK && !(stat & STA_NOINIT)) { /* Test if the physical drive is kept initialized */
res = FR_OK; res = FR_OK;
} }
#endif #endif
@ -3528,7 +3528,7 @@ FRESULT f_open (
} }
} }
else { /* Open an existing file */ else { /* Open an existing file */
if (res == FR_OK) { /* Is the object exsiting? */ if (res == FR_OK) { /* Is the object existing? */
if (dj.obj.attr & AM_DIR) { /* File open against a directory */ if (dj.obj.attr & AM_DIR) { /* File open against a directory */
res = FR_NO_FILE; res = FR_NO_FILE;
} else { } else {
@ -4339,7 +4339,7 @@ FRESULT f_opendir (
FREE_NAMBUF(); FREE_NAMBUF();
if (res == FR_NO_FILE) res = FR_NO_PATH; if (res == FR_NO_FILE) res = FR_NO_PATH;
} }
if (res != FR_OK) dp->obj.fs = 0; /* Invalidate the directory object if function faild */ if (res != FR_OK) dp->obj.fs = 0; /* Invalidate the directory object if function failed */
LEAVE_FF(fs, res); LEAVE_FF(fs, res);
} }
@ -4779,7 +4779,7 @@ FRESULT f_mkdir (
st_clust(fs, fs->win + SZDIRE, pcl); st_clust(fs, fs->win + SZDIRE, pcl);
fs->wflag = 1; fs->wflag = 1;
} }
res = dir_register(&dj); /* Register the object to the parent directoy */ res = dir_register(&dj); /* Register the object to the parent directory */
} }
} }
if (res == FR_OK) { if (res == FR_OK) {

View File

@ -240,7 +240,7 @@ typedef struct {
WORD ftime; /* Modified time */ WORD ftime; /* Modified time */
BYTE fattrib; /* File attribute */ BYTE fattrib; /* File attribute */
#if FF_USE_LFN #if FF_USE_LFN
TCHAR altname[FF_SFN_BUF + 1];/* Altenative file name */ TCHAR altname[FF_SFN_BUF + 1];/* Alternative file name */
TCHAR fname[FF_LFN_BUF + 1]; /* Primary file name */ TCHAR fname[FF_LFN_BUF + 1]; /* Primary file name */
#else #else
TCHAR fname[12 + 1]; /* File name */ TCHAR fname[12 + 1]; /* File name */

View File

@ -188,7 +188,7 @@
#define FF_LFN_BUF 255 #define FF_LFN_BUF 255
#define FF_SFN_BUF 12 #define FF_SFN_BUF 12
/* This set of options defines size of file name members in the FILINFO structure /* This set of options defines size of file name members in the FILINFO structure
/ which is used to read out directory items. These values should be suffcient for / which is used to read out directory items. These values should be sufficient for
/ the file names to read. The maximum possible length of the read file name depends / the file names to read. The maximum possible length of the read file name depends
/ on character encoding. When LFN is not enabled, these options have no effect. */ / on character encoding. When LFN is not enabled, these options have no effect. */
@ -251,7 +251,7 @@
/ number and only an FAT volume found on the physical drive will be mounted. / number and only an FAT volume found on the physical drive will be mounted.
/ When this function is enabled (1), each logical drive number can be bound to / When this function is enabled (1), each logical drive number can be bound to
/ arbitrary physical drive and partition listed in the VolToPart[]. Also f_fdisk() / arbitrary physical drive and partition listed in the VolToPart[]. Also f_fdisk()
/ funciton will be available. */ / function will be available. */
#define FF_MIN_SS 512 #define FF_MIN_SS 512
@ -316,7 +316,7 @@
#define FF_NORTC_MON 1 #define FF_NORTC_MON 1
#define FF_NORTC_MDAY 1 #define FF_NORTC_MDAY 1
#define FF_NORTC_YEAR 2018 #define FF_NORTC_YEAR 2018
/* The option FF_FS_NORTC switches timestamp functiton. If the system does not have /* The option FF_FS_NORTC switches timestamp function. If the system does not have
/ any RTC function or valid timestamp is not needed, set FF_FS_NORTC = 1 to disable / any RTC function or valid timestamp is not needed, set FF_FS_NORTC = 1 to disable
/ the timestamp function. Every object modified by FatFs will have a fixed timestamp / the timestamp function. Every object modified by FatFs will have a fixed timestamp
/ defined by FF_NORTC_MON, FF_NORTC_MDAY and FF_NORTC_YEAR in local time. / defined by FF_NORTC_MON, FF_NORTC_MDAY and FF_NORTC_YEAR in local time.

View File

@ -3,7 +3,7 @@
/*------------------------------------------------------------------------*/ /*------------------------------------------------------------------------*/
/* This module will occupy a huge memory in the .const section when the / /* This module will occupy a huge memory in the .const section when the /
/ FatFs is configured for LFN with DBCS. If the system has any Unicode / / FatFs is configured for LFN with DBCS. If the system has any Unicode /
/ utilitiy for the code conversion, this module should be modified to use / / utility for the code conversion, this module should be modified to use /
/ that function to avoid silly memory consumption. / / that function to avoid silly memory consumption. /
/-------------------------------------------------------------------------*/ /-------------------------------------------------------------------------*/
/* /*

View File

@ -282,7 +282,7 @@ sdmmc_err_t sdmmc_io_rw_extended(sdmmc_card_t* card, int func,
return SDMMC_ERR_INVALID_SIZE; return SDMMC_ERR_INVALID_SIZE;
} }
if (datalen == max_byte_transfer_size) { if (datalen == max_byte_transfer_size) {
count = 0; // See 5.3.1 SDIO simplifed spec count = 0; // See 5.3.1 SDIO simplified spec
} else { } else {
count = datalen; count = datalen;
} }

View File

@ -597,7 +597,7 @@ next_blk:
if (res == TINF_DONE && !d->bfinal) { if (res == TINF_DONE && !d->bfinal) {
/* the block has ended (without producing more data), but we /* the block has ended (without producing more data), but we
can't return without data, so start procesing next block */ can't return without data, so start processing next block */
goto next_blk; goto next_blk;
} }

View File

@ -188,10 +188,6 @@ msgstr ""
msgid "%q must be >= %d" msgid "%q must be >= %d"
msgstr "" msgstr ""
#: ports/espressif/common-hal/analogbufio/BufferedIn.c
msgid "%q must be array of type 'H'"
msgstr ""
#: shared-bindings/analogbufio/BufferedIn.c #: shared-bindings/analogbufio/BufferedIn.c
msgid "%q must be a bytearray or array of type 'H' or 'B'" msgid "%q must be a bytearray or array of type 'H' or 'B'"
msgstr "" msgstr ""
@ -200,6 +196,10 @@ msgstr ""
msgid "%q must be a bytearray or array of type 'h', 'H', 'b', or 'B'" msgid "%q must be a bytearray or array of type 'h', 'H', 'b', or 'B'"
msgstr "" msgstr ""
#: ports/espressif/common-hal/analogbufio/BufferedIn.c
msgid "%q must be array of type 'H'"
msgstr ""
#: ports/raspberrypi/bindings/cyw43/__init__.c py/argcheck.c py/objexcept.c #: ports/raspberrypi/bindings/cyw43/__init__.c py/argcheck.c py/objexcept.c
#: shared-bindings/canio/CAN.c shared-bindings/digitalio/Pull.c #: shared-bindings/canio/CAN.c shared-bindings/digitalio/Pull.c
msgid "%q must be of type %q or %q, not %q" msgid "%q must be of type %q or %q, not %q"
@ -1229,7 +1229,8 @@ msgstr ""
msgid "Interrupt error." msgid "Interrupt error."
msgstr "" msgstr ""
#: py/argcheck.c shared-bindings/digitalio/DigitalInOut.c #: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c py/argcheck.c
#: shared-bindings/digitalio/DigitalInOut.c
#: shared-bindings/displayio/EPaperDisplay.c #: shared-bindings/displayio/EPaperDisplay.c
msgid "Invalid %q" msgid "Invalid %q"
msgstr "" msgstr ""
@ -1523,10 +1524,6 @@ msgstr ""
msgid "No in or out in program" msgid "No in or out in program"
msgstr "" msgstr ""
#: shared-bindings/aesio/aes.c
msgid "No key was specified"
msgstr ""
#: shared-bindings/time/__init__.c #: shared-bindings/time/__init__.c
msgid "No long integer support" msgid "No long integer support"
msgstr "" msgstr ""
@ -1939,7 +1936,7 @@ msgstr ""
#: ports/espressif/common-hal/_bleio/Adapter.c #: ports/espressif/common-hal/_bleio/Adapter.c
#: ports/nrf/common-hal/_bleio/Adapter.c #: ports/nrf/common-hal/_bleio/Adapter.c
msgid "Scan already in progess. Stop with stop_scan." msgid "Scan already in progress. Stop with stop_scan."
msgstr "" msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
@ -2252,6 +2249,11 @@ msgstr ""
msgid "Unknown BLE error: %d" msgid "Unknown BLE error: %d"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/wifi/__init__.c
#, c-format
msgid "Unknown error code %d"
msgstr ""
#: shared-bindings/wifi/Radio.c #: shared-bindings/wifi/Radio.c
#, c-format #, c-format
msgid "Unknown failure %d" msgid "Unknown failure %d"
@ -2287,11 +2289,6 @@ msgstr ""
msgid "Unknown system firmware error: %d" msgid "Unknown system firmware error: %d"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/wifi/__init__.c
#, c-format
msgid "Unkown error code %d"
msgstr ""
#: shared-bindings/adafruit_pixelbuf/PixelBuf.c #: shared-bindings/adafruit_pixelbuf/PixelBuf.c
#: shared-module/_pixelmap/PixelMap.c #: shared-module/_pixelmap/PixelMap.c
#, c-format #, c-format
@ -3044,8 +3041,8 @@ msgid "extra positional arguments given"
msgstr "" msgstr ""
#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c #: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c
#: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c #: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/gifio/OnDiskGif.c
#: shared-module/gifio/GifWriter.c #: shared-bindings/synthio/__init__.c shared-module/gifio/GifWriter.c
msgid "file must be a file opened in byte mode" msgid "file must be a file opened in byte mode"
msgstr "" msgstr ""

View File

@ -49,7 +49,7 @@
#define CONF_TC3_WAVE_DUTY_VAL 0x1f4 #define CONF_TC3_WAVE_DUTY_VAL 0x1f4
#endif #endif
/* Caculate pwm ccx register value based on WAVE_PER_VAL and Waveform Duty Value */ /* Calculate pwm ccx register value based on WAVE_PER_VAL and Waveform Duty Value */
#if CONF_TC3_PRESCALER < TC_CTRLA_PRESCALER_DIV64_Val #if CONF_TC3_PRESCALER < TC_CTRLA_PRESCALER_DIV64_Val
#define CONF_TC3_CC0 \ #define CONF_TC3_CC0 \
((uint32_t)(((double)CONF_TC3_WAVE_PER_VAL * CONF_GCLK_TC3_FREQUENCY) / 1000000 / (1 << CONF_TC3_PRESCALER) - 1)) ((uint32_t)(((double)CONF_TC3_WAVE_PER_VAL * CONF_GCLK_TC3_FREQUENCY) / 1000000 / (1 << CONF_TC3_PRESCALER) - 1))

View File

@ -42,7 +42,7 @@
#define CONF_TC0_WAVE_DUTY_VAL 0x1f4 #define CONF_TC0_WAVE_DUTY_VAL 0x1f4
#endif #endif
/* Caculate pwm ccx register value based on WAVE_PER_VAL and Waveform Duty Value */ /* Calculate pwm ccx register value based on WAVE_PER_VAL and Waveform Duty Value */
#if CONF_TC0_PRESCALER < TC_CTRLA_PRESCALER_DIV64_Val #if CONF_TC0_PRESCALER < TC_CTRLA_PRESCALER_DIV64_Val
#define CONF_TC0_CC0 \ #define CONF_TC0_CC0 \
((uint32_t)(((double)CONF_TC0_WAVE_PER_VAL * CONF_GCLK_TC0_FREQUENCY) / 1000000 / (1 << CONF_TC0_PRESCALER) - 1)) ((uint32_t)(((double)CONF_TC0_WAVE_PER_VAL * CONF_GCLK_TC0_FREQUENCY) / 1000000 / (1 << CONF_TC0_PRESCALER) - 1))

View File

@ -42,7 +42,7 @@
#define CONF_TC0_WAVE_DUTY_VAL 0x1f4 #define CONF_TC0_WAVE_DUTY_VAL 0x1f4
#endif #endif
/* Caculate pwm ccx register value based on WAVE_PER_VAL and Waveform Duty Value */ /* Calculate pwm ccx register value based on WAVE_PER_VAL and Waveform Duty Value */
#if CONF_TC0_PRESCALER < TC_CTRLA_PRESCALER_DIV64_Val #if CONF_TC0_PRESCALER < TC_CTRLA_PRESCALER_DIV64_Val
#define CONF_TC0_CC0 \ #define CONF_TC0_CC0 \
((uint32_t)(((double)CONF_TC0_WAVE_PER_VAL * CONF_GCLK_TC0_FREQUENCY) / 1000000 / (1 << CONF_TC0_PRESCALER) - 1)) ((uint32_t)(((double)CONF_TC0_WAVE_PER_VAL * CONF_GCLK_TC0_FREQUENCY) / 1000000 / (1 << CONF_TC0_PRESCALER) - 1))

View File

@ -42,7 +42,7 @@
#define CONF_TC0_WAVE_DUTY_VAL 0x1f4 #define CONF_TC0_WAVE_DUTY_VAL 0x1f4
#endif #endif
/* Caculate pwm ccx register value based on WAVE_PER_VAL and Waveform Duty Value */ /* Calculate pwm ccx register value based on WAVE_PER_VAL and Waveform Duty Value */
#if CONF_TC0_PRESCALER < TC_CTRLA_PRESCALER_DIV64_Val #if CONF_TC0_PRESCALER < TC_CTRLA_PRESCALER_DIV64_Val
#define CONF_TC0_CC0 \ #define CONF_TC0_CC0 \
((uint32_t)(((double)CONF_TC0_WAVE_PER_VAL * CONF_GCLK_TC0_FREQUENCY) / 1000000 / (1 << CONF_TC0_PRESCALER) - 1)) ((uint32_t)(((double)CONF_TC0_WAVE_PER_VAL * CONF_GCLK_TC0_FREQUENCY) / 1000000 / (1 << CONF_TC0_PRESCALER) - 1))

View File

@ -51,7 +51,7 @@ uint8_t display_init_sequence[] = {
0xc5, 1, 0x0e, // _VMCTR1 VCOMH = 4V, VOML = -1.1V 0xc5, 1, 0x0e, // _VMCTR1 VCOMH = 4V, VOML = -1.1V
0x2a, 0, // _INVOFF 0x2a, 0, // _INVOFF
0x36, 1, 0x18, // _MADCTL bottom to top refresh 0x36, 1, 0x18, // _MADCTL bottom to top refresh
// 1 clk cycle nonoverlap, 2 cycle gate rise, 3 sycle osc equalie, // 1 clk cycle nonoverlap, 2 cycle gate rise, 3 cycle osc equalie,
// fix on VTL // fix on VTL
0x3a, 1, 0x05, // COLMOD - 16bit color 0x3a, 1, 0x05, // COLMOD - 16bit color
0xe0, 16, 0x02, 0x1c, 0x07, 0x12, // _GMCTRP1 Gamma 0xe0, 16, 0x02, 0x1c, 0x07, 0x12, // _GMCTRP1 Gamma

View File

@ -50,7 +50,7 @@ uint8_t display_init_sequence[] = {
0xc5, 1, 0x0e, // _VMCTR1 VCOMH = 4V, VOML = -1.1V 0xc5, 1, 0x0e, // _VMCTR1 VCOMH = 4V, VOML = -1.1V
0x2a, 0, // _INVOFF 0x2a, 0, // _INVOFF
0x36, 1, 0b10100000, // _MADCTL for rotation 0 0x36, 1, 0b10100000, // _MADCTL for rotation 0
// 1 clk cycle nonoverlap, 2 cycle gate rise, 3 sycle osc equalie, // 1 clk cycle nonoverlap, 2 cycle gate rise, 3 cycle osc equalie,
// fix on VTL // fix on VTL
0x3a, 1, 0x05, // COLMOD - 16bit color 0x3a, 1, 0x05, // COLMOD - 16bit color
0xe0, 16, 0x02, 0x1c, 0x07, 0x12, // _GMCTRP1 Gamma 0xe0, 16, 0x02, 0x1c, 0x07, 0x12, // _GMCTRP1 Gamma

View File

@ -52,7 +52,7 @@ uint8_t display_init_sequence[] = {
0xc5, 1, 0x0e, // _VMCTR1 VCOMH = 4V, VOML = -1.1V 0xc5, 1, 0x0e, // _VMCTR1 VCOMH = 4V, VOML = -1.1V
0x2a, 0, // _INVOFF 0x2a, 0, // _INVOFF
0x36, 1, 0b10100000, // _MADCTL for rotation 0 0x36, 1, 0b10100000, // _MADCTL for rotation 0
// 1 clk cycle nonoverlap, 2 cycle gate rise, 3 sycle osc equalie, // 1 clk cycle nonoverlap, 2 cycle gate rise, 3 cycle osc equalie,
// fix on VTL // fix on VTL
0x3a, 1, 0x05, // COLMOD - 16bit color 0x3a, 1, 0x05, // COLMOD - 16bit color
0xe0, 16, 0x02, 0x1c, 0x07, 0x12, // _GMCTRP1 Gamma 0xe0, 16, 0x02, 0x1c, 0x07, 0x12, // _GMCTRP1 Gamma

View File

@ -52,7 +52,7 @@ uint8_t display_init_sequence[] = {
0xc5, 1, 0x0e, // _VMCTR1 VCOMH = 4V, VOML = -1.1V 0xc5, 1, 0x0e, // _VMCTR1 VCOMH = 4V, VOML = -1.1V
0x2a, 0, // _INVOFF 0x2a, 0, // _INVOFF
0x36, 1, 0xa8, // _MADCTL bottom to top refresh 0x36, 1, 0xa8, // _MADCTL bottom to top refresh
// 1 clk cycle nonoverlap, 2 cycle gate rise, 3 sycle osc equalie, // 1 clk cycle nonoverlap, 2 cycle gate rise, 3 cycle osc equalie,
// fix on VTL // fix on VTL
0x3a, 1, 0x05, // COLMOD - 16bit color 0x3a, 1, 0x05, // COLMOD - 16bit color
0xe0, 16, 0x02, 0x1c, 0x07, 0x12, // _GMCTRP1 Gamma 0xe0, 16, 0x02, 0x1c, 0x07, 0x12, // _GMCTRP1 Gamma

View File

@ -36,7 +36,7 @@ STATIC volatile bool woke_up = false;
STATIC mp_float_t wakeup_time; STATIC mp_float_t wakeup_time;
void common_hal_alarm_time_timealarm_construct(alarm_time_timealarm_obj_t *self, mp_float_t monotonic_time) { void common_hal_alarm_time_timealarm_construct(alarm_time_timealarm_obj_t *self, mp_float_t monotonic_time) {
// TODO: when issueing light/seep sleep, throw a ValueError if the // TODO: when issuing light/seep sleep, throw a ValueError if the
// time exceeds the maximum value. For light sleep, max = // time exceeds the maximum value. For light sleep, max =
// 2**32 / 16384 = 3 days. For deep sleep, max = 2**32 / 32 // 2**32 / 16384 = 3 days. For deep sleep, max = 2**32 / 32
// = 1550 days. // = 1550 days.

View File

@ -482,7 +482,7 @@ uint32_t common_hal_frequencyio_frequencyin_get_item(frequencyio_frequencyin_obj
float time_each_event = self->factor / self->frequency; // get the time for each event during actual period float time_each_event = self->factor / self->frequency; // get the time for each event during actual period
float capture_diff = self->factor - self->capture_period; // get the difference of actual and base periods float capture_diff = self->factor - self->capture_period; // get the difference of actual and base periods
// we only need to adjust if the capture_diff can contain 1 or more events // we only need to adjust if the capture_diff can contain 1 or more events
// if so, we add how many events could have occured during the diff time // if so, we add how many events could have occurred during the diff time
if (time_each_event > capture_diff) { if (time_each_event > capture_diff) {
frequency_adjustment = capture_diff / time_each_event; frequency_adjustment = capture_diff / time_each_event;
} }

View File

@ -189,7 +189,7 @@
// - firmware // - firmware
// - internal CIRCUITPY flash filesystem (optional) // - internal CIRCUITPY flash filesystem (optional)
// - internal config, used to store crystalless clock calibration info (optional) // - internal config, used to store crystalless clock calibration info (optional)
// - microntroller.nvm (optional) // - microcontroller.nvm (optional)
// Define these regions starting up from the bottom of flash: // Define these regions starting up from the bottom of flash:

View File

@ -1073,7 +1073,7 @@ static void sd_mmc_deselect_slot(void) {
* \note * \note
* This function runs the initialization procedure and the identification * This function runs the initialization procedure and the identification
* process, then it sets the SD/MMC card in transfer state. * process, then it sets the SD/MMC card in transfer state.
* At last, it will automaticly enable maximum bus width and transfer speed. * At last, it will automatically enable maximum bus width and transfer speed.
* *
* \return true if success, otherwise false * \return true if success, otherwise false
*/ */
@ -1205,7 +1205,7 @@ static bool sd_mmc_mci_card_init(void) {
* \note * \note
* This function runs the initialization procedure and the identification * This function runs the initialization procedure and the identification
* process, then it sets the SD/MMC card in transfer state. * process, then it sets the SD/MMC card in transfer state.
* At last, it will automaticly enable maximum bus width and transfer speed. * At last, it will automatically enable maximum bus width and transfer speed.
* *
* \return true if success, otherwise false * \return true if success, otherwise false
*/ */
@ -1270,7 +1270,7 @@ static bool sd_mmc_mci_install_mmc(void) {
uint8_t retry = 10; uint8_t retry = 10;
while (retry--) { while (retry--) {
/* Retry is a WORKAROUND for no compliance card (Atmel Internal ref. MMC19): /* Retry is a WORKAROUND for no compliance card (Atmel Internal ref. MMC19):
* These cards seem not ready immediatly * These cards seem not ready immediately
* after the end of busy of mmc_cmd6_set_high_speed()*/ * after the end of busy of mmc_cmd6_set_high_speed()*/
/* Set default block size */ /* Set default block size */
@ -1427,7 +1427,7 @@ sd_mmc_err_t sd_mmc_wait_end_of_read_blocks(bool abort) {
return SD_MMC_OK; return SD_MMC_OK;
} }
/* All blocks are transfered then stop read operation */ /* All blocks are transferred then stop read operation */
if (sd_mmc_nb_block_to_tranfer == 1) { if (sd_mmc_nb_block_to_tranfer == 1) {
/* Single block transfer, then nothing to do */ /* Single block transfer, then nothing to do */
sd_mmc_deselect_slot(); sd_mmc_deselect_slot();
@ -1506,7 +1506,7 @@ sd_mmc_err_t sd_mmc_wait_end_of_write_blocks(bool abort) {
return SD_MMC_OK; return SD_MMC_OK;
} }
/* All blocks are transfered then stop write operation */ /* All blocks are transferred then stop write operation */
if (sd_mmc_nb_block_to_tranfer == 1) { if (sd_mmc_nb_block_to_tranfer == 1) {
/* Single block transfer, then nothing to do */ /* Single block transfer, then nothing to do */
sd_mmc_deselect_slot(); sd_mmc_deselect_slot();

View File

@ -67,7 +67,7 @@ typedef uint8_t sd_mmc_err_t; /**< Type of return error code */
#define SD_MMC_INIT_ONGOING 1 /**< Card not initialized */ #define SD_MMC_INIT_ONGOING 1 /**< Card not initialized */
#define SD_MMC_ERR_NO_CARD 2 /**< No SD/MMC card inserted */ #define SD_MMC_ERR_NO_CARD 2 /**< No SD/MMC card inserted */
#define SD_MMC_ERR_UNUSABLE 3 /**< Unusable card */ #define SD_MMC_ERR_UNUSABLE 3 /**< Unusable card */
#define SD_MMC_ERR_SLOT 4 /**< Slot unknow */ #define SD_MMC_ERR_SLOT 4 /**< Slot unknown */
#define SD_MMC_ERR_COMM 5 /**< General communication error */ #define SD_MMC_ERR_COMM 5 /**< General communication error */
#define SD_MMC_ERR_PARAM 6 /**< Illeage input parameter */ #define SD_MMC_ERR_PARAM 6 /**< Illeage input parameter */
#define SD_MMC_ERR_WP 7 /**< Card write protected */ #define SD_MMC_ERR_WP 7 /**< Card write protected */
@ -166,7 +166,7 @@ uint32_t sd_mmc_get_capacity(uint8_t slot);
* *
* \param[in] slot Card slot * \param[in] slot Card slot
* *
* \return true, if write portected * \return true, if write protected
*/ */
bool sd_mmc_is_write_protected(uint8_t slot); bool sd_mmc_is_write_protected(uint8_t slot);

View File

@ -73,8 +73,8 @@ extern "C" {
* Responses types: * Responses types:
* *
* R1, R3, R4 & R5 use a 48 bits response protected by a 7bit CRC checksum * R1, R3, R4 & R5 use a 48 bits response protected by a 7bit CRC checksum
* - R1 receiv data not specified * - R1 receive data not specified
* - R3 receiv OCR * - R3 receive OCR
* - R4, R5 RCA management (MMC only) * - R4, R5 RCA management (MMC only)
* - R6, R7 RCA management (SD only) * - R6, R7 RCA management (SD only)
* *
@ -115,14 +115,14 @@ typedef uint32_t sdmmc_cmd_def_t;
#define SDMMC_RESP_CRC (1lu << 12) #define SDMMC_RESP_CRC (1lu << 12)
// ! Card may send busy // ! Card may send busy
#define SDMMC_RESP_BUSY (1lu << 13) #define SDMMC_RESP_BUSY (1lu << 13)
// Open drain for a braodcast command (bc) // Open drain for a broadcast command (bc)
// or to enter in inactive state (MCI only) // or to enter in inactive state (MCI only)
#define SDMMC_CMD_OPENDRAIN (1lu << 14) #define SDMMC_CMD_OPENDRAIN (1lu << 14)
// ! To signal a data write operation // ! To signal a data write operation
#define SDMMC_CMD_WRITE (1lu << 15) #define SDMMC_CMD_WRITE (1lu << 15)
// ! To signal a SDIO tranfer in multi byte mode // ! To signal a SDIO transfer in multi byte mode
#define SDMMC_CMD_SDIO_BYTE (1lu << 16) #define SDMMC_CMD_SDIO_BYTE (1lu << 16)
// ! To signal a SDIO tranfer in block mode // ! To signal a SDIO transfer in block mode
#define SDMMC_CMD_SDIO_BLOCK (1lu << 17) #define SDMMC_CMD_SDIO_BLOCK (1lu << 17)
// ! To signal a data transfer in stream mode // ! To signal a data transfer in stream mode
#define SDMMC_CMD_STREAM (1lu << 18) #define SDMMC_CMD_STREAM (1lu << 18)
@ -132,7 +132,7 @@ typedef uint32_t sdmmc_cmd_def_t;
#define SDMMC_CMD_MULTI_BLOCK (1lu << 20) #define SDMMC_CMD_MULTI_BLOCK (1lu << 20)
// ! @} // ! @}
// ! \name Set of flags to define a reponse type // ! \name Set of flags to define a response type
// ! @{ // ! @{
#define SDMMC_CMD_NO_RESP (0) #define SDMMC_CMD_NO_RESP (0)
#define SDMMC_CMD_R1 (SDMMC_RESP_PRESENT | SDMMC_RESP_CRC) #define SDMMC_CMD_R1 (SDMMC_RESP_PRESENT | SDMMC_RESP_CRC)
@ -324,7 +324,7 @@ typedef uint32_t sdmmc_cmd_def_t;
#define SD_MCI_ACMD41_SD_SEND_OP_COND (41 | SDMMC_CMD_R3 | SDMMC_CMD_OPENDRAIN) #define SD_MCI_ACMD41_SD_SEND_OP_COND (41 | SDMMC_CMD_R3 | SDMMC_CMD_OPENDRAIN)
/** /**
* ACMD41(R1): Send host capacity support information (HCS) and activates the * ACMD41(R1): Send host capacity support information (HCS) and activates the
* card's initilization process * card's initialization process
*/ */
#define SD_SPI_ACMD41_SD_SEND_OP_COND (41 | SDMMC_CMD_R1) #define SD_SPI_ACMD41_SD_SEND_OP_COND (41 | SDMMC_CMD_R1)
/** /**
@ -440,7 +440,7 @@ typedef uint32_t sdmmc_cmd_def_t;
#define SDIO_R5_ERROR (1lu << 11) /**< General error */ #define SDIO_R5_ERROR (1lu << 11) /**< General error */
#define SDIO_R5_FUNC_NUM (1lu << 9) /**< Invalid function number */ #define SDIO_R5_FUNC_NUM (1lu << 9) /**< Invalid function number */
#define SDIO_R5_OUT_OF_RANGE (1lu << 8) /**< Argument out of range */ #define SDIO_R5_OUT_OF_RANGE (1lu << 8) /**< Argument out of range */
#define SDIO_R5_STATUS_ERR (SDIO_R5_ERROR | SDIO_R5_FUNC_NUM | SDIO_R5_OUT_OF_RANGE) // !< Errro status bits mask #define SDIO_R5_STATUS_ERR (SDIO_R5_ERROR | SDIO_R5_FUNC_NUM | SDIO_R5_OUT_OF_RANGE) // !< Error status bits mask
// ! @} // ! @}
// ! \name SDIO state (in R6) // ! \name SDIO state (in R6)

View File

@ -307,7 +307,7 @@ safe_mode_t port_init(void) {
// because it was hard enough to figure out, and maybe there's // because it was hard enough to figure out, and maybe there's
// a mistake that could make it work in the future. // a mistake that could make it work in the future.
#if 0 #if 0
// Designate QSPI memory mapped region as not cachable. // Designate QSPI memory mapped region as not cacheable.
// Turn off MPU in case it is on. // Turn off MPU in case it is on.
MPU->CTRL = 0; MPU->CTRL = 0;
@ -320,7 +320,7 @@ safe_mode_t port_init(void) {
0b011 << MPU_RASR_AP_Pos | // full read/write access for privileged and user mode 0b011 << MPU_RASR_AP_Pos | // full read/write access for privileged and user mode
0b000 << MPU_RASR_TEX_Pos | // caching not allowed, strongly ordered 0b000 << MPU_RASR_TEX_Pos | // caching not allowed, strongly ordered
1 << MPU_RASR_S_Pos | // sharable 1 << MPU_RASR_S_Pos | // sharable
0 << MPU_RASR_C_Pos | // not cachable 0 << MPU_RASR_C_Pos | // not cacheable
0 << MPU_RASR_B_Pos | // not bufferable 0 << MPU_RASR_B_Pos | // not bufferable
0b10111 << MPU_RASR_SIZE_Pos | // 16MB region size 0b10111 << MPU_RASR_SIZE_Pos | // 16MB region size
1 << MPU_RASR_ENABLE_Pos // enable this region 1 << MPU_RASR_ENABLE_Pos // enable this region

View File

@ -55,7 +55,7 @@ Connect these pins using a `USB adapter <https://www.adafruit.com/product/4090>`
**UART Connection:** **UART Connection:**
A `USB to UART convertor <https://www.adafruit.com/product/3309>`_ can be used for connecting to ESP32-C3 to get access to the serial console and REPL and for flashing CircuitPython. A `USB to UART converter <https://www.adafruit.com/product/3309>`_ can be used for connecting to ESP32-C3 to get access to the serial console and REPL and for flashing CircuitPython.
The following connections need to be made in this case: The following connections need to be made in this case:
@ -92,7 +92,7 @@ Connect these pins using a `USB adapter <https://www.adafruit.com/product/4090>`
**UART Connection:** **UART Connection:**
A `USB to UART convertor <https://www.adafruit.com/product/3309>`_ can be used for connecting to ESP32-S2 to get access to the serial console and REPL and for flashing CircuitPython. A `USB to UART converter <https://www.adafruit.com/product/3309>`_ can be used for connecting to ESP32-S2 to get access to the serial console and REPL and for flashing CircuitPython.
The following connections need to be made in this case: The following connections need to be made in this case:
@ -129,7 +129,7 @@ Connect these pins using a `USB adapter <https://www.adafruit.com/product/4090>`
**UART Connection:** **UART Connection:**
A `USB to UART convertor <https://www.adafruit.com/product/3309>`_ can be used for connecting to ESP32-S3 to get access to the serial console and REPL and for flashing CircuitPython. A `USB to UART converter <https://www.adafruit.com/product/3309>`_ can be used for connecting to ESP32-S3 to get access to the serial console and REPL and for flashing CircuitPython.
The following connections need to be made in this case: The following connections need to be made in this case:

View File

@ -63,7 +63,7 @@
//| """ //| """
//| Configure and initialize a camera with the given properties //| Configure and initialize a camera with the given properties
//| //|
//| This driver requires that the ``CIRCUITPY_RESERVED_PSRAM`` in ``settings.toml`` be large enough to hold the camera frambuffer(s). Generally, boards with built-in cameras will have a default setting that is large enough. If the constructor raises a MemoryError or an IDFError, this probably indicates the setting is too small and should be increased. //| This driver requires that the ``CIRCUITPY_RESERVED_PSRAM`` in ``settings.toml`` be large enough to hold the camera framebuffer(s). Generally, boards with built-in cameras will have a default setting that is large enough. If the constructor raises a MemoryError or an IDFError, this probably indicates the setting is too small and should be increased.
//| //|
//| //|
//| .. important:: //| .. important::
@ -89,7 +89,7 @@
//| :param reset_pin: The reset input to the camera module //| :param reset_pin: The reset input to the camera module
//| :param pixel_format: The pixel format of the captured image //| :param pixel_format: The pixel format of the captured image
//| :param frame_size: The size of captured image //| :param frame_size: The size of captured image
//| :param jpeg_quality: For `PixelFormat.JPEG`, the quality. Higher numbers increase quality. If the quality is too high, the JPEG data will be larger than the availalble buffer size and the image will be unusable or truncated. The exact range of appropriate values depends on the sensor and must be determined empirically. //| :param jpeg_quality: For `PixelFormat.JPEG`, the quality. Higher numbers increase quality. If the quality is too high, the JPEG data will be larger than the available buffer size and the image will be unusable or truncated. The exact range of appropriate values depends on the sensor and must be determined empirically.
//| :param framebuffer_count: The number of framebuffers (1 for single-buffered and 2 for double-buffered) //| :param framebuffer_count: The number of framebuffers (1 for single-buffered and 2 for double-buffered)
//| :param grab_mode: When to grab a new frame //| :param grab_mode: When to grab a new frame
//| """ //| """

View File

@ -32,7 +32,7 @@
#include "common-hal/espnow/__init__.h" #include "common-hal/espnow/__init__.h"
// TODO: check peer already exist // TODO: check peer already exist
// TODO: check peer dosen't exist // TODO: check peer doesn't exist
//| class Peer: //| class Peer:
//| """A data class to store parameters specific to a peer.""" //| """A data class to store parameters specific to a peer."""

View File

@ -4,7 +4,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS
// S2 Mini Board bottom, right, top-bottom // S2 Mini Board bottom, right, top-bottom
// GPIO0-GPIO14: broken out as a bloc on ESP32-S2FN4R2 SoC // GPIO0-GPIO14: broken out as a block on ESP32-S2FN4R2 SoC
// mpconfigboard.h: GPIO0: CIRCUITPY_BOOT_BUTTON // mpconfigboard.h: GPIO0: CIRCUITPY_BOOT_BUTTON
{ MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO0) },
{ MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, // RTC_GPIO0,GPIO0 { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, // RTC_GPIO0,GPIO0
@ -57,7 +57,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
// skip GPIO22-GPIO25: not broken out on ESP32-S2FN4R2 SoC // skip GPIO22-GPIO25: not broken out on ESP32-S2FN4R2 SoC
// skip GPIO26-GPIO32: SPI Flash & RAM, not broken out on S2 Mini (internal to ESP32-S2FN4R2 SoC?) // skip GPIO26-GPIO32: SPI Flash & RAM, not broken out on S2 Mini (internal to ESP32-S2FN4R2 SoC?)
// GPIO33-GPIO40: broken out as a bloc on ESP32-S2FN4R2 SoC, last 2 half of JTAG // GPIO33-GPIO40: broken out as a block on ESP32-S2FN4R2 SoC, last 2 half of JTAG
{ MP_ROM_QSTR(MP_QSTR_IO33), MP_ROM_PTR(&pin_GPIO33) },// SPIIO4,GPIO33,FSPIHD { MP_ROM_QSTR(MP_QSTR_IO33), MP_ROM_PTR(&pin_GPIO33) },// SPIIO4,GPIO33,FSPIHD
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO33) },// def from Wemos MP { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO33) },// def from Wemos MP
{ MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO33) },// D1 mini pin D2 GPIO4 { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO33) },// D1 mini pin D2 GPIO4

View File

@ -193,7 +193,7 @@ static bool pmic_init(void) {
} }
// Reg: 12h // Reg: 12h
// Enable EXTEN, DCDC1, LDO2 and LDO3 // Enable EXTENT, DCDC1, LDO2 and LDO3
write_buf[0] = AXP192_DCDC13_LDO23_CTRL; write_buf[0] = AXP192_DCDC13_LDO23_CTRL;
write_buf[1] = AXP192_DCDC13_LDO23_CTRL_EXTEN | write_buf[1] = AXP192_DCDC13_LDO23_CTRL_EXTEN |
AXP192_DCDC13_LDO23_CTRL_LDO3 | AXP192_DCDC13_LDO23_CTRL_LDO3 |

View File

@ -51,7 +51,7 @@ uint8_t display_init_sequence[] = {
0xC5, 0x01, 0x0E, // _VMCTR1 VCOMH = 4V, VOML = -1.1V 0xC5, 0x01, 0x0E, // _VMCTR1 VCOMH = 4V, VOML = -1.1V
0x20, 0x00, // _INVOFF 0x20, 0x00, // _INVOFF
0x36, 0x01, 0x18, // _MADCTL bottom to top refresh 0x36, 0x01, 0x18, // _MADCTL bottom to top refresh
// 1 clk cycle nonoverlap, 2 cycle gate rise, 3 sycle osc equalie, // 1 clk cycle nonoverlap, 2 cycle gate rise, 3 cycle osc equalie,
// fix on VTL // fix on VTL
0x3A, 0x01, 0x05, // COLMOD - 16bit color 0x3A, 0x01, 0x05, // COLMOD - 16bit color
0xE0, 0x10, 0x02, 0x1C, 0x07, 0x12, 0x37, 0x32, 0x29, 0x2D, 0x29, 0x25, 0x2B, 0x39, 0x00, 0x01, 0x03, 0x10, // _GMCTRP1 Gamma 0xE0, 0x10, 0x02, 0x1C, 0x07, 0x12, 0x37, 0x32, 0x29, 0x2D, 0x29, 0x25, 0x2B, 0x39, 0x00, 0x01, 0x03, 0x10, // _GMCTRP1 Gamma

View File

@ -221,7 +221,7 @@ mp_obj_t common_hal_bleio_adapter_start_scan(bleio_adapter_obj_t *self, uint8_t
mp_float_t interval, mp_float_t window, mp_int_t minimum_rssi, bool active) { mp_float_t interval, mp_float_t window, mp_int_t minimum_rssi, bool active) {
if (self->scan_results != NULL) { if (self->scan_results != NULL) {
if (!shared_module_bleio_scanresults_get_done(self->scan_results)) { 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; self->scan_results = NULL;
} }

View File

@ -248,7 +248,7 @@ STATIC int _discovered_characteristic_cb(uint16_t conn_handle,
((chr->properties & BLE_GATT_CHR_PROP_WRITE) != 0 ? CHAR_PROP_WRITE : 0) | ((chr->properties & BLE_GATT_CHR_PROP_WRITE) != 0 ? CHAR_PROP_WRITE : 0) |
((chr->properties & BLE_GATT_CHR_PROP_WRITE_NO_RSP) != 0 ? CHAR_PROP_WRITE_NO_RESPONSE : 0); ((chr->properties & BLE_GATT_CHR_PROP_WRITE_NO_RSP) != 0 ? 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( common_hal_bleio_characteristic_construct(
characteristic, service, chr->val_handle, uuid, characteristic, service, chr->val_handle, uuid,
props, SECURITY_MODE_OPEN, SECURITY_MODE_OPEN, props, SECURITY_MODE_OPEN, SECURITY_MODE_OPEN,

View File

@ -119,7 +119,7 @@ void alarm_touch_touchalarm_set_alarm(const bool deep_sleep, const size_t n_alar
for (uint8_t i = 1; i <= 14; i++) { for (uint8_t i = 1; i <= 14; i++) {
if ((touch_channel_mask & 1 << i) != 0) { if ((touch_channel_mask & 1 << i) != 0) {
touch_pad_t touch_channel = (touch_pad_t)i; touch_pad_t touch_channel = (touch_pad_t)i;
// intialize touchpad // initialize touchpad
peripherals_touch_init(touch_channel); peripherals_touch_init(touch_channel);
// wait for touch data to reset // wait for touch data to reset
@ -166,7 +166,7 @@ void alarm_touch_touchalarm_prepare_for_deep_sleep(void) {
peripherals_touch_never_reset(false); peripherals_touch_never_reset(false);
peripherals_touch_reset(); peripherals_touch_reset();
// intialize touchpad // initialize touchpad
peripherals_touch_init(touch_channel); peripherals_touch_init(touch_channel);
#if !defined(CONFIG_IDF_TARGET_ESP32) #if !defined(CONFIG_IDF_TARGET_ESP32)

View File

@ -123,7 +123,7 @@ void common_hal_pulseio_pulsein_construct(pulseio_pulsein_obj_t *self, const mcu
rmt_config_t config = RMT_DEFAULT_CONFIG_RX(pin->number, channel); rmt_config_t config = RMT_DEFAULT_CONFIG_RX(pin->number, channel);
config.rx_config.filter_en = true; config.rx_config.filter_en = true;
config.rx_config.idle_threshold = 30000; // 30*3=90ms idle required to register a sequence config.rx_config.idle_threshold = 30000; // 30*3=90ms idle required to register a sequence
config.clk_div = 240; // All measurements are divided by 3 to accomodate 65ms pulses config.clk_div = 240; // All measurements are divided by 3 to accommodate 65ms pulses
rmt_config(&config); rmt_config(&config);
rmt_driver_install(channel, 1000, 0); // TODO: pick a more specific buffer size? rmt_driver_install(channel, 1000, 0); // TODO: pick a more specific buffer size?

View File

@ -197,7 +197,7 @@ void common_hal_pwmio_pwmout_deinit(pwmio_pwmout_obj_t *self) {
if (!taken || self->variable_frequency) { if (!taken || self->variable_frequency) {
ledc_timer_rst(LEDC_LOW_SPEED_MODE, self->tim_handle.timer_num); ledc_timer_rst(LEDC_LOW_SPEED_MODE, self->tim_handle.timer_num);
reserved_timer_freq[self->tim_handle.timer_num] = 0; reserved_timer_freq[self->tim_handle.timer_num] = 0;
// if timer isn't varfreq this will be off aleady // if timer isn't varfreq this will be off already
varfreq_timers[self->tim_handle.timer_num] = false; varfreq_timers[self->tim_handle.timer_num] = false;
never_reset_tim[self->tim_handle.timer_num] = false; never_reset_tim[self->tim_handle.timer_num] = false;
} }

View File

@ -69,7 +69,7 @@ void common_hal_rotaryio_incrementalencoder_construct(rotaryio_incrementalencode
.unit = unit, .unit = unit,
}; };
// Reinitalize same unit, CHANNEL_1 with different parameters. // Reinitialize same unit, CHANNEL_1 with different parameters.
peripherals_pcnt_reinit(&pcnt_config_channel_1); peripherals_pcnt_reinit(&pcnt_config_channel_1);
self->pin_a = pin_a->number; self->pin_a = pin_a->number;

View File

@ -44,7 +44,7 @@ typedef struct {
} i2s_lcd_config_t; } i2s_lcd_config_t;
/** /**
* @brief Initilize i2s lcd driver. * @brief Initialize i2s lcd driver.
* *
* @param config configuration of i2s * @param config configuration of i2s
* *

View File

@ -93,7 +93,7 @@ SECTIONS
. = ALIGN(4); . = ALIGN(4);
_etext = .; /* define a global symbol at end of code */ _etext = .; /* define a global symbol at end of code */
_sidata = _etext; /* This is used by the startup in order to initialize the .data secion */ _sidata = _etext; /* This is used by the startup in order to initialize the .data section */
} >FLASH_FIRMWARE } >FLASH_FIRMWARE
/* Uninitialized data section */ /* Uninitialized data section */

View File

@ -72,7 +72,7 @@ static void ledda_init(void) {
// Set clock register to 12 MHz / 64 kHz - 1 // Set clock register to 12 MHz / 64 kHz - 1
ledda_write((12000000 / 64000) - 1, LEDDBR); ledda_write((12000000 / 64000) - 1, LEDDBR);
// Ensure LED "breathe" effect is diabled // Ensure LED "breathe" effect is disabled
ledda_write(0, LEDDBCRR); ledda_write(0, LEDDBCRR);
ledda_write(0, LEDDBCFR); ledda_write(0, LEDDBCFR);

View File

@ -6,7 +6,7 @@
_start: _start:
j crt_init j crt_init
# This sentinal ensures that this program is loaded # This sentinel ensures that this program is loaded
# to RAM when loaded using dfu-util. # to RAM when loaded using dfu-util.
#.word 0x17ab0f23 #.word 0x17ab0f23
#.word 0x10001000 #.word 0x10001000

View File

@ -64,7 +64,7 @@ void PLACE_IN_ITCM(common_hal_neopixel_write)(const digitalio_digitalinout_obj_t
const uint32_t pin = digitalinout->pin->number; const uint32_t pin = digitalinout->pin->number;
__disable_irq(); __disable_irq();
// Enable DWT in debug core. Useable when interrupts disabled, as opposed to Systick->VAL // Enable DWT in debug core. Usable when interrupts disabled, as opposed to Systick->VAL
CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk; CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk;
DWT->CTRL |= DWT_CTRL_CYCCNTENA_Msk; DWT->CTRL |= DWT_CTRL_CYCCNTENA_Msk;
DWT->CYCCNT = 0; DWT->CYCCNT = 0;

View File

@ -241,7 +241,7 @@ FLASHER ?=
ifeq ($(FLASHER),) ifeq ($(FLASHER),)
# Also update to bootloader settting to validate application and skip checksum ( app valid = 0x0001, crc = 0x0000 ) # Also update to bootloader setting to validate application and skip checksum ( app valid = 0x0001, crc = 0x0000 )
flash: $(BUILD)/firmware.hex flash: $(BUILD)/firmware.hex
nrfjprog --program $< --sectorerase -f $(MCU_VARIANT) nrfjprog --program $< --sectorerase -f $(MCU_VARIANT)
nrfjprog --erasepage $(BOOT_SETTING_ADDR) -f $(MCU_VARIANT) nrfjprog --erasepage $(BOOT_SETTING_ADDR) -f $(MCU_VARIANT)

View File

@ -286,7 +286,7 @@ typedef struct
/**@brief L2CAP event structure. */ /**@brief L2CAP event structure. */
typedef struct typedef struct
{ {
uint16_t conn_handle; /**< Connection Handle on which the event occured. */ uint16_t conn_handle; /**< Connection Handle on which the event occurred. */
uint16_t local_cid; /**< Local Channel ID of the L2CAP channel, or uint16_t local_cid; /**< Local Channel ID of the L2CAP channel, or
@ref BLE_L2CAP_CID_INVALID if not present. */ @ref BLE_L2CAP_CID_INVALID if not present. */
union union

View File

@ -287,7 +287,7 @@ typedef struct
/**@brief L2CAP event structure. */ /**@brief L2CAP event structure. */
typedef struct typedef struct
{ {
uint16_t conn_handle; /**< Connection Handle on which the event occured. */ uint16_t conn_handle; /**< Connection Handle on which the event occurred. */
uint16_t local_cid; /**< Local Channel ID of the L2CAP channel, or uint16_t local_cid; /**< Local Channel ID of the L2CAP channel, or
@ref BLE_L2CAP_CID_INVALID if not present. */ @ref BLE_L2CAP_CID_INVALID if not present. */
union union

View File

@ -275,8 +275,8 @@ typedef struct
* If the application returns from the fault handler the SoftDevice will call NVIC_SystemReset(). * If the application returns from the fault handler the SoftDevice will call NVIC_SystemReset().
* *
* @note It is recommended to either perform a reset in the fault handler or to let the SoftDevice reset the device. * @note It is recommended to either perform a reset in the fault handler or to let the SoftDevice reset the device.
* Otherwise SoC peripherals may behave in an undefined way. For example, the RADIO peripherial may * Otherwise SoC peripherals may behave in an undefined way. For example, the RADIO peripheral may
* continously transmit packets. * continuously transmit packets.
* *
* @note This callback is executed in HardFault context, thus SVC functions cannot be called from the fault callback. * @note This callback is executed in HardFault context, thus SVC functions cannot be called from the fault callback.
* *

View File

@ -104,7 +104,7 @@ Parsing hex file.
Erasing user available code and UICR flash areas. Erasing user available code and UICR flash areas.
Applying system reset. Applying system reset.
Checking that the area to write is not protected. Checking that the area to write is not protected.
Programing device. Programming device.
Applying system reset. Applying system reset.
Run. Run.
``` ```

View File

@ -117,7 +117,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
// { MP_ROM_QSTR(MP_QSTR_TFT_RESET), MP_ROM_PTR(&pin_P1_13) }, // { MP_ROM_QSTR(MP_QSTR_TFT_RESET), MP_ROM_PTR(&pin_P1_13) },
{ MP_ROM_QSTR(MP_QSTR_TFT_BACKLIGHT), MP_ROM_PTR(&pin_P1_13) }, { MP_ROM_QSTR(MP_QSTR_TFT_BACKLIGHT), MP_ROM_PTR(&pin_P1_13) },
// P28~P33/D28~D33 connecte into QSPI FlashROM (W25Q16JV_IQ) // P28~P33/D28~D33 connected into QSPI FlashROM (W25Q16JV_IQ)
{ MP_ROM_QSTR(MP_QSTR_P34), MP_ROM_PTR(&pin_P0_22) }, { MP_ROM_QSTR(MP_QSTR_P34), MP_ROM_PTR(&pin_P0_22) },
{ MP_ROM_QSTR(MP_QSTR_D34), MP_ROM_PTR(&pin_P0_22) }, { MP_ROM_QSTR(MP_QSTR_D34), MP_ROM_PTR(&pin_P0_22) },

View File

@ -8,11 +8,11 @@ We've also routed two I<sup>2</sup>C buses, 2 SPI buses, eleven GPIO, dedicated
## CircuitPython Pin Defs ## CircuitPython Pin Defs
CircuitPython pin definitions, while simialr to other boards represent a slight departure from just the typical `A` and `D` pin definitions. The majority of general pins are labled as `G` (or alternatively, `BUS`,) as the MicroMod system they build on uses those names to specify pins that may not be specficially analog or digital. CircuitPython pin definitions, while similar to other boards represent a slight departure from just the typical `A` and `D` pin definitions. The majority of general pins are labeled as `G` (or alternatively, `BUS`,) as the MicroMod system they build on uses those names to specify pins that may not be specficially analog or digital.
This can be somewhat confusing, especially around the analog pins. Here's a quick pin-map: This can be somewhat confusing, especially around the analog pins. Here's a quick pin-map:
MicroMod Pin # | ATP Pin Label | Pin Definition | Additional Definitons | Pin/Port Reference | Notes MicroMod Pin # | ATP Pin Label | Pin Definition | Additional Definitions | Pin/Port Reference | Notes
:--------------|:--------------|:--------------|:-----------------------|:-------------------|:------ :--------------|:--------------|:--------------|:-----------------------|:-------------------|:------
8 | G11 | | | (Not Connected) | 8 | G11 | | | (Not Connected) |
10 | D0 | D0 | | P0_27 | 10 | D0 | D0 | | P0_27 |

View File

@ -190,7 +190,7 @@ STATIC uint32_t ble_stack_enable(void) {
return err_code; return err_code;
} }
// Increase the GATT Server attribute size to accomodate both the CircuitPython built-in service // Increase the GATT Server attribute size to accommodate both the CircuitPython built-in service
// and anything the user does. // and anything the user does.
memset(&ble_conf, 0, sizeof(ble_conf)); memset(&ble_conf, 0, sizeof(ble_conf));
// Each increment to the BLE_GATTS_ATTR_TAB_SIZE_DEFAULT multiplier costs 1408 bytes. // Each increment to the BLE_GATTS_ATTR_TAB_SIZE_DEFAULT multiplier costs 1408 bytes.
@ -529,7 +529,7 @@ STATIC bool scan_on_ble_evt(ble_evt_t *ble_evt, void *scan_results_in) {
mp_obj_t common_hal_bleio_adapter_start_scan(bleio_adapter_obj_t *self, uint8_t *prefixes, size_t prefix_length, bool extended, mp_int_t buffer_size, mp_float_t timeout, mp_float_t interval, mp_float_t window, mp_int_t minimum_rssi, bool active) { mp_obj_t common_hal_bleio_adapter_start_scan(bleio_adapter_obj_t *self, uint8_t *prefixes, size_t prefix_length, bool extended, mp_int_t buffer_size, mp_float_t timeout, mp_float_t interval, mp_float_t window, mp_int_t minimum_rssi, bool active) {
if (self->scan_results != NULL) { if (self->scan_results != NULL) {
if (!shared_module_bleio_scanresults_get_done(self->scan_results)) { 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; self->scan_results = NULL;
} }

View File

@ -283,7 +283,7 @@ void common_hal_bleio_characteristic_set_cccd(bleio_characteristic_obj_t *self,
} }
// Write with response will return NRF_ERROR_BUSY if the response has not been received. // Write with response will return NRF_ERROR_BUSY if the response has not been received.
// Write without reponse will return NRF_ERROR_RESOURCES if too many writes are pending. // Write without response will return NRF_ERROR_RESOURCES if too many writes are pending.
if (err_code == NRF_ERROR_BUSY || err_code == NRF_ERROR_RESOURCES) { if (err_code == NRF_ERROR_BUSY || err_code == NRF_ERROR_RESOURCES) {
// We could wait for an event indicating the write is complete, but just retrying is easier. // We could wait for an event indicating the write is complete, but just retrying is easier.
RUN_BACKGROUND_TASKS; RUN_BACKGROUND_TASKS;

View File

@ -528,7 +528,7 @@ STATIC void on_char_discovery_rsp(ble_gattc_evt_char_disc_rsp_t *response, bleio
(gattc_char->char_props.write ? CHAR_PROP_WRITE : 0) | (gattc_char->char_props.write ? CHAR_PROP_WRITE : 0) |
(gattc_char->char_props.write_wo_resp ? CHAR_PROP_WRITE_NO_RESPONSE : 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( common_hal_bleio_characteristic_construct(
characteristic, m_char_discovery_service, gattc_char->handle_value, uuid, characteristic, m_char_discovery_service, gattc_char->handle_value, uuid,
props, SECURITY_MODE_OPEN, SECURITY_MODE_OPEN, props, SECURITY_MODE_OPEN, SECURITY_MODE_OPEN,

View File

@ -249,7 +249,7 @@ void common_hal_bleio_gattc_write(uint16_t handle, uint16_t conn_handle, mp_buff
} }
// Write with response will return NRF_ERROR_BUSY if the response has not been received. // Write with response will return NRF_ERROR_BUSY if the response has not been received.
// Write without reponse will return NRF_ERROR_RESOURCES if too many writes are pending. // Write without response will return NRF_ERROR_RESOURCES if too many writes are pending.
if (err_code == NRF_ERROR_BUSY || err_code == NRF_ERROR_RESOURCES) { if (err_code == NRF_ERROR_BUSY || err_code == NRF_ERROR_RESOURCES) {
// We could wait for an event indicating the write is complete, but just retrying is easier. // We could wait for an event indicating the write is complete, but just retrying is easier.
MICROPY_VM_HOOK_LOOP; MICROPY_VM_HOOK_LOOP;

View File

@ -55,7 +55,7 @@ void common_hal_mcu_disable_interrupts() {
// Unlike __disable_irq(), this should only be called the first time // Unlike __disable_irq(), this should only be called the first time
// "is_nested_critical_region" is sd's equivalent of our nesting count // "is_nested_critical_region" is sd's equivalent of our nesting count
// so a nested call would store 0 in the global and make the later // so a nested call would store 0 in the global and make the later
// exit call not actually reenable interrupts // exit call not actually re-enable interrupts
// //
// This only disables interrupts of priority 2 through 7; levels 0, 1, // This only disables interrupts of priority 2 through 7; levels 0, 1,
// and 4, are exclusive to softdevice and should never be used, so // and 4, are exclusive to softdevice and should never be used, so

View File

@ -94,7 +94,7 @@ STATIC void reset_single_pwmout(uint8_t i) {
for (int ch = 0; ch < CHANNELS_PER_PWM; ch++) { for (int ch = 0; ch < CHANNELS_PER_PWM; ch++) {
pwm_seq[i][ch] = (1 << 15); // polarity = 0 pwm_seq[i][ch] = (1 << 15); // polarity = 0
pwm->PSEL.OUT[ch] = 0xFFFFFFFF; // disconnnect from I/O pwm->PSEL.OUT[ch] = 0xFFFFFFFF; // disconnect from I/O
} }
} }

View File

@ -65,7 +65,7 @@
// This also includes mpconfigboard.h. // This also includes mpconfigboard.h.
#include "py/circuitpy_mpconfig.h" #include "py/circuitpy_mpconfig.h"
// Definitions that might be overriden by mpconfigboard.h // Definitions that might be overridden by mpconfigboard.h
#ifndef CIRCUITPY_INTERNAL_NVM_SIZE #ifndef CIRCUITPY_INTERNAL_NVM_SIZE
#define CIRCUITPY_INTERNAL_NVM_SIZE (8 * 1024) #define CIRCUITPY_INTERNAL_NVM_SIZE (8 * 1024)

View File

@ -59,7 +59,7 @@ static int sck_delay_saved = 0;
void qspi_disable(void) { void qspi_disable(void) {
// If VBUS is detected, no need to disable QSPI // If VBUS is detected, no need to disable QSPI
if (NRF_QSPI->ENABLE && !(NRF_POWER->USBREGSTATUS & POWER_USBREGSTATUS_VBUSDETECT_Msk)) { if (NRF_QSPI->ENABLE && !(NRF_POWER->USBREGSTATUS & POWER_USBREGSTATUS_VBUSDETECT_Msk)) {
// Keep CS high when QSPI is diabled // Keep CS high when QSPI is disabled
nrf_gpio_cfg_output(MICROPY_QSPI_CS); nrf_gpio_cfg_output(MICROPY_QSPI_CS);
nrf_gpio_pin_write(MICROPY_QSPI_CS, 1); nrf_gpio_pin_write(MICROPY_QSPI_CS, 1);

View File

@ -84,7 +84,7 @@ const mp_obj_type_t cyw43_pin_type = {
//| The low 4 bits, ``m``, are the power management mode: //| The low 4 bits, ``m``, are the power management mode:
//| * 0: disabled //| * 0: disabled
//| * 1: aggressive power saving which reduces wifi throughput //| * 1: aggressive power saving which reduces wifi throughput
//| * 2: Power saving with high througput //| * 2: Power saving with high throughput
//| //|
//| The next 8 bits, ``r``, specify "the maximum time to wait before going back to sleep" for power management mode 2. The units of ``r`` are 10ms. //| The next 8 bits, ``r``, specify "the maximum time to wait before going back to sleep" for power management mode 2. The units of ``r`` are 10ms.
//| //|

View File

@ -257,7 +257,7 @@ mp_uint_t common_hal_ssl_sslsocket_recv_into(ssl_sslsocket_obj_t *self, uint8_t
} else if (ret == MBEDTLS_ERR_SSL_WANT_WRITE) { } else if (ret == MBEDTLS_ERR_SSL_WANT_WRITE) {
// If handshake is not finished, read attempt may end up in protocol // If handshake is not finished, read attempt may end up in protocol
// wanting to write next handshake message. The same may happen with // wanting to write next handshake message. The same may happen with
// renegotation. // renegotiation.
ret = MP_EWOULDBLOCK; ret = MP_EWOULDBLOCK;
} }
DEBUG("raising errno [error case] %d\n", ret); DEBUG("raising errno [error case] %d\n", ret);
@ -276,7 +276,7 @@ mp_uint_t common_hal_ssl_sslsocket_send(ssl_sslsocket_obj_t *self, const uint8_t
} else if (ret == MBEDTLS_ERR_SSL_WANT_READ) { } else if (ret == MBEDTLS_ERR_SSL_WANT_READ) {
// If handshake is not finished, write attempt may end up in protocol // If handshake is not finished, write attempt may end up in protocol
// wanting to read next handshake message. The same may happen with // wanting to read next handshake message. The same may happen with
// renegotation. // renegotiation.
ret = MP_EWOULDBLOCK; ret = MP_EWOULDBLOCK;
} }
DEBUG("raising errno [error case] %d\n", ret); DEBUG("raising errno [error case] %d\n", ret);

View File

@ -176,7 +176,7 @@ void common_hal_wifi_radio_start_ap(wifi_radio_obj_t *self, uint8_t *ssid, size_
common_hal_wifi_radio_stop_ap(self); common_hal_wifi_radio_stop_ap(self);
// Channel can only be changed after inital powerup and config of ap. // Channel can only be changed after initial powerup and config of ap.
// Defaults to 1 if not set or invalid (i.e. 13) // Defaults to 1 if not set or invalid (i.e. 13)
cyw43_wifi_ap_set_channel(&cyw43_state, (const uint32_t)channel); cyw43_wifi_ap_set_channel(&cyw43_state, (const uint32_t)channel);

View File

@ -107,7 +107,7 @@ void raise_cyw_error(int err) {
mp_errno = MP_ETIMEDOUT; mp_errno = MP_ETIMEDOUT;
break; break;
default: default:
mp_raise_OSError_msg_varg(translate("Unkown error code %d"), err); mp_raise_OSError_msg_varg(translate("Unknown error code %d"), err);
} }
mp_raise_OSError(mp_errno); mp_raise_OSError(mp_errno);
} }

View File

@ -24,7 +24,7 @@ SECTIONS
. = ALIGN(4); . = ALIGN(4);
KEEP(*(.isr_vector)) /* Startup code */ KEEP(*(.isr_vector)) /* Startup code */
/* This first flash block is 16K annd the isr vectors only take up /* This first flash block is 16K and the isr vectors only take up
about 400 bytes. Micropython pads this with files, but this didn't about 400 bytes. Micropython pads this with files, but this didn't
work with the size of Circuitpython's ff object. */ work with the size of Circuitpython's ff object. */

View File

@ -26,7 +26,7 @@ SECTIONS
. = ALIGN(4); . = ALIGN(4);
KEEP(*(.isr_vector)) /* Startup code */ KEEP(*(.isr_vector)) /* Startup code */
/* This first flash block is 16K annd the isr vectors only take up /* This first flash block is 16K and the isr vectors only take up
about 400 bytes. Micropython pads this with files, but this didn't about 400 bytes. Micropython pads this with files, but this didn't
work with the size of Circuitpython's ff object. */ work with the size of Circuitpython's ff object. */

View File

@ -26,7 +26,7 @@ SECTIONS
. = ALIGN(4); . = ALIGN(4);
KEEP(*(.isr_vector)) /* Startup code */ KEEP(*(.isr_vector)) /* Startup code */
/* This first flash block is 16K annd the isr vectors only take up /* This first flash block is 16K and the isr vectors only take up
about 400 bytes. Micropython pads this with files, but this didn't about 400 bytes. Micropython pads this with files, but this didn't
work with the size of Circuitpython's ff object. */ work with the size of Circuitpython's ff object. */

View File

@ -14,7 +14,7 @@ LD_COMMON = boards/common_default.ld
LD_FILE = boards/STM32F401xd_fs.ld LD_FILE = boards/STM32F401xd_fs.ld
# Disable ulab as we're nearly out of space on this board due to # Disable ulab as we're nearly out of space on this board due to
# INTERNAL_FLASH_FILESYSTEM. It can probably be reenabled if we enable # INTERNAL_FLASH_FILESYSTEM. It can probably be re-enabled if we enable
# lto for this port, and if other stuff hasn't been added in the # lto for this port, and if other stuff hasn't been added in the
# meantime # meantime
CIRCUITPY_AESIO = 0 CIRCUITPY_AESIO = 0

View File

@ -54,7 +54,7 @@ uint8_t display_init_sequence[] = {
0xc5, 1, 0x0e, // _VMCTR1 VCOMH = 4V, VOML = -1.1V 0xc5, 1, 0x0e, // _VMCTR1 VCOMH = 4V, VOML = -1.1V
0x20, 0, // _INVOFF //MISMATCh 0x2a vs 0x20 0x20, 0, // _INVOFF //MISMATCh 0x2a vs 0x20
0x36, 1, 0x60, // _MADCTL bottom to top refresh 0x36, 1, 0x60, // _MADCTL bottom to top refresh
// 1 clk cycle nonoverlap, 2 cycle gate rise, 3 sycle osc equalie, // 1 clk cycle nonoverlap, 2 cycle gate rise, 3 cycle osc equalie,
// fix on VTL // fix on VTL
0x3a, 1, 0x05, // COLMOD - 16bit color 0x3a, 1, 0x05, // COLMOD - 16bit color
0xe0, 0x10, 0x02, 0x1c, 0x07, 0x12, 0xe0, 0x10, 0x02, 0x1c, 0x07, 0x12,

View File

@ -5,7 +5,7 @@ import digitalio
import supervisor import supervisor
import time import time
# Scenario: Enable 3V3 pin defintiion # Scenario: Enable 3V3 pin definition
# Then the symbol "board.ENABLE_3V3" is defined # Then the symbol "board.ENABLE_3V3" is defined
assert board.ENABLE_3V3 is not None assert board.ENABLE_3V3 is not None

View File

@ -35,7 +35,7 @@ extern "C" {
/** /**
* @brief How many milliseconds of audio can fit in the audio buffer(s). * @brief How many milliseconds of audio can fit in the audio buffer(s).
* Interrupts for recieved data fire at half this duration / twice the frequency. * Interrupts for received data fire at half this duration / twice the frequency.
*/ */
#ifndef MEMS_AUDIO_MS_BUFFER #ifndef MEMS_AUDIO_MS_BUFFER
#define MEMS_AUDIO_MS_BUFFER (1) #define MEMS_AUDIO_MS_BUFFER (1)

View File

@ -67,7 +67,7 @@ void common_hal_neopixel_write(const digitalio_digitalinout_obj_t *digitalinout,
uint32_t p_mask = pin_mask(digitalinout->pin->number); uint32_t p_mask = pin_mask(digitalinout->pin->number);
__disable_irq(); __disable_irq();
// Enable DWT in debug core. Useable when interrupts disabled, as opposed to Systick->VAL // Enable DWT in debug core. Usable when interrupts disabled, as opposed to Systick->VAL
CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk; CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk;
DWT->CTRL |= DWT_CTRL_CYCCNTENA_Msk; DWT->CTRL |= DWT_CTRL_CYCCNTENA_Msk;
DWT->CYCCNT = 0; DWT->CYCCNT = 0;

View File

@ -456,7 +456,7 @@ STATIC mp_obj_t extra_coverage(void) {
{ {
mp_printf(&mp_plat_print, "# VM\n"); mp_printf(&mp_plat_print, "# VM\n");
// call mp_execute_bytecode with invalide bytecode (should raise NotImplementedError) // call mp_execute_bytecode with invalid bytecode (should raise NotImplementedError)
mp_obj_fun_bc_t fun_bc; mp_obj_fun_bc_t fun_bc;
fun_bc.bytecode = (const byte *)"\x01"; // just needed for n_state fun_bc.bytecode = (const byte *)"\x01"; // just needed for n_state
mp_code_state_t *code_state = m_new_obj_var(mp_code_state_t, mp_obj_t, 1); mp_code_state_t *code_state = m_new_obj_var(mp_code_state_t, mp_obj_t, 1);

View File

@ -147,7 +147,7 @@ STATIC mp_obj_t mod_os_remove(mp_obj_t path_in) {
const char *path = mp_obj_str_get_str(path_in); const char *path = mp_obj_str_get_str(path_in);
// Note that POSIX requires remove() to be able to delete a directory // Note that POSIX requires remove() to be able to delete a directory
// too (act as rmdir()). This is POSIX extenstion to ANSI C semantics // too (act as rmdir()). This is POSIX extension to ANSI C semantics
// of that function. But Python remove() follows ANSI C, and explicitly // of that function. But Python remove() follows ANSI C, and explicitly
// required to raise exception on attempt to remove a directory. Thus, // required to raise exception on attempt to remove a directory. Thus,
// call POSIX unlink() here. // call POSIX unlink() here.

View File

@ -73,7 +73,7 @@ STATIC mp_obj_t mod_termios_tcsetattr(mp_obj_t fd_in, mp_obj_t when_in, mp_obj_t
// We don't export TCSANOW and friends to save on code space. Then // We don't export TCSANOW and friends to save on code space. Then
// common lazy sense says that passing 0 should be godo enough, and // common lazy sense says that passing 0 should be godo enough, and
// it is e.g. for glibc. But for other libc's it's not, so set just // it is e.g. for glibc. But for other libc's it's not, so set just
// treat 0 as defauling to TCSANOW. // treat 0 as defaulting to TCSANOW.
when = TCSANOW; when = TCSANOW;
} }

View File

@ -281,7 +281,7 @@ bool asm_thumb_b_n_label(asm_thumb_t *as, uint label) {
#define OP_BCC_N(cond, byte_offset) (0xd000 | ((cond) << 8) | (((byte_offset) >> 1) & 0x00ff)) #define OP_BCC_N(cond, byte_offset) (0xd000 | ((cond) << 8) | (((byte_offset) >> 1) & 0x00ff))
// all these bit arithmetics need coverage testing! // all these bit arithmetic need coverage testing!
#define OP_BCC_W_HI(cond, byte_offset) (0xf000 | ((cond) << 6) | (((byte_offset) >> 10) & 0x0400) | (((byte_offset) >> 14) & 0x003f)) #define OP_BCC_W_HI(cond, byte_offset) (0xf000 | ((cond) << 6) | (((byte_offset) >> 10) & 0x0400) | (((byte_offset) >> 14) & 0x003f))
#define OP_BCC_W_LO(byte_offset) (0x8000 | ((byte_offset) & 0x2000) | (((byte_offset) >> 1) & 0x0fff)) #define OP_BCC_W_LO(byte_offset) (0x8000 | ((byte_offset) & 0x2000) | (((byte_offset) >> 1) & 0x0fff))

View File

@ -393,7 +393,7 @@ extern const struct _mp_obj_module_t nvm_module;
// Native modules that are weak links can be accessed directly // Native modules that are weak links can be accessed directly
// by prepending their name with an underscore. This list should correspond to // by prepending their name with an underscore. This list should correspond to
// MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS, assuming you want the native modules // MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS, assuming you want the native modules
// to be accessible when overriden. // to be accessible when overridden.
#define MICROPY_PORT_BUILTIN_MODULE_ALT_NAMES #define MICROPY_PORT_BUILTIN_MODULE_ALT_NAMES

View File

@ -526,7 +526,7 @@ CFLAGS += -DUSB_NUM_ENDPOINT_PAIRS=$(USB_NUM_ENDPOINT_PAIRS)
CIRCUITPY_USTACK ?= 0 CIRCUITPY_USTACK ?= 0
CFLAGS += -DCIRCUITPY_USTACK=$(CIRCUITPY_USTACK) CFLAGS += -DCIRCUITPY_USTACK=$(CIRCUITPY_USTACK)
# for decompressing utlities # for decompressing utilities
CIRCUITPY_ZLIB ?= $(CIRCUITPY_FULL_BUILD) CIRCUITPY_ZLIB ?= $(CIRCUITPY_FULL_BUILD)
CFLAGS += -DCIRCUITPY_ZLIB=$(CIRCUITPY_ZLIB) CFLAGS += -DCIRCUITPY_ZLIB=$(CIRCUITPY_ZLIB)

View File

@ -3477,7 +3477,7 @@ mp_raw_code_t *mp_compile_to_raw_code(mp_parse_tree_t *parse_tree, qstr source_f
} }
} }
// update maximim number of labels needed // update maximum number of labels needed
if (comp->next_label > max_num_labels) { if (comp->next_label > max_num_labels) {
max_num_labels = comp->next_label; max_num_labels = comp->next_label;
} }

View File

@ -39,7 +39,7 @@
Routine for converting a arbitrary floating Routine for converting a arbitrary floating
point number into a string. point number into a string.
The code in this funcion was inspired from Fred Bayer's pdouble.c. The code in this function was inspired from Fred Bayer's pdouble.c.
Since pdouble.c was released as Public Domain, I'm releasing this Since pdouble.c was released as Public Domain, I'm releasing this
code as public domain as well. code as public domain as well.
@ -390,7 +390,7 @@ int mp_format_float(FPTYPE f, char *buf, size_t buf_size, char fmt, int prec, ch
--dec; --dec;
--num_digits_left; --num_digits_left;
if (digit_index <= 0) { if (digit_index <= 0) {
// Once we get below 1.0, we scale up f instead of calculting // Once we get below 1.0, we scale up f instead of calculating
// negative powers of 10 in u_base. This provides better // negative powers of 10 in u_base. This provides better
// renditions of exact decimals like 1/16 etc. // renditions of exact decimals like 1/16 etc.
f *= FPCONST(10.0); f *= FPCONST(10.0);

View File

@ -24,7 +24,7 @@ def check_non_ascii(msg):
# Replace <char><space> with <char | 0x80>. # Replace <char><space> with <char | 0x80>.
# Trival scheme to demo/test. # Trivial scheme to demo/test.
def space_compression(error_strings): def space_compression(error_strings):
for line in error_strings: for line in error_strings:
check_non_ascii(line) check_non_ascii(line)

View File

@ -13,7 +13,7 @@ OBJ_EXTRA_ORDER_DEPS =
# tree. # tree.
# #
# So for example, py/map.c would have an object file name py/map.o # So for example, py/map.c would have an object file name py/map.o
# The object files will go into the build directory and mantain the same # The object files will go into the build directory and maintain the same
# directory structure as the source tree. So the final dependency will look # directory structure as the source tree. So the final dependency will look
# like this: # like this:
# #
@ -142,7 +142,7 @@ endif
ifneq ($(PROG),) ifneq ($(PROG),)
# Build a standalone executable (unix does this) # Build a standalone executable (unix does this)
# The executable should have an .exe extension for builds targetting 'pure' # The executable should have an .exe extension for builds targeting 'pure'
# Windows, i.e. msvc or mingw builds, but not when using msys or cygwin's gcc. # Windows, i.e. msvc or mingw builds, but not when using msys or cygwin's gcc.
COMPILER_TARGET := $(shell $(CC) -dumpmachine) COMPILER_TARGET := $(shell $(CC) -dumpmachine)
ifneq (,$(findstring mingw,$(COMPILER_TARGET))) ifneq (,$(findstring mingw,$(COMPILER_TARGET)))

View File

@ -414,7 +414,7 @@ mp_obj_t MICROPY_WRAP_MP_BINARY_OP(mp_binary_op)(mp_binary_op_t op, mp_obj_t lhs
} else { } else {
// standard precision is enough for right-shift // standard precision is enough for right-shift
if (rhs_val >= (mp_int_t)(sizeof(lhs_val) * MP_BITS_PER_BYTE)) { if (rhs_val >= (mp_int_t)(sizeof(lhs_val) * MP_BITS_PER_BYTE)) {
// Shifting to big amounts is underfined behavior // Shifting to big amounts is undefined behavior
// in C and is CPU-dependent; propagate sign bit. // in C and is CPU-dependent; propagate sign bit.
rhs_val = sizeof(lhs_val) * MP_BITS_PER_BYTE - 1; rhs_val = sizeof(lhs_val) * MP_BITS_PER_BYTE - 1;
} }

View File

@ -171,7 +171,7 @@ bool mp_seq_cmp_objs(mp_uint_t op, const mp_obj_t *items1, size_t len1, const mp
continue; continue;
} }
// Othewise, if they are not equal, we can have final decision based on them // Otherwise, if they are not equal, we can have final decision based on them
if (op == MP_BINARY_OP_EQUAL) { if (op == MP_BINARY_OP_EQUAL) {
// In particular, if we are checking for equality, here're the answer // In particular, if we are checking for equality, here're the answer
return false; return false;

View File

@ -71,7 +71,7 @@
//| wake_alarm: Optional[circuitpython_typing.Alarm] //| wake_alarm: Optional[circuitpython_typing.Alarm]
//| """The most recently triggered alarm. If CircuitPython was sleeping, the alarm that woke it from sleep. //| """The most recently triggered alarm. If CircuitPython was sleeping, the alarm that woke it from sleep.
//| If no alarm occured since the last hard reset or soft restart, value is ``None``. //| If no alarm occurred since the last hard reset or soft restart, value is ``None``.
//| """ //| """
//| //|

View File

@ -33,7 +33,7 @@
#include "common-hal/digitalio/DigitalInOut.h" #include "common-hal/digitalio/DigitalInOut.h"
// Light sleep fully self-contained and does not exit user code. It will return // Light sleep fully self-contained and does not exit user code. It will return
// the same alarm object that was orignally passed in, unlike deep sleep, which // the same alarm object that was originally passed in, unlike deep sleep, which
// must create an identical copy due to the VM reset // must create an identical copy due to the VM reset
extern mp_obj_t common_hal_alarm_light_sleep_until_alarms(size_t n_alarms, const mp_obj_t *alarms); extern mp_obj_t common_hal_alarm_light_sleep_until_alarms(size_t n_alarms, const mp_obj_t *alarms);

Some files were not shown because too many files have changed in this diff Show More