projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reformar get name funtion. Add test.
[bertos.git]
/
bertos
/
cpu
/
cortex-m3
/
drv
/
hsmci_sam3.c
diff --git
a/bertos/cpu/cortex-m3/drv/hsmci_sam3.c
b/bertos/cpu/cortex-m3/drv/hsmci_sam3.c
index a4960fb51fb5a1fce6d88adcaad3071839f60ec9..b0c0ad0af522693a3afc08a548ee997352e4298d 100644
(file)
--- a/
bertos/cpu/cortex-m3/drv/hsmci_sam3.c
+++ b/
bertos/cpu/cortex-m3/drv/hsmci_sam3.c
@@
-88,16
+88,16
@@
bool hsmci_sendCmd(uint8_t index, uint32_t argument, uint32_t reply_type)
HSMCI_ARGR = argument;
HSMCI_CMDR = index | reply_type | BV(HSMCI_CMDR_MAXLAT);
HSMCI_ARGR = argument;
HSMCI_CMDR = index | reply_type | BV(HSMCI_CMDR_MAXLAT);
- uint32_t status = HSMCI_SR;
- while (!(status & BV(HSMCI_SR_CMDRDY)))
- {
+ uint32_t status;
+ do {
+ status = HSMCI_SR;
+
if (status & HSMCI_RESP_ERROR_MASK)
return status;
cpu_relax();
if (status & HSMCI_RESP_ERROR_MASK)
return status;
cpu_relax();
- status = HSMCI_SR;
- }
+ } while (!(status & BV(HSMCI_SR_CMDRDY)));
return 0;
}
return 0;
}