/*
 * eps_ftm.h
 *
 *  Created on: Aug 21, 2023
 *      Author: Invcuser_75
 */

#ifndef EXO_SERVICES_EPS_CTRLR_INC_EPS_FTM_H_
#define EXO_SERVICES_EPS_CTRLR_INC_EPS_FTM_H_

/**
* @brief This function will return the download address to be allocated for file transfer
*
* @param[in]  void : none
*
* @return memory address
* @retval allocated address
*/
uint32_t eps_get_ftm_download_address(void);

/**
* @brief This function will return the storage address to be used to move firmware stored in sdram to
* external flash
*
* @param[in]  void : none
*
* @return memory address
* @retval allocated address
*/
uint32_t eps_get_fw_storage_address(void);


uint8_t* eps_get_nor_flash_bckup_address(uint8_t board_selc);
/*
 * @brief This API get the sdram storage address
 */
uint8_t* eps_get_sdram_storage_address(void);
/*
 * @brief This API get the NOR flash storage address
 */
uint8_t* eps_get_nor_flash_address(uint8_t board_selc);

uint8_t* eps_batt_get_nor_flash_address(void);
/**
 * @brief This function used to calculate integrity and return the calculated CRC
 * this function will calculate crc only if length is 4 byte aligned
 */
uint32_t calc_checksum_memory_temp(uint8_t *data_buf,uint32_t length);
/**
 * @brief This function used to calculate CRC by applying CRC32 algorithm
 */
uint32_t Crc32_temp(uint32_t Crc, uint32_t Data);

#endif /* EXO_SERVICES_EPS_CTRLR_INC_EPS_FTM_H_ */
