rename defines
This commit is contained in:
parent
f4d5451fec
commit
13aa3536b4
@ -26,7 +26,7 @@ uint8_t mmc_init()
|
|||||||
uint8_t CMD[] = { 0x40, 0x00, 0x00, 0x00, 0x00, 0x95 };
|
uint8_t CMD[] = { 0x40, 0x00, 0x00, 0x00, 0x00, 0x95 };
|
||||||
while (mmc_write_command(CMD) != 1) {
|
while (mmc_write_command(CMD) != 1) {
|
||||||
if (Timeout++ > 20) {
|
if (Timeout++ > 20) {
|
||||||
MMC_Disable();
|
mmc_disable();
|
||||||
return (1); // Abbruch bei Commando1 (Return Code1)
|
return (1); // Abbruch bei Commando1 (Return Code1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -37,7 +37,7 @@ uint8_t mmc_init()
|
|||||||
CMD[5] = 0xFF;
|
CMD[5] = 0xFF;
|
||||||
while (mmc_write_command(CMD) != 0) {
|
while (mmc_write_command(CMD) != 0) {
|
||||||
if (Timeout++ > 800) {
|
if (Timeout++ > 800) {
|
||||||
MMC_Disable();
|
mmc_disable();
|
||||||
return (9); // Abbruch bei Commando2 (Return Code2)
|
return (9); // Abbruch bei Commando2 (Return Code2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,11 +22,9 @@ extern uint8_t mmc_write_command(uint8_t *);
|
|||||||
extern uint8_t mmc_read_csd(uint8_t *);
|
extern uint8_t mmc_read_csd(uint8_t *);
|
||||||
extern uint8_t mmc_read_cid(uint8_t *);
|
extern uint8_t mmc_read_cid(uint8_t *);
|
||||||
|
|
||||||
// set MMC_Chip_Select to high (MMC/SD-Karte Inaktiv)
|
#define mmc_disable() MMC_WRITE|= (1<<MMC_CS);
|
||||||
#define MMC_Disable() MMC_WRITE|= (1<<MMC_CS);
|
|
||||||
|
|
||||||
// set MMC_Chip_Select to low (MMC/SD-Karte Aktiv)
|
#define mmc_enable() MMC_WRITE&=~(1<<MMC_CS);
|
||||||
#define MMC_Enable() MMC_WRITE&=~(1<<MMC_CS);
|
|
||||||
|
|
||||||
#define nop() __asm__ __volatile__ ("nop" ::)
|
#define nop() __asm__ __volatile__ ("nop" ::)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user