📄 user.pre
字号:
static near bit SPPOWN @ ((unsigned)&SPPCON*8)+1;
static near bit ADDR0 @ ((unsigned)&SPPEPS*8)+0;
static near bit ADDR1 @ ((unsigned)&SPPEPS*8)+1;
static near bit ADDR2 @ ((unsigned)&SPPEPS*8)+2;
static near bit ADDR3 @ ((unsigned)&SPPEPS*8)+3;
static volatile near bit BUSY @ ((unsigned)&SPPEPS*8)+4;
static volatile near bit WRSPP @ ((unsigned)&SPPEPS*8)+6;
static volatile near bit RDSPP @ ((unsigned)&SPPEPS*8)+7;
static near bit WS0 @ ((unsigned)&SPPCFG*8)+0;
static near bit WS1 @ ((unsigned)&SPPCFG*8)+1;
static near bit WS2 @ ((unsigned)&SPPCFG*8)+2;
static near bit WS3 @ ((unsigned)&SPPCFG*8)+3;
static near bit CLK1EN @ ((unsigned)&SPPCFG*8)+4;
static near bit CSEN @ ((unsigned)&SPPCFG*8)+5;
static near bit CLKCFG0 @ ((unsigned)&SPPCFG*8)+6;
static near bit CLKCFG1 @ ((unsigned)&SPPCFG*8)+7;
# 246 "C:\Program Files\HTSOFT\PIC18\INCLUDE\pic18.h"
extern unsigned char eeprom_read(unsigned int address);
extern void eeprom_write(unsigned int address,unsigned char data);
extern unsigned char flash_read(unsigned long addr);
extern void flash_write(far unsigned char *,unsigned char,far unsigned char *);
extern void flash_erase(unsigned long addr);
extern unsigned int config_read(unsigned char reg_no);
extern void config_write(unsigned char reg_no, unsigned int dataword);
extern unsigned int device_id_read(void);
extern unsigned char idloc_read(unsigned char reg_no);
extern void idloc_write(unsigned char reg_no,unsigned char data);
extern void initiate_write(void);
extern void wait_on_wr(void);
# 287
extern unsigned char checksum8(unsigned long startAddr, unsigned long length);
extern unsigned int checksumi16(unsigned long startAddr, unsigned long length);
extern unsigned long checksum32(unsigned long startAddr, unsigned long length);
# 49 "C:\MCHPFSUSB\fw\Cdc\system\typedefs.h"
typedef unsigned char byte;
typedef unsigned int word;
typedef unsigned long dword;
typedef union _BYTE
{
byte _byte;
struct
{
unsigned b0:1;
unsigned b1:1;
unsigned b2:1;
unsigned b3:1;
unsigned b4:1;
unsigned b5:1;
unsigned b6:1;
unsigned b7:1;
} a;
} BYTE;
typedef union _WORD
{
word _word;
struct
{
byte byte0;
byte byte1;
} a;
struct
{
BYTE Byte0;
BYTE Byte1;
} b;
struct
{
BYTE LowB;
BYTE HighB;
} c;
struct
{
byte v[2];
} d;
} WORD;
typedef union _DWORD
{
dword _dword;
struct
{
byte byte0;
byte byte1;
byte byte2;
byte byte3;
} a;
struct
{
word word0;
word word1;
} b;
struct
{
BYTE Byte0;
BYTE Byte1;
BYTE Byte2;
BYTE Byte3;
} c;
struct
{
WORD Word0;
WORD Word1;
} d;
struct
{
byte v[4];
} e;
} DWORD;
# 132
typedef void(*pFunc)(void);
typedef union _POINTER
{
struct
{
byte bLow;
byte bHigh;
} a;
word _word;
byte* bRam;
word* wRam;
const byte* bRom;
const word* wRom;
} POINTER;
typedef enum _BOOL { FALSE = 0, TRUE } BOOL;
# 56 "C:\MCHPFSUSB\fw\Cdc\system\usb\usb.h"
typedef struct
{
unsigned EPSTALL : 1;
unsigned EPINEN : 1;
unsigned EPOUTEN : 1;
unsigned EPCONDIS : 1;
unsigned EPHSHK : 1;
unsigned Reserved : 3;
}
EndPointType;
# 122 "C:\MCHPFSUSB\fw\Cdc\system\usb\usbdefs\usbdefs_std_dsc.h"
typedef struct _USB_DEV_DSC
{
byte bLength; byte bDscType; word bcdUSB;
byte bDevCls; byte bDevSubCls; byte bDevProtocol;
byte bMaxPktSize0; word idVendor; word idProduct;
word bcdDevice; byte iMFR; byte iProduct;
byte iSerialNum; byte bNumCfg;
} USB_DEV_DSC;
# 134
typedef struct _USB_CFG_DSC
{
byte bLength; byte bDscType; word wTotalLength;
byte bNumIntf; byte bCfgValue; byte iCfg;
byte bmAttributes; byte bMaxPower;
} USB_CFG_DSC;
# 144
typedef struct _USB_INTF_DSC
{
byte bLength; byte bDscType; byte bIntfNum;
byte bAltSetting; byte bNumEPs; byte bIntfCls;
byte bIntfSubCls; byte bIntfProtocol; byte iIntf;
} USB_INTF_DSC;
# 154
typedef struct _USB_EP_DSC
{
byte bLength; byte bDscType; byte bEPAdr;
byte bmAttributes; word wMaxPktSize; byte bInterval;
} USB_EP_DSC;
# 263 "C:\MCHPFSUSB\fw\Cdc\system\usb\class\cdc\cdc.h"
typedef union _LINE_CODING
{
struct
{
byte _byte[0x07];
} a;
struct
{
DWORD dwDTERate;
byte bCharFormat;
byte bParityType;
byte bDataBits;
} b;
} LINE_CODING;
typedef union _CONTROL_SIGNAL_BITMAP
{
byte _byte;
struct
{
unsigned DTE_PRESENT;
unsigned CARRIER_CONTROL;
} a;
} CONTROL_SIGNAL_BITMAP;
# 292
typedef struct _USB_CDC_HEADER_FN_DSC
{
byte bFNLength;
byte bDscType;
byte bDscSubType;
word bcdCDC;
} USB_CDC_HEADER_FN_DSC;
typedef struct _USB_CDC_ACM_FN_DSC
{
byte bFNLength;
byte bDscType;
byte bDscSubType;
byte bmCapabilities;
} USB_CDC_ACM_FN_DSC;
typedef struct _USB_CDC_UNION_FN_DSC
{
byte bFNLength;
byte bDscType;
byte bDscSubType;
byte bMasterIntf;
byte bSaveIntf0;
} USB_CDC_UNION_FN_DSC;
typedef struct _USB_CDC_CALL_MGT_FN_DSC
{
byte bFNLength;
byte bDscType;
byte bDscSubType;
byte bmCapabilities;
byte bDataInterface;
} USB_CDC_CALL_MGT_FN_DSC;
extern byte cdc_rx_len;
extern byte cdc_trf_state;
extern POINTER pCDCSrc;
extern byte cdc_tx_len;
extern byte cdc_mem_type;
void USBCheckCDCRequest(void);
void CDCInitEP(void);
byte getsUSBUSART(char *buffer, byte len);
void putrsUSBUSART(const char *data);
void putsUSBUSART(char *data);
void CDCTxService(void);
# 70 "C:\MCHPFSUSB\fw\Cdc\autofiles\usbdsc.h"
typedef struct
{ USB_CFG_DSC cd01;
USB_INTF_DSC i01a00;
USB_CDC_HEADER_FN_DSC cdc_header_fn_i01a00;
USB_CDC_ACM_FN_DSC cdc_acm_fn_i01a00;
USB_CDC_UNION_FN_DSC cdc_union_fn_i01a00;
USB_CDC_CALL_MGT_FN_DSC cdc_call_mgt_fn_i01a00;
USB_EP_DSC ep02i_i01a00;
USB_INTF_DSC i02a00;
USB_EP_DSC ep03o_i02a00;
USB_EP_DSC ep03i_i02a00;
} CFG01;
extern const USB_DEV_DSC device_dsc;
extern const unsigned char *const USB_CD_Ptr[];
extern const unsigned char *const USB_SD_Ptr[];
extern const pFunc ClassReqHandler[1];
# 59 "C:\MCHPFSUSB\fw\Cdc\system\usb\usbdefs\usbdefs_ep0_buff.h"
typedef union _CTRL_TRF_SETUP
{
struct
{
byte _byte[8];
} a;
struct
{
byte bmRequestType;
byte bRequest;
word wValue;
word wIndex;
word wLength;
} b;
struct
{
unsigned :8;
unsigned :8;
WORD W_Value;
WORD W_Index;
WORD W_Length;
} c;
struct
{
unsigned Recipient:5;
unsigned RequestType:2;
unsigned DataDir:1;
unsigned :8;
byte bFeature;
unsigned :8;
unsigned :8;
unsigned :8;
unsigned :8;
unsigned :8;
} d;
struct
{
unsigned :8;
unsigned :8;
byte bDscIndex;
byte bDscType;
word wLangID;
unsigned :8;
unsigned :8;
} e;
struct
{
unsigned :8;
unsigned :8;
BYTE bDevADR;
byte bDevADRH;
unsigned :8;
unsigned :8;
unsigned :8;
unsigned :8;
} f;
struct
{
unsigned :8;
unsigned :8;
byte bCfgValue;
byte bCfgRSD;
unsigned :8;
unsigned :8;
unsigned :8;
unsigned :8;
} g;
struct
{
unsigned :8;
unsigned :8;
byte bAltID;
byte bAltID_H;
byte bIntfID;
byte bIntfID_H;
unsigned :8;
unsigned :8;
} h;
struct
{
unsigned :8;
unsigned :8;
unsigned :8;
unsigned :8;
byte bEPID;
byte bEPID_H;
unsigned :8;
unsigned :8;
} i;
struct
{
unsigned :8;
unsigned :8;
unsigned :8;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -