51 #if !defined(MICROCHIP_API) || (defined(YHUB) && defined(FLASH_FIRMW_FIRSTPAGE)) 55 #define MAX_ROM_ZONES_PER_FILES 16 56 #define MAX_FLASH_ZONES_PER_FILES 4 58 #define BYN_SIGN ((u32) ('B'| ((u16)'Y'<<8) | ((u32)'N'<<16) )) 68 #define USE_V6_BYN_FILE 120 #define BYN_HEAD_SIZE_V4 (sizeof(byn_head_sign)+sizeof(byn_head_v4)) 121 #define BYN_HEAD_SIZE_V5 (sizeof(byn_head_sign)+sizeof(byn_head_v5)) 122 #define BYN_HEAD_SIZE_V6 (sizeof(byn_head_sign)+sizeof(byn_head_v6)) 123 #define BYN_MD5_OFS_V6 (sizeof(byn_head_sign)+16) 130 #ifdef CPU_BIG_ENDIAN 133 #define DECODE_U16(NUM) ((((NUM) & 0xff00) >> 8) | (((NUM)&0xff) << 8)) 134 #define DECODE_U32(NUM) ((((NUM) >> 24) & 0xff) | (((NUM) << 8) & 0xff0000) | (((NUM) >> 8) & 0xff00) | (((NUM) << 24) & 0xff000000 )) 136 #define decode_byn_head_multi(dummy) {} 137 #define decode_byn_zone(dummy) {} 138 #define DECODE_U16(NUM) (NUM) 139 #define DECODE_U32(NUM) (NUM) 174 #ifndef MICROCHIP_API 206 #ifndef MICROCHIP_API 222 #define MAX_FIRMWARE_LEN 0x100000ul 223 #define INVALID_FIRMWARE 0xfffffffful 224 #define FLASH_NB_REBOOT_RETRY 1 228 #ifndef MICROCHIP_API 239 #ifndef MICROCHIP_API 255 #define BLOCK_FLASH_TIMEOUT 4000u 256 #define PROG_GET_INFO_TIMEOUT 10000u 257 #define ZONE_VERIF_TIMEOUT 4000u 258 #define FLASH_SUBDEV_TIMEOUT 59000u 259 #define YPROG_BOOTLOADER_TIMEOUT 20000u 260 #define YPROG_FORCE_FW_UPDATE 1u 263 #define FLASH_ERRMSG_LEN 56 265 #define FLASH_ERRMSG_LEN YOCTO_ERRMSG_LEN 269 #define PROG_IN_ERROR 0x8000 271 #ifndef MICROCHIP_API 304 #ifdef YAPI_IN_YDEVICE 305 #define uGetFirmware(ofs, dst, size) hProgGetFirmware(ofs, dst, size) 306 void hProgInit(
void);
307 void hProgFree(
void);
309 #define uGetFirmware(ofs, dst, size) yGetFirmware(ofs, dst, size) 318 #define uGetFirmwareBynHead(head_ptr) {uGetFirmware(0, (u8*)(head_ptr), sizeof(byn_head_multi));decode_byn_head_multi(head_ptr);} 319 #define uGetFirmwareBynZone(offset,zone_ptr) {uGetFirmware(offset,(u8*)(zone_ptr),sizeof(byn_zone)); decode_byn_zone(zone_ptr);}
const char * prog_GetCPUName(BootloaderSt *dev)
int SendDataPacket(BootloaderSt *dev, int program, u32 address, u8 *data, int nbinstr, char *errmsg)
#define YOCTO_PRODUCTNAME_LEN
#define MAX_ROM_ZONES_PER_FILES
int BlockingRead(BootloaderSt *dev, USB_Packet *pkt, int maxwait, char *errmsg)
#define YOCTO_FIRMWARE_LEN
#define decode_byn_zone(dummy)
int ypGetBootloaderReply(BootloaderSt *dev, USB_Packet *pkt, char *errmsg)
int ypSendBootloaderCmd(BootloaderSt *dev, const USB_Packet *pkt, char *errmsg)
int ypBootloaderShutdown(BootloaderSt *dev)
YRETCODE yapiUpdateFirmware_internal(const char *serial, const char *firmwarePath, const char *settings, int force, int startUpdate, char *msg)
int IsValidBynFile(const byn_head_multi *head, u32 size, const char *serial, u16 flags, char *errmsg)
int ValidateBynCompat(const byn_head_multi *head, u32 size, const char *serial, u16 flags, BootloaderSt *dev, char *errmsg)
int IsValidBynHead(const byn_head_multi *head, u32 size, u16 flags, char *errmsg)
int yNetHubGetBootloaders(const char *hubserial, char *buffer, char *errmsg)
YRETCODE yapiCheckFirmware_internal(const char *serial, const char *rev, u32 flags, const char *path, char *buffer, int buffersize, int *fullsize, char *errmsg)
#define MAX_FLASH_ZONES_PER_FILES
int ypIsSendBootloaderBusy(BootloaderSt *dev)
YRETCODE yapiGetBootloadersDevs(char *serials, unsigned int maxNbSerial, unsigned int *totalBootladers, char *errmsg)
YPROG_RESULT uFlashDevice(void)
#define decode_byn_head_multi(dummy)