bdk: i2c: optimize packet mode functions

- Allow xfer packet to send up to 20 bytes before receiving
- Remove interrupt use since it's only polling
- Check proper status for TX finish.
This commit is contained in:
CTCaer authored and NaGa committed 2026-03-27 20:08:45 +01:00
1 parent 8f6dce1368
commit 476c070cf4
2 files changed
+59 -67

No files matched your search

+1 -1
View File
@@ -28,7 +28,7 @@
#define I2C_6 5
void i2c_init(u32 i2c_idx);
int i2c_xfer_packet(u32 i2c_idx, u8 *buf, u32 size, u32 dev_addr, u32 reg);
int i2c_xfer_packet(u32 i2c_idx, u32 dev_addr, const u8 *tx_buf, u32 tx_size, u8 *rx_buf, u32 rx_size);
int i2c_send_buf_big(u32 i2c_idx, u32 dev_addr, const u8 *buf, u32 size);
int i2c_recv_buf_big(u8 *buf, u32 size, u32 i2c_idx, u32 dev_addr, u32 reg);
int i2c_send_buf_small(u32 i2c_idx, u32 dev_addr, u32 reg, const u8 *buf, u32 size);