📄 lpc-h.h
字号:
typedef unsigned char Ubyte;
typedef unsigned short Uword;
typedef unsigned long Ulong;
#ifndef DOS
#include <windows.h>
void Outportb(Uword portid, Ubyte value);
Ubyte Inportb(Uword portid);
#else
#include <dos.h>
#include <conio.h>
#endif
#define VERSION "LPC version 0.3 DOS"
#include <time.h>
#include <stdio.h>
#include <ctype.h>
#define LO_BYTE(X) ((Ubyte) (X))
#define HI_BYTE(X) ((Ubyte) ((X)>>8))
#define LO_NIB(X) ((Ubyte) ((X) &0x0f))
#define HI_NIB(X) ((Ubyte) (((X)>>4) &0x0f))
void delay(unsigned time);
void Puts(char *str);
void SetProgress(int steps);
void StepProgress(void);
extern void (*Ldout)(Ubyte Nibble);
extern Ubyte (*Ldin)(void);
extern Uword LPT;
extern Ubyte AbortLPC;
extern unsigned int LPC_Delay;
#define DATA ((Uword)(LPT+0x00))
#define STATUS ((Uword)(LPT+0x01))
#define CTRL ((Uword)(LPT+0x02))
#define TAR 0xff
#define WRITE 0x06
#define READ 0x04
/* Common part to hardware rev. 1 & 2 */
#define LCLK 0x01
#define LFRAME 0x02
#define LRST 0x04
#define CTRLMASK 0x07
#define DATAMASK 0xf8
void SetDriver(int rev);
Uword ReadFlashID(void); /* returns(Mfg,Device) */
void InitFlash(void);
int FlashErase(void);
int BlankCheck(void);
void ReadChip(char *Outfile);
void WriteChip(char *Infile, int index);
int VerifyChip(char *file, int index);
int Rev2_Detect(void);
void FlashReset(void);
Ubyte Rev1_Ldin(void);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -