add dir entry debug dump
This commit is contained in:
parent
7046230e31
commit
dc8ed94279
@ -33,8 +33,8 @@ void dir_entry_start(){
|
||||
positon = 0;
|
||||
}
|
||||
|
||||
void dir_entry_dump(dir_ent_t* ent){
|
||||
debug(DEBUG_FAT,"dir_entry_dump: id=%i name=%s size=%i attr=%d\n", ent->id, ent->file_name,
|
||||
void dir_entry_dump(uint32_t addr, dir_ent_t* ent){
|
||||
debug(DEBUG_FAT,"dir_entry_dump: addr=0x%06lx id=%i name=%s size=%li attr=%i\n", addr, ent->id, ent->file_name,
|
||||
ent->file_size, ent->file_attr);
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ void dir_entry_add(uint16_t id, uint8_t* file_name,uint32_t file_size,uint8_t fi
|
||||
ent.file_attr = file_attr;
|
||||
addr = DIR_ENTRY_LOC + (positon << DIR_ENTRY_SIZE_SHIFT );
|
||||
sram_bulk_copy(addr, (uint8_t *) &ent, DIR_ENTRY_SIZE );
|
||||
dir_entry_dump(&ent);
|
||||
dir_entry_dump(addr, &ent);
|
||||
positon++;
|
||||
}
|
||||
|
||||
|
||||
@ -51,7 +51,7 @@
|
||||
extern const char _rom[] PROGMEM;
|
||||
extern FILE uart_stdout;
|
||||
|
||||
uint8_t debug_level = (DEBUG | DEBUG_USB | DEBUG_CRC | DEBUG_FAT);
|
||||
uint8_t debug_level = (DEBUG | DEBUG_USB | DEBUG_CRC | DEBUG_FAT | DEBUG_SRAM );
|
||||
|
||||
uint8_t read_buffer[TRANSFER_BUFFER_SIZE];
|
||||
uint32_t req_addr = 0;
|
||||
|
||||
@ -97,7 +97,7 @@ void system_init(void)
|
||||
void sreg_set(uint32_t addr)
|
||||
{
|
||||
uint8_t i = 24;
|
||||
debug(DEBUG_SRAM,"sreg_set: addr=0x%08lx",addr);
|
||||
debug(DEBUG_SRAM,"sreg_set: addr=0x%08lx\n",addr);
|
||||
while(i--) {
|
||||
if ((addr & ( 1L << i))){
|
||||
debug(DEBUG_SRAM,"1");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user