删除内容: - 删除OLED显示相关代码(u8g2库、I2C接口) - 删除按键输入相关代码(key.c) - 删除菜单系统(MultMenu整个目录) - 删除USB CDC功能(USB_DEVICE目录) - 删除旧的E32演示代码(e32_demo.c/h) 保留内容: - Driver_RF433核心驱动(已封装完整) - rf433_tx_app.c(TX应用层,独立无UI依赖) - rf433_rx_app.c(RX应用层,独立无UI依赖) - GPIO LED指示功能(LED_TX/LED_RX)
92 lines
2.6 KiB
C
92 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
|
|
*
|
|
* 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 */
|
|
#include <stdbool.h>
|
|
#include <stdio.h>
|
|
/* 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 RESET_Pin GPIO_PIN_3
|
|
#define RESET_GPIO_Port GPIOA
|
|
#define M0_Pin GPIO_PIN_7
|
|
#define M0_GPIO_Port GPIOA
|
|
#define M1_Pin GPIO_PIN_0
|
|
#define M1_GPIO_Port GPIOB
|
|
#define AUX_Pin GPIO_PIN_1
|
|
#define AUX_GPIO_Port GPIOB
|
|
#define LED_TX_Pin GPIO_PIN_15
|
|
#define LED_TX_GPIO_Port GPIOA
|
|
#define LED_RX_Pin GPIO_PIN_6
|
|
#define LED_RX_GPIO_Port GPIOB
|
|
|
|
/* USER CODE BEGIN Private defines */
|
|
void gpio_led_tx_on(void);
|
|
void gpio_led_tx_off(void);
|
|
void gpio_led_rx_on(void);
|
|
void gpio_led_rx_off(void);
|
|
|
|
void systick_interrupt_1ms_callback(void);
|
|
void systick_set_user_timeout( uint32_t time_ms );
|
|
uint32_t systick_get_user_timeout(void);
|
|
|
|
void uart1_rx_timeout_1ms_callback(void);
|
|
bool uart1_check_rx_done( uint8_t *buffer , uint32_t *length );
|
|
/* USER CODE END Private defines */
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __MAIN_H */
|