From f08dba7586dbc43ecc85205faddd4dd447ff5573 Mon Sep 17 00:00:00 2001 From: username Date: Fri, 17 Mar 2023 11:01:49 +0100 Subject: [PATCH] spellcheck --- Firmware/source/Src/fpdk.c | 64 ++++++++++++++++----------------- Firmware/source/Src/fpdkproto.h | 2 +- Firmware/source/Src/fpdkuart.c | 2 +- 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/Firmware/source/Src/fpdk.c b/Firmware/source/Src/fpdk.c index 70eaec8..d4273b7 100644 --- a/Firmware/source/Src/fpdk.c +++ b/Firmware/source/Src/fpdk.c @@ -34,7 +34,7 @@ extern DMA_HandleTypeDef hdma_spi1_tx; extern DMA_HandleTypeDef hdma_spi1_rx; extern UART_HandleTypeDef huart1; -//board specific defines for programing IO +//board specific defines for programming IO #define _FPDK_CLK2_UP() HAL_GPIO_WritePin( IC_IO_PA0_UART1_TX_GPIO_Port, IC_IO_PA0_UART1_TX_Pin, GPIO_PIN_SET ) #define _FPDK_CLK2_DOWN() HAL_GPIO_WritePin( IC_IO_PA0_UART1_TX_GPIO_Port, IC_IO_PA0_UART1_TX_Pin, GPIO_PIN_RESET ) #define _FPDK_CLK_UP() HAL_GPIO_WritePin( IC_IO_PA3_CLK_GPIO_Port, IC_IO_PA3_CLK_Pin, GPIO_PIN_SET ) @@ -44,7 +44,7 @@ extern UART_HandleTypeDef huart1; #define _FPDK_GET_DAT() HAL_GPIO_ReadPin( IC_IO_PA6_DAT_GPIO_Port, IC_IO_PA6_DAT_Pin ) #define _FPDK_SET_CMT(bit) HAL_GPIO_WritePin( IC_IO_PA7_USART1_RX_GPIO_Port, IC_IO_PA7_USART1_RX_Pin, bit?GPIO_PIN_SET:GPIO_PIN_RESET ) -//general macros for programing IO +//general macros for programming IO void _FPDK_DelayUS(uint32_t us) { asm volatile ("MOV R0,%[loops]\n1:\nSUB R0,#1\nCMP R0,#0\nBNE 1b"::[loops]"r"(10*us):"memory"); } #define _FPDK_Clock() { _FPDK_CLK_UP(); _FPDK_DelayUS(1); _FPDK_CLK_DOWN(); } #define _FPDK_Clock2() { _FPDK_CLK2_UP(); _FPDK_DelayUS(1);_FPDK_CLK2_DOWN(); } @@ -79,11 +79,11 @@ static uint32_t _dac_vdd_max = FPDK_VDD_DAC_MAX_MV; #define FPDK_LEAVE_PROG_MODE_DELAYUS 10000 //IMPORTANT: wait a bit after leaving program mode, before executing next command #define FPDK_VDD_CAL_STARTUP_DELAYUS 1000 -//FPDK hardware varaint / hardware mod +//FPDK hardware variant / hardware mod static FPDKHWVARIANT _hw_variant; static uint32_t _hw_mod; -//current dac output values, we need to store them so we can set channels seperate +//current dac output values, we need to store them so we can set channels separate static uint32_t _dac_vdd; static uint32_t _dac_vpp; @@ -238,7 +238,7 @@ static uint32_t _FPDK_RecvBits32O2(const uint8_t bits) return bitdat; } -static int _FPDK_EnterProgramingmMode(const FPDKICTYPE type, const uint32_t VPP_mV, const uint32_t VDD_mV) +static int _FPDK_EnterProgrammingmMode(const FPDKICTYPE type, const uint32_t VPP_mV, const uint32_t VDD_mV) { _FPDK_SetClkOutgoing(); @@ -270,7 +270,7 @@ static int _FPDK_EnterProgramingmMode(const FPDKICTYPE type, const uint32_t VPP_ return 0; } -static void _FPDK_LeaveProgramingMode(const FPDKICTYPE type, const uint32_t extrawaitus) +static void _FPDK_LeaveProgrammingMode(const FPDKICTYPE type, const uint32_t extrawaitus) { _FPDK_SetDatIncoming(); _FPDK_SetPA4Incoming(); @@ -669,7 +669,7 @@ static uint32_t _FPDK_GetIDIC(const FPDKICTYPE type, const uint32_t vpp_cmd, con { uint32_t ic_id = 0; - if( _FPDK_EnterProgramingmMode(type,vpp_cmd,vdd_cmd)<0 ) + if( _FPDK_EnterProgrammingmMode(type,vpp_cmd,vdd_cmd)<0 ) return FPDK_ERR_VPPVDD; switch( type ) @@ -701,7 +701,7 @@ static uint32_t _FPDK_GetIDIC(const FPDKICTYPE type, const uint32_t vpp_cmd, con default: break; } - _FPDK_LeaveProgramingMode(type, 0); //leave prog mode, abort write before it is executed + _FPDK_LeaveProgrammingMode(type, 0); //leave prog mode, abort write before it is executed if( 0x3FFF == (ic_id & 0x3FFF) ) ic_id = 0; @@ -746,13 +746,13 @@ uint16_t FPDK_ReadIC(const uint16_t ic_id, const FPDKICTYPE type, if( (FPDK_IC_FLASH != type) && (ic_id != (_FPDK_GetIDIC( type, vpp_cmd, vdd_cmd, data_bits )&0xFFF)) ) return FPDK_ERR_CMDRSP; - if( _FPDK_EnterProgramingmMode(type,vpp_cmd,vdd_cmd) < 0 ) //enter programing mode using VPP and VDD + if( _FPDK_EnterProgrammingmMode(type,vpp_cmd,vdd_cmd) < 0 ) //enter programming mode using VPP and VDD return FPDK_ERR_VPPVDD; uint16_t resp = _FPDK_SendCommand(type,cmd,cmd_trailing_clocks); //send READ command if( (FPDK_IC_FLASH == type) && (ic_id != (resp&0xFFF)) ) { - _FPDK_LeaveProgramingMode(type, 0); + _FPDK_LeaveProgrammingMode(type, 0); return FPDK_ERR_CMDRSP; } @@ -762,7 +762,7 @@ uint16_t FPDK_ReadIC(const uint16_t ic_id, const FPDKICTYPE type, !FPDK_SetVPP(vpp_read, FPDK_VPP_R_STABELIZE_DELAYUS) ) { - _FPDK_LeaveProgramingMode(type, 0); + _FPDK_LeaveProgrammingMode(type, 0); return FPDK_ERR_HVPPHVDD; } } @@ -770,7 +770,7 @@ uint16_t FPDK_ReadIC(const uint16_t ic_id, const FPDKICTYPE type, for( uint32_t p=0; p8) ) - return FPDK_ERR_UKNOWN; + return FPDK_ERR_UNKNOWN; if( (FPDK_IC_FLASH != type) && (ic_id != (_FPDK_GetIDIC( type, vpp_cmd, vdd_cmd, data_bits )&0xFFF)) ) return FPDK_ERR_CMDRSP; - if( _FPDK_EnterProgramingmMode(type,vpp_cmd,vdd_cmd) < 0 ) //enter programing mode using VPP and VDD + if( _FPDK_EnterProgrammingmMode(type,vpp_cmd,vdd_cmd) < 0 ) //enter programming mode using VPP and VDD return FPDK_ERR_VPPVDD; uint16_t resp = _FPDK_SendCommand(type,cmd,cmd_trailing_clocks); //send WRITE command if( (FPDK_IC_FLASH == type) && (ic_id != (resp&0xFFF)) ) { - _FPDK_LeaveProgramingMode(type, 0); + _FPDK_LeaveProgrammingMode(type, 0); return FPDK_ERR_CMDRSP; } @@ -975,7 +975,7 @@ uint16_t FPDK_WriteIC(const uint16_t ic_id, const FPDKICTYPE type, !FPDK_SetVPP(vpp_write, FPDK_VPP_EW_STABELIZE_DELAYUS) ) { - _FPDK_LeaveProgramingMode(type, 0); + _FPDK_LeaveProgrammingMode(type, 0); return FPDK_ERR_HVPPHVDD; } @@ -1050,7 +1050,7 @@ uint16_t FPDK_WriteIC(const uint16_t ic_id, const FPDKICTYPE type, _FPDK_DelayUS(100); //wait a bit so voltage can stabelize again (makes writing much more reliable) } - _FPDK_LeaveProgramingMode(type, 100000); + _FPDK_LeaveProgrammingMode(type, 100000); return ic_id; } @@ -1127,7 +1127,7 @@ static void _FPDK_CalibrateNext(uint32_t steps) } } -static uint32_t _FPDK_CalibrateGetNextFreqeuncy() +static uint32_t _FPDK_CalibrateGetNextFrequency() { _spiFrequency = 0; _spiSendPulses = 1; @@ -1154,7 +1154,7 @@ static uint8_t _FPDK_CalibrateSingleFrequency(const uint32_t tune_frequency, con for( uint16_t t=minval+(skipFirstStep?1:0); t<=maxval; t+=step ) { - uint32_t measured_frequency = multiplier * _FPDK_CalibrateGetNextFreqeuncy(); + uint32_t measured_frequency = multiplier * _FPDK_CalibrateGetNextFrequency(); if( 0 == measured_frequency ) break; diff --git a/Firmware/source/Src/fpdkproto.h b/Firmware/source/Src/fpdkproto.h index cf60052..2d204d5 100644 --- a/Firmware/source/Src/fpdkproto.h +++ b/Firmware/source/Src/fpdkproto.h @@ -61,7 +61,7 @@ typedef enum FPDKPROTO_RSP typedef enum FPDK_ERR { - FPDK_ERR_UKNOWN = 0xFFFF, + FPDK_ERR_UNKNOWN = 0xFFFF, FPDK_ERR_VPPVDD = 0xFFFE, FPDK_ERR_HVPPHVDD = 0xFFFD, FPDK_ERR_CMDRSP = 0xFFFC, diff --git a/Firmware/source/Src/fpdkuart.c b/Firmware/source/Src/fpdkuart.c index df43431..c2561f4 100644 --- a/Firmware/source/Src/fpdkuart.c +++ b/Firmware/source/Src/fpdkuart.c @@ -77,7 +77,7 @@ void FPDKUART_HandleQueue(void) { if( __HAL_UART_GET_FLAG(&huart1,UART_FLAG_ABRF) != RESET) //auto baud detection on STM finished? { - if( __HAL_UART_GET_FLAG(&huart1, UART_FLAG_ABRE) != RESET ) //auto baud error occured ? + if( __HAL_UART_GET_FLAG(&huart1, UART_FLAG_ABRE) != RESET ) //auto baud error occurred ? FPDKUART_Init(); //restart uart on error else {