www.pudn.com > usbhost_source.rar > H8HST.H
/** * h8lb.h * H8LANボード * (c)2002 Junichi Tomaru */ #include#include #include "h8_3052f.h" #include "bios.h" #include "lcd.h" #include "sio.h" #include "sl811hst.h" #include "usbdef.h" #include "usrdef.h" #include "ut.h" union DWORD_T { dword data; struct { /* ビッグエンディアン用 */ word hi; word lo; } words; }; typedef union DWORD_T dword_t; union WORD_T{ /* 16bit→8bit×2 */ word data; struct { /* ビッグエンディアン用 */ byte hi; byte lo; } bytes; }; typedef union WORD_T word_t; /* グローバル変数 */ char usbspeed; /* USBスピード */ devinf_t info; /* デバイス情報 */ devdesc_t devdesc; /* 割り込みシリアル送受信用 */ _Extern volatile char rx0buf[256]; /* 受信バッファ */ _Extern volatile byte rx0hp; /* 受信ヘッドポインタ */ _Extern volatile byte rx0tp; /* 受信テールポインタ */ _Extern volatile byte rx0ct; /* 受信カウンタ */ _Extern volatile char rx0err; /* 受信エラー */ _Extern volatile char tx0buf[256]; /* 送信バッファ */ _Extern volatile byte tx0hp; /* 送信ヘッドポインタ */ _Extern volatile byte tx0tp; /* 送信テールポインタ */ _Extern volatile byte tx0ct; /* 送信カウンタ */ _Extern volatile char rx1buf[256]; /* 受信バッファ */ _Extern volatile byte rx1hp; /* 受信ヘッドポインタ */ _Extern volatile byte rx1tp; /* 受信テールポインタ */ _Extern volatile byte rx1ct; /* 受信カウンタ */ _Extern volatile char rx1err; /* 受信エラー */ _Extern volatile char tx1buf[256]; /* 送信バッファ */ _Extern volatile byte tx1hp; /* 送信ヘッドポインタ */ _Extern volatile byte tx1tp; /* 送信テールポインタ */ _Extern volatile byte tx1ct; /* 送信カウンタ */ /* disp.c */ void dispmessage( char mes ); void dispnetprotocol( word type ); void disptransprotocol( char type ); void dispipaddress( void ); /* debug.c */ char *bin8tohex( unsigned char bin, char *buf ); char *bin16tohex( unsigned int bin, char *buf ); char *bin32tohex( unsigned int long bin, char *buf ); bool getdebcom( void ); void debuginit( void ); void prompt( void ); void debugmain( void ); /* h8host.c */ char getdipsw( void ); /* h8lbver.c */ extern char titleid[]; extern char makerid[]; extern char copyright[]; extern char revs[]; extern char vers[]; /* end of h8host.h */