Copy bios device functions to kernel

This commit is contained in:
Byron Lathi
2023-09-04 14:31:55 -07:00
parent 791bffb248
commit a770d938de
12 changed files with 1071 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
#include <conio.h>
#include "sd_print.h"
#include "sd_card.h"
void SD_printBuf(uint8_t *buf)
{
uint8_t colCount = 0;
uint16_t i;
for(i = 0; i < SD_BLOCK_LEN; i++)
{
cprintf("%2x", *buf++);
if(colCount == 31)
{
cputs("\r\n");
colCount = 0;
}
else
{
cputc(' ');
colCount++;
}
}
cputs("\r\n");
}