print information about the SD card, if existent.
This commit is contained in:
parent
6486460e3f
commit
bd8809d35d
|
@ -112,10 +112,17 @@ main(void)
|
||||||
leds_off(LEDS_ALL);
|
leds_off(LEDS_ALL);
|
||||||
|
|
||||||
#ifdef WITH_SDC
|
#ifdef WITH_SDC
|
||||||
spi_init();
|
{
|
||||||
sd_init();
|
int r;
|
||||||
if (sd_init_card(&sd_cache) == SD_INIT_SUCCESS) {
|
sdspi_init();
|
||||||
printf("SD card initialized\n");
|
sd_init();
|
||||||
|
r = sd_init_card(&sd_cache);
|
||||||
|
if (r == SD_INIT_SUCCESS) {
|
||||||
|
printf("Found SD card (%lu bytes)\n", sd_get_size());
|
||||||
|
uart_set_mode(UART_MODE_SPI);
|
||||||
|
} else {
|
||||||
|
printf("SD card initialization failed: %d\n", r);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue