From 5d9d373a959271b498710817d08c2ea8e153aa6e Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Thu, 13 Oct 2011 20:33:30 +0200 Subject: correct firmware?? --- firmware/93c46.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'firmware/93c46.c') diff --git a/firmware/93c46.c b/firmware/93c46.c index 9ec4e11..4af0f45 100644 --- a/firmware/93c46.c +++ b/firmware/93c46.c @@ -93,10 +93,10 @@ int flash_93c46_init(void) //SETPIN(DIN0) = D4 = low //SETPIN(DIN1) = D4 = low - octopus.ports[16]=PIN_IN; - octopus.ports[17]=PIN_OUT; - octopus.ports[18]=PIN_OUT; octopus.ports[19]=PIN_OUT; + octopus.ports[18]=PIN_OUT; + octopus.ports[17]=PIN_OUT; + octopus.ports[16]=PIN_IN; return RSP_OK; } @@ -111,10 +111,9 @@ void flash_93c46_deinit_usb(void) int flash_93c46_deinit(void) { - octopus.ports[16]=PIN_NONE; - octopus.ports[17]=PIN_NONE; - octopus.ports[18]=PIN_NONE; - octopus.ports[19]=PIN_NONE; + octopus.ports[5]=PIN_OUT; // this is wrong! + octopus.ports[6]=PIN_OUT; // this is wrong! + octopus.ports[7]=PIN_OUT; // this is wrong! return RSP_OK; } @@ -123,8 +122,7 @@ void flash_93c46_read_usb(unsigned char address, unsigned int length, char * buf { answer[0]=CMD_93C46_READ; answer[1]=(unsigned char)flash_93c46_read(address,length,(char*)&answer[2]); - answer[2+length] = 0; - CommandAnswer(3+length); + CommandAnswer(length+2); } int flash_93c46_read(unsigned char address, unsigned int length, char * buf) @@ -144,7 +142,7 @@ void flash_93c46_write_usb(unsigned char address, unsigned int length, char * bu { answer[0]=CMD_93C46_WRITE; answer[1]=(unsigned char)flash_93c46_write(address,length, buf); - answer[2]=0; + answer[2]=0x00; CommandAnswer(3); } -- cgit v1.2.1