steering-wheel-stm/Core/Inc/main.h

109 lines
3.2 KiB
C
Raw Permalink Normal View History

2022-05-29 00:47:46 +02:00
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.h
* @brief : Header for main.c file.
* This file contains the common defines of the application.
******************************************************************************
* @attention
*
* Copyright (c) 2022 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 __MAIN_H
#define __MAIN_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "stm32g4xx_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 */
2022-08-17 08:46:40 +02:00
#define MAIN_LOOP_PERIOD 50 /* ms */
2022-05-29 00:47:46 +02:00
/* USER CODE END EC */
/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */
/* USER CODE END EM */
2022-08-17 08:45:48 +02:00
void HAL_TIM_MspPostInit(TIM_HandleTypeDef* htim);
2022-05-29 00:47:46 +02:00
/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);
/* USER CODE BEGIN EFP */
/* USER CODE END EFP */
/* Private defines -----------------------------------------------------------*/
#define TOP_PWM_Pin GPIO_PIN_0
#define TOP_PWM_GPIO_Port GPIOA
#define LOGO_PWM_Pin GPIO_PIN_1
#define LOGO_PWM_GPIO_Port GPIOA
#define LED_ICLK_Pin GPIO_PIN_2
#define LED_ICLK_GPIO_Port GPIOA
#define LED_OCLK_Pin GPIO_PIN_3
#define LED_OCLK_GPIO_Port GPIOA
#define LED_NCLR_Pin GPIO_PIN_4
#define LED_NCLR_GPIO_Port GPIOA
#define LED_SER_Pin GPIO_PIN_5
#define LED_SER_GPIO_Port GPIOA
#define LED_NOE_Pin GPIO_PIN_6
#define LED_NOE_GPIO_Port GPIOA
#define V_POT_Pin GPIO_PIN_11
#define V_POT_GPIO_Port GPIOB
#define BTN0_Pin GPIO_PIN_12
#define BTN0_GPIO_Port GPIOB
#define BTN0_EXTI_IRQn EXTI15_10_IRQn
#define BTN1_Pin GPIO_PIN_13
#define BTN1_GPIO_Port GPIOB
#define BTN1_EXTI_IRQn EXTI15_10_IRQn
#define BTN2_Pin GPIO_PIN_14
#define BTN2_GPIO_Port GPIOB
#define BTN2_EXTI_IRQn EXTI15_10_IRQn
#define BTN3_Pin GPIO_PIN_15
#define BTN3_GPIO_Port GPIOB
#define BTN3_EXTI_IRQn EXTI15_10_IRQn
#define DISP_RESET_Pin GPIO_PIN_15
#define DISP_RESET_GPIO_Port GPIOA
#define ENC0A_Pin GPIO_PIN_4
#define ENC0A_GPIO_Port GPIOB
#define ENC0B_Pin GPIO_PIN_5
#define ENC0B_GPIO_Port GPIOB
#define ENC1A_Pin GPIO_PIN_6
#define ENC1A_GPIO_Port GPIOB
#define ENC1B_Pin GPIO_PIN_7
#define ENC1B_GPIO_Port GPIOB
/* USER CODE BEGIN Private defines */
2022-08-17 08:45:48 +02:00
#define TOP_PWM_TIM_CHANNEL TIM_CHANNEL_1
2022-05-29 00:47:46 +02:00
/* USER CODE END Private defines */
#ifdef __cplusplus
}
#endif
#endif /* __MAIN_H */