#include "lib/stdint.h"
#include "core/system.h"
-#include "core/iap.h"
#include "core/lpc_core.h"
+#include "core/iap.h"
#include "core/rom_uart.h"
/*******************************************************************************/
IAP_CMD_ERASE_PAGE = 59,
};
-typedef void (*iap_entry_func)(uint32_t*, uint32_t*);
-iap_entry_func iap_entry;
+void (*iap_entry)(uint32_t*, uint32_t*);
static uint32_t params[5];
static uint32_t results[4];
void rom_helpers_init(void)
{
+ /* Common ROM helpers */
rom_div_helpers = (struct lpc_rom_div_helpers*)(ROM_DRIVERS->rom_div);
uart_helpers = (struct lpc_rom_uart_helpers*)(ROM_DRIVERS->rom_usart_driver);
- iap_entry = (iap_entry_func)LPC_82x_IAP_ROM_LOC;
+ /* IAP is a little bit different */
+ iap_entry = (void (*)(uint32_t*, uint32_t*))LPC_82x_IAP_ROM_LOC;
}