Conversation
usage: i3c options... options: -b --bus <bus> bus to use. -m --manufid <manufid> manufacturer ID (upper 16 bits of PID). -p --partid <partid> part ID (lower 32 bits of PID). -r --read <data length> read data. -w --write <data block> Write data block. -g --get <data block> get a dev info. -h --help Output usage message and exit.)) Signed-off-by: dongjiuzhu1 <[email protected]>
| FAR uint8_t *tmp; | ||
| uint32_t i; | ||
|
|
||
| tmp = calloc(xfer->len, sizeof(uint8_t)); |
Contributor
There was a problem hiding this comment.
remove the allocation
| uint8_t rnw; /* encodes the transfer direction. true for a read, false for a write */ | ||
| uint16_t len; /* Length of data buffer buffers, in bytes */ | ||
| FAR uint8_t *data; /* Holds pointer to userspace buffer with transmit data */ | ||
| uint8_t pad[5]; |
| ****************************************************************************/ | ||
|
|
||
| static int rx_args_to_xfer(int length, int rnw, FAR uint8_t **data, | ||
| FAR char *arg) |
| } | ||
|
|
||
| rnw = 1; | ||
| length = len; |
| tmp[len] = (uint8_t)strtol(data_ptrs[len], NULL, 0); | ||
| } | ||
|
|
||
| length = len; |
| case 'b': | ||
| break; | ||
| case 'r': | ||
| if (rx_args_to_xfer(xfers->len, xfers->rnw, &xfers->data, |
Contributor
There was a problem hiding this comment.
need increase xfers
|
|
||
| break; | ||
| case 'w': | ||
| if (w_args_to_xfer(xfers->len, &xfers->data, optarg)) |
| * Private Type | ||
| ****************************************************************************/ | ||
|
|
||
| struct i3c_ioc_priv_xfer |
Contributor
There was a problem hiding this comment.
let's use i3c_priv_xfer directly
| } | ||
|
|
||
| transfers.nxfers = nxfers; | ||
| transfers.xfers = (FAR struct i3c_priv_xfer *)xfers; |
acassis
requested changes
Jan 12, 2026
Contributor
acassis
left a comment
There was a problem hiding this comment.
@Donny9 please add an I3C Tool Documentation, similar to this we have to I2C: https://nuttx.apache.org/docs/latest/applications/system/i2c/index.html
acassis
reviewed
Jan 12, 2026
| @@ -0,0 +1,89 @@ | |||
| # System / `i3c` I3C Tool | |||
Contributor
There was a problem hiding this comment.
@Donny9 README.md was deprecated in favor to reStructuredText used in nuttx/Documentation. Please move it to there
Contributor
GUIDINGLI
approved these changes
Jan 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note: Please adhere to Contributing Guidelines.
Summary
add i3c tools
usage: i3c options...
options:
-b --bus bus to use.
-m --manufid manufacturer ID (upper 16 bits of PID).
-p --partid part ID (lower 32 bits of PID).
-r --read read data.
-w --write Write data block.
-g --get get a dev info.
-h --help Output usage message and exit.
Impact
debug toos for i3c
Testing
local compile test and run i3c tools