shuichan_new/STM32F103_BootLoader/Inc/main.h

86 lines
2.6 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.h
* @brief : Header for main.c file.
* This file contains the common defines of the application.
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2019 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
*
******************************************************************************
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "stm32f1xx_hal.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */
/* USER CODE END ET */
/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */
/* USER CODE END EC */
/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */
/* USER CODE END EM */
/* Exported functions prototypes ---------------------------------------------*/
/*===== W25Q64 外部 Flash 引脚(软件 SPI =====*/
#define W25Q64_CS_PIN GPIO_PIN_8
#define W25Q64_CS_PORT GPIOB
#define W25Q64_CLK_PIN GPIO_PIN_6
#define W25Q64_CLK_PORT GPIOB
#define W25Q64_DO_PIN GPIO_PIN_9 /* Flash DO -> MCU 输入 */
#define W25Q64_DO_PORT GPIOB
#define W25Q64_DI_PIN GPIO_PIN_7 /* MCU DI -> Flash 输入 */
#define W25Q64_DI_PORT GPIOB
void Error_Handler(void);
/* USER CODE BEGIN EFP */
/* USER CODE END EFP */
/* Private defines -----------------------------------------------------------*/
/* USER CODE BEGIN Private defines */
#define Rx_Max 1024
extern uint8_t Rx_Flag;
extern uint16_t Rx_Len;
extern uint8_t Rx_Buf[Rx_Max];
extern UART_HandleTypeDef huart3;
/* USER CODE END Private defines */
#ifdef __cplusplus
}
#endif
#endif /* __MAIN_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/