忘记push了,添加了RC522驱动
This commit is contained in:
+2
-2
@@ -1,8 +1,8 @@
|
||||
[PreviousLibFiles]
|
||||
LibFiles=Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h;Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_sram.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_fsmc.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_sram.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_i2c.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h;Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_sram.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h;Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xe.h;Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h;Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h;Drivers/CMSIS/Device/ST/STM32F1xx/Source/Templates/system_stm32f1xx.c;Drivers/CMSIS/Include/core_cm7.h;Drivers/CMSIS/Include/tz_context.h;Drivers/CMSIS/Include/core_cm3.h;Drivers/CMSIS/Include/cmsis_compiler.h;Drivers/CMSIS/Include/cmsis_armclang.h;Drivers/CMSIS/Include/mpu_armv7.h;Drivers/CMSIS/Include/cmsis_armcc.h;Drivers/CMSIS/Include/core_cm4.h;Drivers/CMSIS/Include/core_cm0.h;Drivers/CMSIS/Include/cmsis_iccarm.h;Drivers/CMSIS/Include/core_armv8mml.h;Drivers/CMSIS/Include/core_sc000.h;Drivers/CMSIS/Include/core_cm1.h;Drivers/CMSIS/Include/mpu_armv8.h;Drivers/CMSIS/Include/core_sc300.h;Drivers/CMSIS/Include/cmsis_gcc.h;Drivers/CMSIS/Include/cmsis_version.h;Drivers/CMSIS/Include/core_cm23.h;Drivers/CMSIS/Include/core_cm33.h;Drivers/CMSIS/Include/core_cm0plus.h;Drivers/CMSIS/Include/core_armv8mbl.h;
|
||||
LibFiles=Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h;Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_sram.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_fsmc.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_sram.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_i2c.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_spi.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h;Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_sram.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h;Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h;Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xe.h;Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h;Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h;Drivers/CMSIS/Device/ST/STM32F1xx/Source/Templates/system_stm32f1xx.c;Drivers/CMSIS/Include/core_cm7.h;Drivers/CMSIS/Include/tz_context.h;Drivers/CMSIS/Include/core_cm3.h;Drivers/CMSIS/Include/cmsis_compiler.h;Drivers/CMSIS/Include/cmsis_armclang.h;Drivers/CMSIS/Include/mpu_armv7.h;Drivers/CMSIS/Include/cmsis_armcc.h;Drivers/CMSIS/Include/core_cm4.h;Drivers/CMSIS/Include/core_cm0.h;Drivers/CMSIS/Include/cmsis_iccarm.h;Drivers/CMSIS/Include/core_armv8mml.h;Drivers/CMSIS/Include/core_sc000.h;Drivers/CMSIS/Include/core_cm1.h;Drivers/CMSIS/Include/mpu_armv8.h;Drivers/CMSIS/Include/core_sc300.h;Drivers/CMSIS/Include/cmsis_gcc.h;Drivers/CMSIS/Include/cmsis_version.h;Drivers/CMSIS/Include/core_cm23.h;Drivers/CMSIS/Include/core_cm33.h;Drivers/CMSIS/Include/core_cm0plus.h;Drivers/CMSIS/Include/core_armv8mbl.h;
|
||||
|
||||
[PreviousUsedCubeIDEFiles]
|
||||
SourceFiles=Core/Src/main.c;Core/Src/stm32f1xx_it.c;Core/Src/stm32f1xx_hal_msp.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_fsmc.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_sram.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_i2c.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c;Drivers/CMSIS/Device/ST/STM32F1xx/Source/Templates/system_stm32f1xx.c;Core/Src/system_stm32f1xx.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_fsmc.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_sram.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_i2c.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c;Drivers/CMSIS/Device/ST/STM32F1xx/Source/Templates/system_stm32f1xx.c;Core/Src/system_stm32f1xx.c;;;
|
||||
SourceFiles=Core/Src/main.c;Core/Src/stm32f1xx_it.c;Core/Src/stm32f1xx_hal_msp.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_fsmc.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_sram.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_i2c.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_spi.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c;Drivers/CMSIS/Device/ST/STM32F1xx/Source/Templates/system_stm32f1xx.c;Core/Src/system_stm32f1xx.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_fsmc.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_sram.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_i2c.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_spi.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c;Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c;Drivers/CMSIS/Device/ST/STM32F1xx/Source/Templates/system_stm32f1xx.c;Core/Src/system_stm32f1xx.c;;;
|
||||
HeaderPath=Drivers/STM32F1xx_HAL_Driver/Inc;Drivers/STM32F1xx_HAL_Driver/Inc/Legacy;Drivers/CMSIS/Device/ST/STM32F1xx/Include;Drivers/CMSIS/Include;Core/Inc;
|
||||
CDefines=USE_HAL_DRIVER;STM32F103xE;USE_HAL_DRIVER;USE_HAL_DRIVER;
|
||||
|
||||
|
||||
@@ -58,12 +58,22 @@ void Error_Handler(void);
|
||||
/* USER CODE END EFP */
|
||||
|
||||
/* Private defines -----------------------------------------------------------*/
|
||||
#define KEY3_Pin GPIO_PIN_2
|
||||
#define KEY3_GPIO_Port GPIOE
|
||||
#define KEY2_Pin GPIO_PIN_3
|
||||
#define KEY2_GPIO_Port GPIOE
|
||||
#define KEY1_Pin GPIO_PIN_4
|
||||
#define KEY1_GPIO_Port GPIOE
|
||||
#define TDOUT_Pin GPIO_PIN_8
|
||||
#define TDOUT_GPIO_Port GPIOF
|
||||
#define TDIN_Pin GPIO_PIN_9
|
||||
#define TDIN_GPIO_Port GPIOF
|
||||
#define TPEN_Pin GPIO_PIN_10
|
||||
#define TPEN_GPIO_Port GPIOF
|
||||
#define KEY0_Pin GPIO_PIN_0
|
||||
#define KEY0_GPIO_Port GPIOA
|
||||
#define RC522_CS_Pin GPIO_PIN_4
|
||||
#define RC522_CS_GPIO_Port GPIOA
|
||||
#define LCD_BL_Pin GPIO_PIN_0
|
||||
#define LCD_BL_GPIO_Port GPIOB
|
||||
#define TCLK_Pin GPIO_PIN_1
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
/*#define HAL_MMC_MODULE_ENABLED */
|
||||
/*#define HAL_SDRAM_MODULE_ENABLED */
|
||||
/*#define HAL_SMARTCARD_MODULE_ENABLED */
|
||||
/*#define HAL_SPI_MODULE_ENABLED */
|
||||
#define HAL_SPI_MODULE_ENABLED
|
||||
#define HAL_SRAM_MODULE_ENABLED
|
||||
#define HAL_TIM_MODULE_ENABLED
|
||||
/*#define HAL_UART_MODULE_ENABLED */
|
||||
|
||||
+66
-1
@@ -42,6 +42,8 @@
|
||||
/* Private variables ---------------------------------------------------------*/
|
||||
I2C_HandleTypeDef hi2c2;
|
||||
|
||||
SPI_HandleTypeDef hspi1;
|
||||
|
||||
TIM_HandleTypeDef htim6;
|
||||
|
||||
SRAM_HandleTypeDef hsram1;
|
||||
@@ -56,6 +58,7 @@ static void MX_GPIO_Init(void);
|
||||
static void MX_FSMC_Init(void);
|
||||
static void MX_I2C2_Init(void);
|
||||
static void MX_TIM6_Init(void);
|
||||
static void MX_SPI1_Init(void);
|
||||
/* USER CODE BEGIN PFP */
|
||||
|
||||
/* USER CODE END PFP */
|
||||
@@ -96,6 +99,7 @@ int main(void)
|
||||
MX_FSMC_Init();
|
||||
MX_I2C2_Init();
|
||||
MX_TIM6_Init();
|
||||
MX_SPI1_Init();
|
||||
/* USER CODE BEGIN 2 */
|
||||
main_app();
|
||||
/* USER CODE END 2 */
|
||||
@@ -183,6 +187,44 @@ static void MX_I2C2_Init(void)
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief SPI1 Initialization Function
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
static void MX_SPI1_Init(void)
|
||||
{
|
||||
|
||||
/* USER CODE BEGIN SPI1_Init 0 */
|
||||
|
||||
/* USER CODE END SPI1_Init 0 */
|
||||
|
||||
/* USER CODE BEGIN SPI1_Init 1 */
|
||||
|
||||
/* USER CODE END SPI1_Init 1 */
|
||||
/* SPI1 parameter configuration*/
|
||||
hspi1.Instance = SPI1;
|
||||
hspi1.Init.Mode = SPI_MODE_MASTER;
|
||||
hspi1.Init.Direction = SPI_DIRECTION_2LINES;
|
||||
hspi1.Init.DataSize = SPI_DATASIZE_8BIT;
|
||||
hspi1.Init.CLKPolarity = SPI_POLARITY_LOW;
|
||||
hspi1.Init.CLKPhase = SPI_PHASE_1EDGE;
|
||||
hspi1.Init.NSS = SPI_NSS_SOFT;
|
||||
hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_4;
|
||||
hspi1.Init.FirstBit = SPI_FIRSTBIT_MSB;
|
||||
hspi1.Init.TIMode = SPI_TIMODE_DISABLE;
|
||||
hspi1.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
|
||||
hspi1.Init.CRCPolynomial = 10;
|
||||
if (HAL_SPI_Init(&hspi1) != HAL_OK)
|
||||
{
|
||||
Error_Handler();
|
||||
}
|
||||
/* USER CODE BEGIN SPI1_Init 2 */
|
||||
|
||||
/* USER CODE END SPI1_Init 2 */
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief TIM6 Initialization Function
|
||||
* @param None
|
||||
@@ -231,21 +273,31 @@ static void MX_GPIO_Init(void)
|
||||
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
||||
|
||||
/* GPIO Ports Clock Enable */
|
||||
__HAL_RCC_GPIOE_CLK_ENABLE();
|
||||
__HAL_RCC_GPIOF_CLK_ENABLE();
|
||||
__HAL_RCC_GPIOA_CLK_ENABLE();
|
||||
__HAL_RCC_GPIOB_CLK_ENABLE();
|
||||
__HAL_RCC_GPIOG_CLK_ENABLE();
|
||||
__HAL_RCC_GPIOE_CLK_ENABLE();
|
||||
__HAL_RCC_GPIOD_CLK_ENABLE();
|
||||
|
||||
/*Configure GPIO pin Output Level */
|
||||
HAL_GPIO_WritePin(TDIN_GPIO_Port, TDIN_Pin, GPIO_PIN_SET);
|
||||
|
||||
/*Configure GPIO pin Output Level */
|
||||
HAL_GPIO_WritePin(RC522_CS_GPIO_Port, RC522_CS_Pin, GPIO_PIN_RESET);
|
||||
|
||||
/*Configure GPIO pin Output Level */
|
||||
HAL_GPIO_WritePin(LCD_BL_GPIO_Port, LCD_BL_Pin, GPIO_PIN_RESET);
|
||||
|
||||
/*Configure GPIO pin Output Level */
|
||||
HAL_GPIO_WritePin(GPIOB, TCLK_Pin|TCS_Pin|MAX_IRD_Pin|MAX_RD_Pin, GPIO_PIN_SET);
|
||||
|
||||
/*Configure GPIO pins : KEY3_Pin KEY2_Pin KEY1_Pin */
|
||||
GPIO_InitStruct.Pin = KEY3_Pin|KEY2_Pin|KEY1_Pin;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
|
||||
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
||||
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
|
||||
|
||||
/*Configure GPIO pin : TDOUT_Pin */
|
||||
GPIO_InitStruct.Pin = TDOUT_Pin;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
|
||||
@@ -265,6 +317,19 @@ static void MX_GPIO_Init(void)
|
||||
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
||||
HAL_GPIO_Init(TPEN_GPIO_Port, &GPIO_InitStruct);
|
||||
|
||||
/*Configure GPIO pin : KEY0_Pin */
|
||||
GPIO_InitStruct.Pin = KEY0_Pin;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
HAL_GPIO_Init(KEY0_GPIO_Port, &GPIO_InitStruct);
|
||||
|
||||
/*Configure GPIO pin : RC522_CS_Pin */
|
||||
GPIO_InitStruct.Pin = RC522_CS_Pin;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||
HAL_GPIO_Init(RC522_CS_GPIO_Port, &GPIO_InitStruct);
|
||||
|
||||
/*Configure GPIO pin : LCD_BL_Pin */
|
||||
GPIO_InitStruct.Pin = LCD_BL_Pin;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||
|
||||
@@ -146,6 +146,76 @@ void HAL_I2C_MspDeInit(I2C_HandleTypeDef* hi2c)
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief SPI MSP Initialization
|
||||
* This function configures the hardware resources used in this example
|
||||
* @param hspi: SPI handle pointer
|
||||
* @retval None
|
||||
*/
|
||||
void HAL_SPI_MspInit(SPI_HandleTypeDef* hspi)
|
||||
{
|
||||
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
||||
if(hspi->Instance==SPI1)
|
||||
{
|
||||
/* USER CODE BEGIN SPI1_MspInit 0 */
|
||||
|
||||
/* USER CODE END SPI1_MspInit 0 */
|
||||
/* Peripheral clock enable */
|
||||
__HAL_RCC_SPI1_CLK_ENABLE();
|
||||
|
||||
__HAL_RCC_GPIOA_CLK_ENABLE();
|
||||
/**SPI1 GPIO Configuration
|
||||
PA5 ------> SPI1_SCK
|
||||
PA6 ------> SPI1_MISO
|
||||
PA7 ------> SPI1_MOSI
|
||||
*/
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_5|GPIO_PIN_7;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
|
||||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_6;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||
|
||||
/* USER CODE BEGIN SPI1_MspInit 1 */
|
||||
|
||||
/* USER CODE END SPI1_MspInit 1 */
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief SPI MSP De-Initialization
|
||||
* This function freeze the hardware resources used in this example
|
||||
* @param hspi: SPI handle pointer
|
||||
* @retval None
|
||||
*/
|
||||
void HAL_SPI_MspDeInit(SPI_HandleTypeDef* hspi)
|
||||
{
|
||||
if(hspi->Instance==SPI1)
|
||||
{
|
||||
/* USER CODE BEGIN SPI1_MspDeInit 0 */
|
||||
|
||||
/* USER CODE END SPI1_MspDeInit 0 */
|
||||
/* Peripheral clock disable */
|
||||
__HAL_RCC_SPI1_CLK_DISABLE();
|
||||
|
||||
/**SPI1 GPIO Configuration
|
||||
PA5 ------> SPI1_SCK
|
||||
PA6 ------> SPI1_MISO
|
||||
PA7 ------> SPI1_MOSI
|
||||
*/
|
||||
HAL_GPIO_DeInit(GPIOA, GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7);
|
||||
|
||||
/* USER CODE BEGIN SPI1_MspDeInit 1 */
|
||||
|
||||
/* USER CODE END SPI1_MspDeInit 1 */
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief TIM_Base MSP Initialization
|
||||
* This function configures the hardware resources used in this example
|
||||
|
||||
@@ -24,6 +24,7 @@ Core/Src/main.o: ../Core/Src/main.c ../Core/Inc/main.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
|
||||
/Users/wuwenfeng/STM32CubeIDE/workspace_1.7.0/m3s/SW_APPs/Main_APP.h
|
||||
@@ -80,6 +81,8 @@ Core/Src/main.o: ../Core/Src/main.c ../Core/Inc/main.h \
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
main.c:72:5:main 8 static
|
||||
main.c:118:6:SystemClock_Config 72 static
|
||||
main.c:157:13:MX_I2C2_Init 8 static
|
||||
main.c:191:13:MX_TIM6_Init 16 static
|
||||
main.c:229:13:MX_GPIO_Init 48 static
|
||||
main.c:298:13:MX_FSMC_Init 40 static
|
||||
main.c:362:6:Error_Handler 4 static,ignoring_inline_asm
|
||||
main.c:75:5:main 8 static
|
||||
main.c:122:6:SystemClock_Config 72 static
|
||||
main.c:161:13:MX_I2C2_Init 8 static
|
||||
main.c:195:13:MX_SPI1_Init 8 static
|
||||
main.c:233:13:MX_TIM6_Init 16 static
|
||||
main.c:271:13:MX_GPIO_Init 48 static
|
||||
main.c:363:13:MX_FSMC_Init 40 static
|
||||
main.c:427:6:Error_Handler 4 static,ignoring_inline_asm
|
||||
|
||||
@@ -24,6 +24,7 @@ Core/Src/stm32f1xx_hal_msp.o: ../Core/Src/stm32f1xx_hal_msp.c \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h
|
||||
|
||||
@@ -79,6 +80,8 @@ Core/Src/stm32f1xx_hal_msp.o: ../Core/Src/stm32f1xx_hal_msp.c \
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
stm32f1xx_hal_msp.c:64:6:HAL_MspInit 24 static
|
||||
stm32f1xx_hal_msp.c:90:6:HAL_I2C_MspInit 40 static
|
||||
stm32f1xx_hal_msp.c:124:6:HAL_I2C_MspDeInit 16 static
|
||||
stm32f1xx_hal_msp.c:155:6:HAL_TIM_Base_MspInit 24 static
|
||||
stm32f1xx_hal_msp.c:180:6:HAL_TIM_Base_MspDeInit 16 static
|
||||
stm32f1xx_hal_msp.c:201:13:HAL_FSMC_MspInit 32 static
|
||||
stm32f1xx_hal_msp.c:260:6:HAL_SRAM_MspInit 16 static
|
||||
stm32f1xx_hal_msp.c:272:13:HAL_FSMC_MspDeInit 8 static
|
||||
stm32f1xx_hal_msp.c:320:6:HAL_SRAM_MspDeInit 16 static
|
||||
stm32f1xx_hal_msp.c:155:6:HAL_SPI_MspInit 40 static
|
||||
stm32f1xx_hal_msp.c:195:6:HAL_SPI_MspDeInit 16 static
|
||||
stm32f1xx_hal_msp.c:225:6:HAL_TIM_Base_MspInit 24 static
|
||||
stm32f1xx_hal_msp.c:250:6:HAL_TIM_Base_MspDeInit 16 static
|
||||
stm32f1xx_hal_msp.c:271:13:HAL_FSMC_MspInit 32 static
|
||||
stm32f1xx_hal_msp.c:330:6:HAL_SRAM_MspInit 16 static
|
||||
stm32f1xx_hal_msp.c:342:13:HAL_FSMC_MspDeInit 8 static
|
||||
stm32f1xx_hal_msp.c:390:6:HAL_SRAM_MspDeInit 16 static
|
||||
|
||||
@@ -24,6 +24,7 @@ Core/Src/stm32f1xx_it.o: ../Core/Src/stm32f1xx_it.c ../Core/Inc/main.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
|
||||
../Core/Inc/stm32f1xx_it.h
|
||||
@@ -80,6 +81,8 @@ Core/Src/stm32f1xx_it.o: ../Core/Src/stm32f1xx_it.c ../Core/Inc/main.h \
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||
|
||||
@@ -24,6 +24,7 @@ Core/Src/system_stm32f1xx.o: ../Core/Src/system_stm32f1xx.c \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h
|
||||
|
||||
@@ -77,6 +78,8 @@ Core/Src/system_stm32f1xx.o: ../Core/Src/system_stm32f1xx.c \
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||
|
||||
@@ -25,6 +25,7 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.o: \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h
|
||||
|
||||
@@ -78,6 +79,8 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.o: \
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||
|
||||
@@ -25,6 +25,7 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.o: \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h
|
||||
|
||||
@@ -78,6 +79,8 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.o: \
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||
|
||||
@@ -25,6 +25,7 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.o: \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h
|
||||
|
||||
@@ -78,6 +79,8 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.o: \
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||
|
||||
@@ -25,6 +25,7 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.o: \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h
|
||||
|
||||
@@ -78,6 +79,8 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.o: \
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||
|
||||
@@ -25,6 +25,7 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.o: \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h
|
||||
|
||||
@@ -78,6 +79,8 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.o: \
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||
|
||||
@@ -25,6 +25,7 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.o: \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h
|
||||
|
||||
@@ -78,6 +79,8 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.o: \
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||
|
||||
@@ -25,6 +25,7 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.o: \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h
|
||||
|
||||
@@ -78,6 +79,8 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.o: \
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||
|
||||
@@ -25,6 +25,7 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.o: \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h
|
||||
|
||||
@@ -78,6 +79,8 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.o: \
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||
|
||||
@@ -25,6 +25,7 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_i2c.o: \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h
|
||||
|
||||
@@ -78,6 +79,8 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_i2c.o: \
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||
|
||||
@@ -25,6 +25,7 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.o: \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h
|
||||
|
||||
@@ -78,6 +79,8 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.o: \
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||
|
||||
@@ -25,6 +25,7 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.o: \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h
|
||||
|
||||
@@ -78,6 +79,8 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.o: \
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||
|
||||
@@ -25,6 +25,7 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.o: \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h
|
||||
|
||||
@@ -78,6 +79,8 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.o: \
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_spi.o: \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_spi.c \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \
|
||||
../Core/Inc/stm32f1xx_hal_conf.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \
|
||||
../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \
|
||||
../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xe.h \
|
||||
../Drivers/CMSIS/Include/core_cm3.h \
|
||||
../Drivers/CMSIS/Include/cmsis_version.h \
|
||||
../Drivers/CMSIS/Include/cmsis_compiler.h \
|
||||
../Drivers/CMSIS/Include/cmsis_gcc.h \
|
||||
../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_sram.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
|
||||
|
||||
../Core/Inc/stm32f1xx_hal_conf.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:
|
||||
|
||||
../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:
|
||||
|
||||
../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xe.h:
|
||||
|
||||
../Drivers/CMSIS/Include/core_cm3.h:
|
||||
|
||||
../Drivers/CMSIS/Include/cmsis_version.h:
|
||||
|
||||
../Drivers/CMSIS/Include/cmsis_compiler.h:
|
||||
|
||||
../Drivers/CMSIS/Include/cmsis_gcc.h:
|
||||
|
||||
../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_sram.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||
@@ -0,0 +1,55 @@
|
||||
stm32f1xx_hal_spi.c:335:19:HAL_SPI_Init 16 static
|
||||
stm32f1xx_hal_spi.c:463:19:HAL_SPI_DeInit 16 static
|
||||
stm32f1xx_hal_spi.c:507:13:HAL_SPI_MspInit 16 static
|
||||
stm32f1xx_hal_spi.c:523:13:HAL_SPI_MspDeInit 16 static
|
||||
stm32f1xx_hal_spi.c:795:19:HAL_SPI_Transmit 40 static
|
||||
stm32f1xx_hal_spi.c:960:19:HAL_SPI_Receive 40 static
|
||||
stm32f1xx_hal_spi.c:1174:19:HAL_SPI_TransmitReceive 56 static
|
||||
stm32f1xx_hal_spi.c:1407:19:HAL_SPI_Transmit_IT 32 static
|
||||
stm32f1xx_hal_spi.c:1492:19:HAL_SPI_Receive_IT 32 static
|
||||
stm32f1xx_hal_spi.c:1586:19:HAL_SPI_TransmitReceive_IT 32 static
|
||||
stm32f1xx_hal_spi.c:1674:19:HAL_SPI_Transmit_DMA 32 static
|
||||
stm32f1xx_hal_spi.c:1782:19:HAL_SPI_Receive_DMA 32 static
|
||||
stm32f1xx_hal_spi.c:1897:19:HAL_SPI_TransmitReceive_DMA 32 static
|
||||
stm32f1xx_hal_spi.c:2043:19:HAL_SPI_Abort 32 static
|
||||
stm32f1xx_hal_spi.c:2187:19:HAL_SPI_Abort_IT 40 static
|
||||
stm32f1xx_hal_spi.c:2347:19:HAL_SPI_DMAPause 16 static
|
||||
stm32f1xx_hal_spi.c:2367:19:HAL_SPI_DMAResume 16 static
|
||||
stm32f1xx_hal_spi.c:2387:19:HAL_SPI_DMAStop 24 static
|
||||
stm32f1xx_hal_spi.c:2427:6:HAL_SPI_IRQHandler 40 static
|
||||
stm32f1xx_hal_spi.c:2529:13:HAL_SPI_TxCpltCallback 16 static
|
||||
stm32f1xx_hal_spi.c:2545:13:HAL_SPI_RxCpltCallback 16 static
|
||||
stm32f1xx_hal_spi.c:2561:13:HAL_SPI_TxRxCpltCallback 16 static
|
||||
stm32f1xx_hal_spi.c:2577:13:HAL_SPI_TxHalfCpltCallback 16 static
|
||||
stm32f1xx_hal_spi.c:2593:13:HAL_SPI_RxHalfCpltCallback 16 static
|
||||
stm32f1xx_hal_spi.c:2609:13:HAL_SPI_TxRxHalfCpltCallback 16 static
|
||||
stm32f1xx_hal_spi.c:2625:13:HAL_SPI_ErrorCallback 16 static
|
||||
stm32f1xx_hal_spi.c:2643:13:HAL_SPI_AbortCpltCallback 16 static
|
||||
stm32f1xx_hal_spi.c:2678:22:HAL_SPI_GetState 16 static
|
||||
stm32f1xx_hal_spi.c:2690:10:HAL_SPI_GetError 16 static
|
||||
stm32f1xx_hal_spi.c:2715:13:SPI_DMATransmitCplt 32 static
|
||||
stm32f1xx_hal_spi.c:2772:13:SPI_DMAReceiveCplt 24 static
|
||||
stm32f1xx_hal_spi.c:2871:13:SPI_DMATransmitReceiveCplt 24 static
|
||||
stm32f1xx_hal_spi.c:2961:13:SPI_DMAHalfTransmitCplt 24 static
|
||||
stm32f1xx_hal_spi.c:2979:13:SPI_DMAHalfReceiveCplt 24 static
|
||||
stm32f1xx_hal_spi.c:2997:13:SPI_DMAHalfTransmitReceiveCplt 24 static
|
||||
stm32f1xx_hal_spi.c:3015:13:SPI_DMAError 24 static
|
||||
stm32f1xx_hal_spi.c:3038:13:SPI_DMAAbortOnError 24 static
|
||||
stm32f1xx_hal_spi.c:3060:13:SPI_DMATxAbortCallback 32 static
|
||||
stm32f1xx_hal_spi.c:3124:13:SPI_DMARxAbortCallback 24 static
|
||||
stm32f1xx_hal_spi.c:3182:13:SPI_2linesRxISR_8BIT 16 static
|
||||
stm32f1xx_hal_spi.c:3245:13:SPI_2linesTxISR_8BIT 16 static
|
||||
stm32f1xx_hal_spi.c:3281:13:SPI_2linesRxISR_16BIT 16 static
|
||||
stm32f1xx_hal_spi.c:3337:13:SPI_2linesTxISR_16BIT 16 static
|
||||
stm32f1xx_hal_spi.c:3397:13:SPI_RxISR_8BIT 16 static
|
||||
stm32f1xx_hal_spi.c:3460:13:SPI_RxISR_16BIT 16 static
|
||||
stm32f1xx_hal_spi.c:3500:13:SPI_TxISR_8BIT 16 static
|
||||
stm32f1xx_hal_spi.c:3525:13:SPI_TxISR_16BIT 16 static
|
||||
stm32f1xx_hal_spi.c:3555:26:SPI_WaitFlagStateUntilTimeout 40 static
|
||||
stm32f1xx_hal_spi.c:3622:26:SPI_EndRxTransaction 32 static
|
||||
stm32f1xx_hal_spi.c:3659:26:SPI_EndRxTxTransaction 32 static
|
||||
stm32f1xx_hal_spi.c:3676:13:SPI_CloseRxTx_ISR 32 static
|
||||
stm32f1xx_hal_spi.c:3782:13:SPI_CloseRx_ISR 24 static
|
||||
stm32f1xx_hal_spi.c:3856:13:SPI_CloseTx_ISR 32 static
|
||||
stm32f1xx_hal_spi.c:3917:13:SPI_AbortRx_ISR 24 static
|
||||
stm32f1xx_hal_spi.c:3953:13:SPI_AbortTx_ISR 16 static
|
||||
@@ -25,6 +25,7 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_sram.o: \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h
|
||||
|
||||
@@ -78,6 +79,8 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_sram.o: \
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||
|
||||
@@ -25,6 +25,7 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.o: \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h
|
||||
|
||||
@@ -78,6 +79,8 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.o: \
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||
|
||||
@@ -25,6 +25,7 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.o: \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h
|
||||
|
||||
@@ -78,6 +79,8 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.o: \
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||
|
||||
@@ -25,6 +25,7 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_fsmc.o: \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h
|
||||
|
||||
@@ -78,6 +79,8 @@ Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_ll_fsmc.o: \
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||
|
||||
@@ -17,6 +17,7 @@ C_SRCS += \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_spi.c \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_sram.c \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.c \
|
||||
@@ -35,6 +36,7 @@ OBJS += \
|
||||
./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.o \
|
||||
./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.o \
|
||||
./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.o \
|
||||
./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_spi.o \
|
||||
./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_sram.o \
|
||||
./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.o \
|
||||
./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.o \
|
||||
@@ -53,6 +55,7 @@ C_DEPS += \
|
||||
./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.d \
|
||||
./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.d \
|
||||
./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.d \
|
||||
./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_spi.d \
|
||||
./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_sram.d \
|
||||
./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.d \
|
||||
./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.d \
|
||||
|
||||
@@ -24,6 +24,7 @@ HW_Devices/LCD.o: ../HW_Devices/LCD.c ../HW_Devices/LCD.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h
|
||||
|
||||
@@ -81,6 +82,8 @@ HW_Devices/LCD.o: ../HW_Devices/LCD.c ../HW_Devices/LCD.h \
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||
|
||||
@@ -24,6 +24,7 @@ HW_Devices/eeprom.o: ../HW_Devices/eeprom.c ../HW_Devices/eeprom.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
|
||||
../HW_Devices/iic.h
|
||||
@@ -82,6 +83,8 @@ HW_Devices/eeprom.o: ../HW_Devices/eeprom.c ../HW_Devices/eeprom.h \
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||
|
||||
@@ -24,6 +24,7 @@ HW_Devices/iic.o: ../HW_Devices/iic.c ../HW_Devices/iic.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h
|
||||
|
||||
@@ -81,6 +82,8 @@ HW_Devices/iic.o: ../HW_Devices/iic.c ../HW_Devices/iic.h \
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
HW_Devices/rs522.o: ../HW_Devices/rs522.c ../HW_Devices/rs522.h \
|
||||
../Core/Inc/main.h ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \
|
||||
../Core/Inc/stm32f1xx_hal_conf.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \
|
||||
../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \
|
||||
../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xe.h \
|
||||
../Drivers/CMSIS/Include/core_cm3.h \
|
||||
../Drivers/CMSIS/Include/cmsis_version.h \
|
||||
../Drivers/CMSIS/Include/cmsis_compiler.h \
|
||||
../Drivers/CMSIS/Include/cmsis_gcc.h \
|
||||
../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_sram.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h
|
||||
|
||||
../HW_Devices/rs522.h:
|
||||
|
||||
../Core/Inc/main.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
|
||||
|
||||
../Core/Inc/stm32f1xx_hal_conf.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:
|
||||
|
||||
../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:
|
||||
|
||||
../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xe.h:
|
||||
|
||||
../Drivers/CMSIS/Include/core_cm3.h:
|
||||
|
||||
../Drivers/CMSIS/Include/cmsis_version.h:
|
||||
|
||||
../Drivers/CMSIS/Include/cmsis_compiler.h:
|
||||
|
||||
../Drivers/CMSIS/Include/cmsis_gcc.h:
|
||||
|
||||
../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_sram.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||
@@ -0,0 +1,19 @@
|
||||
rs522.c:18:9:ReadRawRC 24 static
|
||||
rs522.c:38:6:WriteRawRC 24 static
|
||||
rs522.c:56:6:SetBitMask 24 static
|
||||
rs522.c:71:6:ClearBitMask 24 static
|
||||
rs522.c:86:6:PcdAntennaOn 16 static
|
||||
rs522.c:104:6:PcdAntennaOff 8 static
|
||||
rs522.c:118:6:PcdReset 8 static
|
||||
rs522.c:140:6:M500PcdConfigISOType 16 static
|
||||
rs522.c:171:6:PcdComMF522 48 static
|
||||
rs522.c:282:6:PcdRequest 48 static
|
||||
rs522.c:314:6:PcdAnticoll 56 static
|
||||
rs522.c:353:6:CalulateCRC 40 static
|
||||
rs522.c:383:6:PcdSelect 48 static
|
||||
rs522.c:426:6:PcdAuthState 56 static
|
||||
rs522.c:465:6:PcdWrite 48 static
|
||||
rs522.c:506:6:PcdRead 48 static
|
||||
rs522.c:539:6:PcdHalt 40 static
|
||||
rs522.c:552:6:IC_CMT 32 static
|
||||
rs522.c:571:6:RC522_Init 8 static
|
||||
@@ -8,18 +8,21 @@ C_SRCS += \
|
||||
../HW_Devices/LCD.c \
|
||||
../HW_Devices/eeprom.c \
|
||||
../HW_Devices/iic.c \
|
||||
../HW_Devices/rs522.c \
|
||||
../HW_Devices/touch.c
|
||||
|
||||
OBJS += \
|
||||
./HW_Devices/LCD.o \
|
||||
./HW_Devices/eeprom.o \
|
||||
./HW_Devices/iic.o \
|
||||
./HW_Devices/rs522.o \
|
||||
./HW_Devices/touch.o
|
||||
|
||||
C_DEPS += \
|
||||
./HW_Devices/LCD.d \
|
||||
./HW_Devices/eeprom.d \
|
||||
./HW_Devices/iic.d \
|
||||
./HW_Devices/rs522.d \
|
||||
./HW_Devices/touch.d
|
||||
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ HW_Devices/touch.o: ../HW_Devices/touch.c ../HW_Devices/touch.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
|
||||
../HW_Devices/LCD.h ../HW_Devices/eeprom.h
|
||||
@@ -82,6 +83,8 @@ HW_Devices/touch.o: ../HW_Devices/touch.c ../HW_Devices/touch.h \
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||
|
||||
@@ -6,4 +6,4 @@ touch.c:111:9:TP_Read_XY2 24 static
|
||||
touch.c:131:6:TP_Server 16 static
|
||||
touch.c:154:6:TP_XY 24 static
|
||||
touch.c:167:6:TP_DrwaTrage 40 static
|
||||
touch.c:177:6:TP_adjustment 160 static
|
||||
touch.c:178:6:TP_adjustment 168 static
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
SW_APPs/APP_IDcard.o: ../SW_APPs/APP_IDcard.c ../SW_APPs/APP_IDcard.h \
|
||||
../Core/Inc/main.h ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \
|
||||
../Core/Inc/stm32f1xx_hal_conf.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \
|
||||
../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \
|
||||
../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xe.h \
|
||||
../Drivers/CMSIS/Include/core_cm3.h \
|
||||
../Drivers/CMSIS/Include/cmsis_version.h \
|
||||
../Drivers/CMSIS/Include/cmsis_compiler.h \
|
||||
../Drivers/CMSIS/Include/cmsis_gcc.h \
|
||||
../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_sram.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
|
||||
../SW_APPs/windows.h \
|
||||
/Users/wuwenfeng/STM32CubeIDE/workspace_1.7.0/m3s/HW_Devices/lcd.h \
|
||||
/Users/wuwenfeng/STM32CubeIDE/workspace_1.7.0/m3s/HW_Devices/rs522.h
|
||||
|
||||
../SW_APPs/APP_IDcard.h:
|
||||
|
||||
../Core/Inc/main.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
|
||||
|
||||
../Core/Inc/stm32f1xx_hal_conf.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:
|
||||
|
||||
../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:
|
||||
|
||||
../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xe.h:
|
||||
|
||||
../Drivers/CMSIS/Include/core_cm3.h:
|
||||
|
||||
../Drivers/CMSIS/Include/cmsis_version.h:
|
||||
|
||||
../Drivers/CMSIS/Include/cmsis_compiler.h:
|
||||
|
||||
../Drivers/CMSIS/Include/cmsis_gcc.h:
|
||||
|
||||
../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_sram.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||
|
||||
../SW_APPs/windows.h:
|
||||
|
||||
/Users/wuwenfeng/STM32CubeIDE/workspace_1.7.0/m3s/HW_Devices/lcd.h:
|
||||
|
||||
/Users/wuwenfeng/STM32CubeIDE/workspace_1.7.0/m3s/HW_Devices/rs522.h:
|
||||
@@ -0,0 +1,2 @@
|
||||
APP_IDcard.c:11:6:APP_IDcard_init 16 static
|
||||
APP_IDcard.c:17:6:APP_IDcard_loop 4 static
|
||||
@@ -24,6 +24,7 @@ SW_APPs/APP_blood.o: ../SW_APPs/APP_blood.c ../SW_APPs/APP_blood.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
|
||||
../SW_APPs/windows.h \
|
||||
@@ -86,6 +87,8 @@ SW_APPs/APP_blood.o: ../SW_APPs/APP_blood.c ../SW_APPs/APP_blood.h \
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||
|
||||
@@ -25,13 +25,15 @@ SW_APPs/Main_APP.o: ../SW_APPs/Main_APP.c ../SW_APPs/Main_APP.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
|
||||
../SW_APPs/windows.h \
|
||||
/Users/wuwenfeng/STM32CubeIDE/workspace_1.7.0/m3s/HW_Devices/lcd.h \
|
||||
/Users/wuwenfeng/STM32CubeIDE/workspace_1.7.0/m3s/HW_Devices/touch.h \
|
||||
/Users/wuwenfeng/STM32CubeIDE/workspace_1.7.0/m3s/HW_Devices/eeprom.h \
|
||||
../SW_APPs/APP_blood.h
|
||||
../SW_APPs/APP_blood.h ../SW_APPs/APP_IDcard.h \
|
||||
/Users/wuwenfeng/STM32CubeIDE/workspace_1.7.0/m3s/HW_Devices/rs522.h
|
||||
|
||||
../SW_APPs/Main_APP.h:
|
||||
|
||||
@@ -89,6 +91,8 @@ SW_APPs/Main_APP.o: ../SW_APPs/Main_APP.c ../SW_APPs/Main_APP.h \
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||
@@ -102,3 +106,7 @@ SW_APPs/Main_APP.o: ../SW_APPs/Main_APP.c ../SW_APPs/Main_APP.h \
|
||||
/Users/wuwenfeng/STM32CubeIDE/workspace_1.7.0/m3s/HW_Devices/eeprom.h:
|
||||
|
||||
../SW_APPs/APP_blood.h:
|
||||
|
||||
../SW_APPs/APP_IDcard.h:
|
||||
|
||||
/Users/wuwenfeng/STM32CubeIDE/workspace_1.7.0/m3s/HW_Devices/rs522.h:
|
||||
|
||||
@@ -1 +1 @@
|
||||
Main_APP.c:20:6:main_app 96 static
|
||||
Main_APP.c:21:6:main_app 96 static
|
||||
|
||||
@@ -5,16 +5,19 @@
|
||||
|
||||
# Add inputs and outputs from these tool invocations to the build variables
|
||||
C_SRCS += \
|
||||
../SW_APPs/APP_IDcard.c \
|
||||
../SW_APPs/APP_blood.c \
|
||||
../SW_APPs/Main_APP.c \
|
||||
../SW_APPs/windows.c
|
||||
|
||||
OBJS += \
|
||||
./SW_APPs/APP_IDcard.o \
|
||||
./SW_APPs/APP_blood.o \
|
||||
./SW_APPs/Main_APP.o \
|
||||
./SW_APPs/windows.o
|
||||
|
||||
C_DEPS += \
|
||||
./SW_APPs/APP_IDcard.d \
|
||||
./SW_APPs/APP_blood.d \
|
||||
./SW_APPs/Main_APP.d \
|
||||
./SW_APPs/windows.d
|
||||
|
||||
@@ -24,6 +24,7 @@ SW_APPs/windows.o: ../SW_APPs/windows.c ../SW_APPs/windows.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
|
||||
/Users/wuwenfeng/STM32CubeIDE/workspace_1.7.0/m3s/HW_Devices/lcd.h \
|
||||
@@ -83,6 +84,8 @@ SW_APPs/windows.o: ../SW_APPs/windows.c ../SW_APPs/windows.h \
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
|
||||
|
||||
../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
|
||||
|
||||
Binary file not shown.
+16344
-15968
File diff suppressed because it is too large
Load Diff
+1650
-1172
File diff suppressed because it is too large
Load Diff
@@ -17,6 +17,7 @@
|
||||
"./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.o"
|
||||
"./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.o"
|
||||
"./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.o"
|
||||
"./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_spi.o"
|
||||
"./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_sram.o"
|
||||
"./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.o"
|
||||
"./Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim_ex.o"
|
||||
@@ -24,7 +25,9 @@
|
||||
"./HW_Devices/LCD.o"
|
||||
"./HW_Devices/eeprom.o"
|
||||
"./HW_Devices/iic.o"
|
||||
"./HW_Devices/rs522.o"
|
||||
"./HW_Devices/touch.o"
|
||||
"./SW_APPs/APP_IDcard.o"
|
||||
"./SW_APPs/APP_blood.o"
|
||||
"./SW_APPs/Main_APP.o"
|
||||
"./SW_APPs/windows.o"
|
||||
|
||||
@@ -0,0 +1,731 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file stm32f1xx_hal_spi.h
|
||||
* @author MCD Application Team
|
||||
* @brief Header file of SPI HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© Copyright (c) 2016 STMicroelectronics.
|
||||
* All rights reserved.</center></h2>
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef STM32F1xx_HAL_SPI_H
|
||||
#define STM32F1xx_HAL_SPI_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f1xx_hal_def.h"
|
||||
|
||||
/** @addtogroup STM32F1xx_HAL_Driver
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup SPI
|
||||
* @{
|
||||
*/
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/** @defgroup SPI_Exported_Types SPI Exported Types
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief SPI Configuration Structure definition
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
uint32_t Mode; /*!< Specifies the SPI operating mode.
|
||||
This parameter can be a value of @ref SPI_Mode */
|
||||
|
||||
uint32_t Direction; /*!< Specifies the SPI bidirectional mode state.
|
||||
This parameter can be a value of @ref SPI_Direction */
|
||||
|
||||
uint32_t DataSize; /*!< Specifies the SPI data size.
|
||||
This parameter can be a value of @ref SPI_Data_Size */
|
||||
|
||||
uint32_t CLKPolarity; /*!< Specifies the serial clock steady state.
|
||||
This parameter can be a value of @ref SPI_Clock_Polarity */
|
||||
|
||||
uint32_t CLKPhase; /*!< Specifies the clock active edge for the bit capture.
|
||||
This parameter can be a value of @ref SPI_Clock_Phase */
|
||||
|
||||
uint32_t NSS; /*!< Specifies whether the NSS signal is managed by
|
||||
hardware (NSS pin) or by software using the SSI bit.
|
||||
This parameter can be a value of @ref SPI_Slave_Select_management */
|
||||
|
||||
uint32_t BaudRatePrescaler; /*!< Specifies the Baud Rate prescaler value which will be
|
||||
used to configure the transmit and receive SCK clock.
|
||||
This parameter can be a value of @ref SPI_BaudRate_Prescaler
|
||||
@note The communication clock is derived from the master
|
||||
clock. The slave clock does not need to be set. */
|
||||
|
||||
uint32_t FirstBit; /*!< Specifies whether data transfers start from MSB or LSB bit.
|
||||
This parameter can be a value of @ref SPI_MSB_LSB_transmission */
|
||||
|
||||
uint32_t TIMode; /*!< Specifies if the TI mode is enabled or not.
|
||||
This parameter can be a value of @ref SPI_TI_mode */
|
||||
|
||||
uint32_t CRCCalculation; /*!< Specifies if the CRC calculation is enabled or not.
|
||||
This parameter can be a value of @ref SPI_CRC_Calculation */
|
||||
|
||||
uint32_t CRCPolynomial; /*!< Specifies the polynomial used for the CRC calculation.
|
||||
This parameter must be an odd number between Min_Data = 1 and Max_Data = 65535 */
|
||||
} SPI_InitTypeDef;
|
||||
|
||||
/**
|
||||
* @brief HAL SPI State structure definition
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
HAL_SPI_STATE_RESET = 0x00U, /*!< Peripheral not Initialized */
|
||||
HAL_SPI_STATE_READY = 0x01U, /*!< Peripheral Initialized and ready for use */
|
||||
HAL_SPI_STATE_BUSY = 0x02U, /*!< an internal process is ongoing */
|
||||
HAL_SPI_STATE_BUSY_TX = 0x03U, /*!< Data Transmission process is ongoing */
|
||||
HAL_SPI_STATE_BUSY_RX = 0x04U, /*!< Data Reception process is ongoing */
|
||||
HAL_SPI_STATE_BUSY_TX_RX = 0x05U, /*!< Data Transmission and Reception process is ongoing */
|
||||
HAL_SPI_STATE_ERROR = 0x06U, /*!< SPI error state */
|
||||
HAL_SPI_STATE_ABORT = 0x07U /*!< SPI abort is ongoing */
|
||||
} HAL_SPI_StateTypeDef;
|
||||
|
||||
/**
|
||||
* @brief SPI handle Structure definition
|
||||
*/
|
||||
typedef struct __SPI_HandleTypeDef
|
||||
{
|
||||
SPI_TypeDef *Instance; /*!< SPI registers base address */
|
||||
|
||||
SPI_InitTypeDef Init; /*!< SPI communication parameters */
|
||||
|
||||
uint8_t *pTxBuffPtr; /*!< Pointer to SPI Tx transfer Buffer */
|
||||
|
||||
uint16_t TxXferSize; /*!< SPI Tx Transfer size */
|
||||
|
||||
__IO uint16_t TxXferCount; /*!< SPI Tx Transfer Counter */
|
||||
|
||||
uint8_t *pRxBuffPtr; /*!< Pointer to SPI Rx transfer Buffer */
|
||||
|
||||
uint16_t RxXferSize; /*!< SPI Rx Transfer size */
|
||||
|
||||
__IO uint16_t RxXferCount; /*!< SPI Rx Transfer Counter */
|
||||
|
||||
void (*RxISR)(struct __SPI_HandleTypeDef *hspi); /*!< function pointer on Rx ISR */
|
||||
|
||||
void (*TxISR)(struct __SPI_HandleTypeDef *hspi); /*!< function pointer on Tx ISR */
|
||||
|
||||
DMA_HandleTypeDef *hdmatx; /*!< SPI Tx DMA Handle parameters */
|
||||
|
||||
DMA_HandleTypeDef *hdmarx; /*!< SPI Rx DMA Handle parameters */
|
||||
|
||||
HAL_LockTypeDef Lock; /*!< Locking object */
|
||||
|
||||
__IO HAL_SPI_StateTypeDef State; /*!< SPI communication state */
|
||||
|
||||
__IO uint32_t ErrorCode; /*!< SPI Error code */
|
||||
|
||||
#if (USE_HAL_SPI_REGISTER_CALLBACKS == 1U)
|
||||
void (* TxCpltCallback)(struct __SPI_HandleTypeDef *hspi); /*!< SPI Tx Completed callback */
|
||||
void (* RxCpltCallback)(struct __SPI_HandleTypeDef *hspi); /*!< SPI Rx Completed callback */
|
||||
void (* TxRxCpltCallback)(struct __SPI_HandleTypeDef *hspi); /*!< SPI TxRx Completed callback */
|
||||
void (* TxHalfCpltCallback)(struct __SPI_HandleTypeDef *hspi); /*!< SPI Tx Half Completed callback */
|
||||
void (* RxHalfCpltCallback)(struct __SPI_HandleTypeDef *hspi); /*!< SPI Rx Half Completed callback */
|
||||
void (* TxRxHalfCpltCallback)(struct __SPI_HandleTypeDef *hspi); /*!< SPI TxRx Half Completed callback */
|
||||
void (* ErrorCallback)(struct __SPI_HandleTypeDef *hspi); /*!< SPI Error callback */
|
||||
void (* AbortCpltCallback)(struct __SPI_HandleTypeDef *hspi); /*!< SPI Abort callback */
|
||||
void (* MspInitCallback)(struct __SPI_HandleTypeDef *hspi); /*!< SPI Msp Init callback */
|
||||
void (* MspDeInitCallback)(struct __SPI_HandleTypeDef *hspi); /*!< SPI Msp DeInit callback */
|
||||
|
||||
#endif /* USE_HAL_SPI_REGISTER_CALLBACKS */
|
||||
} SPI_HandleTypeDef;
|
||||
|
||||
#if (USE_HAL_SPI_REGISTER_CALLBACKS == 1U)
|
||||
/**
|
||||
* @brief HAL SPI Callback ID enumeration definition
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
HAL_SPI_TX_COMPLETE_CB_ID = 0x00U, /*!< SPI Tx Completed callback ID */
|
||||
HAL_SPI_RX_COMPLETE_CB_ID = 0x01U, /*!< SPI Rx Completed callback ID */
|
||||
HAL_SPI_TX_RX_COMPLETE_CB_ID = 0x02U, /*!< SPI TxRx Completed callback ID */
|
||||
HAL_SPI_TX_HALF_COMPLETE_CB_ID = 0x03U, /*!< SPI Tx Half Completed callback ID */
|
||||
HAL_SPI_RX_HALF_COMPLETE_CB_ID = 0x04U, /*!< SPI Rx Half Completed callback ID */
|
||||
HAL_SPI_TX_RX_HALF_COMPLETE_CB_ID = 0x05U, /*!< SPI TxRx Half Completed callback ID */
|
||||
HAL_SPI_ERROR_CB_ID = 0x06U, /*!< SPI Error callback ID */
|
||||
HAL_SPI_ABORT_CB_ID = 0x07U, /*!< SPI Abort callback ID */
|
||||
HAL_SPI_MSPINIT_CB_ID = 0x08U, /*!< SPI Msp Init callback ID */
|
||||
HAL_SPI_MSPDEINIT_CB_ID = 0x09U /*!< SPI Msp DeInit callback ID */
|
||||
|
||||
} HAL_SPI_CallbackIDTypeDef;
|
||||
|
||||
/**
|
||||
* @brief HAL SPI Callback pointer definition
|
||||
*/
|
||||
typedef void (*pSPI_CallbackTypeDef)(SPI_HandleTypeDef *hspi); /*!< pointer to an SPI callback function */
|
||||
|
||||
#endif /* USE_HAL_SPI_REGISTER_CALLBACKS */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
/** @defgroup SPI_Exported_Constants SPI Exported Constants
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup SPI_Error_Code SPI Error Code
|
||||
* @{
|
||||
*/
|
||||
#define HAL_SPI_ERROR_NONE (0x00000000U) /*!< No error */
|
||||
#define HAL_SPI_ERROR_MODF (0x00000001U) /*!< MODF error */
|
||||
#define HAL_SPI_ERROR_CRC (0x00000002U) /*!< CRC error */
|
||||
#define HAL_SPI_ERROR_OVR (0x00000004U) /*!< OVR error */
|
||||
#define HAL_SPI_ERROR_DMA (0x00000010U) /*!< DMA transfer error */
|
||||
#define HAL_SPI_ERROR_FLAG (0x00000020U) /*!< Error on RXNE/TXE/BSY Flag */
|
||||
#define HAL_SPI_ERROR_ABORT (0x00000040U) /*!< Error during SPI Abort procedure */
|
||||
#if (USE_HAL_SPI_REGISTER_CALLBACKS == 1U)
|
||||
#define HAL_SPI_ERROR_INVALID_CALLBACK (0x00000080U) /*!< Invalid Callback error */
|
||||
#endif /* USE_HAL_SPI_REGISTER_CALLBACKS */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup SPI_Mode SPI Mode
|
||||
* @{
|
||||
*/
|
||||
#define SPI_MODE_SLAVE (0x00000000U)
|
||||
#define SPI_MODE_MASTER (SPI_CR1_MSTR | SPI_CR1_SSI)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup SPI_Direction SPI Direction Mode
|
||||
* @{
|
||||
*/
|
||||
#define SPI_DIRECTION_2LINES (0x00000000U)
|
||||
#define SPI_DIRECTION_2LINES_RXONLY SPI_CR1_RXONLY
|
||||
#define SPI_DIRECTION_1LINE SPI_CR1_BIDIMODE
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup SPI_Data_Size SPI Data Size
|
||||
* @{
|
||||
*/
|
||||
#define SPI_DATASIZE_8BIT (0x00000000U)
|
||||
#define SPI_DATASIZE_16BIT SPI_CR1_DFF
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup SPI_Clock_Polarity SPI Clock Polarity
|
||||
* @{
|
||||
*/
|
||||
#define SPI_POLARITY_LOW (0x00000000U)
|
||||
#define SPI_POLARITY_HIGH SPI_CR1_CPOL
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup SPI_Clock_Phase SPI Clock Phase
|
||||
* @{
|
||||
*/
|
||||
#define SPI_PHASE_1EDGE (0x00000000U)
|
||||
#define SPI_PHASE_2EDGE SPI_CR1_CPHA
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup SPI_Slave_Select_management SPI Slave Select Management
|
||||
* @{
|
||||
*/
|
||||
#define SPI_NSS_SOFT SPI_CR1_SSM
|
||||
#define SPI_NSS_HARD_INPUT (0x00000000U)
|
||||
#define SPI_NSS_HARD_OUTPUT (SPI_CR2_SSOE << 16U)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup SPI_BaudRate_Prescaler SPI BaudRate Prescaler
|
||||
* @{
|
||||
*/
|
||||
#define SPI_BAUDRATEPRESCALER_2 (0x00000000U)
|
||||
#define SPI_BAUDRATEPRESCALER_4 (SPI_CR1_BR_0)
|
||||
#define SPI_BAUDRATEPRESCALER_8 (SPI_CR1_BR_1)
|
||||
#define SPI_BAUDRATEPRESCALER_16 (SPI_CR1_BR_1 | SPI_CR1_BR_0)
|
||||
#define SPI_BAUDRATEPRESCALER_32 (SPI_CR1_BR_2)
|
||||
#define SPI_BAUDRATEPRESCALER_64 (SPI_CR1_BR_2 | SPI_CR1_BR_0)
|
||||
#define SPI_BAUDRATEPRESCALER_128 (SPI_CR1_BR_2 | SPI_CR1_BR_1)
|
||||
#define SPI_BAUDRATEPRESCALER_256 (SPI_CR1_BR_2 | SPI_CR1_BR_1 | SPI_CR1_BR_0)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup SPI_MSB_LSB_transmission SPI MSB LSB Transmission
|
||||
* @{
|
||||
*/
|
||||
#define SPI_FIRSTBIT_MSB (0x00000000U)
|
||||
#define SPI_FIRSTBIT_LSB SPI_CR1_LSBFIRST
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup SPI_TI_mode SPI TI Mode
|
||||
* @{
|
||||
*/
|
||||
#define SPI_TIMODE_DISABLE (0x00000000U)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup SPI_CRC_Calculation SPI CRC Calculation
|
||||
* @{
|
||||
*/
|
||||
#define SPI_CRCCALCULATION_DISABLE (0x00000000U)
|
||||
#define SPI_CRCCALCULATION_ENABLE SPI_CR1_CRCEN
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup SPI_Interrupt_definition SPI Interrupt Definition
|
||||
* @{
|
||||
*/
|
||||
#define SPI_IT_TXE SPI_CR2_TXEIE
|
||||
#define SPI_IT_RXNE SPI_CR2_RXNEIE
|
||||
#define SPI_IT_ERR SPI_CR2_ERRIE
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup SPI_Flags_definition SPI Flags Definition
|
||||
* @{
|
||||
*/
|
||||
#define SPI_FLAG_RXNE SPI_SR_RXNE /* SPI status flag: Rx buffer not empty flag */
|
||||
#define SPI_FLAG_TXE SPI_SR_TXE /* SPI status flag: Tx buffer empty flag */
|
||||
#define SPI_FLAG_BSY SPI_SR_BSY /* SPI status flag: Busy flag */
|
||||
#define SPI_FLAG_CRCERR SPI_SR_CRCERR /* SPI Error flag: CRC error flag */
|
||||
#define SPI_FLAG_MODF SPI_SR_MODF /* SPI Error flag: Mode fault flag */
|
||||
#define SPI_FLAG_OVR SPI_SR_OVR /* SPI Error flag: Overrun flag */
|
||||
#define SPI_FLAG_MASK (SPI_SR_RXNE | SPI_SR_TXE | SPI_SR_BSY\
|
||||
| SPI_SR_CRCERR | SPI_SR_MODF | SPI_SR_OVR)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/* Exported macros -----------------------------------------------------------*/
|
||||
/** @defgroup SPI_Exported_Macros SPI Exported Macros
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @brief Reset SPI handle state.
|
||||
* @param __HANDLE__ specifies the SPI Handle.
|
||||
* This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
|
||||
* @retval None
|
||||
*/
|
||||
#if (USE_HAL_SPI_REGISTER_CALLBACKS == 1U)
|
||||
#define __HAL_SPI_RESET_HANDLE_STATE(__HANDLE__) do{ \
|
||||
(__HANDLE__)->State = HAL_SPI_STATE_RESET; \
|
||||
(__HANDLE__)->MspInitCallback = NULL; \
|
||||
(__HANDLE__)->MspDeInitCallback = NULL; \
|
||||
} while(0)
|
||||
#else
|
||||
#define __HAL_SPI_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_SPI_STATE_RESET)
|
||||
#endif /* USE_HAL_SPI_REGISTER_CALLBACKS */
|
||||
|
||||
/** @brief Enable the specified SPI interrupts.
|
||||
* @param __HANDLE__ specifies the SPI Handle.
|
||||
* This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
|
||||
* @param __INTERRUPT__ specifies the interrupt source to enable.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg SPI_IT_TXE: Tx buffer empty interrupt enable
|
||||
* @arg SPI_IT_RXNE: RX buffer not empty interrupt enable
|
||||
* @arg SPI_IT_ERR: Error interrupt enable
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_SPI_ENABLE_IT(__HANDLE__, __INTERRUPT__) SET_BIT((__HANDLE__)->Instance->CR2, (__INTERRUPT__))
|
||||
|
||||
/** @brief Disable the specified SPI interrupts.
|
||||
* @param __HANDLE__ specifies the SPI handle.
|
||||
* This parameter can be SPIx where x: 1, 2, or 3 to select the SPI peripheral.
|
||||
* @param __INTERRUPT__ specifies the interrupt source to disable.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg SPI_IT_TXE: Tx buffer empty interrupt enable
|
||||
* @arg SPI_IT_RXNE: RX buffer not empty interrupt enable
|
||||
* @arg SPI_IT_ERR: Error interrupt enable
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_SPI_DISABLE_IT(__HANDLE__, __INTERRUPT__) CLEAR_BIT((__HANDLE__)->Instance->CR2, (__INTERRUPT__))
|
||||
|
||||
/** @brief Check whether the specified SPI interrupt source is enabled or not.
|
||||
* @param __HANDLE__ specifies the SPI Handle.
|
||||
* This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
|
||||
* @param __INTERRUPT__ specifies the SPI interrupt source to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg SPI_IT_TXE: Tx buffer empty interrupt enable
|
||||
* @arg SPI_IT_RXNE: RX buffer not empty interrupt enable
|
||||
* @arg SPI_IT_ERR: Error interrupt enable
|
||||
* @retval The new state of __IT__ (TRUE or FALSE).
|
||||
*/
|
||||
#define __HAL_SPI_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->CR2\
|
||||
& (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)
|
||||
|
||||
/** @brief Check whether the specified SPI flag is set or not.
|
||||
* @param __HANDLE__ specifies the SPI Handle.
|
||||
* This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
|
||||
* @param __FLAG__ specifies the flag to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg SPI_FLAG_RXNE: Receive buffer not empty flag
|
||||
* @arg SPI_FLAG_TXE: Transmit buffer empty flag
|
||||
* @arg SPI_FLAG_CRCERR: CRC error flag
|
||||
* @arg SPI_FLAG_MODF: Mode fault flag
|
||||
* @arg SPI_FLAG_OVR: Overrun flag
|
||||
* @arg SPI_FLAG_BSY: Busy flag
|
||||
* @retval The new state of __FLAG__ (TRUE or FALSE).
|
||||
*/
|
||||
#define __HAL_SPI_GET_FLAG(__HANDLE__, __FLAG__) ((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__))
|
||||
|
||||
/** @brief Clear the SPI CRCERR pending flag.
|
||||
* @param __HANDLE__ specifies the SPI Handle.
|
||||
* This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_SPI_CLEAR_CRCERRFLAG(__HANDLE__) ((__HANDLE__)->Instance->SR = (uint16_t)(~SPI_FLAG_CRCERR))
|
||||
|
||||
/** @brief Clear the SPI MODF pending flag.
|
||||
* @param __HANDLE__ specifies the SPI Handle.
|
||||
* This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_SPI_CLEAR_MODFFLAG(__HANDLE__) \
|
||||
do{ \
|
||||
__IO uint32_t tmpreg_modf = 0x00U; \
|
||||
tmpreg_modf = (__HANDLE__)->Instance->SR; \
|
||||
CLEAR_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_SPE); \
|
||||
UNUSED(tmpreg_modf); \
|
||||
} while(0U)
|
||||
|
||||
/** @brief Clear the SPI OVR pending flag.
|
||||
* @param __HANDLE__ specifies the SPI Handle.
|
||||
* This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_SPI_CLEAR_OVRFLAG(__HANDLE__) \
|
||||
do{ \
|
||||
__IO uint32_t tmpreg_ovr = 0x00U; \
|
||||
tmpreg_ovr = (__HANDLE__)->Instance->DR; \
|
||||
tmpreg_ovr = (__HANDLE__)->Instance->SR; \
|
||||
UNUSED(tmpreg_ovr); \
|
||||
} while(0U)
|
||||
|
||||
/** @brief Enable the SPI peripheral.
|
||||
* @param __HANDLE__ specifies the SPI Handle.
|
||||
* This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_SPI_ENABLE(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_SPE)
|
||||
|
||||
/** @brief Disable the SPI peripheral.
|
||||
* @param __HANDLE__ specifies the SPI Handle.
|
||||
* This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_SPI_DISABLE(__HANDLE__) CLEAR_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_SPE)
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/* Private constants ---------------------------------------------------------*/
|
||||
/** @defgroup SPI_Private_Constants SPI Private Constants
|
||||
* @{
|
||||
*/
|
||||
#define SPI_INVALID_CRC_ERROR 0U /* CRC error wrongly detected */
|
||||
#define SPI_VALID_CRC_ERROR 1U /* CRC error is true */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/* Private macros ------------------------------------------------------------*/
|
||||
/** @defgroup SPI_Private_Macros SPI Private Macros
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @brief Set the SPI transmit-only mode.
|
||||
* @param __HANDLE__ specifies the SPI Handle.
|
||||
* This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
|
||||
* @retval None
|
||||
*/
|
||||
#define SPI_1LINE_TX(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_BIDIOE)
|
||||
|
||||
/** @brief Set the SPI receive-only mode.
|
||||
* @param __HANDLE__ specifies the SPI Handle.
|
||||
* This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
|
||||
* @retval None
|
||||
*/
|
||||
#define SPI_1LINE_RX(__HANDLE__) CLEAR_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_BIDIOE)
|
||||
|
||||
/** @brief Reset the CRC calculation of the SPI.
|
||||
* @param __HANDLE__ specifies the SPI Handle.
|
||||
* This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
|
||||
* @retval None
|
||||
*/
|
||||
#define SPI_RESET_CRC(__HANDLE__) do{CLEAR_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_CRCEN);\
|
||||
SET_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_CRCEN);}while(0U)
|
||||
|
||||
/** @brief Check whether the specified SPI flag is set or not.
|
||||
* @param __SR__ copy of SPI SR register.
|
||||
* @param __FLAG__ specifies the flag to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg SPI_FLAG_RXNE: Receive buffer not empty flag
|
||||
* @arg SPI_FLAG_TXE: Transmit buffer empty flag
|
||||
* @arg SPI_FLAG_CRCERR: CRC error flag
|
||||
* @arg SPI_FLAG_MODF: Mode fault flag
|
||||
* @arg SPI_FLAG_OVR: Overrun flag
|
||||
* @arg SPI_FLAG_BSY: Busy flag
|
||||
* @retval SET or RESET.
|
||||
*/
|
||||
#define SPI_CHECK_FLAG(__SR__, __FLAG__) ((((__SR__) & ((__FLAG__) & SPI_FLAG_MASK)) == \
|
||||
((__FLAG__) & SPI_FLAG_MASK)) ? SET : RESET)
|
||||
|
||||
/** @brief Check whether the specified SPI Interrupt is set or not.
|
||||
* @param __CR2__ copy of SPI CR2 register.
|
||||
* @param __INTERRUPT__ specifies the SPI interrupt source to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg SPI_IT_TXE: Tx buffer empty interrupt enable
|
||||
* @arg SPI_IT_RXNE: RX buffer not empty interrupt enable
|
||||
* @arg SPI_IT_ERR: Error interrupt enable
|
||||
* @retval SET or RESET.
|
||||
*/
|
||||
#define SPI_CHECK_IT_SOURCE(__CR2__, __INTERRUPT__) ((((__CR2__) & (__INTERRUPT__)) == \
|
||||
(__INTERRUPT__)) ? SET : RESET)
|
||||
|
||||
/** @brief Checks if SPI Mode parameter is in allowed range.
|
||||
* @param __MODE__ specifies the SPI Mode.
|
||||
* This parameter can be a value of @ref SPI_Mode
|
||||
* @retval None
|
||||
*/
|
||||
#define IS_SPI_MODE(__MODE__) (((__MODE__) == SPI_MODE_SLAVE) || \
|
||||
((__MODE__) == SPI_MODE_MASTER))
|
||||
|
||||
/** @brief Checks if SPI Direction Mode parameter is in allowed range.
|
||||
* @param __MODE__ specifies the SPI Direction Mode.
|
||||
* This parameter can be a value of @ref SPI_Direction
|
||||
* @retval None
|
||||
*/
|
||||
#define IS_SPI_DIRECTION(__MODE__) (((__MODE__) == SPI_DIRECTION_2LINES) || \
|
||||
((__MODE__) == SPI_DIRECTION_2LINES_RXONLY) || \
|
||||
((__MODE__) == SPI_DIRECTION_1LINE))
|
||||
|
||||
/** @brief Checks if SPI Direction Mode parameter is 2 lines.
|
||||
* @param __MODE__ specifies the SPI Direction Mode.
|
||||
* @retval None
|
||||
*/
|
||||
#define IS_SPI_DIRECTION_2LINES(__MODE__) ((__MODE__) == SPI_DIRECTION_2LINES)
|
||||
|
||||
/** @brief Checks if SPI Direction Mode parameter is 1 or 2 lines.
|
||||
* @param __MODE__ specifies the SPI Direction Mode.
|
||||
* @retval None
|
||||
*/
|
||||
#define IS_SPI_DIRECTION_2LINES_OR_1LINE(__MODE__) (((__MODE__) == SPI_DIRECTION_2LINES) || \
|
||||
((__MODE__) == SPI_DIRECTION_1LINE))
|
||||
|
||||
/** @brief Checks if SPI Data Size parameter is in allowed range.
|
||||
* @param __DATASIZE__ specifies the SPI Data Size.
|
||||
* This parameter can be a value of @ref SPI_Data_Size
|
||||
* @retval None
|
||||
*/
|
||||
#define IS_SPI_DATASIZE(__DATASIZE__) (((__DATASIZE__) == SPI_DATASIZE_16BIT) || \
|
||||
((__DATASIZE__) == SPI_DATASIZE_8BIT))
|
||||
|
||||
/** @brief Checks if SPI Serial clock steady state parameter is in allowed range.
|
||||
* @param __CPOL__ specifies the SPI serial clock steady state.
|
||||
* This parameter can be a value of @ref SPI_Clock_Polarity
|
||||
* @retval None
|
||||
*/
|
||||
#define IS_SPI_CPOL(__CPOL__) (((__CPOL__) == SPI_POLARITY_LOW) || \
|
||||
((__CPOL__) == SPI_POLARITY_HIGH))
|
||||
|
||||
/** @brief Checks if SPI Clock Phase parameter is in allowed range.
|
||||
* @param __CPHA__ specifies the SPI Clock Phase.
|
||||
* This parameter can be a value of @ref SPI_Clock_Phase
|
||||
* @retval None
|
||||
*/
|
||||
#define IS_SPI_CPHA(__CPHA__) (((__CPHA__) == SPI_PHASE_1EDGE) || \
|
||||
((__CPHA__) == SPI_PHASE_2EDGE))
|
||||
|
||||
/** @brief Checks if SPI Slave Select parameter is in allowed range.
|
||||
* @param __NSS__ specifies the SPI Slave Select management parameter.
|
||||
* This parameter can be a value of @ref SPI_Slave_Select_management
|
||||
* @retval None
|
||||
*/
|
||||
#define IS_SPI_NSS(__NSS__) (((__NSS__) == SPI_NSS_SOFT) || \
|
||||
((__NSS__) == SPI_NSS_HARD_INPUT) || \
|
||||
((__NSS__) == SPI_NSS_HARD_OUTPUT))
|
||||
|
||||
/** @brief Checks if SPI Baudrate prescaler parameter is in allowed range.
|
||||
* @param __PRESCALER__ specifies the SPI Baudrate prescaler.
|
||||
* This parameter can be a value of @ref SPI_BaudRate_Prescaler
|
||||
* @retval None
|
||||
*/
|
||||
#define IS_SPI_BAUDRATE_PRESCALER(__PRESCALER__) (((__PRESCALER__) == SPI_BAUDRATEPRESCALER_2) || \
|
||||
((__PRESCALER__) == SPI_BAUDRATEPRESCALER_4) || \
|
||||
((__PRESCALER__) == SPI_BAUDRATEPRESCALER_8) || \
|
||||
((__PRESCALER__) == SPI_BAUDRATEPRESCALER_16) || \
|
||||
((__PRESCALER__) == SPI_BAUDRATEPRESCALER_32) || \
|
||||
((__PRESCALER__) == SPI_BAUDRATEPRESCALER_64) || \
|
||||
((__PRESCALER__) == SPI_BAUDRATEPRESCALER_128) || \
|
||||
((__PRESCALER__) == SPI_BAUDRATEPRESCALER_256))
|
||||
|
||||
/** @brief Checks if SPI MSB LSB transmission parameter is in allowed range.
|
||||
* @param __BIT__ specifies the SPI MSB LSB transmission (whether data transfer starts from MSB or LSB bit).
|
||||
* This parameter can be a value of @ref SPI_MSB_LSB_transmission
|
||||
* @retval None
|
||||
*/
|
||||
#define IS_SPI_FIRST_BIT(__BIT__) (((__BIT__) == SPI_FIRSTBIT_MSB) || \
|
||||
((__BIT__) == SPI_FIRSTBIT_LSB))
|
||||
|
||||
/** @brief Checks if SPI TI mode parameter is disabled.
|
||||
* @param __MODE__ SPI_TIMODE_DISABLE. Device not support Ti Mode.
|
||||
* This parameter can be a value of @ref SPI_TI_mode
|
||||
* @retval None
|
||||
*/
|
||||
#define IS_SPI_TIMODE(__MODE__) ((__MODE__) == SPI_TIMODE_DISABLE)
|
||||
|
||||
/** @brief Checks if SPI CRC calculation enabled state is in allowed range.
|
||||
* @param __CALCULATION__ specifies the SPI CRC calculation enable state.
|
||||
* This parameter can be a value of @ref SPI_CRC_Calculation
|
||||
* @retval None
|
||||
*/
|
||||
#define IS_SPI_CRC_CALCULATION(__CALCULATION__) (((__CALCULATION__) == SPI_CRCCALCULATION_DISABLE) || \
|
||||
((__CALCULATION__) == SPI_CRCCALCULATION_ENABLE))
|
||||
|
||||
/** @brief Checks if SPI polynomial value to be used for the CRC calculation, is in allowed range.
|
||||
* @param __POLYNOMIAL__ specifies the SPI polynomial value to be used for the CRC calculation.
|
||||
* This parameter must be a number between Min_Data = 0 and Max_Data = 65535
|
||||
* @retval None
|
||||
*/
|
||||
#define IS_SPI_CRC_POLYNOMIAL(__POLYNOMIAL__) (((__POLYNOMIAL__) >= 0x1U) && \
|
||||
((__POLYNOMIAL__) <= 0xFFFFU) && \
|
||||
(((__POLYNOMIAL__)&0x1U) != 0U))
|
||||
|
||||
/** @brief Checks if DMA handle is valid.
|
||||
* @param __HANDLE__ specifies a DMA Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define IS_SPI_DMA_HANDLE(__HANDLE__) ((__HANDLE__) != NULL)
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/* Private functions ---------------------------------------------------------*/
|
||||
/** @defgroup SPI_Private_Functions SPI Private Functions
|
||||
* @{
|
||||
*/
|
||||
uint8_t SPI_ISCRCErrorValid(SPI_HandleTypeDef *hspi);
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/* Exported functions --------------------------------------------------------*/
|
||||
/** @addtogroup SPI_Exported_Functions
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup SPI_Exported_Functions_Group1
|
||||
* @{
|
||||
*/
|
||||
/* Initialization/de-initialization functions ********************************/
|
||||
HAL_StatusTypeDef HAL_SPI_Init(SPI_HandleTypeDef *hspi);
|
||||
HAL_StatusTypeDef HAL_SPI_DeInit(SPI_HandleTypeDef *hspi);
|
||||
void HAL_SPI_MspInit(SPI_HandleTypeDef *hspi);
|
||||
void HAL_SPI_MspDeInit(SPI_HandleTypeDef *hspi);
|
||||
|
||||
/* Callbacks Register/UnRegister functions ***********************************/
|
||||
#if (USE_HAL_SPI_REGISTER_CALLBACKS == 1U)
|
||||
HAL_StatusTypeDef HAL_SPI_RegisterCallback(SPI_HandleTypeDef *hspi, HAL_SPI_CallbackIDTypeDef CallbackID, pSPI_CallbackTypeDef pCallback);
|
||||
HAL_StatusTypeDef HAL_SPI_UnRegisterCallback(SPI_HandleTypeDef *hspi, HAL_SPI_CallbackIDTypeDef CallbackID);
|
||||
#endif /* USE_HAL_SPI_REGISTER_CALLBACKS */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @addtogroup SPI_Exported_Functions_Group2
|
||||
* @{
|
||||
*/
|
||||
/* I/O operation functions ***************************************************/
|
||||
HAL_StatusTypeDef HAL_SPI_Transmit(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size, uint32_t Timeout);
|
||||
HAL_StatusTypeDef HAL_SPI_Receive(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size, uint32_t Timeout);
|
||||
HAL_StatusTypeDef HAL_SPI_TransmitReceive(SPI_HandleTypeDef *hspi, uint8_t *pTxData, uint8_t *pRxData, uint16_t Size,
|
||||
uint32_t Timeout);
|
||||
HAL_StatusTypeDef HAL_SPI_Transmit_IT(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size);
|
||||
HAL_StatusTypeDef HAL_SPI_Receive_IT(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size);
|
||||
HAL_StatusTypeDef HAL_SPI_TransmitReceive_IT(SPI_HandleTypeDef *hspi, uint8_t *pTxData, uint8_t *pRxData,
|
||||
uint16_t Size);
|
||||
HAL_StatusTypeDef HAL_SPI_Transmit_DMA(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size);
|
||||
HAL_StatusTypeDef HAL_SPI_Receive_DMA(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size);
|
||||
HAL_StatusTypeDef HAL_SPI_TransmitReceive_DMA(SPI_HandleTypeDef *hspi, uint8_t *pTxData, uint8_t *pRxData,
|
||||
uint16_t Size);
|
||||
HAL_StatusTypeDef HAL_SPI_DMAPause(SPI_HandleTypeDef *hspi);
|
||||
HAL_StatusTypeDef HAL_SPI_DMAResume(SPI_HandleTypeDef *hspi);
|
||||
HAL_StatusTypeDef HAL_SPI_DMAStop(SPI_HandleTypeDef *hspi);
|
||||
/* Transfer Abort functions */
|
||||
HAL_StatusTypeDef HAL_SPI_Abort(SPI_HandleTypeDef *hspi);
|
||||
HAL_StatusTypeDef HAL_SPI_Abort_IT(SPI_HandleTypeDef *hspi);
|
||||
|
||||
void HAL_SPI_IRQHandler(SPI_HandleTypeDef *hspi);
|
||||
void HAL_SPI_TxCpltCallback(SPI_HandleTypeDef *hspi);
|
||||
void HAL_SPI_RxCpltCallback(SPI_HandleTypeDef *hspi);
|
||||
void HAL_SPI_TxRxCpltCallback(SPI_HandleTypeDef *hspi);
|
||||
void HAL_SPI_TxHalfCpltCallback(SPI_HandleTypeDef *hspi);
|
||||
void HAL_SPI_RxHalfCpltCallback(SPI_HandleTypeDef *hspi);
|
||||
void HAL_SPI_TxRxHalfCpltCallback(SPI_HandleTypeDef *hspi);
|
||||
void HAL_SPI_ErrorCallback(SPI_HandleTypeDef *hspi);
|
||||
void HAL_SPI_AbortCpltCallback(SPI_HandleTypeDef *hspi);
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @addtogroup SPI_Exported_Functions_Group3
|
||||
* @{
|
||||
*/
|
||||
/* Peripheral State and Error functions ***************************************/
|
||||
HAL_SPI_StateTypeDef HAL_SPI_GetState(SPI_HandleTypeDef *hspi);
|
||||
uint32_t HAL_SPI_GetError(SPI_HandleTypeDef *hspi);
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* STM32F1xx_HAL_SPI_H */
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,575 @@
|
||||
/*
|
||||
* rs522.c
|
||||
*
|
||||
* Created on: Sep 3, 2021
|
||||
* Author: wuwenfeng
|
||||
*/
|
||||
#include "rs522.h"
|
||||
|
||||
extern SPI_HandleTypeDef hspi1;
|
||||
|
||||
/*
|
||||
* 函数名:ReadRawRC
|
||||
* 描述 :读RC522寄存器
|
||||
* 输入 :ucAddress,寄存器地址
|
||||
* 返回 : 寄存器的当前值
|
||||
* 调用 :内部调用
|
||||
*/
|
||||
uint8_t ReadRawRC ( uint8_t ucAddress )
|
||||
{
|
||||
uint8_t ucAddr, ucReturn;
|
||||
ucAddr = ( ( ucAddress << 1 ) & 0x7E ) | 0x80;
|
||||
HAL_GPIO_WritePin(RC522_CS_GPIO_Port, RC522_CS_Pin, 0);
|
||||
HAL_SPI_Transmit(&hspi1,&ucAddr,1,100);
|
||||
HAL_SPI_Receive(&hspi1,&ucReturn,1,100);
|
||||
HAL_GPIO_WritePin(RC522_CS_GPIO_Port, RC522_CS_Pin, 1);
|
||||
return ucReturn;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 函数名:WriteRawRC
|
||||
* 描述 :写RC522寄存器
|
||||
* 输入 :ucAddress,寄存器地址
|
||||
* ucValue,写入寄存器的值
|
||||
* 返回 : 无
|
||||
* 调用 :内部调用
|
||||
*/
|
||||
void WriteRawRC ( uint8_t ucAddress, uint8_t ucValue )
|
||||
{
|
||||
uint8_t ucAddr;
|
||||
ucAddr = ( ucAddress << 1 ) & 0x7E;
|
||||
HAL_GPIO_WritePin(RC522_CS_GPIO_Port, RC522_CS_Pin, 0);
|
||||
HAL_SPI_Transmit(&hspi1,&ucAddr,1,100);
|
||||
HAL_SPI_Transmit(&hspi1,&ucValue,1,100);
|
||||
HAL_GPIO_WritePin(RC522_CS_GPIO_Port, RC522_CS_Pin, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
* 函数名:SetBitMask
|
||||
* 描述 :对RC522寄存器置位
|
||||
* 输入 :ucReg,寄存器地址
|
||||
* ucMask,置位值
|
||||
* 返回 : 无
|
||||
* 调用 :内部调用
|
||||
*/
|
||||
void SetBitMask ( uint8_t ucReg, uint8_t ucMask )
|
||||
{
|
||||
uint8_t ucTemp;
|
||||
ucTemp = ReadRawRC ( ucReg );
|
||||
WriteRawRC ( ucReg, ucTemp | ucMask ); // set bit mask
|
||||
}
|
||||
|
||||
/*
|
||||
* 函数名:ClearBitMask
|
||||
* 描述 :对RC522寄存器清位
|
||||
* 输入 :ucReg,寄存器地址
|
||||
* ucMask,清位值
|
||||
* 返回 : 无
|
||||
* 调用 :内部调用
|
||||
*/
|
||||
void ClearBitMask ( uint8_t ucReg, uint8_t ucMask )
|
||||
{
|
||||
uint8_t ucTemp;
|
||||
ucTemp = ReadRawRC ( ucReg );
|
||||
WriteRawRC ( ucReg, ucTemp & ( ~ ucMask) ); // clear bit mask
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 函数名:PcdAntennaOn
|
||||
* 描述 :开启天线
|
||||
* 输入 :无
|
||||
* 返回 : 无
|
||||
* 调用 :内部调用
|
||||
*/
|
||||
void PcdAntennaOn ( void )
|
||||
{
|
||||
uint8_t uc;
|
||||
uc = ReadRawRC ( TxControlReg );
|
||||
if ( ! ( uc & 0x03 ) )
|
||||
{
|
||||
SetBitMask(TxControlReg, 0x03);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 函数名:PcdAntennaOff
|
||||
* 描述 :开启天线
|
||||
* 输入 :无
|
||||
* 返回 : 无
|
||||
* 调用 :内部调用
|
||||
*/
|
||||
void PcdAntennaOff ( void )
|
||||
{
|
||||
ClearBitMask ( TxControlReg, 0x03 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* 函数名:PcdRese
|
||||
* 描述 :复位RC522
|
||||
* 输入 :无
|
||||
* 返回 : 无
|
||||
* 调用 :外部调用
|
||||
*/
|
||||
void PcdReset ( void )
|
||||
{
|
||||
HAL_Delay(1);
|
||||
WriteRawRC ( CommandReg, 0x0f );
|
||||
while ( ReadRawRC ( CommandReg ) & 0x10 );
|
||||
HAL_Delay(1);
|
||||
WriteRawRC ( ModeReg, 0x3D ); //定义发送和接收常用模式 和Mifare卡通讯,CRC初始值0x6363
|
||||
WriteRawRC ( TReloadRegL, 30 ); //16位定时器低位
|
||||
WriteRawRC ( TReloadRegH, 0 ); //16位定时器高位
|
||||
WriteRawRC ( TModeReg, 0x8D ); //定义内部定时器的设置
|
||||
WriteRawRC ( TPrescalerReg, 0x3E ); //设置定时器分频系数
|
||||
WriteRawRC ( TxAutoReg, 0x40 ); //调制发送信号为100%ASK
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* 函数名:M500PcdConfigISOType
|
||||
* 描述 :设置RC522的工作方式
|
||||
* 输入 :ucType,工作方式
|
||||
* 返回 : 无
|
||||
* 调用 :外部调用
|
||||
*/
|
||||
void M500PcdConfigISOType ( uint8_t ucType )
|
||||
{
|
||||
if ( ucType == 'A') //ISO14443_A
|
||||
{
|
||||
ClearBitMask ( Status2Reg, 0x08 );
|
||||
WriteRawRC ( ModeReg, 0x3D );//3F
|
||||
WriteRawRC ( RxSelReg, 0x86 );//84
|
||||
WriteRawRC( RFCfgReg, 0x7F ); //4F
|
||||
WriteRawRC( TReloadRegL, 30 );//tmoLength);// TReloadVal = 'h6a =tmoLength(dec)
|
||||
WriteRawRC ( TReloadRegH, 0 );
|
||||
WriteRawRC ( TModeReg, 0x8D );
|
||||
WriteRawRC ( TPrescalerReg, 0x3E );
|
||||
HAL_Delay(1);
|
||||
PcdAntennaOn ();//开天线
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* 函数名:PcdComMF522
|
||||
* 描述 :通过RC522和ISO14443卡通讯
|
||||
* 输入 :ucCommand,RC522命令字
|
||||
* pInData,通过RC522发送到卡片的数据
|
||||
* ucInLenByte,发送数据的字节长度
|
||||
* pOutData,接收到的卡片返回数据
|
||||
* pOutLenBit,返回数据的位长度
|
||||
* 返回 : 状态值
|
||||
* = MI_OK,成功
|
||||
* 调用 :内部调用
|
||||
*/
|
||||
char PcdComMF522 ( uint8_t ucCommand, uint8_t * pInData, uint8_t ucInLenByte, uint8_t * pOutData, uint32_t * pOutLenBit )
|
||||
{
|
||||
char cStatus = MI_ERR;
|
||||
uint8_t ucIrqEn = 0x00;
|
||||
uint8_t ucWaitFor = 0x00;
|
||||
uint8_t ucLastBits;
|
||||
uint8_t ucN;
|
||||
uint32_t ul;
|
||||
|
||||
switch ( ucCommand )
|
||||
{
|
||||
case PCD_AUTHENT: //Mifare认证
|
||||
ucIrqEn = 0x12; //允许错误中断请求ErrIEn 允许空闲中断IdleIEn
|
||||
ucWaitFor = 0x10; //认证寻卡等待时候 查询空闲中断标志位
|
||||
break;
|
||||
|
||||
case PCD_TRANSCEIVE: //接收发送 发送接收
|
||||
ucIrqEn = 0x77; //允许TxIEn RxIEn IdleIEn LoAlertIEn ErrIEn TimerIEn
|
||||
ucWaitFor = 0x30; //寻卡等待时候 查询接收中断标志位与 空闲中断标志位
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
WriteRawRC ( ComIEnReg, ucIrqEn | 0x80 ); //IRqInv置位管脚IRQ与Status1Reg的IRq位的值相反
|
||||
ClearBitMask ( ComIrqReg, 0x80 ); //Set1该位清零时,CommIRqReg的屏蔽位清零
|
||||
WriteRawRC ( CommandReg, PCD_IDLE ); //写空闲命令
|
||||
SetBitMask ( FIFOLevelReg, 0x80 ); //置位FlushBuffer清除内部FIFO的读和写指针以及ErrReg的BufferOvfl标志位被清除
|
||||
for ( ul = 0; ul < ucInLenByte; ul ++ )
|
||||
{
|
||||
WriteRawRC ( FIFODataReg, pInData [ ul ] ); //写数据进FIFOdata
|
||||
}
|
||||
WriteRawRC ( CommandReg, ucCommand ); //写命令
|
||||
if ( ucCommand == PCD_TRANSCEIVE )
|
||||
{
|
||||
SetBitMask(BitFramingReg,0x80); //StartSend置位启动数据发送 该位与收发命令使用时才有效
|
||||
}
|
||||
ul = 1000;//根据时钟频率调整,操作M1卡最大等待时间25ms
|
||||
do //认证 与寻卡等待时间
|
||||
{
|
||||
ucN = ReadRawRC ( ComIrqReg ); //查询事件中断
|
||||
ul --;
|
||||
} while ( ( ul != 0 ) && ( ! ( ucN & 0x01 ) ) && ( ! ( ucN & ucWaitFor ) ) ); //退出条件i=0,定时器中断,与写空闲命令
|
||||
ClearBitMask ( BitFramingReg, 0x80 ); //清理允许StartSend位
|
||||
if ( ul != 0 )
|
||||
{
|
||||
if ( ! (( ReadRawRC ( ErrorReg ) & 0x1B )) ) //读错误标志寄存器BufferOfI CollErr ParityErr ProtocolErr
|
||||
{
|
||||
cStatus = MI_OK;
|
||||
if ( ucN & ucIrqEn & 0x01 ) //是否发生定时器中断
|
||||
{
|
||||
cStatus = MI_NOTAGERR;
|
||||
}
|
||||
if ( ucCommand == PCD_TRANSCEIVE )
|
||||
{
|
||||
ucN = ReadRawRC ( FIFOLevelReg ); //读FIFO中保存的字节数
|
||||
ucLastBits = ReadRawRC ( ControlReg ) & 0x07; //最后接收到得字节的有效位数
|
||||
if ( ucLastBits )
|
||||
{
|
||||
* pOutLenBit = ( ucN - 1 ) * 8 + ucLastBits; //N个字节数减去1(最后一个字节)+最后一位的位数 读取到的数据总位数
|
||||
}
|
||||
else
|
||||
{
|
||||
* pOutLenBit = ucN * 8; //最后接收到的字节整个字节有效
|
||||
}
|
||||
if ( ucN == 0 )
|
||||
{
|
||||
ucN = 1;
|
||||
}
|
||||
if ( ucN > MAXRLEN )
|
||||
{
|
||||
ucN = MAXRLEN;
|
||||
}
|
||||
for ( ul = 0; ul < ucN; ul ++ )
|
||||
{
|
||||
pOutData [ ul ] = ReadRawRC ( FIFODataReg );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
cStatus = MI_ERR;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
SetBitMask ( ControlReg, 0x80 ); // stop timer now
|
||||
WriteRawRC ( CommandReg, PCD_IDLE );
|
||||
|
||||
return cStatus;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* 函数名:PcdRequest
|
||||
* 描述 :寻卡
|
||||
* 输入 :ucReq_code,寻卡方式
|
||||
* = 0x52,寻感应区内所有符合14443A标准的卡
|
||||
* = 0x26,寻未进入休眠状态的卡
|
||||
* pTagType,卡片类型代码
|
||||
* = 0x4400,Mifare_UltraLight
|
||||
* = 0x0400,Mifare_One(S50)
|
||||
* = 0x0200,Mifare_One(S70)
|
||||
* = 0x0800,Mifare_Pro(X))
|
||||
* = 0x4403,Mifare_DESFire
|
||||
* 返回 : 状态值
|
||||
* = MI_OK,成功
|
||||
* 调用 :外部调用
|
||||
*/
|
||||
char PcdRequest ( uint8_t ucReq_code, uint8_t * pTagType )
|
||||
{
|
||||
char cStatus;
|
||||
uint8_t ucComMF522Buf [ MAXRLEN ];
|
||||
uint32_t ulLen;
|
||||
ClearBitMask ( Status2Reg, 0x08 ); //清理指示MIFARECyptol单元接通以及所有卡的数据通信被加密的情况
|
||||
WriteRawRC ( BitFramingReg, 0x07 ); // 发送的最后一个字节的 七位
|
||||
SetBitMask ( TxControlReg, 0x03 ); //TX1,TX2管脚的输出信号传递经发送调制的13.56的能量载波信号
|
||||
ucComMF522Buf [ 0 ] = ucReq_code; //存入 卡片命令字
|
||||
cStatus = PcdComMF522 ( PCD_TRANSCEIVE, ucComMF522Buf, 1, ucComMF522Buf, & ulLen ); //寻卡
|
||||
if ( ( cStatus == MI_OK ) && ( ulLen == 0x10 ) ) //寻卡成功返回卡类型
|
||||
{
|
||||
* pTagType = ucComMF522Buf [ 0 ];
|
||||
* ( pTagType + 1 ) = ucComMF522Buf [ 1 ];
|
||||
}
|
||||
else
|
||||
{
|
||||
cStatus = MI_ERR;
|
||||
}
|
||||
return cStatus;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 函数名:PcdAnticoll
|
||||
* 描述 :防冲撞
|
||||
* 输入 :pSnr,卡片序列号,4字节
|
||||
* 返回 : 状态值
|
||||
* = MI_OK,成功
|
||||
* 调用 :外部调用
|
||||
*/
|
||||
char PcdAnticoll ( uint8_t * pSnr )
|
||||
{
|
||||
char cStatus;
|
||||
uint8_t uc, ucSnr_check = 0;
|
||||
uint8_t ucComMF522Buf [ MAXRLEN ];
|
||||
uint32_t ulLen;
|
||||
ClearBitMask ( Status2Reg, 0x08 ); //清MFCryptol On位 只有成功执行MFAuthent命令后,该位才能置位
|
||||
WriteRawRC ( BitFramingReg, 0x00); //清理寄存器 停止收发
|
||||
ClearBitMask ( CollReg, 0x80 ); //清ValuesAfterColl所有接收的位在冲突后被清除
|
||||
ucComMF522Buf [ 0 ] = 0x93; //卡片防冲突命令
|
||||
ucComMF522Buf [ 1 ] = 0x20;
|
||||
cStatus = PcdComMF522 ( PCD_TRANSCEIVE, ucComMF522Buf, 2, ucComMF522Buf, & ulLen);//与卡片通信
|
||||
if ( cStatus == MI_OK) //通信成功
|
||||
{
|
||||
for ( uc = 0; uc < 4; uc ++ )
|
||||
{
|
||||
* ( pSnr + uc ) = ucComMF522Buf [ uc ]; //读出UID
|
||||
ucSnr_check ^= ucComMF522Buf [ uc ];
|
||||
}
|
||||
|
||||
if ( ucSnr_check != ucComMF522Buf [ uc ] )
|
||||
{
|
||||
cStatus = MI_ERR;
|
||||
}
|
||||
}
|
||||
SetBitMask ( CollReg, 0x80 );
|
||||
return cStatus;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 函数名:CalulateCRC
|
||||
* 描述 :用RC522计算CRC16
|
||||
* 输入 :pIndata,计算CRC16的数组
|
||||
* ucLen,计算CRC16的数组字节长度
|
||||
* pOutData,存放计算结果存放的首地址
|
||||
* 返回 : 无
|
||||
* 调用 :内部调用
|
||||
*/
|
||||
void CalulateCRC ( uint8_t * pIndata, uint8_t ucLen, uint8_t * pOutData )
|
||||
{
|
||||
uint8_t uc, ucN;
|
||||
ClearBitMask(DivIrqReg,0x04);
|
||||
WriteRawRC(CommandReg,PCD_IDLE);
|
||||
SetBitMask(FIFOLevelReg,0x80);
|
||||
for ( uc = 0; uc < ucLen; uc ++)
|
||||
{
|
||||
WriteRawRC ( FIFODataReg, * ( pIndata + uc ) );
|
||||
}
|
||||
WriteRawRC ( CommandReg, PCD_CALCCRC );
|
||||
uc = 0xFF;
|
||||
do
|
||||
{
|
||||
ucN = ReadRawRC ( DivIrqReg );
|
||||
uc --;
|
||||
} while ( ( uc != 0 ) && ! ( ucN & 0x04 ) );
|
||||
pOutData [ 0 ] = ReadRawRC ( CRCResultRegL );
|
||||
pOutData [ 1 ] = ReadRawRC ( CRCResultRegM );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 函数名:PcdSelect
|
||||
* 描述 :选定卡片
|
||||
* 输入 :pSnr,卡片序列号,4字节
|
||||
* 返回 : 状态值
|
||||
* = MI_OK,成功
|
||||
* 调用 :外部调用
|
||||
*/
|
||||
char PcdSelect ( uint8_t * pSnr )
|
||||
{
|
||||
char ucN;
|
||||
uint8_t uc;
|
||||
uint8_t ucComMF522Buf [ MAXRLEN ];
|
||||
uint32_t ulLen;
|
||||
ucComMF522Buf [ 0 ] = PICC_ANTICOLL1;
|
||||
ucComMF522Buf [ 1 ] = 0x70;
|
||||
ucComMF522Buf [ 6 ] = 0;
|
||||
for ( uc = 0; uc < 4; uc ++ )
|
||||
{
|
||||
ucComMF522Buf [ uc + 2 ] = * ( pSnr + uc );
|
||||
ucComMF522Buf [ 6 ] ^= * ( pSnr + uc );
|
||||
}
|
||||
CalulateCRC ( ucComMF522Buf, 7, & ucComMF522Buf [ 7 ] );
|
||||
ClearBitMask ( Status2Reg, 0x08 );
|
||||
ucN = PcdComMF522 ( PCD_TRANSCEIVE, ucComMF522Buf, 9, ucComMF522Buf, & ulLen );
|
||||
if ( ( ucN == MI_OK ) && ( ulLen == 0x18 ) )
|
||||
{
|
||||
ucN = MI_OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
ucN = MI_ERR;
|
||||
}
|
||||
return ucN;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 函数名:PcdAuthState
|
||||
* 描述 :验证卡片密码
|
||||
* 输入 :ucAuth_mode,密码验证模式
|
||||
* = 0x60,验证A密钥
|
||||
* = 0x61,验证B密钥
|
||||
* u8 ucAddr,块地址
|
||||
* pKey,密码
|
||||
* pSnr,卡片序列号,4字节
|
||||
* 返回 : 状态值
|
||||
* = MI_OK,成功
|
||||
* 调用 :外部调用
|
||||
*/
|
||||
char PcdAuthState ( uint8_t ucAuth_mode, uint8_t ucAddr, uint8_t * pKey, uint8_t * pSnr )
|
||||
{
|
||||
char cStatus;
|
||||
uint8_t uc, ucComMF522Buf [ MAXRLEN ];
|
||||
uint32_t ulLen;
|
||||
ucComMF522Buf [ 0 ] = ucAuth_mode;
|
||||
ucComMF522Buf [ 1 ] = ucAddr;
|
||||
for ( uc = 0; uc < 6; uc ++ )
|
||||
{
|
||||
ucComMF522Buf [ uc + 2 ] = * ( pKey + uc );
|
||||
}
|
||||
for ( uc = 0; uc < 6; uc ++ )
|
||||
{
|
||||
ucComMF522Buf [ uc + 8 ] = * ( pSnr + uc );
|
||||
}
|
||||
cStatus = PcdComMF522 ( PCD_AUTHENT, ucComMF522Buf, 12, ucComMF522Buf, & ulLen );
|
||||
if ( ( cStatus != MI_OK ) || ( ! ( ReadRawRC ( Status2Reg ) & 0x08 ) ) )
|
||||
{
|
||||
// if(cStatus != MI_OK)
|
||||
// printf("666") ;
|
||||
// else
|
||||
// printf("888");
|
||||
cStatus = MI_ERR;
|
||||
}
|
||||
|
||||
return cStatus;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 函数名:PcdWrite
|
||||
* 描述 :写数据到M1卡一块
|
||||
* 输入 :u8 ucAddr,块地址
|
||||
* pData,写入的数据,16字节
|
||||
* 返回 : 状态值
|
||||
* = MI_OK,成功
|
||||
* 调用 :外部调用
|
||||
*/
|
||||
char PcdWrite ( uint8_t ucAddr, uint8_t * pData )
|
||||
{
|
||||
char cStatus;
|
||||
uint8_t uc, ucComMF522Buf [ MAXRLEN ];
|
||||
uint32_t ulLen;
|
||||
ucComMF522Buf [ 0 ] = PICC_WRITE;
|
||||
ucComMF522Buf [ 1 ] = ucAddr;
|
||||
CalulateCRC ( ucComMF522Buf, 2, & ucComMF522Buf [ 2 ] );
|
||||
cStatus = PcdComMF522 ( PCD_TRANSCEIVE, ucComMF522Buf, 4, ucComMF522Buf, & ulLen );
|
||||
if ( ( cStatus != MI_OK ) || ( ulLen != 4 ) || ( ( ucComMF522Buf [ 0 ] & 0x0F ) != 0x0A ) )
|
||||
{
|
||||
cStatus = MI_ERR;
|
||||
}
|
||||
if ( cStatus == MI_OK )
|
||||
{
|
||||
//memcpy(ucComMF522Buf, pData, 16);
|
||||
for ( uc = 0; uc < 16; uc ++ )
|
||||
{
|
||||
ucComMF522Buf [ uc ] = * ( pData + uc );
|
||||
}
|
||||
CalulateCRC ( ucComMF522Buf, 16, & ucComMF522Buf [ 16 ] );
|
||||
cStatus = PcdComMF522 ( PCD_TRANSCEIVE, ucComMF522Buf, 18, ucComMF522Buf, & ulLen );
|
||||
if ( ( cStatus != MI_OK ) || ( ulLen != 4 ) || ( ( ucComMF522Buf [ 0 ] & 0x0F ) != 0x0A ) )
|
||||
{
|
||||
cStatus = MI_ERR;
|
||||
}
|
||||
}
|
||||
return cStatus;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 函数名:PcdRead
|
||||
* 描述 :读取M1卡一块数据
|
||||
* 输入 :u8 ucAddr,块地址
|
||||
* pData,读出的数据,16字节
|
||||
* 返回 : 状态值
|
||||
* = MI_OK,成功
|
||||
* 调用 :外部调用
|
||||
*/
|
||||
char PcdRead ( uint8_t ucAddr, uint8_t * pData )
|
||||
{
|
||||
char cStatus;
|
||||
uint8_t uc, ucComMF522Buf [ MAXRLEN ];
|
||||
uint32_t ulLen;
|
||||
ucComMF522Buf [ 0 ] = PICC_READ;
|
||||
ucComMF522Buf [ 1 ] = ucAddr;
|
||||
CalulateCRC ( ucComMF522Buf, 2, & ucComMF522Buf [ 2 ] );
|
||||
cStatus = PcdComMF522 ( PCD_TRANSCEIVE, ucComMF522Buf, 4, ucComMF522Buf, & ulLen );
|
||||
if ( ( cStatus == MI_OK ) && ( ulLen == 0x90 ) )
|
||||
{
|
||||
for ( uc = 0; uc < 16; uc ++ )
|
||||
{
|
||||
* ( pData + uc ) = ucComMF522Buf [ uc ];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
cStatus = MI_ERR;
|
||||
}
|
||||
return cStatus;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 函数名:PcdHalt
|
||||
* 描述 :命令卡片进入休眠状态
|
||||
* 输入 :无
|
||||
* 返回 : 状态值
|
||||
* = MI_OK,成功
|
||||
* 调用 :外部调用
|
||||
*/
|
||||
char PcdHalt( void )
|
||||
{
|
||||
uint8_t ucComMF522Buf [ MAXRLEN ];
|
||||
uint32_t ulLen;
|
||||
ucComMF522Buf [ 0 ] = PICC_HALT;
|
||||
ucComMF522Buf [ 1 ] = 0;
|
||||
CalulateCRC ( ucComMF522Buf, 2, & ucComMF522Buf [ 2 ] );
|
||||
PcdComMF522 ( PCD_TRANSCEIVE, ucComMF522Buf, 4, ucComMF522Buf, & ulLen );
|
||||
return MI_OK;
|
||||
|
||||
}
|
||||
|
||||
|
||||
void IC_CMT ( uint8_t * UID, uint8_t * KEY, uint8_t RW, uint8_t * Dat )
|
||||
{
|
||||
uint8_t ucArray_ID [ 4 ] = { 0 };//先后存放IC卡的类型和UID(IC卡序列号)
|
||||
PcdRequest ( 0x52, ucArray_ID );//寻卡
|
||||
PcdAnticoll ( ucArray_ID );//防冲撞
|
||||
PcdSelect ( UID );//选定卡
|
||||
PcdAuthState ( 0x60, 0x10, KEY, UID );//校验
|
||||
if ( RW )//读写选择,1是读,0是写
|
||||
{
|
||||
PcdRead ( 0x10, Dat );
|
||||
}
|
||||
else
|
||||
{
|
||||
PcdWrite ( 0x10, Dat );
|
||||
}
|
||||
PcdHalt ();
|
||||
|
||||
}
|
||||
|
||||
void RC522_Init ( void )
|
||||
{
|
||||
PcdReset ();
|
||||
M500PcdConfigISOType ( 'A' );//设置工作方式
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
/*
|
||||
* rs522.h
|
||||
*
|
||||
* Created on: Sep 3, 2021
|
||||
* Author: wuwenfeng
|
||||
*/
|
||||
|
||||
#ifndef RS522_H_
|
||||
#define RS522_H_
|
||||
#include "main.h"
|
||||
|
||||
//MF522命令字
|
||||
#define PCD_IDLE 0x00 //取消当前命令
|
||||
#define PCD_AUTHENT 0x0E //验证密钥
|
||||
#define PCD_RECEIVE 0x08 //接收数据
|
||||
#define PCD_TRANSMIT 0x04 //发送数据
|
||||
#define PCD_TRANSCEIVE 0x0C //发送并接收数据
|
||||
#define PCD_RESETPHASE 0x0F //复位
|
||||
#define PCD_CALCCRC 0x03 //CRC计算
|
||||
|
||||
|
||||
//Mifare_One卡片命令字
|
||||
#define PICC_REQIDL 0x26 //寻天线区内未进入休眠状态
|
||||
#define PICC_REQALL 0x52 //寻天线区内全部卡
|
||||
#define PICC_ANTICOLL1 0x93 //防冲撞
|
||||
#define PICC_ANTICOLL2 0x95 //防冲撞
|
||||
#define PICC_AUTHENT1A 0x60 //验证A密钥
|
||||
#define PICC_AUTHENT1B 0x61 //验证B密钥
|
||||
#define PICC_READ 0x30 //读块
|
||||
#define PICC_WRITE 0xA0 //写块
|
||||
#define PICC_DECREMENT 0xC0 //扣款
|
||||
#define PICC_INCREMENT 0xC1 //充值
|
||||
#define PICC_RESTORE 0xC2 //调块数据到缓冲区
|
||||
#define PICC_TRANSFER 0xB0 //保存缓冲区中数据
|
||||
#define PICC_HALT 0x50 //休眠
|
||||
|
||||
|
||||
//MF522 FIFO长度定义
|
||||
#define DEF_FIFO_LENGTH 64 //FIFO size=64byte
|
||||
#define MAXRLEN 18
|
||||
|
||||
|
||||
//MF522寄存器定义
|
||||
// PAGE 0
|
||||
#define RFU00 0x00
|
||||
#define CommandReg 0x01
|
||||
#define ComIEnReg 0x02
|
||||
#define DivlEnReg 0x03
|
||||
#define ComIrqReg 0x04
|
||||
#define DivIrqReg 0x05
|
||||
#define ErrorReg 0x06
|
||||
#define Status1Reg 0x07
|
||||
#define Status2Reg 0x08
|
||||
#define FIFODataReg 0x09
|
||||
#define FIFOLevelReg 0x0A
|
||||
#define WaterLevelReg 0x0B
|
||||
#define ControlReg 0x0C
|
||||
#define BitFramingReg 0x0D
|
||||
#define CollReg 0x0E
|
||||
#define RFU0F 0x0F
|
||||
// PAGE 1
|
||||
#define RFU10 0x10
|
||||
#define ModeReg 0x11
|
||||
#define TxModeReg 0x12
|
||||
#define RxModeReg 0x13
|
||||
#define TxControlReg 0x14
|
||||
#define TxAutoReg 0x15
|
||||
#define TxSelReg 0x16
|
||||
#define RxSelReg 0x17
|
||||
#define RxThresholdReg 0x18
|
||||
#define DemodReg 0x19
|
||||
#define RFU1A 0x1A
|
||||
#define RFU1B 0x1B
|
||||
#define MifareReg 0x1C
|
||||
#define RFU1D 0x1D
|
||||
#define RFU1E 0x1E
|
||||
#define SerialSpeedReg 0x1F
|
||||
// PAGE 2
|
||||
#define RFU20 0x20
|
||||
#define CRCResultRegM 0x21
|
||||
#define CRCResultRegL 0x22
|
||||
#define RFU23 0x23
|
||||
#define ModWidthReg 0x24
|
||||
#define RFU25 0x25
|
||||
#define RFCfgReg 0x26
|
||||
#define GsNReg 0x27
|
||||
#define CWGsCfgReg 0x28
|
||||
#define ModGsCfgReg 0x29
|
||||
#define TModeReg 0x2A
|
||||
#define TPrescalerReg 0x2B
|
||||
#define TReloadRegH 0x2C
|
||||
#define TReloadRegL 0x2D
|
||||
#define TCounterValueRegH 0x2E
|
||||
#define TCounterValueRegL 0x2F
|
||||
// PAGE 3
|
||||
#define RFU30 0x30
|
||||
#define TestSel1Reg 0x31
|
||||
#define TestSel2Reg 0x32
|
||||
#define TestPinEnReg 0x33
|
||||
#define TestPinValueReg 0x34
|
||||
#define TestBusReg 0x35
|
||||
#define AutoTestReg 0x36
|
||||
#define VersionReg 0x37
|
||||
#define AnalogTestReg 0x38
|
||||
#define TestDAC1Reg 0x39
|
||||
#define TestDAC2Reg 0x3A
|
||||
#define TestADCReg 0x3B
|
||||
#define RFU3C 0x3C
|
||||
#define RFU3D 0x3D
|
||||
#define RFU3E 0x3E
|
||||
#define RFU3F 0x3F
|
||||
|
||||
|
||||
//和MF522通讯时返回的错误代码
|
||||
|
||||
#define MI_OK 0
|
||||
#define MI_NOTAGERR (1)
|
||||
#define MI_ERR (2)
|
||||
|
||||
#define SHAQU1 0X01
|
||||
#define KUAI4 0X04
|
||||
#define KUAI7 0X07
|
||||
#define REGCARD 0xa1
|
||||
#define CONSUME 0xa2
|
||||
#define READCARD 0xa3
|
||||
#define ADDMONEY 0xa4
|
||||
|
||||
|
||||
void RC522_Init( void ); //初始化
|
||||
|
||||
#endif /* RS522_H_ */
|
||||
+3
-2
@@ -174,11 +174,12 @@ void TP_DrwaTrage(int x,int y,int r)
|
||||
LCD_DrawLine(x,y,x,y-10,RED);
|
||||
}
|
||||
//触摸屏校准
|
||||
void TP_adjustment()
|
||||
//mode 校准模式,0 被动校准 ,1 主动校准
|
||||
void TP_adjustment(char mode)
|
||||
{
|
||||
//判断是否需要校准,从eeprom获取数据
|
||||
EEPROM_READ_BATY(16,(char *)&tconfig,sizeof(touch_config));
|
||||
if(tconfig.begin==0xab&&tconfig.end==0xcd) //判断校准标记
|
||||
if(tconfig.begin==0xab&&tconfig.end==0xcd&&mode==0) //判断校准标记
|
||||
{
|
||||
return; //已经校准过了
|
||||
}
|
||||
|
||||
+1
-1
@@ -39,6 +39,6 @@ typedef struct
|
||||
|
||||
|
||||
void TP_Server();
|
||||
void TP_adjustment();
|
||||
void TP_adjustment(char mode);
|
||||
char TP_XY(int *x,int *y);
|
||||
#endif /* TOUCH_H_ */
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* APP_IDcard.c
|
||||
*
|
||||
* Created on: Sep 6, 2021
|
||||
* Author: wuwenfeng
|
||||
*/
|
||||
#include "APP_IDcard.h"
|
||||
|
||||
window *idcard_window;
|
||||
|
||||
void APP_IDcard_init(window *a_window)
|
||||
{
|
||||
idcard_window=a_window;
|
||||
RC522_Init();
|
||||
}
|
||||
|
||||
void APP_IDcard_loop()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* APP_IDcard.h
|
||||
*
|
||||
* Created on: Sep 6, 2021
|
||||
* Author: wuwenfeng
|
||||
*/
|
||||
|
||||
#ifndef APP_IDCARD_H_
|
||||
#define APP_IDCARD_H_
|
||||
#include "main.h"
|
||||
#include "windows.h"
|
||||
#include "rs522.h"
|
||||
|
||||
void APP_IDcard_init(window *a_window);
|
||||
void APP_IDcard_loop();
|
||||
|
||||
#endif /* APP_IDCARD_H_ */
|
||||
+13
-4
@@ -12,6 +12,7 @@
|
||||
|
||||
|
||||
#include "APP_blood.h"
|
||||
#include "APP_IDcard.h"
|
||||
|
||||
extern touch_device t0;
|
||||
|
||||
@@ -23,14 +24,21 @@ void main_app()
|
||||
LCDx_Init();
|
||||
EPPROM_SLOWWRITE_INIT();
|
||||
|
||||
TP_adjustment();
|
||||
if(HAL_GPIO_ReadPin(KEY3_GPIO_Port, KEY3_Pin)==0)
|
||||
{
|
||||
TP_adjustment(1);
|
||||
}else
|
||||
{
|
||||
TP_adjustment(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
UI *ui=UI_Init(BLACK);
|
||||
|
||||
APP_blood_init(New_Window(ui,10,10,128,128,WHITE,"MAX30102"));
|
||||
//APP_blood_init(New_Window(ui,10,10,128,128,WHITE,"MAX30102"));
|
||||
|
||||
//New_Window(ui,25,30,150,100,GREEN,"GREEN");
|
||||
APP_IDcard_init(New_Window(ui,25,30,150,100,GREEN,"IDcard"));
|
||||
//New_Window(ui,80,80,60,90,YELLOW,"YELLOW");
|
||||
//New_Window(ui,120,90,70,60,MAGENTA,"MAGENTA");
|
||||
|
||||
@@ -51,7 +59,8 @@ void main_app()
|
||||
*/
|
||||
|
||||
// 交叉编译测试
|
||||
APP_blood_loop();
|
||||
//APP_blood_loop();
|
||||
APP_IDcard_loop();
|
||||
|
||||
UI_Server(ui);
|
||||
TP_Server();
|
||||
|
||||
@@ -4,54 +4,64 @@ FSMC.BusTurnAroundDuration1=0
|
||||
FSMC.DataSetupTime1=1
|
||||
FSMC.IPParameters=AddressSetupTime1,DataSetupTime1,BusTurnAroundDuration1
|
||||
File.Version=6
|
||||
GPIO.groupedBy=Group By Peripherals
|
||||
KeepUserPlacement=false
|
||||
Mcu.Family=STM32F1
|
||||
Mcu.IP0=FSMC
|
||||
Mcu.IP1=I2C2
|
||||
Mcu.IP2=NVIC
|
||||
Mcu.IP3=RCC
|
||||
Mcu.IP4=SYS
|
||||
Mcu.IP5=TIM6
|
||||
Mcu.IPNb=6
|
||||
Mcu.IP4=SPI1
|
||||
Mcu.IP5=SYS
|
||||
Mcu.IP6=TIM6
|
||||
Mcu.IPNb=7
|
||||
Mcu.Name=STM32F103Z(C-D-E)Tx
|
||||
Mcu.Package=LQFP144
|
||||
Mcu.Pin0=PF8
|
||||
Mcu.Pin1=PF9
|
||||
Mcu.Pin10=PE8
|
||||
Mcu.Pin11=PE9
|
||||
Mcu.Pin12=PE10
|
||||
Mcu.Pin13=PE11
|
||||
Mcu.Pin14=PE12
|
||||
Mcu.Pin15=PE13
|
||||
Mcu.Pin16=PE14
|
||||
Mcu.Pin17=PE15
|
||||
Mcu.Pin18=PB10
|
||||
Mcu.Pin19=PB11
|
||||
Mcu.Pin2=PF10
|
||||
Mcu.Pin20=PB12
|
||||
Mcu.Pin21=PB13
|
||||
Mcu.Pin22=PB14
|
||||
Mcu.Pin23=PD8
|
||||
Mcu.Pin24=PD9
|
||||
Mcu.Pin25=PD10
|
||||
Mcu.Pin26=PD14
|
||||
Mcu.Pin27=PD15
|
||||
Mcu.Pin28=PD0
|
||||
Mcu.Pin29=PD1
|
||||
Mcu.Pin3=OSC_IN
|
||||
Mcu.Pin30=PD4
|
||||
Mcu.Pin31=PD5
|
||||
Mcu.Pin32=PG12
|
||||
Mcu.Pin33=VP_SYS_VS_ND
|
||||
Mcu.Pin34=VP_SYS_VS_Systick
|
||||
Mcu.Pin35=VP_TIM6_VS_ClockSourceINT
|
||||
Mcu.Pin4=OSC_OUT
|
||||
Mcu.Pin5=PB0
|
||||
Mcu.Pin6=PB1
|
||||
Mcu.Pin7=PB2
|
||||
Mcu.Pin8=PG0
|
||||
Mcu.Pin9=PE7
|
||||
Mcu.PinsNb=36
|
||||
Mcu.Pin0=PE2
|
||||
Mcu.Pin1=PE3
|
||||
Mcu.Pin10=PA5
|
||||
Mcu.Pin11=PA6
|
||||
Mcu.Pin12=PA7
|
||||
Mcu.Pin13=PB0
|
||||
Mcu.Pin14=PB1
|
||||
Mcu.Pin15=PB2
|
||||
Mcu.Pin16=PG0
|
||||
Mcu.Pin17=PE7
|
||||
Mcu.Pin18=PE8
|
||||
Mcu.Pin19=PE9
|
||||
Mcu.Pin2=PE4
|
||||
Mcu.Pin20=PE10
|
||||
Mcu.Pin21=PE11
|
||||
Mcu.Pin22=PE12
|
||||
Mcu.Pin23=PE13
|
||||
Mcu.Pin24=PE14
|
||||
Mcu.Pin25=PE15
|
||||
Mcu.Pin26=PB10
|
||||
Mcu.Pin27=PB11
|
||||
Mcu.Pin28=PB12
|
||||
Mcu.Pin29=PB13
|
||||
Mcu.Pin3=PF8
|
||||
Mcu.Pin30=PB14
|
||||
Mcu.Pin31=PD8
|
||||
Mcu.Pin32=PD9
|
||||
Mcu.Pin33=PD10
|
||||
Mcu.Pin34=PD14
|
||||
Mcu.Pin35=PD15
|
||||
Mcu.Pin36=PD0
|
||||
Mcu.Pin37=PD1
|
||||
Mcu.Pin38=PD4
|
||||
Mcu.Pin39=PD5
|
||||
Mcu.Pin4=PF9
|
||||
Mcu.Pin40=PG12
|
||||
Mcu.Pin41=VP_SYS_VS_ND
|
||||
Mcu.Pin42=VP_SYS_VS_Systick
|
||||
Mcu.Pin43=VP_TIM6_VS_ClockSourceINT
|
||||
Mcu.Pin5=PF10
|
||||
Mcu.Pin6=OSC_IN
|
||||
Mcu.Pin7=OSC_OUT
|
||||
Mcu.Pin8=PA0-WKUP
|
||||
Mcu.Pin9=PA4
|
||||
Mcu.PinsNb=44
|
||||
Mcu.ThirdPartyNb=0
|
||||
Mcu.UserConstants=
|
||||
Mcu.UserName=STM32F103ZETx
|
||||
@@ -73,6 +83,20 @@ OSC_IN.Mode=HSE-External-Oscillator
|
||||
OSC_IN.Signal=RCC_OSC_IN
|
||||
OSC_OUT.Mode=HSE-External-Oscillator
|
||||
OSC_OUT.Signal=RCC_OSC_OUT
|
||||
PA0-WKUP.GPIOParameters=GPIO_Label
|
||||
PA0-WKUP.GPIO_Label=KEY0
|
||||
PA0-WKUP.Locked=true
|
||||
PA0-WKUP.Signal=GPIO_Input
|
||||
PA4.GPIOParameters=GPIO_Label
|
||||
PA4.GPIO_Label=RC522_CS
|
||||
PA4.Locked=true
|
||||
PA4.Signal=GPIO_Output
|
||||
PA5.Mode=Full_Duplex_Master
|
||||
PA5.Signal=SPI1_SCK
|
||||
PA6.Mode=Full_Duplex_Master
|
||||
PA6.Signal=SPI1_MISO
|
||||
PA7.Mode=Full_Duplex_Master
|
||||
PA7.Signal=SPI1_MOSI
|
||||
PB0.GPIOParameters=GPIO_Label
|
||||
PB0.GPIO_Label=LCD_BL
|
||||
PB0.Locked=true
|
||||
@@ -127,6 +151,21 @@ PE12.Signal=FSMC_D9_DA9
|
||||
PE13.Signal=FSMC_D10_DA10
|
||||
PE14.Signal=FSMC_D11_DA11
|
||||
PE15.Signal=FSMC_D12_DA12
|
||||
PE2.GPIOParameters=GPIO_PuPd,GPIO_Label
|
||||
PE2.GPIO_Label=KEY3
|
||||
PE2.GPIO_PuPd=GPIO_PULLUP
|
||||
PE2.Locked=true
|
||||
PE2.Signal=GPIO_Input
|
||||
PE3.GPIOParameters=GPIO_PuPd,GPIO_Label
|
||||
PE3.GPIO_Label=KEY2
|
||||
PE3.GPIO_PuPd=GPIO_PULLUP
|
||||
PE3.Locked=true
|
||||
PE3.Signal=GPIO_Input
|
||||
PE4.GPIOParameters=GPIO_PuPd,GPIO_Label
|
||||
PE4.GPIO_Label=KEY1
|
||||
PE4.GPIO_PuPd=GPIO_PULLUP
|
||||
PE4.Locked=true
|
||||
PE4.Signal=GPIO_Input
|
||||
PE7.Signal=FSMC_D4_DA4
|
||||
PE8.Signal=FSMC_D5_DA5
|
||||
PE9.Signal=FSMC_D6_DA6
|
||||
@@ -176,7 +215,7 @@ ProjectManager.StackSize=0x800
|
||||
ProjectManager.TargetToolchain=STM32CubeIDE
|
||||
ProjectManager.ToolChainLocation=
|
||||
ProjectManager.UnderRoot=true
|
||||
ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_FSMC_Init-FSMC-false-HAL-true,4-MX_I2C2_Init-I2C2-false-HAL-true
|
||||
ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_FSMC_Init-FSMC-false-HAL-true,4-MX_I2C2_Init-I2C2-false-HAL-true,5-MX_TIM6_Init-TIM6-false-HAL-true,6-MX_SPI1_Init-SPI1-false-HAL-true
|
||||
RCC.ADCFreqValue=36000000
|
||||
RCC.AHBFreq_Value=72000000
|
||||
RCC.APB1CLKDivider=RCC_HCLK_DIV2
|
||||
@@ -241,6 +280,12 @@ SH.FSMC_NOE.0=FSMC_NOE,Lcd1
|
||||
SH.FSMC_NOE.ConfNb=1
|
||||
SH.FSMC_NWE.0=FSMC_NWE,Lcd1
|
||||
SH.FSMC_NWE.ConfNb=1
|
||||
SPI1.BaudRatePrescaler=SPI_BAUDRATEPRESCALER_4
|
||||
SPI1.CalculateBaudRate=18.0 MBits/s
|
||||
SPI1.Direction=SPI_DIRECTION_2LINES
|
||||
SPI1.IPParameters=VirtualType,Mode,Direction,BaudRatePrescaler,CalculateBaudRate
|
||||
SPI1.Mode=SPI_MODE_MASTER
|
||||
SPI1.VirtualType=VM_MASTER
|
||||
TIM6.IPParameters=Prescaler,Period
|
||||
TIM6.Period=10000-1
|
||||
TIM6.Prescaler=72-1
|
||||
|
||||
Reference in New Issue
Block a user