This repository has been archived on 2026-05-29. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
LightTAM_RFID_Reader/Core/Inc/main.h
T
eduard.dlabal f8c5650c95 Add USART2 support and modify system clock configuration
- Implemented USART2 initialization and interrupt handling.
- Added a function to send data to the server via USART2.
- Updated the main application to utilize USART2 for communication.
- Changed system clock configuration to use HSE and PLL for higher frequency.
- Adjusted SPI1 baud rate prescaler for improved performance.
- Enhanced LED control logic based on RFID card detection.
- Updated project configuration to reflect new USART2 settings.
2025-05-18 14:53:54 +02:00

87 lines
2.6 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
*
* <h2><center>&copy; Copyright (c) 2019 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 */
/* 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 */
/* USER CODE END EFP */
/* Private defines -----------------------------------------------------------*/
#define SS_Pin GPIO_PIN_4
#define SS_GPIO_Port GPIOA
#define PN532_RST_Pin GPIO_PIN_0
#define PN532_RST_GPIO_Port GPIOB
#define PN532_REQ_Pin GPIO_PIN_1
#define PN532_REQ_GPIO_Port GPIOB
#define RED_LED_Pin GPIO_PIN_12
#define RED_LED_GPIO_Port GPIOB
#define ORANGE_LED_Pin GPIO_PIN_13
#define ORANGE_LED_GPIO_Port GPIOB
#define GREEN_LED_Pin GPIO_PIN_14
#define GREEN_LED_GPIO_Port GPIOB
#define DEBUG_TXD_Pin GPIO_PIN_9
#define DEBUG_TXD_GPIO_Port GPIOA
#define DEBUG_RXD_Pin GPIO_PIN_10
#define DEBUG_RXD_GPIO_Port GPIOA
/* USER CODE BEGIN Private defines */
/* USER CODE END Private defines */
#ifdef __cplusplus
}
#endif
#endif /* __MAIN_H */