On 7/11/21 10:48 PM, Christoph Hellwig wrote:
+ char cdb[MAX_COMMAND_SIZE] = { };
How about using 'u8' instead of 'char'?
Additionally, MAX_COMMAND_SIZE equals 16. According to SBC-4 6 bytes is
enough for the START STOP UNIT command.
+ cdb[0] = START_STOP;
+ cdb[4] = data;
Please combine the above two statements with the cdb[] declaration into
a single line.
Additionally, please split data into two arguments to make calls of this
function easier to read. This is what I found in SBC-4:
* bit 1 of byte 4 has the name LOEJ (load eject).
* bit 0 of byte 4 has the name START (start unit).
Thanks,
Bart.