print information about the SD card, if existent.

This commit is contained in:
nvt-se 2008-03-28 16:02:01 +00:00
parent 6486460e3f
commit bd8809d35d

View file

@ -112,10 +112,17 @@ main(void)
leds_off(LEDS_ALL); leds_off(LEDS_ALL);
#ifdef WITH_SDC #ifdef WITH_SDC
spi_init(); {
int r;
sdspi_init();
sd_init(); sd_init();
if (sd_init_card(&sd_cache) == SD_INIT_SUCCESS) { r = sd_init_card(&sd_cache);
printf("SD card initialized\n"); 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