/* ----------------------- IAP相关(不要修改此处 code) --------------------------- */
#pragma section code	c_value

void IAP_Init()
{
    // Memory address related
	IAP_Dev_define.norBootAddr = NORMAL_BOOT_ADDRESS;
	
	// BOOT PIN select
	IAP_Dev_define.ptrBootPinFC = IAP_BOOT_PIN_FUNCTION_ADR;
	IAP_Dev_define.ptrBootPinPU = IAP_BOOT_PIN_PULL_UP_ADR;
	IAP_Dev_define.ptrBootPinPD = IAP_BOOT_PIN_PULL_DOWN_ADR;
	IAP_Dev_define.ptrBootPinCR = IAP_BOOT_PIN_CONTROL_ADR;
	IAP_Dev_define.ptrBootPinPRD = IAP_BOOT_PIN_INPUT_ADR;
	IAP_Dev_define.valBootPinBit = IAP_BOOT_PIN_SELECT;
	IAP_Dev_define.valBootDefaultHL = IAP_BOOT_GPIO_DEFAULT_HIGH_LOW;
	IAP_Dev_define.valBootEnableHL =IAP_BOOT_GPIO_ENABLE_HIGH_LOW;
	
	// UART select
	IAP_Dev_define.ptrUartPinCR = IAP_UART_CR_ADR;
    IAP_Dev_define.ptrUartPinFC = IAP_UART_FC_ADR;
    IAP_Dev_define.valUartTxPin = IAP_UART_TX_PIN;
	IAP_Dev_define.valUartRxPin = IAP_UART_RX_PIN;
	
	IAP_Dev_define.ptrUartTxBuf = IAP_UART_TDBUF_ADR;
	IAP_Dev_define.ptrUartRxBuf = IAP_UART_RDBUF_ADR;	
	IAP_Dev_define.ptrUartSR    = IAP_UART_SR_ADR;
	IAP_Dev_define.ptrUartDR    = IAP_UART_DR_ADR;
	IAP_Dev_define.ptrUartCR1   = IAP_UART_CR1_ADR;
	IAP_Dev_define.ptrUartCR2   = IAP_UART_CR2_ADR;
	
	IAP_Dev_define.ptrPxPU	    = IAP_PxPU_ADR;
}
#pragma section code
/* ----------------------- IAP相关 End --------------------------- */
