#ifndef IDIBUS_BOOTLOADER_DEFS_H_
#define IDIBUS_BOOTLOADER_DEFS_H_

#include <inttypes.h>

#include "Common/IDIBUS_DEFS.h"
//#include "config.h"

#define IDIMMES_COM_C_FmwBootloaderInfo						255U
//[Module Type][Module HW Revision][Module SN][Module BL Revision][Reason for bootloader enter][Custom FMW loading enabled]
#define IDIMMES_COM_C_FmwBootloaderInfo_Length				(IDISN_FIXP_MODULE_TYPE_Length+IDISN_FIXP_HW_REV_Length+\
															IDISN_FIXP_SERIAL_Length+IDISN_FIXP_SW_REV_Length+1+1)
#define IDIMMES_COM_C_FmwBootloaderStatus					254U
//[Module Status][Block Size Hi][Block Size Lo]
#define IDIMMES_COM_C_FmwBootloaderWrite					253U
//[FMW DATA (in expected size)]

//FLAG FIELD
#define IDIFMW_REASON_NoReason								0		
#define IDIFMW_REASON_EnterFromApplication					1	//EEPROM FLAG	
#define IDIFMW_REASON_EnterForced							2	//Address detection	
#define IDIFMW_REASON_NoFmwDetected							4	

//Maybe move to common idi error list???
#define IDIFMW_STATUS_ReadyToGetBlock						0
#define IDIFMW_STATUS_ErrorPacketCRC						1
//NO BLOCK ACCEPT
#define IDIFMW_STATUS_Busy									2
#define IDIFMW_STATUS_IncompatibleFmw						3
#define IDIFMW_STATUS_FmwUploadCRCError						4	//Final Check
#define IDIFMW_STATUS_FmwUploadComplete						5
#define IDIFMW_STATUS_Reboot								10	

#endif /* IDIBUS_BOOTLOADER_DEFS_H_ */