diff options
author | Yves Fischer <yvesf-git@xapek.org> | 2011-10-13 20:33:30 +0200 |
---|---|---|
committer | Yves Fischer <yvesf-git@xapek.org> | 2011-10-13 20:33:30 +0200 |
commit | 5d9d373a959271b498710817d08c2ea8e153aa6e (patch) | |
tree | 6867e887454a850b4e15616000ef342a1c661c7e /firmware/93c46.c | |
parent | 35a36b0a6c69ce136fd6ea2a203d34e48e1291e8 (diff) | |
download | mini-octopus-5d9d373a959271b498710817d08c2ea8e153aa6e.tar.gz mini-octopus-5d9d373a959271b498710817d08c2ea8e153aa6e.zip |
correct firmware??
Diffstat (limited to 'firmware/93c46.c')
-rw-r--r-- | firmware/93c46.c | 18 |
1 files changed, 8 insertions, 10 deletions
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); } |