chore: sync from actuator_ctrl as new template baseline

- Add SEGGER_RTT support
- Revert .vscode/ to gitignore (project-specific IDE config)
- Updated CMakeLists.txt, board_config.h, main.c from actuator_ctrl
This commit is contained in:
Nova
2026-07-27 22:12:38 +08:00
parent 58c0cf7460
commit 1f35ffd288
14 changed files with 3573 additions and 185 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);