トランジスタ技術2011年9月号「mbed30分クッキング」のプログラムです。
Dependencies: mbed TextLCD SDFileSystem
ports.h
00001 /*******************************************************/ 00002 /* file: ports.h */ 00003 /* abstract: This file contains extern declarations */ 00004 /* for providing stimulus to the JTAG ports.*/ 00005 /*******************************************************/ 00006 00007 #ifndef ports_dot_h 00008 #define ports_dot_h 00009 00010 #include <stdio.h> 00011 00012 /* these constants are used to send the appropriate ports to setPort */ 00013 /* they should be enumerated types, but some of the microcontroller */ 00014 /* compilers don't like enumerated types */ 00015 #define TCK (short) 0 00016 #define TMS (short) 1 00017 #define TDI (short) 2 00018 00019 void initPort(FILE *fp, void (*cbfunc_progress)(int done, int total), void (*cbfunc_waittime)(int microsec)); 00020 00021 /* set the port "p" (TCK, TMS, or TDI) to val (0 or 1) */ 00022 void setPort(short p, short val); 00023 00024 /* read the TDO bit and store it in val */ 00025 unsigned char readTDOBit(); 00026 00027 /* make clock go down->up->down*/ 00028 void pulseClock(); 00029 00030 /* read the next byte of data from the xsvf file */ 00031 void readByte(unsigned char *data); 00032 00033 void waitTime(long microsec); 00034 00035 #endif
Generated on Tue Jul 12 2022 20:42:46 by 1.7.2