123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205 |
- /* 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>© Copyright (c) 2020 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 */
- #include "Bluecell_operate.h"
- /* 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 ---------------------------------------------*/
- void Error_Handler(void);
- /* USER CODE BEGIN EFP */
- extern volatile uint16_t ADC1value[4];
- extern volatile uint16_t ADC3value[5];
- extern uint16_t adc1cnt;
- extern uint16_t adc3cnt;
- extern ADC_HandleTypeDef hadc1;
- extern ADC_HandleTypeDef hadc3;
- extern I2C_HandleTypeDef hi2c2;
- /* USER CODE END EFP */
- /* Private defines -----------------------------------------------------------*/
- #define LED_FAIL2_Pin GPIO_PIN_3
- #define LED_FAIL2_GPIO_Port GPIOE
- #define FAIL_MBIC_Pin GPIO_PIN_4
- #define FAIL_MBIC_GPIO_Port GPIOE
- #define BOOT_LED_Pin GPIO_PIN_15
- #define BOOT_LED_GPIO_Port GPIOC
- #define DET_UL4_OUT_Pin GPIO_PIN_6
- #define DET_UL4_OUT_GPIO_Port GPIOF
- #define DET_DL1_IN_Pin GPIO_PIN_7
- #define DET_DL1_IN_GPIO_Port GPIOF
- #define DET_DL2_IN_Pin GPIO_PIN_8
- #define DET_DL2_IN_GPIO_Port GPIOF
- #define DET_DL3_IN_Pin GPIO_PIN_9
- #define DET_DL3_IN_GPIO_Port GPIOF
- #define DET_DL4_IN_Pin GPIO_PIN_10
- #define DET_DL4_IN_GPIO_Port GPIOF
- #define RFU_TEMP_Pin GPIO_PIN_2
- #define RFU_TEMP_GPIO_Port GPIOC
- #define RFU_TX_Pin GPIO_PIN_2
- #define RFU_TX_GPIO_Port GPIOA
- #define RFU_RX_Pin GPIO_PIN_3
- #define RFU_RX_GPIO_Port GPIOA
- #define DET_UL1_OUT_Pin GPIO_PIN_4
- #define DET_UL1_OUT_GPIO_Port GPIOA
- #define DET_UL2_OUT_Pin GPIO_PIN_5
- #define DET_UL2_OUT_GPIO_Port GPIOA
- #define DET_UL3_OUT_Pin GPIO_PIN_6
- #define DET_UL3_OUT_GPIO_Port GPIOA
- #define ATT_CLOCK3_Pin GPIO_PIN_0
- #define ATT_CLOCK3_GPIO_Port GPIOG
- #define ATT_DATA3_Pin GPIO_PIN_1
- #define ATT_DATA3_GPIO_Port GPIOG
- #define ATT_CLOCK4_Pin GPIO_PIN_10
- #define ATT_CLOCK4_GPIO_Port GPIOE
- #define ATT_DATA4_Pin GPIO_PIN_11
- #define ATT_DATA4_GPIO_Port GPIOE
- #define ATT_EN_DL4_Pin GPIO_PIN_12
- #define ATT_EN_DL4_GPIO_Port GPIOE
- #define ATT_EN_UL4_Pin GPIO_PIN_13
- #define ATT_EN_UL4_GPIO_Port GPIOE
- #define PATH_EN_DL4_Pin GPIO_PIN_14
- #define PATH_EN_DL4_GPIO_Port GPIOE
- #define PATH_EN_UL4_Pin GPIO_PIN_15
- #define PATH_EN_UL4_GPIO_Port GPIOE
- #define EEPROM_SCL_Pin GPIO_PIN_10
- #define EEPROM_SCL_GPIO_Port GPIOB
- #define EEPROM_SDA_Pin GPIO_PIN_11
- #define EEPROM_SDA_GPIO_Port GPIOB
- #define ATT_EN_UL1_Pin GPIO_PIN_14
- #define ATT_EN_UL1_GPIO_Port GPIOB
- #define PATH_EN_DL1_Pin GPIO_PIN_15
- #define PATH_EN_DL1_GPIO_Port GPIOB
- #define PATH_EN_DL2_Pin GPIO_PIN_10
- #define PATH_EN_DL2_GPIO_Port GPIOD
- #define PATH_EN_UL2_Pin GPIO_PIN_11
- #define PATH_EN_UL2_GPIO_Port GPIOD
- #define LED_ACT_Pin GPIO_PIN_14
- #define LED_ACT_GPIO_Port GPIOD
- #define LED_FAIL_Pin GPIO_PIN_15
- #define LED_FAIL_GPIO_Port GPIOD
- #define ATT_EN_DL3_Pin GPIO_PIN_2
- #define ATT_EN_DL3_GPIO_Port GPIOG
- #define ATT_EN_UL3_Pin GPIO_PIN_3
- #define ATT_EN_UL3_GPIO_Port GPIOG
- #define PATH_EN_DL3_Pin GPIO_PIN_4
- #define PATH_EN_DL3_GPIO_Port GPIOG
- #define PATH_EN_UL3_Pin GPIO_PIN_5
- #define PATH_EN_UL3_GPIO_Port GPIOG
- #define _PATH_SW1_Pin GPIO_PIN_8
- #define _PATH_SW1_GPIO_Port GPIOG
- #define PATH_EN_UL1_Pin GPIO_PIN_6
- #define PATH_EN_UL1_GPIO_Port GPIOC
- #define MBIC_UP_Pin GPIO_PIN_9
- #define MBIC_UP_GPIO_Port GPIOA
- #define MBIC_DOWN_Pin GPIO_PIN_10
- #define MBIC_DOWN_GPIO_Port GPIOA
- #define UNIT_ID0_Pin GPIO_PIN_10
- #define UNIT_ID0_GPIO_Port GPIOC
- #define UNIT_ID1_Pin GPIO_PIN_11
- #define UNIT_ID1_GPIO_Port GPIOC
- #define UNIT_ID2_Pin GPIO_PIN_12
- #define UNIT_ID2_GPIO_Port GPIOC
- #define UNIT_ID3_Pin GPIO_PIN_0
- #define UNIT_ID3_GPIO_Port GPIOD
- #define ATT_CLOCK2_Pin GPIO_PIN_2
- #define ATT_CLOCK2_GPIO_Port GPIOD
- #define ATT_DATA2_Pin GPIO_PIN_3
- #define ATT_DATA2_GPIO_Port GPIOD
- #define ATT_EN_DL2_Pin GPIO_PIN_4
- #define ATT_EN_DL2_GPIO_Port GPIOD
- #define ATT_EN_UL2_Pin GPIO_PIN_7
- #define ATT_EN_UL2_GPIO_Port GPIOD
- #define PATH_SW1_Pin GPIO_PIN_9
- #define PATH_SW1_GPIO_Port GPIOG
- #define _PATH_SW2_Pin GPIO_PIN_10
- #define _PATH_SW2_GPIO_Port GPIOG
- #define PATH_SW2_Pin GPIO_PIN_11
- #define PATH_SW2_GPIO_Port GPIOG
- #define _PATH_SW3_Pin GPIO_PIN_12
- #define _PATH_SW3_GPIO_Port GPIOG
- #define PATH_SW3_Pin GPIO_PIN_13
- #define PATH_SW3_GPIO_Port GPIOG
- #define _PATH_SW4_Pin GPIO_PIN_14
- #define _PATH_SW4_GPIO_Port GPIOG
- #define PATH_SW4_Pin GPIO_PIN_15
- #define PATH_SW4_GPIO_Port GPIOG
- #define ATT_CLOCK1_Pin GPIO_PIN_6
- #define ATT_CLOCK1_GPIO_Port GPIOB
- #define ATT_DATA1_Pin GPIO_PIN_7
- #define ATT_DATA1_GPIO_Port GPIOB
- #define ATT_EN_DL1_Pin GPIO_PIN_9
- #define ATT_EN_DL1_GPIO_Port GPIOB
- /* USER CODE BEGIN Private defines */
- #define MBIC_ON_MAINTAIN_SEC 3000
- #define MBIC_ON_SHUTDOWN_MAINTAIN_SEC 5000
- #define MBIC_RECOVERY_SHUTDOWN_MAINTAIN_SEC 35000
- #define MBIC_OFF_MAINTAIN_SEC 10000
- #define ADC_AVERAGECNT 100
- #define ADC1_CNT 4
- #define ADC3_CNT 5
- /* USER CODE END Private defines */
- #ifdef __cplusplus
- }
- #endif
- #endif /* __MAIN_H */
- /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|