sync(template): 回合 capsule_mb 通用驱动修复

- uart_ring_buffer: PRIMASK 位检查从 ==0 改为 &0x1 修正
- i2c: 新增 i2c_read_raw() 无子地址读函数
- 全局: volatile 统一替换为 __IO (CMSIS 风格)
This commit is contained in:
2026-06-30 11:03:22 +08:00
parent 03810e9cad
commit bfa311b70f
5 changed files with 181 additions and 14 deletions
+10
View File
@@ -129,6 +129,16 @@ i2c_result_t i2c_write(uint8_t slave_addr, uint8_t reg_addr, uint8_t *data, uint
*/
i2c_result_t i2c_read(uint8_t slave_addr, uint8_t reg_addr, uint8_t *data, uint8_t length);
/* Pure read response without sub-address phase (for commands that already sent read request parameters) */
/*!
\brief read data from I2C device without register/sub-address phase
\param[in] slave_addr: slave device address (7-bit)
\param[out] data: pointer to data buffer
\param[in] length: number of bytes to read (1-255)
\retval i2c_result_t: operation result
*/
i2c_result_t i2c_read_raw(uint8_t slave_addr, uint8_t *data, uint8_t length);
#ifdef DEBUG_VERBOSE
/*!
\brief get status string for debugging