start adding argument and response module#232
Conversation
2e7bd36 to
1ba799f
Compare
c0d50f5 to
b9d7961
Compare
|
Looks good, but I see these types aren't yet used. Is there a plan to use them? |
|
for now, these can be used for implementing SD drivers in separate crates. Implementing a generic SD driver which use these inside the library could work, but a generic transport trait to send CMDs/ACMDS is required first and I am not fully sure how well that works. |
d322f44 to
9300e6a
Compare
9300e6a to
f1bb923
Compare
1320605 to
d5b63d9
Compare
|
rebased again |
|
Looks ok, but I think we need some kind of example to show how to use them. How hard would it be to build a fake SD Card with an API to send requests and get responses that an example can drive in a similar way to how you would initialise an actual SD Card? |
|
hmm. probably okay? For most responses, it is relatively clear what the SD card needs to send back, or at the very least what is relevant. I can look into this. If we do something like that, we should write to so it can be re-used for tests. |
249f68e to
f086ce3
Compare
f086ce3 to
da26567
Compare
|
I added a |
|
In the SD card example, we could still implement the primary SD driver traits.. this makes it a bit clearer how everything fits together I suppose. |
|
The initialization sequence I implemented is really similar to the ones I implemented for the SAM9G20 SD controller and the Z7 SD controller. the only thing i strongly simplified is that I do not handle the case of pre V2 SD cards where there is not CMD8 reply. for that, I would have to add some sort of way to simulate CMD timeouts. |
Co-authored-by: Jonathan 'theJPster' Pallant <github@thejpster.org.uk>
|
I am onto adding support for alternative mockinng modes (SD1, SD2, SDHC) :) |
|
Looks comprehensive, thanks! |
03f08e5
Nice types for SD mode arguments and responses using
bitbybit