diff --git a/include/sd_card.h b/include/sd_card.h index 9357c1f..4af05d2 100644 --- a/include/sd_card.h +++ b/include/sd_card.h @@ -12,18 +12,6 @@ #include -/* - * "standard value" for DSPI module configuration register MCF_DSPC_DMCR - */ -const uint32_t DSPI_DMCR_CONF = MCF_DSPI_DMCR_MSTR | /* FireBee is DSPI master*/ /* 8 bit CS5 on */ - MCF_DSPI_DMCR_CSIS3 | /* CS3 inactive */ - MCF_DSPI_DMCR_CSIS2 | /* CS2 inactive */ - MCF_DSPI_DMCR_DTXF | /* disable transmit FIFO */ - MCF_DSPI_DMCR_DRXF | /* disable receive FIFO */ - MCF_DSPI_DMCR_CTXF | /* clear transmit FIFO */ - MCF_DSPI_DMCR_CRXF; /* clear receive FIFO */ - /* 0x800d3c00 */ - extern int sd_card_init(void); extern uint32_t sd_com(uint32_t data); extern void sd_card_idle(void); diff --git a/sources/BaS.c b/sources/BaS.c index e3b14ea..706d7c3 100644 --- a/sources/BaS.c +++ b/sources/BaS.c @@ -10,17 +10,16 @@ #include "cache.h" #include "bas_printf.h" #include "bas_types.h" +#include "sd_card.h" /* imported routines */ extern int mmu_init(); extern int vec_init(); extern int illegal_table_make(); -extern void sd_card_idle(); -extern int sd_card_init(); /* wait...() routines moved to sysinit.c */ extern inline void wait(volatile uint32_t us); -extern inline volatile bool waitfor(volatile uint32_t us,int (*condition)(void)); +extern inline volatile bool waitfor(volatile uint32_t us, int (*condition)(void)); /* Symbols from the linker script */ extern uint8_t _STRAM_END[]; diff --git a/sources/sd_card.c b/sources/sd_card.c index d13e635..bdcde22 100644 --- a/sources/sd_card.c +++ b/sources/sd_card.c @@ -7,6 +7,19 @@ #include "bas_printf.h" #include "sd_card.h" + +/* + * "standard value" for DSPI module configuration register MCF_DSPC_DMCR + */ +const uint32_t DSPI_DMCR_CONF = MCF_DSPI_DMCR_MSTR | /* FireBee is DSPI master*/ /* 8 bit CS5 on */ + MCF_DSPI_DMCR_CSIS3 | /* CS3 inactive */ + MCF_DSPI_DMCR_CSIS2 | /* CS2 inactive */ + MCF_DSPI_DMCR_DTXF | /* disable transmit FIFO */ + MCF_DSPI_DMCR_DRXF | /* disable receive FIFO */ + MCF_DSPI_DMCR_CTXF | /* clear transmit FIFO */ + MCF_DSPI_DMCR_CRXF; /* clear receive FIFO */ + /* 0x800d3c00 */ + extern void wait(volatile uint32_t value); #ifdef _NOT_USED_ /* disabled assembler routines */