fix 3, add hardfault pre handler

This commit is contained in:
2017-10-31 17:04:38 +01:00
parent b1a6399e82
commit 2d794f56d8
2 changed files with 6 additions and 3 deletions

View File

@@ -383,8 +383,11 @@ void SDIO_wait_cmd_sent() {
SDIO->ICR |= SDIO_ICR_CMDSENTC;
}
int __attribute__((noinline)) __attribute__((optimize("O0"))) SDIO_get_response(uint8_t expectedCMD, uint8_t typeOfAns, uint32_t *responseBuffer) {
int /*__attribute__((noinline)) __attribute__((optimize("O0")))*/ SDIO_get_response(uint8_t expectedCMD, uint8_t typeOfAns, uint32_t *responseBuffer) {
uint32_t sdio_status;
/* Wait until command isn't active anymore */
while (SDIO->STA & SDIO_STA_CMDACT);
//Wait for error or success
while (1) {
sdio_status = SDIO->STA;