> AFAICS, the code in stlinkv3_spi.c could be much condensed by a
> simple function that handles the command/answer pattern, e.g.
>
> int stlinkv3_command(const uint8_t *command, size_t command_length,
> uint8_t *answer, size_t answer_length);
Many thanks for the review! I have fixed your review comments, but have not tested with actual hardware yet. I will try to test it tomorrow and let you know the results.
5 comments:
.SS
Done
What does `last` refer to? the last known version? the last digit of the version?
ST versions the STLink's firmware parts separately (JTAG/Bridge/SWIM/Serial). This constant is used for checking the bridge firmware version to make sure that it is compatible with the current host implementation. I have renamed this constant to FIRST_COMPATIBLE_BRIDGE_FW_VERSION which is more descriptive I think.
Patch Set #4, Line 114: #define USB_TIMEOUT 5000
Can you give the unit in the name? e.g. USB_TIMEOUT_MS, if it's ms, […]
Sure, it is in milliseconds.
Patch Set #4, Line 138: memset(answer, 0, sizeof(answer));
This is not necessary, is it? I only noticed, because you didn't clear […]
Done
what is `reqd`?
requested sorry.
To view, visit change 34661. To unsubscribe, or for help writing mail filters, visit settings.