typedef enum {READ_PART_ID = 54, READ_BOOT_CODE_VERSION = 55, REINVOKE_ISP = 57, READ_UID = 58} IAP_COMMANDS_T; void do_iap(IAP_COMMANDS_T iap_command) { command[0] = (uint32_t) iap_command; if(iap_command==REINVOKE_ISP) LPC_DMA->CTRL = 0; // Disable DMA controller __disable_irq(); iap_entry(command, result); __enable_irq(); } |