|
@@ -190,25 +190,13 @@ static int sdcard_send_acmd(uint8_t opcode, uint32_t argument)
|
|
*
|
|
*
|
|
* The input buffer is allowed to be unaligned.
|
|
* The input buffer is allowed to be unaligned.
|
|
*/
|
|
*/
|
|
-union xptr {
|
|
|
|
- uint32_t *l;
|
|
|
|
- uint16_t *w;
|
|
|
|
- uint8_t *b;
|
|
|
|
- size_t a;
|
|
|
|
-};
|
|
|
|
-union xcptr {
|
|
|
|
- const uint32_t *l;
|
|
|
|
- const uint16_t *w;
|
|
|
|
- const uint8_t *b;
|
|
|
|
- size_t a;
|
|
|
|
-};
|
|
|
|
|
|
|
|
static int sdcard_read_block(void *buf, int len, int timeout,
|
|
static int sdcard_read_block(void *buf, int len, int timeout,
|
|
uint8_t xcmd, uint32_t xarg)
|
|
uint8_t xcmd, uint32_t xarg)
|
|
{
|
|
{
|
|
uint8_t tok;
|
|
uint8_t tok;
|
|
uint16_t zcrc;
|
|
uint16_t zcrc;
|
|
- union xptr p;
|
|
|
|
|
|
+ xptr_t p;
|
|
int i;
|
|
int i;
|
|
int badtimeout = 8;
|
|
int badtimeout = 8;
|
|
|
|
|
|
@@ -451,7 +439,7 @@ int sdcard_write_sectors(const void *buf, uint32_t lba, int count)
|
|
int okcount = 0;
|
|
int okcount = 0;
|
|
uint16_t crc;
|
|
uint16_t crc;
|
|
uint8_t resp;
|
|
uint8_t resp;
|
|
- union xcptr p;
|
|
|
|
|
|
+ xcptr_t p;
|
|
|
|
|
|
if (!count)
|
|
if (!count)
|
|
return 0;
|
|
return 0;
|