feat(spi): 实现L5单缓冲信用机制并添加事件队列别名

- 在AppSpiCommand中实现g_localCredit信用管理机制
- updateDataReady()函数现在同步g_localCredit状态(有数据时为0,无数据时为1)
- requestEsp32Read()在装载数据前将credit设置为1,装载后通过updateDataReady置0
- 为DATA_READY信号更新注释说明信用机制工作原理
- 添加enqueueEvent()作为requestEsp32Read()的L4别名函数
- 更新相关代码注释以反映新的信用机制实现
This commit is contained in:
cbb
2026-07-14 12:10:01 +08:00
parent 7c05496b89
commit 8bc01dd654
2 changed files with 10 additions and 2 deletions
@@ -118,6 +118,11 @@ public:
*/
bool requestEsp32Read(uint8_t frame_type, const uint8_t *payload, uint16_t payload_len);
/** @brief L4 别名:主动事件入队(当前等同 requestEsp32Read)。 */
bool enqueueEvent(uint8_t frame_type, const uint8_t *payload, uint16_t payload_len) {
return requestEsp32Read(frame_type, payload, payload_len);
}
/** @brief 查询当前是否有未读按铃(ESP32 尚未来读)。 */
bool isRingPending() const { return m_ringPending; }