Skip to content

Commit

Permalink
🐛 Spellcheck comments (#22496)
Browse files Browse the repository at this point in the history
codespell -q 3 --builtin=clear,rare,informal,code -S ./Marlin/src/lcd/language -L alo,amin,endcode,stdio,uint
  • Loading branch information
luzpaz authored Aug 4, 2021
1 parent 6a25e4e commit afca6e7
Show file tree
Hide file tree
Showing 135 changed files with 186 additions and 186 deletions.
2 changes: 1 addition & 1 deletion Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,7 @@
#endif

// Duet Smart Effector (for delta printers) - https://bit.ly/2ul5U7J
// When the pin is defined you can use M672 to set/reset the probe sensivity.
// When the pin is defined you can use M672 to set/reset the probe sensitivity.
//#define DUET_SMART_EFFECTOR
#if ENABLED(DUET_SMART_EFFECTOR)
#define SMART_EFFECTOR_MOD_PIN -1 // Connect a GPIO pin to the Smart Effector MOD pin
Expand Down
2 changes: 1 addition & 1 deletion Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -3912,7 +3912,7 @@
*/
#define I2CPE_MIN_UPD_TIME_MS 4 // (ms) Minimum time between encoder checks.

// Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
// Use a rolling average to identify persistent errors that indicate skips, as opposed to vibration and noise.
#define I2CPE_ERR_ROLLING_AVERAGE

#endif // I2C_POSITION_ENCODERS
Expand Down
2 changes: 1 addition & 1 deletion Marlin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ LIQUID_TWI2 ?= 0
WIRE ?= 0

# This defines if Tone is needed (i.e SPEAKER is defined in Configuration.h)
# Disabling this (and SPEAKER) saves approximatively 350 bytes of memory.
# Disabling this (and SPEAKER) saves approximately 350 bytes of memory.
TONE ?= 1

# This defines if U8GLIB is needed (may require RELOC_WORKAROUND)
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/AVR/fastio.h
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ enum ClockSource2 : char {
* PWM availability macros
*/

// Determine which harware PWMs are already in use
// Determine which hardware PWMs are already in use
#define _PWM_CHK_FAN_B(P) (P == E0_AUTO_FAN_PIN || P == E1_AUTO_FAN_PIN || P == E2_AUTO_FAN_PIN || P == E3_AUTO_FAN_PIN || P == E4_AUTO_FAN_PIN || P == E5_AUTO_FAN_PIN || P == E6_AUTO_FAN_PIN || P == E7_AUTO_FAN_PIN || P == CHAMBER_AUTO_FAN_PIN || P == COOLER_AUTO_FAN_PIN)
#if PIN_EXISTS(CONTROLLER_FAN)
#define PWM_CHK_FAN_B(P) (_PWM_CHK_FAN_B(P) || P == CONTROLLER_FAN_PIN)
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/DUE/HAL_SPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@
} while (--todo);
}

// Pointers to generic functions for block tranfers
// Pointers to generic functions for block transfers
static pfnSpiTxBlock spiTxBlock = (pfnSpiTxBlock)spiTxBlockX;
static pfnSpiRxBlock spiRxBlock = (pfnSpiRxBlock)spiRxBlockX;

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/DUE/usb/arduino_due_x.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
/* ------------------------------------------------------------------------ */

/**
* \page arduino_due_x_board_info "Arduino Due/X - Board informations"
* \page arduino_due_x_board_info "Arduino Due/X - Board information"
* This page lists several definition related to the board description.
*
*/
Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/HAL/DUE/usb/udd.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ typedef struct {
//! This buffer must be word align for DATA IN phase (use prefix COMPILER_WORD_ALIGNED for buffer)
uint8_t *payload;

//! Size of buffer to send or fill, and content the number of byte transfered
//! Size of buffer to send or fill, and content the number of byte transferred
uint16_t payload_size;

//! Callback called after reception of ZLP from setup request
Expand Down Expand Up @@ -132,7 +132,7 @@ typedef void (*udd_callback_halt_cleared_t)(void);
*
* \param status UDD_EP_TRANSFER_OK, if transfer is complete
* \param status UDD_EP_TRANSFER_ABORT, if transfer is aborted
* \param n number of data transfered
* \param n number of data transferred
*/
typedef void (*udd_callback_trans_t) (udd_ep_status_t status,
iram_size_t nb_transfered, udd_ep_id_t ep);
Expand Down Expand Up @@ -303,7 +303,7 @@ bool udd_ep_wait_stall_clear(udd_ep_id_t ep,
* The driver uses a specific DMA USB to transfer data
* from internal RAM to endpoint, if this one is available.
* When the transfer is finished or aborted (stall, reset, ...), the \a callback is called.
* The \a callback returns the transfer status and eventually the number of byte transfered.
* The \a callback returns the transfer status and eventually the number of byte transferred.
* Note: The control endpoint is not authorized.
*
* \param ep The ID of the endpoint to use
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/HAL/DUE/usb/udi_cdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ static void udi_cdc_ctrl_state_notify(uint8_t port, udd_ep_id_t ep);
*
* \param status UDD_EP_TRANSFER_OK, if transfer finished
* \param status UDD_EP_TRANSFER_ABORT, if transfer aborted
* \param n number of data transfered
* \param n number of data transferred
*/
static void udi_cdc_serial_state_msg_sent(udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep);

Expand Down Expand Up @@ -200,7 +200,7 @@ static void udi_cdc_data_received(udd_ep_status_t status, iram_size_t n, udd_ep_
*
* \param status UDD_EP_TRANSFER_OK, if transfer finished
* \param status UDD_EP_TRANSFER_ABORT, if transfer aborted
* \param n number of data transfered
* \param n number of data transferred
*/
static void udi_cdc_data_sent(udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep);

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/DUE/usb/udi_cdc_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ extern "C" {
*/
//@{
# if UDI_CDC_PORT_NB > 2
# error USBB, UDP, UDPHS and UOTGHS interfaces have not enought endpoints.
# error USBB, UDP, UDPHS and UOTGHS interfaces have not enough endpoints.
# endif
#define UDI_CDC_DATA_EP_IN_0 (1 | USB_EP_DIR_IN) // TX
#define UDI_CDC_DATA_EP_OUT_0 (2 | USB_EP_DIR_OUT) // RX
Expand Down
10 changes: 5 additions & 5 deletions Marlin/src/HAL/DUE/usb/udi_msc.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ static void udi_msc_cbw_wait(void);
*
* \param status UDD_EP_TRANSFER_OK, if transfer is finished
* \param status UDD_EP_TRANSFER_ABORT, if transfer is aborted
* \param nb_received number of data transfered
* \param nb_received number of data transferred
*/
static void udi_msc_cbw_received(udd_ep_status_t status,
iram_size_t nb_received, udd_ep_id_t ep);
Expand Down Expand Up @@ -211,7 +211,7 @@ static void udi_msc_data_send(uint8_t * buffer, uint8_t buf_size);
*
* \param status UDD_EP_TRANSFER_OK, if transfer finish
* \param status UDD_EP_TRANSFER_ABORT, if transfer aborted
* \param nb_sent number of data transfered
* \param nb_sent number of data transferred
*/
static void udi_msc_data_sent(udd_ep_status_t status, iram_size_t nb_sent,
udd_ep_id_t ep);
Expand Down Expand Up @@ -244,7 +244,7 @@ void udi_msc_csw_send(void);
*
* \param status UDD_EP_TRANSFER_OK, if transfer is finished
* \param status UDD_EP_TRANSFER_ABORT, if transfer is aborted
* \param nb_sent number of data transfered
* \param nb_sent number of data transferred
*/
static void udi_msc_csw_sent(udd_ep_status_t status, iram_size_t nb_sent,
udd_ep_id_t ep);
Expand Down Expand Up @@ -463,7 +463,7 @@ uint8_t udi_msc_getsetting(void)
static void udi_msc_cbw_invalid(void)
{
if (!udi_msc_b_cbw_invalid)
return; // Don't re-stall endpoint if error reseted by setup
return; // Don't re-stall endpoint if error reset by setup
udd_ep_set_halt(UDI_MSC_EP_OUT);
// If stall cleared then re-stall it. Only Setup MSC Reset can clear it
udd_ep_wait_stall_clear(UDI_MSC_EP_OUT, udi_msc_cbw_invalid);
Expand All @@ -472,7 +472,7 @@ static void udi_msc_cbw_invalid(void)
static void udi_msc_csw_invalid(void)
{
if (!udi_msc_b_cbw_invalid)
return; // Don't re-stall endpoint if error reseted by setup
return; // Don't re-stall endpoint if error reset by setup
udd_ep_set_halt(UDI_MSC_EP_IN);
// If stall cleared then re-stall it. Only Setup MSC Reset can clear it
udd_ep_wait_stall_clear(UDI_MSC_EP_IN, udi_msc_csw_invalid);
Expand Down
46 changes: 23 additions & 23 deletions Marlin/src/HAL/DUE/usb/uotghs_device_due.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ static void udd_sleep_mode(bool b_idle)
/**
* \name Control endpoint low level management routine.
*
* This function performs control endpoint mangement.
* This function performs control endpoint management.
* It handle the SETUP/DATA/HANDSHAKE phases of a control transaction.
*/
//@{
Expand Down Expand Up @@ -397,9 +397,9 @@ static void udd_ctrl_endofrequest(void);
/**
* \brief Main interrupt routine for control endpoint
*
* This switchs control endpoint events to correct sub function.
* This switches control endpoint events to correct sub function.
*
* \return \c 1 if an event about control endpoint is occured, otherwise \c 0.
* \return \c 1 if an event about control endpoint is occurred, otherwise \c 0.
*/
static bool udd_ctrl_interrupt(void);

Expand All @@ -410,7 +410,7 @@ static bool udd_ctrl_interrupt(void);
* \name Management of bulk/interrupt/isochronous endpoints
*
* The UDD manages the data transfer on endpoints:
* - Start data tranfer on endpoint with USB Device DMA
* - Start data transfer on endpoint with USB Device DMA
* - Send a ZLP packet if requested
* - Call callback registered to signal end of transfer
* The transfer abort and stall feature are supported.
Expand All @@ -431,7 +431,7 @@ typedef struct {
uint8_t *buf;
//! Size of buffer to send or fill
iram_size_t buf_size;
//!< Size of data transfered
//!< Size of data transferred
iram_size_t buf_cnt;
//!< Size of data loaded (or prepared for DMA) last time
iram_size_t buf_load;
Expand Down Expand Up @@ -486,7 +486,7 @@ static void udd_ep_finish_job(udd_ep_job_t * ptr_job, bool b_abort, uint8_t ep_n

#ifdef UDD_EP_DMA_SUPPORTED
/**
* \brief Start the next transfer if necessary or complet the job associated.
* \brief Start the next transfer if necessary or complete the job associated.
*
* \param ep endpoint number without direction flag
*/
Expand All @@ -496,9 +496,9 @@ static void udd_ep_finish_job(udd_ep_job_t * ptr_job, bool b_abort, uint8_t ep_n
/**
* \brief Main interrupt routine for bulk/interrupt/isochronous endpoints
*
* This switchs endpoint events to correct sub function.
* This switches endpoint events to correct sub function.
*
* \return \c 1 if an event about bulk/interrupt/isochronous endpoints has occured, otherwise \c 0.
* \return \c 1 if an event about bulk/interrupt/isochronous endpoints has occurred, otherwise \c 0.
*/
static bool udd_ep_interrupt(void);

Expand All @@ -520,7 +520,7 @@ static bool udd_ep_interrupt(void);
*
* Note:
* Here, the global interrupt mask is not clear when an USB interrupt is enabled
* because this one can not be occured during the USB ISR (=during INTX is masked).
* because this one can not be occurred during the USB ISR (=during INTX is masked).
* See Technical reference $3.8.3 Masking interrupt requests in peripheral modules.
*/
#ifdef UHD_ENABLE
Expand Down Expand Up @@ -787,7 +787,7 @@ void udd_attach(void)
udd_sleep_mode(true);
otg_unfreeze_clock();

// This section of clock check can be improved with a chek of
// This section of clock check can be improved with a check of
// USB clock source via sysclk()
// Check USB clock because the source can be a PLL
while (!Is_otg_clock_usable());
Expand All @@ -803,7 +803,7 @@ void udd_attach(void)
#ifdef USB_DEVICE_HS_SUPPORT
udd_enable_msof_interrupt();
#endif
// Reset following interupts flag
// Reset following interrupts flag
udd_ack_reset();
udd_ack_sof();
udd_ack_msof();
Expand Down Expand Up @@ -902,7 +902,7 @@ bool udd_ep_alloc(udd_ep_id_t ep, uint8_t bmAttributes,
}
dbg_print("alloc(%x, %d) ", ep, MaxEndpointSize);

// Bank choise
// Bank choice
switch (bmAttributes & USB_EP_TYPE_MASK) {
case USB_EP_TYPE_ISOCHRONOUS:
nb_bank = UDD_ISOCHRONOUS_NB_BANK(ep);
Expand Down Expand Up @@ -1228,7 +1228,7 @@ bool udd_ep_wait_stall_clear(udd_ep_id_t ep,

if (Is_udd_endpoint_stall_requested(ep)
|| ptr_job->stall_requested) {
// Endpoint halted then registes the callback
// Endpoint halted then registers the callback
ptr_job->busy = true;
ptr_job->call_nohalt = callback;
} else {
Expand Down Expand Up @@ -1386,7 +1386,7 @@ static void udd_ctrl_setup_received(void)

// Decode setup request
if (udc_process_setup() == false) {
// Setup request unknow then stall it
// Setup request unknown then stall it
udd_ctrl_stall_data();
udd_ack_setup_received(0);
return;
Expand Down Expand Up @@ -1447,7 +1447,7 @@ static void udd_ctrl_in_sent(void)
udd_ctrl_prev_payload_buf_cnt += udd_ctrl_payload_buf_cnt;
if ((udd_g_ctrlreq.req.wLength == udd_ctrl_prev_payload_buf_cnt)
|| b_shortpacket) {
// All data requested are transfered or a short packet has been sent
// All data requested are transferred or a short packet has been sent
// then it is the end of data phase.
// Generate an OUT ZLP for handshake phase.
udd_ctrl_send_zlp_out();
Expand Down Expand Up @@ -1516,7 +1516,7 @@ static void udd_ctrl_out_received(void)
// End of SETUP request:
// - Data IN Phase aborted,
// - or last Data IN Phase hidden by ZLP OUT sending quiclky,
// - or ZLP OUT received normaly.
// - or ZLP OUT received normally.
udd_ctrl_endofrequest();
} else {
// Protocol error during SETUP request
Expand Down Expand Up @@ -1544,7 +1544,7 @@ static void udd_ctrl_out_received(void)
(udd_ctrl_prev_payload_buf_cnt +
udd_ctrl_payload_buf_cnt))) {
// End of reception because it is a short packet
// Before send ZLP, call intermediat calback
// Before send ZLP, call intermediate callback
// in case of data receiv generate a stall
udd_g_ctrlreq.payload_size = udd_ctrl_payload_buf_cnt;
if (NULL != udd_g_ctrlreq.over_under_run) {
Expand All @@ -1565,7 +1565,7 @@ static void udd_ctrl_out_received(void)
if (udd_g_ctrlreq.payload_size == udd_ctrl_payload_buf_cnt) {
// Overrun then request a new payload buffer
if (!udd_g_ctrlreq.over_under_run) {
// No callback availabled to request a new payload buffer
// No callback available to request a new payload buffer
udd_ctrl_stall_data();
// Ack reception of OUT to replace NAK by a STALL
udd_ack_out_received(0);
Expand Down Expand Up @@ -1805,7 +1805,7 @@ static void udd_ep_trans_done(udd_ep_id_t ep)
// transfer size of UDD_ENDPOINT_MAX_TRANS Bytes
next_trans = UDD_ENDPOINT_MAX_TRANS;

// Set 0 to tranfer the maximum
// Set 0 to transfer the maximum
udd_dma_ctrl = UOTGHS_DEVDMACONTROL_BUFF_LENGTH(0);
} else {
udd_dma_ctrl = UOTGHS_DEVDMACONTROL_BUFF_LENGTH(next_trans);
Expand Down Expand Up @@ -1850,7 +1850,7 @@ static void udd_ep_trans_done(udd_ep_id_t ep)
}
cpu_irq_restore(flags);

// Here a ZLP has been recieved
// Here a ZLP has been received
// and the DMA transfer must be not started.
// It is the end of transfer
ptr_job->buf_size = ptr_job->buf_cnt;
Expand Down Expand Up @@ -1991,13 +1991,13 @@ static bool udd_ep_interrupt(void)
}
dbg_print("dma%x: ", ep);
udd_disable_endpoint_dma_interrupt(ep);
// Save number of data no transfered
// Save number of data no transferred
nb_remaining = (udd_endpoint_dma_get_status(ep) &
UOTGHS_DEVDMASTATUS_BUFF_COUNT_Msk)
>> UOTGHS_DEVDMASTATUS_BUFF_COUNT_Pos;
if (nb_remaining) {
// Transfer no complete (short packet or ZLP) then:
// Update number of data transfered
// Update number of data transferred
ptr_job->buf_cnt -= nb_remaining;
// Set transfer complete to stop the transfer
ptr_job->buf_size = ptr_job->buf_cnt;
Expand Down Expand Up @@ -2056,7 +2056,7 @@ static bool udd_ep_interrupt(void)
udd_disable_endpoint_interrupt(ep);

Assert(ptr_job->stall_requested);
// A stall has been requested during backgound transfer
// A stall has been requested during background transfer
ptr_job->stall_requested = false;
udd_disable_endpoint_bank_autoswitch(ep);
udd_enable_stall_handshake(ep);
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/DUE/usb/usb_protocol_msc.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ struct usb_msc_cbw {
struct usb_msc_csw {
le32_t dCSWSignature; //!< Must contain 'USBS'
le32_t dCSWTag; //!< Same as dCBWTag
le32_t dCSWDataResidue; //!< Number of bytes not transfered
le32_t dCSWDataResidue; //!< Number of bytes not transferred
uint8_t bCSWStatus; //!< Status code
};

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/LINUX/hardware/Heater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void Heater::update() {
}

void Heater::interrupt(GpioEvent ev) {
// ununsed
// unused
}

#endif // __PLAT_LINUX__
2 changes: 1 addition & 1 deletion Marlin/src/HAL/LINUX/include/pinmapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ constexpr bool VALID_PIN(const pin_t p) { return WITHIN(p, 0, NUM_DIGITAL_PINS);
// Test whether the pin is PWM
constexpr bool PWM_PIN(const pin_t p) { return false; }

// Test whether the pin is interruptable
// Test whether the pin is interruptible
constexpr bool INTERRUPT_PIN(const pin_t p) { return false; }

// Get the pin number at the given index
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/SAMD51/HAL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
// Struct must be 32 bits aligned because of DMA accesses but fields needs to be 8 bits packed
typedef struct __attribute__((aligned(4), packed)) {
ADC_INPUTCTRL_Type INPUTCTRL;
} HAL_DMA_DAC_Registers; // DMA transfered registers
} HAL_DMA_DAC_Registers; // DMA transferred registers

#endif

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/SAMD51/fastio.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
*/
#define PWM_PIN(P) (WITHIN(P, 2, 13) || WITHIN(P, 22, 23) || WITHIN(P, 44, 45) || P == 48)

// Return fullfilled ADCx->INPUTCTRL.reg
// Return fulfilled ADCx->INPUTCTRL.reg
#define PIN_TO_INPUTCTRL(P) ( (PIN_TO_AIN(P) == 0) ? ADC_INPUTCTRL_MUXPOS_AIN0 \
: (PIN_TO_AIN(P) == 1) ? ADC_INPUTCTRL_MUXPOS_AIN1 \
: (PIN_TO_AIN(P) == 2) ? ADC_INPUTCTRL_MUXPOS_AIN2 \
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/SAMD51/timers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
tc->COUNT32.INTENCLR.reg = TC_INTENCLR_OVF; // disable overflow interrupt

// TCn clock setup
const uint8_t clockID = GCLK_CLKCTRL_IDs[TCC_INST_NUM + timer_num]; // TC clock are preceeded by TCC ones
const uint8_t clockID = GCLK_CLKCTRL_IDs[TCC_INST_NUM + timer_num]; // TC clock are preceded by TCC ones
GCLK->PCHCTRL[clockID].bit.CHEN = false;
SYNC(GCLK->PCHCTRL[clockID].bit.CHEN);
GCLK->PCHCTRL[clockID].reg = GCLK_PCHCTRL_GEN_GCLK0 | GCLK_PCHCTRL_CHEN; // 120MHz startup code programmed
Expand Down
Loading

0 comments on commit afca6e7

Please sign in to comment.