Skip to content
Snippets Groups Projects
Unverified Commit 6358e75f authored by Marian Buschsieweke's avatar Marian Buschsieweke
Browse files

cpu/lpc2387: Fixed bug and readability in IAP

- Previous cast was to a function pointer was not legal
- Using already present function pointer to store the IAP entry point to improve
  readability. (Which also fixes the cast issue.)
parent 18ae7652
No related branches found
No related tags found
No related merge requests found
......@@ -38,7 +38,7 @@ static unsigned int iap_command[5];
static unsigned int iap_result[2];
/* typedefinition for IAP entry function */
typedef void (*IAP)(unsigned int[], unsigned int[]);
IAP IAP_Entry;
static const IAP IAP_Entry = (IAP)0x7ffffff1;
/* some function prototypes */
static uint32_t blank_check_sector(uint32_t tmp_sect1, uint32_t tmp_sect2);
......@@ -157,7 +157,7 @@ static uint32_t iap(uint32_t code, uint32_t p1, uint32_t p2, uint32_t p3, uint32
iap_command[3] = p3; /* set 3rd param */
iap_command[4] = p4; /* set 4th param */
((void (*)())0x7ffffff1)(iap_command, iap_result); /* IAP entry point */
IAP_Entry(iap_command, iap_result); /* IAP entry point */
return *iap_result;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment