Use American English

This commit is contained in:
Scott Lahteine 2018-08-22 17:14:38 -05:00
parent 6483285bc5
commit 0987ed2a18
18 changed files with 35 additions and 35 deletions

View file

@ -59,7 +59,7 @@ extern "C" {
// Runs after clock init and before global static constructors // Runs after clock init and before global static constructors
void SystemPostInit() { void SystemPostInit() {
_millis = 0; // Initialise the millisecond counter value; _millis = 0; // Initialize the millisecond counter value
SysTick_Config(SystemCoreClock / 1000); // Start millisecond global counter SysTick_Config(SystemCoreClock / 1000); // Start millisecond global counter
// Runs before setup() need to configure LED_PIN and use to indicate succsessful bootloader execution // Runs before setup() need to configure LED_PIN and use to indicate succsessful bootloader execution
@ -96,7 +96,7 @@ int main(void) {
while (!USB_Configuration && PENDING(millis(), usb_timeout)) { while (!USB_Configuration && PENDING(millis(), usb_timeout)) {
delay(50); delay(50);
#if PIN_EXISTS(LED) #if PIN_EXISTS(LED)
TOGGLE(LED_PIN); // Flash fast while USB initialisation completes TOGGLE(LED_PIN); // Flash quickly during USB initialization
#endif #endif
} }
@ -105,7 +105,7 @@ int main(void) {
#if NUM_SERIAL > 1 #if NUM_SERIAL > 1
MYSERIAL1.begin(BAUDRATE); MYSERIAL1.begin(BAUDRATE);
#endif #endif
SERIAL_PRINTF("\n\necho:%s (%dMhz) Initialised\n", isLPC1769() ? "LPC1769" : "LPC1768", SystemCoreClock / 1000000); SERIAL_PRINTF("\n\necho:%s (%dMhz) Initialized\n", isLPC1769() ? "LPC1769" : "LPC1768", SystemCoreClock / 1000000);
SERIAL_FLUSHTX(); SERIAL_FLUSHTX();
#endif #endif

View file

@ -78,7 +78,7 @@ static uint16_t EE_VerifyPageFullyErased(uint32_t Address);
* @retval - Flash error code: on write Flash error * @retval - Flash error code: on write Flash error
* - FLASH_COMPLETE: on success * - FLASH_COMPLETE: on success
*/ */
uint16_t EE_Initialise(void) { uint16_t EE_Initialize(void) {
uint16_t PageStatus0 = 6, PageStatus1 = 6; uint16_t PageStatus0 = 6, PageStatus1 = 6;
uint16_t VarIdx = 0; uint16_t VarIdx = 0;
uint16_t EepromStatus = 0, ReadStatus = 0; uint16_t EepromStatus = 0, ReadStatus = 0;

View file

@ -108,7 +108,7 @@
/* Exported types ------------------------------------------------------------*/ /* Exported types ------------------------------------------------------------*/
/* Exported macro ------------------------------------------------------------*/ /* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */ /* Exported functions ------------------------------------------------------- */
uint16_t EE_Initialise(void); uint16_t EE_Initialize(void);
uint16_t EE_ReadVariable(uint16_t VirtAddress, uint16_t* Data); uint16_t EE_ReadVariable(uint16_t VirtAddress, uint16_t* Data);
uint16_t EE_WriteVariable(uint16_t VirtAddress, uint16_t Data); uint16_t EE_WriteVariable(uint16_t VirtAddress, uint16_t Data);

View file

@ -59,7 +59,7 @@
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Private Variables // Private Variables
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
static bool eeprom_initialised = false; static bool eeprom_initialized = false;
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Function prototypes // Function prototypes
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
@ -82,17 +82,17 @@ static bool eeprom_initialised = false;
void eeprom_init() { void eeprom_init() {
if (!eeprom_initialised) { if (!eeprom_initialized) {
HAL_FLASH_Unlock(); HAL_FLASH_Unlock();
__HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_OPERR | FLASH_FLAG_WRPERR |FLASH_FLAG_PGAERR | FLASH_FLAG_PGPERR | FLASH_FLAG_PGSERR); __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_OPERR | FLASH_FLAG_WRPERR |FLASH_FLAG_PGAERR | FLASH_FLAG_PGPERR | FLASH_FLAG_PGSERR);
/* EEPROM Init */ /* EEPROM Init */
if (EE_Initialise() != EE_OK) if (EE_Initialize() != EE_OK)
for (;;) HAL_Delay(1); // Spin forever until watchdog reset for (;;) HAL_Delay(1); // Spin forever until watchdog reset
HAL_FLASH_Lock(); HAL_FLASH_Lock();
eeprom_initialised = true; eeprom_initialized = true;
} }
} }

View file

@ -69,11 +69,11 @@ stm32f4_timer_t TimerHandle[NUM_HARDWARE_TIMERS];
// Public functions // Public functions
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
bool timers_initialised[NUM_HARDWARE_TIMERS] = {false}; bool timers_initialized[NUM_HARDWARE_TIMERS] = {false};
void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) { void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
if (!timers_initialised[timer_num]) { if (!timers_initialized[timer_num]) {
constexpr uint32_t step_prescaler = STEPPER_TIMER_PRESCALE - 1, constexpr uint32_t step_prescaler = STEPPER_TIMER_PRESCALE - 1,
temp_prescaler = TEMP_TIMER_PRESCALE - 1; temp_prescaler = TEMP_TIMER_PRESCALE - 1;
switch (timer_num) { switch (timer_num) {
@ -111,7 +111,7 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
HAL_NVIC_SetPriority(TEMP_TIMER_IRQ_ID, 2, 0); HAL_NVIC_SetPriority(TEMP_TIMER_IRQ_ID, 2, 0);
break; break;
} }
timers_initialised[timer_num] = true; timers_initialized[timer_num] = true;
} }
#ifdef STM32GENERIC #ifdef STM32GENERIC

View file

@ -78,7 +78,7 @@ static uint16_t EE_VerifyPageFullyErased(uint32_t Address);
* @retval - Flash error code: on write Flash error * @retval - Flash error code: on write Flash error
* - FLASH_COMPLETE: on success * - FLASH_COMPLETE: on success
*/ */
uint16_t EE_Initialise(void) { uint16_t EE_Initialize(void) {
uint16_t PageStatus0 = 6, PageStatus1 = 6; uint16_t PageStatus0 = 6, PageStatus1 = 6;
uint16_t VarIdx = 0; uint16_t VarIdx = 0;
uint16_t EepromStatus = 0, ReadStatus = 0; uint16_t EepromStatus = 0, ReadStatus = 0;

View file

@ -109,7 +109,7 @@
/* Exported types ------------------------------------------------------------*/ /* Exported types ------------------------------------------------------------*/
/* Exported macro ------------------------------------------------------------*/ /* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */ /* Exported functions ------------------------------------------------------- */
uint16_t EE_Initialise(void); uint16_t EE_Initialize(void);
uint16_t EE_ReadVariable(uint16_t VirtAddress, uint16_t* Data); uint16_t EE_ReadVariable(uint16_t VirtAddress, uint16_t* Data);
uint16_t EE_WriteVariable(uint16_t VirtAddress, uint16_t Data); uint16_t EE_WriteVariable(uint16_t VirtAddress, uint16_t Data);

View file

@ -57,7 +57,7 @@
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Private Variables // Private Variables
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
static bool eeprom_initialised = false; static bool eeprom_initialized = false;
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Function prototypes // Function prototypes
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
@ -80,17 +80,17 @@ static bool eeprom_initialised = false;
void eeprom_init() { void eeprom_init() {
if (!eeprom_initialised) { if (!eeprom_initialized) {
HAL_FLASH_Unlock(); HAL_FLASH_Unlock();
__HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_OPERR | FLASH_FLAG_WRPERR |FLASH_FLAG_PGAERR | FLASH_FLAG_PGPERR | FLASH_FLAG_PGSERR); __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_OPERR | FLASH_FLAG_WRPERR |FLASH_FLAG_PGAERR | FLASH_FLAG_PGPERR | FLASH_FLAG_PGSERR);
/* EEPROM Init */ /* EEPROM Init */
if (EE_Initialise() != EE_OK) if (EE_Initialize() != EE_OK)
for (;;) HAL_Delay(1); // Spin forever until watchdog reset for (;;) HAL_Delay(1); // Spin forever until watchdog reset
HAL_FLASH_Lock(); HAL_FLASH_Lock();
eeprom_initialised = true; eeprom_initialized = true;
} }
} }

View file

@ -69,11 +69,11 @@ tTimerConfig timerConfig[NUM_HARDWARE_TIMERS];
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
bool timers_initialised[NUM_HARDWARE_TIMERS] = {false}; bool timers_initialized[NUM_HARDWARE_TIMERS] = {false};
void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) { void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
if (!timers_initialised[timer_num]) { if (!timers_initialized[timer_num]) {
switch (timer_num) { switch (timer_num) {
case STEP_TIMER_NUM: case STEP_TIMER_NUM:
//STEPPER TIMER TIM5 //use a 32bit timer //STEPPER TIMER TIM5 //use a 32bit timer
@ -100,7 +100,7 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
HAL_NVIC_SetPriority(timerConfig[1].IRQ_Id, 2, 0); HAL_NVIC_SetPriority(timerConfig[1].IRQ_Id, 2, 0);
break; break;
} }
timers_initialised[timer_num] = true; timers_initialized[timer_num] = true;
} }
timerConfig[timer_num].timerdef.Init.Period = (((HAL_TIMER_RATE) / timerConfig[timer_num].timerdef.Init.Prescaler) / frequency) - 1; timerConfig[timer_num].timerdef.Init.Period = (((HAL_TIMER_RATE) / timerConfig[timer_num].timerdef.Init.Prescaler) / frequency) - 1;

View file

@ -9,7 +9,7 @@
static SPISettings spiConfig; static SPISettings spiConfig;
// Standard SPI functions // Standard SPI functions
/** Initialise SPI bus */ /** Initialize SPI bus */
void spiBegin(void) { void spiBegin(void) {
#if !PIN_EXISTS(SS) #if !PIN_EXISTS(SS)
#error SS_PIN not defined! #error SS_PIN not defined!

View file

@ -64,7 +64,7 @@
#define SPI_DATAMODE_3 0x0C #define SPI_DATAMODE_3 0x0C
// Standard SPI functions // Standard SPI functions
/** Initialise SPI bus */ /** Initialize SPI bus */
void spiBegin(void); void spiBegin(void);
/** Configure SPI for specified SPI speed */ /** Configure SPI for specified SPI speed */
void spiInit(uint8_t spiRate); void spiInit(uint8_t spiRate);

View file

@ -75,10 +75,10 @@
static uint8_t eeprom_device_address = 0x50; static uint8_t eeprom_device_address = 0x50;
static void eeprom_init(void) { static void eeprom_init(void) {
static bool eeprom_initialised = false; static bool eeprom_initialized = false;
if (!eeprom_initialised) { if (!eeprom_initialized) {
Wire.begin(); Wire.begin();
eeprom_initialised = true; eeprom_initialized = true;
} }
} }

View file

@ -51,7 +51,7 @@ void UnwInvalidateRegisterFile(RegData *regFile) {
/** /**
* Initialise the data used for unwinding. * Initialize the data used for unwinding.
*/ */
void UnwInitState(UnwState * const state, /**< Pointer to structure to fill. */ void UnwInitState(UnwState * const state, /**< Pointer to structure to fill. */
const UnwindCallbacks *cb, /**< Callbacks. */ const UnwindCallbacks *cb, /**< Callbacks. */

View file

@ -44,7 +44,7 @@ UnwResult UnwindStart(UnwindFrame* frame, const UnwindCallbacks *cb, void *data)
/* We don't have unwind information tables */ /* We don't have unwind information tables */
UnwState state; UnwState state;
/* Initialise the unwinding state */ /* Initialize the unwinding state */
UnwInitState(&state, cb, data, frame->pc, frame->sp); UnwInitState(&state, cb, data, frame->pc, frame->sp);
/* Check the Thumb bit */ /* Check the Thumb bit */

View file

@ -45,7 +45,7 @@ void I2CPositionEncoder::init(const uint8_t address, const AxisEnum axis) {
encoderAxis = axis; encoderAxis = axis;
i2cAddress = address; i2cAddress = address;
initialised++; initialized++;
SERIAL_ECHOPAIR("Setting up encoder on ", axis_codes[encoderAxis]); SERIAL_ECHOPAIR("Setting up encoder on ", axis_codes[encoderAxis]);
SERIAL_ECHOLNPAIR(" axis, addr = ", address); SERIAL_ECHOLNPAIR(" axis, addr = ", address);
@ -54,7 +54,7 @@ void I2CPositionEncoder::init(const uint8_t address, const AxisEnum axis) {
} }
void I2CPositionEncoder::update() { void I2CPositionEncoder::update() {
if (!initialised || !homed || !active) return; //check encoder is set up and active if (!initialized || !homed || !active) return; //check encoder is set up and active
position = get_position(); position = get_position();
@ -98,7 +98,7 @@ void I2CPositionEncoder::update() {
SERIAL_ECHOLNPGM(" axis has been fault-free for set duration, reinstating error correction."); SERIAL_ECHOLNPGM(" axis has been fault-free for set duration, reinstating error correction.");
//the encoder likely lost its place when the error occured, so we'll reset and use the printer's //the encoder likely lost its place when the error occured, so we'll reset and use the printer's
//idea of where it the axis is to re-initialise //idea of where it the axis is to re-initialize
const float pos = planner.get_axis_position_mm(encoderAxis); const float pos = planner.get_axis_position_mm(encoderAxis);
int32_t positionInTicks = pos * get_ticks_unit(); int32_t positionInTicks = pos * get_ticks_unit();
@ -712,7 +712,7 @@ void I2CPositionEncodersMgr::change_module_address(const uint8_t oldaddr, const
SERIAL_ECHOLNPGM("Address change successful!"); SERIAL_ECHOLNPGM("Address change successful!");
// Now, if this module is configured, find which encoder instance it's supposed to correspond to // Now, if this module is configured, find which encoder instance it's supposed to correspond to
// and enable it (it will likely have failed initialisation on power-up, before the address change). // and enable it (it will likely have failed initialization on power-up, before the address change).
const int8_t idx = idx_from_addr(newaddr); const int8_t idx = idx_from_addr(newaddr);
if (idx >= 0 && !encoders[idx].get_active()) { if (idx >= 0 && !encoders[idx].get_active()) {
SERIAL_ECHO(axis_codes[encoders[idx].get_axis()]); SERIAL_ECHO(axis_codes[encoders[idx].get_axis()]);

View file

@ -120,7 +120,7 @@ class I2CPositionEncoder {
bool homed = false, bool homed = false,
trusted = false, trusted = false,
initialised = false, initialized = false,
active = false, active = false,
invert = false, invert = false,
ec = true; ec = true;

View file

@ -1120,7 +1120,7 @@ static __INLINE void NVIC_SystemReset(void)
/** \brief System Tick Configuration /** \brief System Tick Configuration
This function initialises the system tick timer and its interrupt and start the system tick timer. This function initializes the system tick timer and its interrupt and start the system tick timer.
Counter is in free running mode to generate periodical interrupts. Counter is in free running mode to generate periodical interrupts.
\param [in] ticks Number of ticks between two interrupts \param [in] ticks Number of ticks between two interrupts

View file

@ -71,7 +71,7 @@ uint32_t CDC_OutBufAvailChar(uint32_t *availChar) {
/* end Buffer handling */ /* end Buffer handling */
/*---------------------------------------------------------------------------- /*----------------------------------------------------------------------------
CDC Initialisation CDC Initialization
Initializes the data structures and serial port Initializes the data structures and serial port
Parameters: None Parameters: None
Return Value: None Return Value: None