mirror of
https://github.com/DashyFox/StackSport.git
synced 2025-05-04 07:10:17 +00:00
106 lines
3.0 KiB
C
106 lines
3.0 KiB
C
/* 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) 2024 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 "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 */
|
|
|
|
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 RPWM_UP_Pin GPIO_PIN_0
|
|
#define RPWM_UP_GPIO_Port GPIOA
|
|
#define LPWM_UP_Pin GPIO_PIN_1
|
|
#define LPWM_UP_GPIO_Port GPIOA
|
|
#define RPWM_DOWN_Pin GPIO_PIN_2
|
|
#define RPWM_DOWN_GPIO_Port GPIOA
|
|
#define LPWM_DOWN_Pin GPIO_PIN_3
|
|
#define LPWM_DOWN_GPIO_Port GPIOA
|
|
#define LED_DATA_Pin GPIO_PIN_4
|
|
#define LED_DATA_GPIO_Port GPIOA
|
|
#define LED_CLK_Pin GPIO_PIN_5
|
|
#define LED_CLK_GPIO_Port GPIOA
|
|
#define SPEED_CAPTURE_UP_Pin GPIO_PIN_6
|
|
#define SPEED_CAPTURE_UP_GPIO_Port GPIOA
|
|
#define SPEED_CAPTURE_DOWN_Pin GPIO_PIN_7
|
|
#define SPEED_CAPTURE_DOWN_GPIO_Port GPIOA
|
|
#define BALL_EXT_Pin GPIO_PIN_0
|
|
#define BALL_EXT_GPIO_Port GPIOB
|
|
#define BALL_EXT_EXTI_IRQn EXTI0_IRQn
|
|
#define IR_EXT_Pin GPIO_PIN_1
|
|
#define IR_EXT_GPIO_Port GPIOB
|
|
#define IR_EXT_EXTI_IRQn EXTI1_IRQn
|
|
#define TX_Pin GPIO_PIN_10
|
|
#define TX_GPIO_Port GPIOB
|
|
#define RX_Pin GPIO_PIN_11
|
|
#define RX_GPIO_Port GPIOB
|
|
#define LPWM_S_Pin GPIO_PIN_8
|
|
#define LPWM_S_GPIO_Port GPIOA
|
|
#define RPWM_S_Pin GPIO_PIN_9
|
|
#define RPWM_S_GPIO_Port GPIOA
|
|
#define SCL_Pin GPIO_PIN_6
|
|
#define SCL_GPIO_Port GPIOB
|
|
#define SDA_Pin GPIO_PIN_7
|
|
#define SDA_GPIO_Port GPIOB
|
|
|
|
/* USER CODE BEGIN Private defines */
|
|
|
|
/* USER CODE END Private defines */
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __MAIN_H */
|