blk_box_bc/Core/Inc/main.h
2025-10-03 18:32:24 -05:00

117 lines
3.2 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 "stm32g0xx_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 ---------------------------------------------*/
void Error_Handler(void);
/* USER CODE BEGIN EFP */
extern SPI_HandleTypeDef hspi1;
/* USER CODE END EFP */
/* Private defines -----------------------------------------------------------*/
#define INT_Pin GPIO_PIN_1
#define INT_GPIO_Port GPIOA
#define RFID_CS_Pin GPIO_PIN_4
#define RFID_CS_GPIO_Port GPIOA
#define RFID_RST_Pin GPIO_PIN_2
#define RFID_RST_GPIO_Port GPIOB
#define SWT1_Pin GPIO_PIN_10
#define SWT1_GPIO_Port GPIOB
#define SWT2_Pin GPIO_PIN_11
#define SWT2_GPIO_Port GPIOB
#define COL1_Pin GPIO_PIN_15
#define COL1_GPIO_Port GPIOB
#define COL2_Pin GPIO_PIN_8
#define COL2_GPIO_Port GPIOA
#define SWT3_Pin GPIO_PIN_6
#define SWT3_GPIO_Port GPIOC
#define SWT4_Pin GPIO_PIN_7
#define SWT4_GPIO_Port GPIOC
#define ROW1_Pin GPIO_PIN_11
#define ROW1_GPIO_Port GPIOA
#define ROW2_Pin GPIO_PIN_12
#define ROW2_GPIO_Port GPIOA
#define ROW3_Pin GPIO_PIN_15
#define ROW3_GPIO_Port GPIOA
#define ROW4_Pin GPIO_PIN_0
#define ROW4_GPIO_Port GPIOD
#define COL3_Pin GPIO_PIN_1
#define COL3_GPIO_Port GPIOD
#define TOUCH_Pin GPIO_PIN_2
#define TOUCH_GPIO_Port GPIOD
#define KP_C1_Pin GPIO_PIN_3
#define KP_C1_GPIO_Port GPIOD
#define KP_C2_Pin GPIO_PIN_3
#define KP_C2_GPIO_Port GPIOB
#define KP_C3_Pin GPIO_PIN_4
#define KP_C3_GPIO_Port GPIOB
#define KP_C4_Pin GPIO_PIN_5
#define KP_C4_GPIO_Port GPIOB
#define KP_R1_Pin GPIO_PIN_6
#define KP_R1_GPIO_Port GPIOB
#define KP_R2_Pin GPIO_PIN_7
#define KP_R2_GPIO_Port GPIOB
#define KP_R3_Pin GPIO_PIN_8
#define KP_R3_GPIO_Port GPIOB
#define KP_R4_Pin GPIO_PIN_9
#define KP_R4_GPIO_Port GPIOB
/* USER CODE BEGIN Private defines */
/* USER CODE END Private defines */
#ifdef __cplusplus
}
#endif
#endif /* __MAIN_H */