Paul Clarke
/
JTAG_Programmer_copy
Currently Non-working JTAG programmer
ports.h@0:a23e8a7c9275, 2012-06-28 (annotated)
- Committer:
- monpjc
- Date:
- Thu Jun 28 13:36:55 2012 +0000
- Revision:
- 0:a23e8a7c9275
new
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
monpjc | 0:a23e8a7c9275 | 1 | /*******************************************************/ |
monpjc | 0:a23e8a7c9275 | 2 | /* file: ports.h */ |
monpjc | 0:a23e8a7c9275 | 3 | /* abstract: This file contains extern declarations */ |
monpjc | 0:a23e8a7c9275 | 4 | /* for providing stimulus to the JTAG ports.*/ |
monpjc | 0:a23e8a7c9275 | 5 | /*******************************************************/ |
monpjc | 0:a23e8a7c9275 | 6 | |
monpjc | 0:a23e8a7c9275 | 7 | #ifndef ports_dot_h |
monpjc | 0:a23e8a7c9275 | 8 | #define ports_dot_h |
monpjc | 0:a23e8a7c9275 | 9 | |
monpjc | 0:a23e8a7c9275 | 10 | /* these constants are used to send the appropriate ports to setPort */ |
monpjc | 0:a23e8a7c9275 | 11 | /* they should be enumerated types, but some of the microcontroller */ |
monpjc | 0:a23e8a7c9275 | 12 | /* compilers don't like enumerated types */ |
monpjc | 0:a23e8a7c9275 | 13 | #define TCK (short) 0 |
monpjc | 0:a23e8a7c9275 | 14 | #define TMS (short) 1 |
monpjc | 0:a23e8a7c9275 | 15 | #define TDI (short) 2 |
monpjc | 0:a23e8a7c9275 | 16 | |
monpjc | 0:a23e8a7c9275 | 17 | /* set the port "p" (TCK, TMS, or TDI) to val (0 or 1) */ |
monpjc | 0:a23e8a7c9275 | 18 | extern void setPort(short p, short val); |
monpjc | 0:a23e8a7c9275 | 19 | |
monpjc | 0:a23e8a7c9275 | 20 | /* read the TDO bit and store it in val */ |
monpjc | 0:a23e8a7c9275 | 21 | extern unsigned char readTDOBit(); |
monpjc | 0:a23e8a7c9275 | 22 | |
monpjc | 0:a23e8a7c9275 | 23 | /* make clock go down->up->down*/ |
monpjc | 0:a23e8a7c9275 | 24 | extern void pulseClock(); |
monpjc | 0:a23e8a7c9275 | 25 | |
monpjc | 0:a23e8a7c9275 | 26 | /* read the next byte of data from the xsvf file */ |
monpjc | 0:a23e8a7c9275 | 27 | extern void readByte(unsigned char *data); |
monpjc | 0:a23e8a7c9275 | 28 | |
monpjc | 0:a23e8a7c9275 | 29 | extern void waitTime(long microsec); |
monpjc | 0:a23e8a7c9275 | 30 | |
monpjc | 0:a23e8a7c9275 | 31 | #endif |