}
/* commands */
-#if CONFIG_CSR_DATA_WIDTH == 8
-#define CSR8_CMD_FIX sdcore_issue_cmd_write(1)
-#else
-#define CSR8_CMD_FIX
-#endif
void sdcard_go_idle(void) {
#ifdef SDCARD_DEBUG
#endif
sdcore_argument_write(0x00000000);
sdcore_command_write((0 << 8) | SDCARD_CTRL_RESPONSE_NONE);
- CSR8_CMD_FIX;
+ sdcore_send_write(1);
}
int sdcard_send_ext_csd(void) {
#endif
sdcore_argument_write(arg);
sdcore_command_write((8 << 8) | SDCARD_CTRL_RESPONSE_SHORT);
- CSR8_CMD_FIX;
+ sdcore_send_write(1);
return sdcard_wait_response();
}
#endif
sdcore_argument_write(rca << 16);
sdcore_command_write((55 << 8) | SDCARD_CTRL_RESPONSE_SHORT);
- CSR8_CMD_FIX;
+ sdcore_send_write(1);
return sdcard_wait_response();
}
#endif
sdcore_argument_write(arg);
sdcore_command_write((41 << 8) | SDCARD_CTRL_RESPONSE_SHORT);
- CSR8_CMD_FIX;
+ sdcore_send_write(1);
return sdcard_wait_response();
}
#endif
sdcore_argument_write(0x00000000);
sdcore_command_write((2 << 8) | SDCARD_CTRL_RESPONSE_LONG);
- CSR8_CMD_FIX;
+ sdcore_send_write(1);
return sdcard_wait_response();
}
#endif
sdcore_argument_write(0x00000000);
sdcore_command_write((3 << 8) | SDCARD_CTRL_RESPONSE_SHORT);
- CSR8_CMD_FIX;
+ sdcore_send_write(1);
return sdcard_wait_response();
}
#endif
sdcore_argument_write(rca << 16);
sdcore_command_write((10 << 8) | SDCARD_CTRL_RESPONSE_LONG);
- CSR8_CMD_FIX;
+ sdcore_send_write(1);
return sdcard_wait_response();
}
#endif
sdcore_argument_write(rca << 16);
sdcore_command_write((9 << 8) | SDCARD_CTRL_RESPONSE_LONG);
- CSR8_CMD_FIX;
+ sdcore_send_write(1);
return sdcard_wait_response();
}
#endif
sdcore_argument_write(rca << 16);
sdcore_command_write((7 << 8) | SDCARD_CTRL_RESPONSE_SHORT);
- CSR8_CMD_FIX;
+ sdcore_send_write(1);
return sdcard_wait_response();
}
#endif
sdcore_argument_write(0x00000002);
sdcore_command_write((6 << 8) | SDCARD_CTRL_RESPONSE_SHORT);
- CSR8_CMD_FIX;
+ sdcore_send_write(1);
return sdcard_wait_response();
}
sdcore_blockcount_write(1);
sdcore_command_write((6 << 8) | SDCARD_CTRL_RESPONSE_SHORT |
(SDCARD_CTRL_DATA_TRANSFER_READ << 5));
- CSR8_CMD_FIX;
+ sdcore_send_write(1);
sdcard_wait_response();
return sdcard_wait_data_done();
}
sdcore_blockcount_write(1);
sdcore_command_write((51 << 8) | SDCARD_CTRL_RESPONSE_SHORT |
(SDCARD_CTRL_DATA_TRANSFER_READ << 5));
- CSR8_CMD_FIX;
+ sdcore_send_write(1);
sdcard_wait_response();
return sdcard_wait_data_done();
}
#endif
sdcore_argument_write(blocklen);
sdcore_command_write((16 << 8) | SDCARD_CTRL_RESPONSE_SHORT);
- CSR8_CMD_FIX;
+ sdcore_send_write(1);
return sdcard_wait_response();
}
sdcore_blockcount_write(1);
sdcore_command_write((24 << 8) | SDCARD_CTRL_RESPONSE_SHORT |
(SDCARD_CTRL_DATA_TRANSFER_WRITE << 5));
- CSR8_CMD_FIX;
+ sdcore_send_write(1);
cmd_response = sdcard_wait_response();
}
return cmd_response;
sdcore_blockcount_write(blockcnt);
sdcore_command_write((25 << 8) | SDCARD_CTRL_RESPONSE_SHORT |
(SDCARD_CTRL_DATA_TRANSFER_WRITE << 5));
- CSR8_CMD_FIX;
+ sdcore_send_write(1);
cmd_response = sdcard_wait_response();
}
return cmd_response;
sdcore_blockcount_write(1);
sdcore_command_write((17 << 8) | SDCARD_CTRL_RESPONSE_SHORT |
(SDCARD_CTRL_DATA_TRANSFER_READ << 5));
- CSR8_CMD_FIX;
+ sdcore_send_write(1);
cmd_response = sdcard_wait_response();
}
return sdcard_wait_data_done();
sdcore_blockcount_write(blockcnt);
sdcore_command_write((18 << 8) | SDCARD_CTRL_RESPONSE_SHORT |
(SDCARD_CTRL_DATA_TRANSFER_READ << 5));
- CSR8_CMD_FIX;
+ sdcore_send_write(1);
cmd_response = sdcard_wait_response();
}
return cmd_response;
#endif
sdcore_argument_write(0x0000000);
sdcore_command_write((12 << 8) | SDCARD_CTRL_RESPONSE_SHORT);
- CSR8_CMD_FIX;
+ sdcore_send_write(1);
return sdcard_wait_response();
}
#endif
sdcore_argument_write(rca << 16);
sdcore_command_write((13 << 8) | SDCARD_CTRL_RESPONSE_SHORT);
- CSR8_CMD_FIX;
+ sdcore_send_write(1);
return sdcard_wait_response();
}
#endif
sdcore_argument_write(blockcnt);
sdcore_command_write((23 << 8) | SDCARD_CTRL_RESPONSE_SHORT);
- CSR8_CMD_FIX;
+ sdcore_send_write(1);
return sdcard_wait_response();
}