Copy bios device functions to kernel
This commit is contained in:
26
sw/kernel/devices/sd_print.c
Normal file
26
sw/kernel/devices/sd_print.c
Normal 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");
|
||||
}
|
||||
Reference in New Issue
Block a user