This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new c1eee1cc29 Changed the i3c_priv_xfer's member to flags from rnw
c1eee1cc29 is described below
commit c1eee1cc2925266461591e9148f1ec8156164c8f
Author: yangshuyong <[email protected]>
AuthorDate: Mon Nov 27 17:28:58 2023 +0800
Changed the i3c_priv_xfer's member to flags from rnw
Signed-off-by: yangshuyong <[email protected]>
Signed-off-by: lipengfei28 <[email protected]>
---
include/nuttx/i3c/device.h | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/include/nuttx/i3c/device.h b/include/nuttx/i3c/device.h
index 1a57ace9bd..3b2b4e9215 100644
--- a/include/nuttx/i3c/device.h
+++ b/include/nuttx/i3c/device.h
@@ -59,6 +59,15 @@
#define I3C_MATCH_PART 0x4
#define I3C_MATCH_EXTRA_INFO 0x8
+/* Bit definitions for the flags field in struct i3c_priv_xfer
+ *
+ * I3C_MASTER_READ macro indicates a read data from slave to master
+ * I3C_MASTER_WRITE macro indicates a write data from slave to master
+ */
+
+#define I3C_MASTER_READ 0x01
+#define I3C_MASTER_WRITE 0x00
+
/* These macros should be used to i3c_device_id entries. */
#define I3C_MATCH_MANUF_AND_PART (I3C_MATCH_MANUF | I3C_MATCH_PART)
@@ -142,7 +151,8 @@ enum i3c_hdr_mode
};
/* struct i3c_priv_xfer - I3C SDR private transfer
- * @rnw: encodes the transfer direction. true for a read, false for a write
+ * @flags: encodes the transfer direction. bit 0 indicates read or write,
+ * set 1 for read, set 0 for write
* @len: transfer length in bytes of the transfer
* @data: input/output buffer
* @data.in: input buffer. Must point to a DMA-able buffer
@@ -152,7 +162,7 @@ enum i3c_hdr_mode
struct i3c_priv_xfer
{
- unsigned char rnw;
+ uint16_t flags;
uint16_t len;
union
{