/*
 * boot_api.h
 *
 *  Created on: 2019Äê10ÔÂ26ÈÕ
 *      Author: wjandcf
 */

#ifndef BOOT_API_H_
#define BOOT_API_H_

#include <type_define.h>
#include <lpuart1.h>

extern uint32_t boot_api[];

extern uint16_t ymodem_crc16(uint8_t * buf, uint16_t size);
extern uint32_t sum_add(uint32_t a, uint32_t b);

#if defined (INST_LPUART1)
extern uint8_t UART1_Rx_Buf;
extern uint8_t UART1_User_Rx_Buf[];
extern uint16_t UART1_User_Rx_In;
extern uint16_t UART1_User_Rx_Out;
extern lpuart_buff_t UART1_Callback_Data;

extern void LPUART_DRV_Callback_Init(uint32_t instance, lpuart_buff_t *userData);

#endif

#endif /* BOOT_API_H_ */
