2023-03-05 15:36:10 +01:00
|
|
|
/* USER CODE BEGIN Header */
|
|
|
|
/**
|
2023-03-06 21:21:00 +01:00
|
|
|
******************************************************************************
|
|
|
|
* @file : main.h
|
|
|
|
* @brief : Header for main.c file.
|
|
|
|
* This file contains the common defines of the application.
|
|
|
|
******************************************************************************
|
|
|
|
* @attention
|
|
|
|
*
|
|
|
|
* Copyright (c) 2023 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.
|
|
|
|
*
|
|
|
|
******************************************************************************
|
|
|
|
*/
|
2023-03-05 15:36:10 +01:00
|
|
|
/* USER CODE END Header */
|
|
|
|
|
|
|
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
|
|
|
#ifndef __MAIN_H
|
|
|
|
#define __MAIN_H
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Includes ------------------------------------------------------------------*/
|
|
|
|
#include "stm32h7xx_hal.h"
|
|
|
|
|
|
|
|
/* Private includes ----------------------------------------------------------*/
|
|
|
|
/* USER CODE BEGIN Includes */
|
2023-03-07 20:13:28 +01:00
|
|
|
#include "tx_api.h"
|
2023-03-05 15:36:10 +01:00
|
|
|
/* USER CODE END Includes */
|
|
|
|
|
|
|
|
/* Exported types ------------------------------------------------------------*/
|
|
|
|
/* USER CODE BEGIN ET */
|
|
|
|
|
|
|
|
/* USER CODE END ET */
|
|
|
|
|
|
|
|
/* Exported constants --------------------------------------------------------*/
|
|
|
|
/* USER CODE BEGIN EC */
|
2023-03-06 21:21:00 +01:00
|
|
|
extern volatile int ltdc_cb_triggered;
|
2023-03-07 21:58:28 +01:00
|
|
|
extern TX_QUEUE gui_button_queue;
|
2023-03-20 15:36:59 +01:00
|
|
|
extern TX_EVENT_FLAGS_GROUP gui_update_events;
|
2023-03-08 20:20:01 +01:00
|
|
|
extern FDCAN_HandleTypeDef hfdcan1;
|
2023-03-20 15:36:59 +01:00
|
|
|
|
|
|
|
#define GUI_UPDATE_VEHICLE_STATE (1 << 0)
|
2023-03-05 15:36:10 +01:00
|
|
|
/* USER CODE END EC */
|
|
|
|
|
|
|
|
/* Exported macro ------------------------------------------------------------*/
|
|
|
|
/* USER CODE BEGIN EM */
|
|
|
|
|
|
|
|
/* USER CODE END EM */
|
|
|
|
|
|
|
|
void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);
|
|
|
|
|
|
|
|
/* Exported functions prototypes ---------------------------------------------*/
|
|
|
|
void Error_Handler(void);
|
|
|
|
|
|
|
|
/* USER CODE BEGIN EFP */
|
|
|
|
|
|
|
|
/* USER CODE END EFP */
|
|
|
|
|
|
|
|
/* Private defines -----------------------------------------------------------*/
|
|
|
|
#define ENC1A_Pin GPIO_PIN_3
|
|
|
|
#define ENC1A_GPIO_Port GPIOE
|
2023-03-08 20:20:01 +01:00
|
|
|
#define ENC1A_EXTI_IRQn EXTI3_IRQn
|
2023-03-05 15:36:10 +01:00
|
|
|
#define ENC1B_Pin GPIO_PIN_4
|
|
|
|
#define ENC1B_GPIO_Port GPIOE
|
2023-03-08 20:20:01 +01:00
|
|
|
#define ENC1B_EXTI_IRQn EXTI4_IRQn
|
2023-03-05 15:36:10 +01:00
|
|
|
#define ENC2A_Pin GPIO_PIN_5
|
|
|
|
#define ENC2A_GPIO_Port GPIOE
|
2023-03-08 20:20:01 +01:00
|
|
|
#define ENC2A_EXTI_IRQn EXTI9_5_IRQn
|
2023-03-05 15:36:10 +01:00
|
|
|
#define ENC2B_Pin GPIO_PIN_6
|
|
|
|
#define ENC2B_GPIO_Port GPIOE
|
2023-03-08 20:20:01 +01:00
|
|
|
#define ENC2B_EXTI_IRQn EXTI9_5_IRQn
|
2023-03-05 15:36:10 +01:00
|
|
|
#define BTN1_Pin GPIO_PIN_0
|
|
|
|
#define BTN1_GPIO_Port GPIOF
|
|
|
|
#define BTN2_Pin GPIO_PIN_1
|
|
|
|
#define BTN2_GPIO_Port GPIOF
|
|
|
|
#define BTN3_Pin GPIO_PIN_2
|
|
|
|
#define BTN3_GPIO_Port GPIOF
|
|
|
|
#define BTN4_Pin GPIO_PIN_3
|
|
|
|
#define BTN4_GPIO_Port GPIOF
|
|
|
|
#define BTN5_Pin GPIO_PIN_4
|
|
|
|
#define BTN5_GPIO_Port GPIOF
|
|
|
|
#define BTN6_Pin GPIO_PIN_5
|
|
|
|
#define BTN6_GPIO_Port GPIOF
|
|
|
|
#define STATUS1_Pin GPIO_PIN_0
|
|
|
|
#define STATUS1_GPIO_Port GPIOA
|
|
|
|
#define STATUS2_Pin GPIO_PIN_2
|
|
|
|
#define STATUS2_GPIO_Port GPIOA
|
|
|
|
#define PWM_BACKLIGHT_Pin GPIO_PIN_3
|
|
|
|
#define PWM_BACKLIGHT_GPIO_Port GPIOA
|
2023-03-05 15:57:15 +01:00
|
|
|
#define DISPSPI_SCL_Pin GPIO_PIN_5
|
|
|
|
#define DISPSPI_SCL_GPIO_Port GPIOA
|
|
|
|
#define DISPSPI_SDA_Pin GPIO_PIN_7
|
|
|
|
#define DISPSPI_SDA_GPIO_Port GPIOA
|
2023-03-05 15:36:10 +01:00
|
|
|
#define PWM_R_Pin GPIO_PIN_9
|
|
|
|
#define PWM_R_GPIO_Port GPIOE
|
|
|
|
#define PWM_G_Pin GPIO_PIN_11
|
|
|
|
#define PWM_G_GPIO_Port GPIOE
|
|
|
|
#define PWM_B_Pin GPIO_PIN_13
|
|
|
|
#define PWM_B_GPIO_Port GPIOE
|
|
|
|
#define LOGO1_Pin GPIO_PIN_12
|
|
|
|
#define LOGO1_GPIO_Port GPIOD
|
|
|
|
#define LOGO2_Pin GPIO_PIN_13
|
|
|
|
#define LOGO2_GPIO_Port GPIOD
|
|
|
|
#define LED_CP_Pin GPIO_PIN_10
|
|
|
|
#define LED_CP_GPIO_Port GPIOC
|
|
|
|
#define LED_LE_Pin GPIO_PIN_11
|
|
|
|
#define LED_LE_GPIO_Port GPIOC
|
|
|
|
#define LED_D_Pin GPIO_PIN_12
|
|
|
|
#define LED_D_GPIO_Port GPIOC
|
|
|
|
#define DISPSPI_CSX_Pin GPIO_PIN_10
|
|
|
|
#define DISPSPI_CSX_GPIO_Port GPIOG
|
|
|
|
#define DISPSPI_DCX_Pin GPIO_PIN_12
|
|
|
|
#define DISPSPI_DCX_GPIO_Port GPIOG
|
|
|
|
#define DISP_RESET_Pin GPIO_PIN_13
|
|
|
|
#define DISP_RESET_GPIO_Port GPIOG
|
|
|
|
#define BOOT0_SET_Pin GPIO_PIN_7
|
|
|
|
#define BOOT0_SET_GPIO_Port GPIOB
|
2023-03-05 21:24:12 +01:00
|
|
|
|
2023-03-05 15:36:10 +01:00
|
|
|
/* USER CODE BEGIN Private defines */
|
|
|
|
|
|
|
|
/* USER CODE END Private defines */
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* __MAIN_H */
|