X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/1c9852b334371604476e95e9745978401941f056..77fd24511771873c246c56518e77f1aedde9f0b8:/firmware/isp.c?ds=inline diff --git a/firmware/isp.c b/firmware/isp.c index af928b488..5153c8eb4 100644 --- a/firmware/isp.c +++ b/firmware/isp.c @@ -1,12 +1,12 @@ /* - isp.c - part of USB + isp.c - part of USBasp Autor..........: Thomas Fischl Description....: Provides functions for communication/programming - over ISP interf - Licence........: Free under certain conditions. See Documentation. + over ISP interface + Licence........: GNU GPL v2 (see Readme.txt) Creation Date..: 2005-02-23 - Last change....: 2005-04-20 + Last change....: 2007-07-23 */ #include @@ -145,7 +145,7 @@ uchar ispEnterProgrammingMode() { return 1; /* error: device dosn't answer */ } -uchar ispReadFlash(unsigned int address) { +uchar ispReadFlash(unsigned long address) { ispTransmit(0x20 | ((address & 1) << 3)); ispTransmit(address >> 9); ispTransmit(address >> 1); @@ -153,7 +153,7 @@ uchar ispReadFlash(unsigned int address) { } -uchar ispWriteFlash(unsigned int address, uchar data, uchar pollmode) { +uchar ispWriteFlash(unsigned long address, uchar data, uchar pollmode) { /* 0xFF is value after chip erase, so skip programming if (data == 0xFF) { @@ -194,7 +194,7 @@ uchar ispWriteFlash(unsigned int address, uchar data, uchar pollmode) { } -uchar ispFlushPage(unsigned int address, uchar pollvalue) { +uchar ispFlushPage(unsigned long address, uchar pollvalue) { ispTransmit(0x4C); ispTransmit(address >> 9); ispTransmit(address >> 1);