all: Fix spelling mistakes based on codespell check.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2023-03-08 14:10:02 +11:00
parent e160fe7bc6
commit b1229efbd1
191 changed files with 282 additions and 282 deletions

View File

@@ -98,7 +98,7 @@ Note: further tuning of features to include in bluetooth or even setting up the
## Compile with freeze manifest
Freeze manifests can be used by definining `FROZEN_MANIFEST` pointing to a
Freeze manifests can be used by defining `FROZEN_MANIFEST` pointing to a
`manifest.py`. This can either be done by a `make` invocation or by defining
it in the specific target board's `mpconfigboard.mk`.
@@ -132,8 +132,8 @@ For example:
## Set file system size
The size of the file system on the internal flash is configured by the linker
script parameter `_fs_size`. This can either be overriden by the linker script
or dynamically through the makefile. By seting a value to the `FS_SIZE`.
script parameter `_fs_size`. This can either be overridden by the linker script
or dynamically through the makefile. By setting a value to the `FS_SIZE`.
The number will be passed directly to the linker scripts in order to calculate
the start and end of the file system. Note that the parameter value must be in
linker script syntax as it is passed directly.
@@ -215,7 +215,7 @@ Install the necessary Python packages that will be used for flashing using the b
The `intelhex` provides the `hexmerge.py` utility which is used by the Makefile
to trim of the MBR in case SoftDevice flashing is requested.
`nrfutil` as flashing backend also requires a serial port paramter to be defined
`nrfutil` as flashing backend also requires a serial port parameter to be defined
in addition to the `deploy` target of make. For example:
make BOARD=nrf52840-mdk-usb-dongle NRFUTIL_PORT=/dev/ttyACM0 deploy

View File

@@ -23,7 +23,7 @@ import time
class IMU:
def __init__(self, bus):
"""Initalizes Gyro, Accelerometer and Magnetometer using default values."""
"""Initializes Gyro, Accelerometer and Magnetometer using default values."""
if 0x68 in bus.scan():
from bmm150 import BMM150
from bmi270 import BMI270

View File

@@ -13,7 +13,7 @@ SUPPORTED_FN = {"UART": ["RX", "TX", "CTS", "RTS"]}
def parse_pin(name_str):
"""Parses a string and returns a pin-num."""
if len(name_str) < 1:
raise ValueError("Expecting pin name to be at least 4 charcters.")
raise ValueError("Expecting pin name to be at least 4 characters.")
if name_str[0] != "P":
raise ValueError("Expecting pin name to start with P")
pin_str = name_str[1:].split("/")[0]

View File

@@ -219,7 +219,7 @@ STATIC mp_obj_t microbit_image_make_new(const mp_obj_type_t *type_in, mp_uint_t
const char *str = mp_obj_str_get_data(args[0], &len);
// make image from string
if (len == 1) {
/* For a single charater, return the font glyph */
/* For a single character, return the font glyph */
return microbit_image_for_char(str[0]);
} else {
/* Otherwise parse the image description string */
@@ -305,7 +305,7 @@ STATIC void image_blit(microbit_image_obj_t *src, greyscale_t *dest, mp_int_t x,
greyscaleSetPixelValue(dest, i+xdest-x, j+ydest-y, val);
}
}
// Adjust intersection rectange to dest
// Adjust intersection rectangle to dest
intersect_x0 += xdest-x;
intersect_y0 += ydest-y;
intersect_x1 += xdest-x;

View File

@@ -480,7 +480,7 @@ bool ble_drv_advertise_data(ubluepy_advertise_data_t * p_adv_params) {
// do encoding into the adv buffer
if (sd_ble_uuid_encode(&uuid, &encoded_size, &adv_data[byte_pos]) != 0) {
mp_raise_msg(&mp_type_OSError, MP_ERROR_TEXT("can't encode UUID into advertisment packet"));
mp_raise_msg(&mp_type_OSError, MP_ERROR_TEXT("can't encode UUID into advertisement packet"));
}
BLE_DRIVER_LOG("encoded uuid for service %u: ", 0);
@@ -528,7 +528,7 @@ bool ble_drv_advertise_data(ubluepy_advertise_data_t * p_adv_params) {
// do encoding into the adv buffer
if (sd_ble_uuid_encode(&uuid, &encoded_size, &adv_data[byte_pos]) != 0) {
mp_raise_msg(&mp_type_OSError, MP_ERROR_TEXT("can't encode UUID into advertisment packet"));
mp_raise_msg(&mp_type_OSError, MP_ERROR_TEXT("can't encode UUID into advertisement packet"));
}
BLE_DRIVER_LOG("encoded uuid for service %u: ", 0);
@@ -552,7 +552,7 @@ bool ble_drv_advertise_data(ubluepy_advertise_data_t * p_adv_params) {
if ((p_adv_params->data_len > 0) && (p_adv_params->p_data != NULL)) {
if (p_adv_params->data_len + byte_pos > BLE_GAP_ADV_MAX_SIZE) {
mp_raise_msg(&mp_type_OSError, MP_ERROR_TEXT("can't fit data into advertisment packet"));
mp_raise_msg(&mp_type_OSError, MP_ERROR_TEXT("can't fit data into advertisement packet"));
}
memcpy(adv_data, p_adv_params->p_data, p_adv_params->data_len);
@@ -590,12 +590,12 @@ bool ble_drv_advertise_data(ubluepy_advertise_data_t * p_adv_params) {
#if (BLUETOOTH_SD == 110)
m_adv_params.fp = BLE_GAP_ADV_FP_ANY;
m_adv_params.timeout = 0; // infinite advertisment
m_adv_params.timeout = 0; // infinite advertisement
#else
m_adv_params.properties.anonymous = 0;
m_adv_params.properties.include_tx_power = 0;
m_adv_params.filter_policy = 0;
m_adv_params.max_adv_evts = 0; // infinite advertisment
m_adv_params.max_adv_evts = 0; // infinite advertisement
m_adv_params.primary_phy = BLE_GAP_PHY_AUTO;
m_adv_params.secondary_phy = BLE_GAP_PHY_AUTO;
m_adv_params.scan_req_notification = 0; // Do not raise scan request notifications when scanned.
@@ -606,12 +606,12 @@ bool ble_drv_advertise_data(ubluepy_advertise_data_t * p_adv_params) {
#if (BLUETOOTH_SD == 110)
if ((err_code = sd_ble_gap_adv_data_set(adv_data, byte_pos, NULL, 0)) != 0) {
mp_raise_msg_varg(&mp_type_OSError,
MP_ERROR_TEXT("Can not apply advertisment data. status: 0x" HEX2_FMT), (uint16_t)err_code);
MP_ERROR_TEXT("Can not apply advertisement data. status: 0x" HEX2_FMT), (uint16_t)err_code);
}
#else
if ((err_code = sd_ble_gap_adv_set_configure(&m_adv_handle, &m_adv_data, &m_adv_params)) != 0) {
mp_raise_msg_varg(&mp_type_OSError,
MP_ERROR_TEXT("Can not apply advertisment data. status: 0x" HEX2_FMT), (uint16_t)err_code);
MP_ERROR_TEXT("Can not apply advertisement data. status: 0x" HEX2_FMT), (uint16_t)err_code);
}
#endif
BLE_DRIVER_LOG("Set Adv data size: " UINT_FMT "\n", byte_pos);
@@ -626,7 +626,7 @@ bool ble_drv_advertise_data(ubluepy_advertise_data_t * p_adv_params) {
#endif
if (err_code != 0) {
mp_raise_msg_varg(&mp_type_OSError,
MP_ERROR_TEXT("Can not start advertisment. status: 0x" HEX2_FMT), (uint16_t)err_code);
MP_ERROR_TEXT("Can not start advertisement. status: 0x" HEX2_FMT), (uint16_t)err_code);
}
m_adv_in_progress = true;
@@ -641,12 +641,12 @@ void ble_drv_advertise_stop(void) {
#if (BLUETOOTH_SD == 110)
if ((err_code = sd_ble_gap_adv_stop()) != 0) {
mp_raise_msg_varg(&mp_type_OSError,
MP_ERROR_TEXT("Can not stop advertisment. status: 0x" HEX2_FMT), (uint16_t)err_code);
MP_ERROR_TEXT("Can not stop advertisement. status: 0x" HEX2_FMT), (uint16_t)err_code);
}
#else
if ((err_code = sd_ble_gap_adv_stop(m_adv_handle)) != 0) {
mp_raise_msg_varg(&mp_type_OSError,
MP_ERROR_TEXT("Can not stop advertisment. status: 0x" HEX2_FMT), (uint16_t)err_code);
MP_ERROR_TEXT("Can not stop advertisement. status: 0x" HEX2_FMT), (uint16_t)err_code);
}
#endif
}

View File

@@ -137,7 +137,7 @@ int set_ticker_callback(uint32_t index, ticker_callback_ptr func, int32_t initia
ticker->INTENCLR = masks[index];
ticker->TASKS_CAPTURE[index] = 1;
uint32_t t = FastTicker->CC[index];
// Need to make sure that set tick is aligned to lastest tick
// Need to make sure that set tick is aligned to latest tick
// Use CC[3] as a reference, as that is always up-to-date.
int32_t cc3 = FastTicker->CC[3];
int32_t delta = t+initial_delay_us-cc3;

View File

@@ -53,7 +53,7 @@ def generate_eddystone_adv_packet(url):
constants.ad_types.AD_TYPE_SERVICE_DATA, service_data
)
# generate advertisment packet
# generate advertisement packet
packet = bytearray([])
packet.extend(packet_flags)
packet.extend(packet_uuid16)

View File

@@ -42,7 +42,7 @@ def event_handler(id, handle, data):
rtc.stop()
# indicate 'disconnected'
LED(1).off()
# restart advertisment
# restart advertisement
periph.advertise(device_name="micr_temp", services=[serv_env_sense])
elif id == constants.EVT_GATTS_WRITE:

View File

@@ -618,7 +618,7 @@ MP_DEFINE_CONST_OBJ_TYPE(
/// x3 = machine.Pin.board.X3
/// x3_af = x3.af_list()
///
/// x3_af will now contain an array of PinAF objects which are availble on
/// x3_af will now contain an array of PinAF objects which are available on
/// pin X3.
///
/// For the pyboard, x3_af would contain:

View File

@@ -135,7 +135,7 @@ STATIC mp_obj_t machine_timer_make_new(const mp_obj_type_t *type, size_t n_args,
}
// Timer peripheral usage:
// Every timer instance has a numer of capture/compare (CC) registers.
// Every timer instance has a number of capture/compare (CC) registers.
// These can store either the value to compare against (to trigger an
// interrupt or a shortcut) or store a value returned from a
// capture/compare event.

View File

@@ -29,7 +29,7 @@
/* Examples:
Advertisment:
Advertisement:
from ubluepy import Peripheral
p = Peripheral()

View File

@@ -165,7 +165,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(ubluepy_peripheral_set_conn_handler_obj, periph
#if MICROPY_PY_UBLUEPY_PERIPHERAL
/// \method advertise(device_name, [service=[service1, service2, ...]], [data=bytearray], [connectable=True])
/// Start advertising. Connectable advertisment type by default.
/// Start advertising. Connectable advertisement type by default.
///
STATIC mp_obj_t peripheral_advertise(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
static const mp_arg_t allowed_args[] = {
@@ -234,7 +234,7 @@ STATIC mp_obj_t peripheral_advertise(mp_uint_t n_args, const mp_obj_t *pos_args,
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(ubluepy_peripheral_advertise_obj, 0, peripheral_advertise);
/// \method advertise_stop()
/// Stop advertisment if any onging advertisment.
/// Stop advertisement if any onging advertisement.
///
STATIC mp_obj_t peripheral_advertise_stop(mp_obj_t self_in) {
ubluepy_peripheral_obj_t *self = MP_OBJ_TO_PTR(self_in);

View File

@@ -71,7 +71,7 @@ STATIC mp_obj_t scan_entry_get_rssi(mp_obj_t self_in) {
STATIC MP_DEFINE_CONST_FUN_OBJ_1(bluepy_scan_entry_get_rssi_obj, scan_entry_get_rssi);
/// \method getScanData()
/// Return list of the scan data tupples (ad_type, description, value)
/// Return list of the scan data tuples (ad_type, description, value)
///
STATIC mp_obj_t scan_entry_get_scan_data(mp_obj_t self_in) {
ubluepy_scan_entry_obj_t * self = MP_OBJ_TO_PTR(self_in);

View File

@@ -127,7 +127,7 @@ extern const mp_obj_type_t uos_mbfs_textio_type;
// Page indexes count down from the end of ROM.
STATIC uint8_t first_page_index;
STATIC uint8_t last_page_index;
// The number of useable chunks in the file system.
// The number of usable chunks in the file system.
STATIC uint8_t chunks_in_file_system;
// Index of chunk to start searches. This is randomised to even out wear.
STATIC uint8_t start_index;