Looks quite good. Only blocker is the missing . in the manpage.
The other comments are mostly for my understanding.
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);
Patch set 4:Code-Review +1
5 comments:
.SS
What does `last` refer to? the last known version? the last digit of the version?
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,
I don't know what it is.
Patch Set #4, Line 138: memset(answer, 0, sizeof(answer));
This is not necessary, is it? I only noticed, because you didn't clear
it in stlinkv3_check_version() below.
what is `reqd`?
To view, visit change 34661. To unsubscribe, or for help writing mail filters, visit settings.