Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test command write #29

Open
EgartSites opened this issue Oct 17, 2022 · 0 comments
Open

Test command write #29

EgartSites opened this issue Oct 17, 2022 · 0 comments

Comments

@EgartSites
Copy link

case SMB_TEST_COMMAND_WRITE:
while (EP0CS&bmEPBUSY); // wait until ready
*EP0BUF = 0;
if (!i2c_start()) return FALSE;
if (!i2c_byteout(smb_addr)) goto tcwOver;
if (i2c_byteout(smb_cmd)) { (*EP0BUF)++; // Command ACK = command exists
} else {goto tcwOver;}
if (i2c_byteout(3)) { (*EP0BUF)++; // Data Byte #1 ACK = byte writable
} else {goto tcwOver;}
if (i2c_byteout(0)) { (*EP0BUF)++; // Data Byte #2 ACK = word writable
} else {goto tcwOver;}
if (!i2c_byteout(0)) {goto tcwOver;}
if (i2c_byteout(0)) { (*EP0BUF)++; // Data Byte #4 ACK = block writable
} else {goto tcwOver;}
if (i2c_byteout(0)) { (*EP0BUF)++; // Data Byte #5 ACK = >block writable
} else {goto tcwOver;}

Please, make me understand why first out byte is 0x03 ? I think, it should be 0x00 like others byte.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant