Refactor and clean up codebase

- Removed unused constants and type aliases in app_spi_command_defs.h and temp_sensor.h.
- Simplified ISpiCommandHandler destructor to default.
- Eliminated redundant methods and comments in temp_sensor and usart0 files.
- Consolidated writeU32Le function to app_spi_command_defs.h for reuse.
- Updated comments for clarity and accuracy in task_manager.h and task_runner.cpp.
- Removed hardfault.h as it contained no declarations.
- Cleaned up CANFD and watchdog implementations by removing dead code and unnecessary comments.
- Updated version numbers in config.h to reflect recent changes.
- Enhanced error handling and diagnostics in hardfault handling.
This commit is contained in:
cbb
2026-07-15 02:49:37 +08:00
parent a52d94687b
commit 76da7a3dd6
37 changed files with 1401 additions and 1955 deletions
-13
View File
@@ -11,7 +11,6 @@
uint8_t Usart0::s_txBuf[Usart0::kTxBufSize];
volatile uint16_t Usart0::s_txHead = 0U;
volatile uint16_t Usart0::s_txTail = 0U;
volatile uint32_t Usart0::s_dropCount = 0U;
/**
* @brief 计算发送环形缓冲区中的下一个索引。
@@ -24,17 +23,6 @@ uint16_t Usart0::nextIndex(uint16_t idx)
return (idx + 1U) % kTxBufSize;
}
/**
* @brief 判断 USART0 发送缓冲区是否已满。
* @param[in] 无。
* @param[out] 无。
* @retval bool true 表示发送缓冲区已满,false 表示仍有可写空间。
*/
bool Usart0::isBufferFull()
{
return nextIndex(s_txHead) == s_txTail;
}
/**
* @brief 判断 USART0 发送缓冲区是否为空。
* @param[in] 无。
@@ -59,7 +47,6 @@ bool Usart0::putCharNonBlocking(int ch)
const uint16_t next = nextIndex(s_txHead);
if(next == s_txTail) {
RT_CRITICAL_RESTORE(save);
s_dropCount++;
return false;
}