/*
 * Copyright (c) 2022, Shenzhen CVA Innovation CO.,LTD
 * All rights reserved.
 *
 * Shenzhen CVA Innovation CO.,LTD (CVA chip) is supplying this file for use
 * exclusively with CVA's microcontroller products. This file can be freely
 * distributed within development tools that are supporting such microcontroller
 * products.
 *
 * THIS SOFTWARE IS PROVIDED "AS IS".  NO WARRANTIES, WHETHER EXPRESS, IMPLIED
 * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
 * CVA SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL,
 * OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
 */

#ifndef _FEE_INTERNAL_H_
#define _FEE_INTERNAL_H_

/*******************************************************************************
 * the includes
 ******************************************************************************/

#include <stdint.h>
#include <stdbool.h>
#include "fee_extra.h"

#ifdef __cplusplus
extern "C" {
#endif

/*******************************************************************************
 * the defines
 ******************************************************************************/

/*******************************************************************************
 * the typedefs
 ******************************************************************************/


/*******************************************************************************
 * the globals
 ******************************************************************************/

/*******************************************************************************
 * the function prototypes
 ******************************************************************************/

extern Fls_StateType Fee_InternalIsWriteable(Fee_AddressType sAddr, uint32_t size);
extern Fls_StateType Fee_InternalWriteCheck(Fee_AddressType sAddr, uint8_t *buff, uint32_t size);
extern Fls_StateType Fee_InternalReadCheckData(Fee_AddressType sAddr, uint8_t *buff, uint32_t size);
extern Fls_StateType Fee_InternalEarseCheckPhrase(Fee_AddressType earseAddr);
extern uint16_t Fee_InternalCalcCrc16(void *sAddr, uint32_t size);
extern uint8_t Fee_InternalCalcCrc8(void *sAddr, uint32_t size);

#ifdef __cplusplus
}
#endif /* extern "C" */

#endif /* _FEE_INTERNAL_H_ */
