关键芯片都驱动,且测试成功
This commit is contained in:
52
Inc/dma.h
Normal file
52
Inc/dma.h
Normal file
@@ -0,0 +1,52 @@
|
||||
/* USER CODE BEGIN Header */
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file dma.h
|
||||
* @brief This file contains all the function prototypes for
|
||||
* the dma.c file
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 2026 STMicroelectronics.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software is licensed under terms that can be found in the LICENSE file
|
||||
* in the root directory of this software component.
|
||||
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
/* USER CODE END Header */
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __DMA_H__
|
||||
#define __DMA_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "main.h"
|
||||
|
||||
/* DMA memory to memory transfer handles -------------------------------------*/
|
||||
|
||||
/* USER CODE BEGIN Includes */
|
||||
|
||||
/* USER CODE END Includes */
|
||||
|
||||
/* USER CODE BEGIN Private defines */
|
||||
|
||||
/* USER CODE END Private defines */
|
||||
|
||||
void MX_DMA_Init(void);
|
||||
|
||||
/* USER CODE BEGIN Prototypes */
|
||||
|
||||
/* USER CODE END Prototypes */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __DMA_H__ */
|
||||
|
||||
52
Inc/i2c.h
Normal file
52
Inc/i2c.h
Normal file
@@ -0,0 +1,52 @@
|
||||
/* USER CODE BEGIN Header */
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file i2c.h
|
||||
* @brief This file contains all the function prototypes for
|
||||
* the i2c.c file
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 2026 STMicroelectronics.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software is licensed under terms that can be found in the LICENSE file
|
||||
* in the root directory of this software component.
|
||||
* If no LICENSE file comes with this software, it is provided AS-IS.
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
/* USER CODE END Header */
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __I2C_H__
|
||||
#define __I2C_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "main.h"
|
||||
|
||||
/* USER CODE BEGIN Includes */
|
||||
|
||||
/* USER CODE END Includes */
|
||||
|
||||
extern I2C_HandleTypeDef hi2c1;
|
||||
|
||||
/* USER CODE BEGIN Private defines */
|
||||
|
||||
/* USER CODE END Private defines */
|
||||
|
||||
void MX_I2C1_Init(void);
|
||||
|
||||
/* USER CODE BEGIN Prototypes */
|
||||
|
||||
/* USER CODE END Prototypes */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __I2C_H__ */
|
||||
|
||||
73
Inc/main.h
73
Inc/main.h
@@ -69,6 +69,20 @@ void Error_Handler(void);
|
||||
#define LED5_GPIO_Port GPIOF
|
||||
#define LED6_Pin GPIO_PIN_12
|
||||
#define LED6_GPIO_Port GPIOF
|
||||
#define TP_OS0_Pin GPIO_PIN_13
|
||||
#define TP_OS0_GPIO_Port GPIOF
|
||||
#define TP_OS1_Pin GPIO_PIN_14
|
||||
#define TP_OS1_GPIO_Port GPIOF
|
||||
#define TP_OS2_Pin GPIO_PIN_15
|
||||
#define TP_OS2_GPIO_Port GPIOF
|
||||
#define DB0_Pin GPIO_PIN_0
|
||||
#define DB0_GPIO_Port GPIOG
|
||||
#define DB1_Pin GPIO_PIN_1
|
||||
#define DB1_GPIO_Port GPIOG
|
||||
#define ST_TX2_Pin GPIO_PIN_10
|
||||
#define ST_TX2_GPIO_Port GPIOB
|
||||
#define ST_RX2_Pin GPIO_PIN_11
|
||||
#define ST_RX2_GPIO_Port GPIOB
|
||||
#define CH395_SCS_Pin GPIO_PIN_12
|
||||
#define CH395_SCS_GPIO_Port GPIOB
|
||||
#define CH395F_SCK_Pin GPIO_PIN_13
|
||||
@@ -77,16 +91,67 @@ void Error_Handler(void);
|
||||
#define CH395F_SDO_GPIO_Port GPIOB
|
||||
#define CH395F_SDOB15_Pin GPIO_PIN_15
|
||||
#define CH395F_SDOB15_GPIO_Port GPIOB
|
||||
#define ST_TX0_Pin GPIO_PIN_9
|
||||
#define ST_TX0_GPIO_Port GPIOA
|
||||
#define ST_RX0_Pin GPIO_PIN_10
|
||||
#define ST_RX0_GPIO_Port GPIOA
|
||||
#define DB2_Pin GPIO_PIN_2
|
||||
#define DB2_GPIO_Port GPIOG
|
||||
#define DB3_Pin GPIO_PIN_3
|
||||
#define DB3_GPIO_Port GPIOG
|
||||
#define DB4_Pin GPIO_PIN_4
|
||||
#define DB4_GPIO_Port GPIOG
|
||||
#define DB5_Pin GPIO_PIN_5
|
||||
#define DB5_GPIO_Port GPIOG
|
||||
#define DB6_Pin GPIO_PIN_6
|
||||
#define DB6_GPIO_Port GPIOG
|
||||
#define DB7_Pin GPIO_PIN_7
|
||||
#define DB7_GPIO_Port GPIOG
|
||||
#define DB8_Pin GPIO_PIN_8
|
||||
#define DB8_GPIO_Port GPIOG
|
||||
#define ST_TX3_Pin GPIO_PIN_10
|
||||
#define ST_TX3_GPIO_Port GPIOC
|
||||
#define ST_RX3_Pin GPIO_PIN_11
|
||||
#define ST_RX3_GPIO_Port GPIOC
|
||||
#define ST_TX4_Pin GPIO_PIN_12
|
||||
#define ST_TX4_GPIO_Port GPIOC
|
||||
#define ST_DIR4_Pin GPIO_PIN_0
|
||||
#define ST_DIR4_GPIO_Port GPIOD
|
||||
#define TP_FRSTDATA_Pin GPIO_PIN_1
|
||||
#define TP_FRSTDATA_GPIO_Port GPIOD
|
||||
#define ST_RX4_Pin GPIO_PIN_2
|
||||
#define ST_RX4_GPIO_Port GPIOD
|
||||
#define TP_RD_Pin GPIO_PIN_3
|
||||
#define TP_RD_GPIO_Port GPIOD
|
||||
#define TP_CONVST_Pin GPIO_PIN_4
|
||||
#define TP_CONVST_GPIO_Port GPIOD
|
||||
#define ST_TX1_Pin GPIO_PIN_5
|
||||
#define ST_TX1_GPIO_Port GPIOD
|
||||
#define ST_RX1_Pin GPIO_PIN_6
|
||||
#define ST_RX1_GPIO_Port GPIOD
|
||||
#define TP_BUSY_Pin GPIO_PIN_7
|
||||
#define TP_BUSY_GPIO_Port GPIOD
|
||||
#define TP_BUSY_EXTI_IRQn EXTI9_5_IRQn
|
||||
#define DB9_Pin GPIO_PIN_9
|
||||
#define DB9_GPIO_Port GPIOG
|
||||
#define DB10_Pin GPIO_PIN_10
|
||||
#define DB10_GPIO_Port GPIOG
|
||||
#define DB11_Pin GPIO_PIN_11
|
||||
#define DB11_GPIO_Port GPIOG
|
||||
#define DB12_Pin GPIO_PIN_12
|
||||
#define DB12_GPIO_Port GPIOG
|
||||
#define DB13_Pin GPIO_PIN_13
|
||||
#define DB13_GPIO_Port GPIOG
|
||||
#define DB14_Pin GPIO_PIN_14
|
||||
#define DB14_GPIO_Port GPIOG
|
||||
#define DB15_Pin GPIO_PIN_15
|
||||
#define DB15_GPIO_Port GPIOG
|
||||
#define GD_SCLK_Pin GPIO_PIN_3
|
||||
#define GD_SCLK_GPIO_Port GPIOB
|
||||
#define GD_SO_Pin GPIO_PIN_4
|
||||
#define GD_SO_GPIO_Port GPIOB
|
||||
#define GD_SI_Pin GPIO_PIN_5
|
||||
#define GD_SI_GPIO_Port GPIOB
|
||||
#define SD_SCL_Pin GPIO_PIN_6
|
||||
#define SD_SCL_GPIO_Port GPIOB
|
||||
#define SD_SDA_Pin GPIO_PIN_7
|
||||
#define SD_SDA_GPIO_Port GPIOB
|
||||
#define GD_WP_Pin GPIO_PIN_8
|
||||
#define GD_WP_GPIO_Port GPIOB
|
||||
#define GD_CS_Pin GPIO_PIN_0
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
/* #define HAL_SRAM_MODULE_ENABLED */
|
||||
/* #define HAL_SDRAM_MODULE_ENABLED */
|
||||
/* #define HAL_HASH_MODULE_ENABLED */
|
||||
/* #define HAL_I2C_MODULE_ENABLED */
|
||||
#define HAL_I2C_MODULE_ENABLED
|
||||
/* #define HAL_I2S_MODULE_ENABLED */
|
||||
/* #define HAL_IWDG_MODULE_ENABLED */
|
||||
/* #define HAL_LTDC_MODULE_ENABLED */
|
||||
|
||||
@@ -55,6 +55,14 @@ void SVC_Handler(void);
|
||||
void DebugMon_Handler(void);
|
||||
void PendSV_Handler(void);
|
||||
void SysTick_Handler(void);
|
||||
void EXTI9_5_IRQHandler(void);
|
||||
void USART1_IRQHandler(void);
|
||||
void USART2_IRQHandler(void);
|
||||
void USART3_IRQHandler(void);
|
||||
void UART4_IRQHandler(void);
|
||||
void UART5_IRQHandler(void);
|
||||
void DMA2_Stream2_IRQHandler(void);
|
||||
void DMA2_Stream7_IRQHandler(void);
|
||||
/* USER CODE BEGIN EFP */
|
||||
|
||||
/* USER CODE END EFP */
|
||||
|
||||
12
Inc/usart.h
12
Inc/usart.h
@@ -32,13 +32,25 @@ extern "C" {
|
||||
|
||||
/* USER CODE END Includes */
|
||||
|
||||
extern UART_HandleTypeDef huart4;
|
||||
|
||||
extern UART_HandleTypeDef huart5;
|
||||
|
||||
extern UART_HandleTypeDef huart1;
|
||||
|
||||
extern UART_HandleTypeDef huart2;
|
||||
|
||||
extern UART_HandleTypeDef huart3;
|
||||
|
||||
/* USER CODE BEGIN Private defines */
|
||||
|
||||
/* USER CODE END Private defines */
|
||||
|
||||
void MX_UART4_Init(void);
|
||||
void MX_UART5_Init(void);
|
||||
void MX_USART1_UART_Init(void);
|
||||
void MX_USART2_UART_Init(void);
|
||||
void MX_USART3_UART_Init(void);
|
||||
|
||||
/* USER CODE BEGIN Prototypes */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user