4 Autor..........: Thomas Fischl <tfischl@gmx.de>
5 Description....: Provides functions for communication/programming
7 Licence........: GNU GPL v2 (see Readme.txt)
8 Creation Date..: 2005-02-23
9 Last change....: 2007-07-23
12 #ifndef __isp_h_included__
13 #define __isp_h_included__
16 #define uchar unsigned char
28 #define ISP_SCK_SLOW 0
29 #define ISP_SCK_FAST 1
31 /* Prepare connection to target device */
34 /* Close connection to target device */
37 /* read an write a byte from isp using software (slow) */
38 uchar
ispTransmit_sw(uchar send_byte
);
40 /* read an write a byte from isp using hardware (fast) */
41 uchar
ispTransmit_hw(uchar send_byte
);
43 /* enter programming mode */
44 uchar
ispEnterProgrammingMode();
46 /* read byte from eeprom at given address */
47 uchar
ispReadEEPROM(unsigned int address
);
49 /* write byte to flash at given address */
50 uchar
ispWriteFlash(unsigned long address
, uchar data
, uchar pollmode
);
52 uchar
ispFlushPage(unsigned long address
, uchar pollvalue
);
54 /* read byte from flash at given address */
55 uchar
ispReadFlash(unsigned long address
);
57 /* write byte to eeprom at given address */
58 uchar
ispWriteEEPROM(unsigned int address
, uchar data
);
60 /* pointer to sw or hw transmit function */
61 uchar (*ispTransmit
)(uchar
);
63 /* set SCK speed. call before ispConnect! */
64 void ispSetSCKOption(uchar sckoption
);
66 #endif /* __isp_h_included__ */