Attention is currently required from: Simon Buhrow, Nico Huber, Edward O'Callaghan, Anastasia Klimchuk, Samir Ibradžić.
Patch set 34:Code-Review +1
6 comments:
File ft2232_spi.c:
Patch Set #34, Line 283: const size_t cmd_len = 3; /* same length for any ft2232 command */
If it is always the same, maybe it can be #define above?
I don't think it's necessary, as the literal value is never used outside of this function. It's implicitly used when filling in the commands: statements that assign a value to `buf[i++]` always appear in groups of three.
Patch Set #34, Line 300: int i = 0, ret = 0;
Shouldn't `i` be `unsigned int` or `size_t`?
size_t i = 0;
int ret = 0;
Patch Set #34, Line 307: 65536
hmmm, max_data_write is 256
Patch Set #34, Line 311: Out of memory!
`Out of memory!` is usually printed when a malloc() or similar function fails. To avoid confusion, I'd use a different message, e.g. `FTDI command does not fit` (suggestions welcome).
nit: no space between unary operators:
buf[i++] = ~0x08 & spi_data->pinlvl; /* assert CS (3rd) bit only */
Patch Set #34, Line 349: /* send_buf */
I'd say this comment is redundant, and would remove it
To view, visit change 40477. To unsubscribe, or for help writing mail filters, visit settings.