From: hackbard Date: Thu, 30 Aug 2007 14:51:27 +0000 (+0200) Subject: fixed 04 record parsing X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50d38dd59a332ed9378386f89807a56eaa90c101;p=my-code%2Farm.git fixed 04 record parsing --- diff --git a/betty/lpcload.c b/betty/lpcload.c index bd69fbe..6c167e2 100644 --- a/betty/lpcload.c +++ b/betty/lpcload.c @@ -442,10 +442,6 @@ int firmware_to_ram(t_lpc *lpc) { /* read len */ ret=read(lpc->fwfd,buf,2); sscanf(buf,"%02x",&len); - if(len%4) { - printf("fw to ram: len not a multiple of 4\n"); - return -1; - } /* read addr */ ret=read(lpc->fwfd,buf,4); sscanf(buf,"%04x",&addr); @@ -478,8 +474,7 @@ int firmware_to_ram(t_lpc *lpc) { write_to_ram(lpc,buf,addr,len); break; case 0x04: - lpc->roff=((buf[0]<<28)|(buf[1]<<24)); - lpc->roff|=((buf[2]<<20)|(buf[3]<<16)); + lpc->roff=((buf[0]<<24)|(buf[1]<<16)); break; default: printf("fw to ram: unknown type %02x\n",type);