software/bios/cmds/cmd_litesdcard: rename commands to sdcard_xy.

This commit is contained in:
Florent Kermarrec 2020-09-16 22:32:27 +02:00
parent 400bf13400
commit d4018b7ccf
1 changed files with 13 additions and 13 deletions

View File

@ -11,29 +11,29 @@
#include "../helpers.h" #include "../helpers.h"
/** /**
* Command "sdinit" * Command "sdcard_init"
* *
* Initialize SDcard * Initialize SDcard
* *
*/ */
#ifdef CSR_SDCORE_BASE #ifdef CSR_SDCORE_BASE
define_command(sdinit, sdcard_init, "Initialize SDCard", LITESDCARD_CMDS); define_command(sdcard_init, sdcard_init, "Initialize SDCard", LITESDCARD_CMDS);
#endif #endif
/** /**
* Command "sdfreq" * Command "sdcard_freq"
* *
* Set SDcard clock frequency * Set SDcard clock frequency
* *
*/ */
#ifdef CSR_SDCORE_BASE #ifdef CSR_SDCORE_BASE
static void sdfreq(int nb_params, char **params) static void sdcard_freq_handler(int nb_params, char **params)
{ {
unsigned int freq; unsigned int freq;
char *c; char *c;
if (nb_params < 1) { if (nb_params < 1) {
printf("sdfreq <freq>"); printf("sdcard_freq <freq>");
return; return;
} }
@ -46,24 +46,24 @@ static void sdfreq(int nb_params, char **params)
sdcard_set_clk_freq(freq); sdcard_set_clk_freq(freq);
} }
define_command(sdfreq, sdfreq, "Set SDCard clock freq", LITESDCARD_CMDS); define_command(sdcard_freq, sdcard_freq_handler, "Set SDCard clock freq", LITESDCARD_CMDS);
#endif #endif
/** /**
* Command "sdread" * Command "sdcard_read"
* *
* Perform SDcard block read * Perform SDcard block read
* *
*/ */
#ifdef CSR_SDBLOCK2MEM_BASE #ifdef CSR_SDBLOCK2MEM_BASE
static void sdread(int nb_params, char **params) static void sdcard_read_handler(int nb_params, char **params)
{ {
unsigned int block; unsigned int block;
char *c; char *c;
uint8_t buf[512]; uint8_t buf[512];
if (nb_params < 1) { if (nb_params < 1) {
printf("sdread <block>"); printf("sdcard_read <block>");
return; return;
} }
@ -77,7 +77,7 @@ static void sdread(int nb_params, char **params)
dump_bytes((uint32_t *)buf, 512, (unsigned long) buf); dump_bytes((uint32_t *)buf, 512, (unsigned long) buf);
} }
define_command(sdread, sdread, "Read SDCard block", LITESDCARD_CMDS); define_command(sdcard_read, sdcard_read_handler, "Read SDCard block", LITESDCARD_CMDS);
#endif #endif
/** /**
@ -87,7 +87,7 @@ define_command(sdread, sdread, "Read SDCard block", LITESDCARD_CMDS);
* *
*/ */
#ifdef CSR_SDMEM2BLOCK_BASE #ifdef CSR_SDMEM2BLOCK_BASE
static void sdwrite(int nb_params, char **params) static void sdcard_write_handler(int nb_params, char **params)
{ {
int i; int i;
uint8_t buf[512]; uint8_t buf[512];
@ -95,7 +95,7 @@ static void sdwrite(int nb_params, char **params)
char *c; char *c;
if (nb_params < 2) { if (nb_params < 2) {
printf("sdwrite <block> <str>"); printf("sdcard_write <block> <str>");
return; return;
} }
@ -118,5 +118,5 @@ static void sdwrite(int nb_params, char **params)
sdcard_write(block, 1, buf); sdcard_write(block, 1, buf);
} }
define_command(sdwrite, sdwrite, "Write SDCard block", LITESDCARD_CMDS); define_command(sdcard_write, sdcard_write_handler, "Write SDCard block", LITESDCARD_CMDS);
#endif #endif