Files
433_STM32/Driver_RF433/Inc/rf433_config.h
zhongxuanzhen 1c6ff020e9 3.24_433_TX版本:项目去UI化,删除OLED/菜单/按键,TX已验证,RX待验证
删除内容:
- 删除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)
2026-03-24 19:39:43 +08:00

134 lines
3.0 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
******************************************************************************
* @file rf433_config.h
* @brief RF433模块配置文件
******************************************************************************
*/
#ifndef __RF433_CONFIG_H__
#define __RF433_CONFIG_H__
#ifdef __cplusplus
extern "C" {
#endif
/* ============================================================================
* 编译模式选择
* ============================================================================ */
/**
* @brief 编译模式选择
* @note 必须在包含此头文件之前定义
* RF433_MODE_TX - 仅编译TX功能
* RF433_MODE_RX - 仅编译RX功能
* RF433_MODE_BOTH - 编译TX和RX功能默认
*/
#define RF433_MODE_TX 1
#define RF433_MODE_RX 2
#define RF433_MODE_BOTH 3
#ifndef RF433_MODE
#define RF433_MODE RF433_MODE_TX
#endif
/* ============================================================================
* 默认配置参数
* ============================================================================ */
/**
* @brief 默认工作模式(运行时选择)
* @note 1: TX模式
* 2: RX模式
* 3: 双模模式
*/
#ifndef RF433_DEFAULT_WORK_MODE
#define RF433_DEFAULT_WORK_MODE RF433_MODE_TX
#endif
/**
* @brief 默认发送间隔ms
*/
#ifndef RF433_DEFAULT_TX_INTERVAL
#define RF433_DEFAULT_TX_INTERVAL 1000
#endif
/**
* @brief 默认发送次数
*/
#ifndef RF433_DEFAULT_TX_COUNT
#define RF433_DEFAULT_TX_COUNT 100
#endif
/* ============================================================================
* 缓冲区大小配置
* ============================================================================ */
/**
* @brief FIFO缓冲区大小
*/
#ifndef RF433_FIFO_SIZE
#define RF433_FIFO_SIZE 1024
#endif
/**
* @brief 最大数据包长度
*/
#ifndef RF433_MAX_PACKET_SIZE
#define RF433_MAX_PACKET_SIZE 237
#endif
/**
* @brief 默认超时时间ms
*/
#ifndef RF433_DEFAULT_TIMEOUT
#define RF433_DEFAULT_TIMEOUT 100
#endif
/* ============================================================================
* 硬件配置
* ============================================================================ */
/**
* @brief 是否使用AUX引脚检测忙状态
* @note 1: 使用AUX引脚推荐
* 0: 使用延时(不推荐)
*/
#ifndef RF433_USE_GPIO_AUX
#define RF433_USE_GPIO_AUX 1
#endif
/**
* @brief AUX引脚忙等待超时时间ms
*/
#ifndef RF433_AUX_TIMEOUT
#define RF433_AUX_TIMEOUT 100
#endif
/* ============================================================================
* 调试配置
* ============================================================================ */
/**
* @brief 是否启用调试输出
*/
#ifndef RF433_DEBUG_ENABLE
#define RF433_DEBUG_ENABLE 0
#endif
/**
* @brief 调试输出函数
*/
#if RF433_DEBUG_ENABLE
#ifndef RF433_DEBUG_PRINTF
#define RF433_DEBUG_PRINTF(fmt, ...) printf("[RF433] " fmt "\r\n", ##__VA_ARGS__)
#endif
#else
#define RF433_DEBUG_PRINTF(fmt, ...)
#endif
#ifdef __cplusplus
}
#endif
#endif /* __RF433_CONFIG_H__ */