トランジスタ技術2011年9月号「mbed30分クッキング」のプログラムです。

Dependencies:   mbed TextLCD SDFileSystem

Committer:
shintamainjp
Date:
Mon Aug 08 10:33:50 2011 +0000
Revision:
0:42e9eb506e88
Initial version.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
shintamainjp 0:42e9eb506e88 1 /*******************************************************/
shintamainjp 0:42e9eb506e88 2 /* file: ports.h */
shintamainjp 0:42e9eb506e88 3 /* abstract: This file contains extern declarations */
shintamainjp 0:42e9eb506e88 4 /* for providing stimulus to the JTAG ports.*/
shintamainjp 0:42e9eb506e88 5 /*******************************************************/
shintamainjp 0:42e9eb506e88 6
shintamainjp 0:42e9eb506e88 7 #ifndef ports_dot_h
shintamainjp 0:42e9eb506e88 8 #define ports_dot_h
shintamainjp 0:42e9eb506e88 9
shintamainjp 0:42e9eb506e88 10 #include <stdio.h>
shintamainjp 0:42e9eb506e88 11
shintamainjp 0:42e9eb506e88 12 /* these constants are used to send the appropriate ports to setPort */
shintamainjp 0:42e9eb506e88 13 /* they should be enumerated types, but some of the microcontroller */
shintamainjp 0:42e9eb506e88 14 /* compilers don't like enumerated types */
shintamainjp 0:42e9eb506e88 15 #define TCK (short) 0
shintamainjp 0:42e9eb506e88 16 #define TMS (short) 1
shintamainjp 0:42e9eb506e88 17 #define TDI (short) 2
shintamainjp 0:42e9eb506e88 18
shintamainjp 0:42e9eb506e88 19 void initPort(FILE *fp, void (*cbfunc_progress)(int done, int total), void (*cbfunc_waittime)(int microsec));
shintamainjp 0:42e9eb506e88 20
shintamainjp 0:42e9eb506e88 21 /* set the port "p" (TCK, TMS, or TDI) to val (0 or 1) */
shintamainjp 0:42e9eb506e88 22 void setPort(short p, short val);
shintamainjp 0:42e9eb506e88 23
shintamainjp 0:42e9eb506e88 24 /* read the TDO bit and store it in val */
shintamainjp 0:42e9eb506e88 25 unsigned char readTDOBit();
shintamainjp 0:42e9eb506e88 26
shintamainjp 0:42e9eb506e88 27 /* make clock go down->up->down*/
shintamainjp 0:42e9eb506e88 28 void pulseClock();
shintamainjp 0:42e9eb506e88 29
shintamainjp 0:42e9eb506e88 30 /* read the next byte of data from the xsvf file */
shintamainjp 0:42e9eb506e88 31 void readByte(unsigned char *data);
shintamainjp 0:42e9eb506e88 32
shintamainjp 0:42e9eb506e88 33 void waitTime(long microsec);
shintamainjp 0:42e9eb506e88 34
shintamainjp 0:42e9eb506e88 35 #endif