添加RTT支持并清理一些无效内容

This commit is contained in:
2026-07-27 21:08:28 +08:00
parent 83d61b12b3
commit 0cf931c0e9
9 changed files with 3572 additions and 31 deletions
+19 -31
View File
@@ -29,6 +29,22 @@
// #define DEBUG_VERBOSE // Debug Assertions Status : Debug Verbose Information
#undef DEBUG_VERBOSE // Debug Assertions Status : No Debug Verbose Information
/* >>>>>>>>>>>>>>>>>>>>[SEGGER RTT DETECTION]<<<<<<<<<<<<<<<<<<<< */
#define SEGGER_RTT_DETECTION // SEGGER RTT Detection : Enable
// #undef SEGGER_RTT_DETECTION // SEGGER RTT Detection : Disable
#ifdef SEGGER_RTT_DETECTION
#include "SEGGER_RTT.h"
#define RTT_printf(ch, ...) SEGGER_RTT_printf(ch, __VA_ARGS__)
#define RTT_WriteString(ch, s) SEGGER_RTT_WriteString(ch, s)
#define RTT_PutChar(ch, c) SEGGER_RTT_PutChar(ch, c)
#else
#define RTT_printf(ch, ...)
#define RTT_WriteString(ch, s)
#define RTT_PutChar(ch, c)
#endif
/******************************************************************************/
/* Dynamic USART Configuration Structure */
@@ -58,9 +74,9 @@ void usart1_irq_handler(void);
/******************************************************************************/
#define LED_RCU RCU_GPIOA
#define LED_PORT GPIOA
#define LED_PIN GPIO_PIN_7
#define LED_RCU RCU_GPIOB
#define LED_PORT GPIOB
#define LED_PIN GPIO_PIN_1
/******************************************************************************/
@@ -75,34 +91,6 @@ void usart1_irq_handler(void);
/******************************************************************************/
#define FAN_T_GPIO_PORT_RCU RCU_GPIOA
#define FAN_T_GPIO_PORT GPIOA
#define FAN_T_PWR_EN GPIO_PIN_5
#define FAN_T_PWM GPIO_PIN_6
#define FAN_T_DETECT GPIO_PIN_4
#define FAN_A_GPIO_PORT_RCU RCU_GPIOA
#define FAN_A_PWR_PORT_RCU RCU_GPIOB
#define FAN_A_GPIO_PORT GPIOA
#define FAN_A_PWR_PORT GPIOB
#define FAN_A_PWR_EN GPIO_PIN_1
#define FAN_A_PWM GPIO_PIN_9
#define FAN_A_DETECT GPIO_PIN_10
/******************************************************************************/
// UV-LED NTC Temperature Sensor Definitions AD_CHANNEL_0
#define LAMP_TEMP_GPIO_PORT_RCU RCU_GPIOA
#define LAMP_TEMP_GPIO_PORT GPIOA
#define LAMP_TEMP_AD_PIN GPIO_PIN_0
// DMD NTC Temperature Sensor Definitions AD_CHANNEL_1
#define DMD_TEMP_GPIO_PORT_RCU RCU_GPIOA
#define DMD_TEMP_GPIO_PORT GPIOA
#define DMD_TEMP_AD_PIN GPIO_PIN_1
/******************************************************************************/
#define DEBUG_UART USART0
void mcu_detect_and_config(void);