Add software interface for reading SD card data

Adds functions to wait for data to be read, and to read data form the sd
card controller.
This commit is contained in:
Byron Lathi
2022-04-11 14:03:42 -05:00
parent 87d1457d94
commit f4e16c0c12
4 changed files with 29 additions and 0 deletions

View File

@@ -87,6 +87,16 @@ int main() {
sd_card_resp(&resp);
cprintf("CMD17: %lx\n", resp);
while(sw_read());
sd_card_wait_for_data();
cprintf("Read data: \n");
for (i = 0; i < 512; i++){
cprintf("%c", sd_card_read_byte());
}
while (1) {
sw = sw_read();