⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cam_control_fw.h

📁 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY without ev
💻 H
📖 第 1 页 / 共 2 页
字号:
xdata at 0x7f00 unsigned char IN0BUF;xdata at 0x7fb5 unsigned char IN0BC;xdata at 0x7ec0 unsigned char OUT0BUF;xdata at 0x7fc5 unsigned char OUT0BC;xdata at 0x7e80 unsigned char IN1BUF;xdata at 0x7fb6 unsigned char IN1CS;xdata at 0x7fb7 unsigned char IN1BC;xdata at 0x7e40 unsigned char OUT1BUF;xdata at 0x7fc6 unsigned char OUT1CS;xdata at 0x7fc7 unsigned char OUT1BC;xdata at 0x7e00 unsigned char IN2BUF;xdata at 0x7fb9 unsigned char IN2BC;xdata at 0x7fb8 unsigned char IN2CS;xdata at 0x7fc9 unsigned char OUT2BC;xdata at 0x7fc8 unsigned char OUT2CS;xdata at 0x7dc0 unsigned char OUT2BUF;xdata at 0x7d80 unsigned char IN3BUF;xdata at 0x7fbb unsigned char IN3BC;xdata at 0x7fba unsigned char IN3CS;xdata at 0x7d00 unsigned char IN4BUF;xdata at 0x7fbd unsigned char IN4BC;xdata at 0x7fbc unsigned char IN4CS;xdata at 0x7F9C unsigned char OEA;xdata at 0x7f96 unsigned char OUTA;xdata at 0x7f9d unsigned char OEB;xdata at 0x7f97 unsigned char OUTB;xdata at 0x7f9e unsigned char OEC;xdata at 0x7f98 unsigned char OUTC;xdata at 0x7F99 unsigned char PINSA;xdata at 0x7F9A unsigned char PINSB;xdata at 0x7f9b unsigned char PINSC;xdata at 0x7f93 unsigned char PORTACFG;xdata at 0x7f94 unsigned char PORTBCFG;xdata at 0x7f95 unsigned char PORTCCFG;xdata at 0x7fa9 unsigned char IN07IRQ;xdata at 0x7faa unsigned char OUT07IRQ;xdata at 0x7fac unsigned char IN07IEN;xdata at 0x7fad unsigned char OUT07IEN;xdata at 0x7fab unsigned char USBIRQ;xdata at 0x7fae unsigned char USBIEN;xdata at 0x7faf unsigned char USBBAV;xdata at 0x7fd6 unsigned char USBCS;xdata at 0x7fd7 unsigned char TOGCTL;xdata at 0x7fd4 unsigned char SUDPTRH;xdata at 0x7fd5 unsigned char SUDPTRL;xdata at 0x7fe8 unsigned char SETUPDAT;xdata at 0x7fa5 unsigned char I2CS;xdata at 0x7fa6 unsigned char I2DAT;xdata at 0x7fde unsigned char IN07VAL;xdata at 0x7fdf unsigned char OUT07VAL;xdata at 0x7fe3 unsigned char AUTOPTRH;xdata at 0x7fe4 unsigned char AUTOPTRL;xdata at 0x7fe5 unsigned char AUTODATA;/*************************************** * usb.h based on sunkbd_hid.h * http://sourceforge.net/projects/ezhid * maintainer: * Arnim Laeuger * arnim@users.sourceforge.net ***************************************//* USB descriptor type *//* Supported: */ #define USB_DT_DEVICE            0x01#define USB_DT_CONFIG            0x02#define USB_DT_STRING            0x03/* Not Supported: */#define USB_DT_INTERFACE         0x04#define USB_DT_ENDPOINT          0x05/* fundamental data type */typedef unsigned char byte;typedef unsigned short word;/* device descriptor */static code byte dev_desc[] = {  0x12, // bLength            : Length of Descriptor  0x01, // bDescriptorType    : Descriptor Type = Device  0x10, // bcdUSB (L)         : USB Sepcification 2.0 (L)  0x01, // bcdUSB (H)         : USB Specification 2.0 (H)  0xFF, // bDeviceClass       : Device Class   0xFF, // bDeviceSubClass    : Device Subclass  0xFF, // bDeviceProtocol    : Device Protocol  0x40, // bMaxPacketSize0    : Maximum packet size for EP0  VENDOR_ID & 0xFF,         // idVendor (L)       : Vendor ID (L)  (VENDOR_ID >> 8) & 0xFF,  // idVendor (H)       : Vendor ID (H)  PRODUCT_ID & 0xFF,        // idProduct(L)       : Product ID (L)  (PRODUCT_ID >> 8) & 0xFF, // idProduct(H)       : Product ID (H)  0x01, // bcdDevice(L)       : Device Release Number (BCD,L)  0x00, // bcdDevice(H)       : Device Release Number (BCD,H)  0x01, // iManufacturer      : Manufacturer Index String  0x02, // iProduct           : Product Index String  0x00, // iSerialNumber      : Serial Number Index String  0x01 // bNumConfigurations : Number of Configurations in this Device};/* configuration descriptor */static code byte conf_desc[] = {  0x09, // bLength            : Legth of the Descriptor  0x02, // bDecriptorType     : Descriptor Type = Configuration  0x20, // wTotalLength (L)   : Total Length (L) including interface & endpoint  0x00, // wTotalLength (H)   : Total Length (H) including interface & endpoint  0x01, // bNumIterfaces      : Number of interfaces  0x01, // bConfigurationVal  : Configuration value used by set config request  0x00, // iConfiguration     : Index of String Describing this Configuartion  0x80, // bmAttributes       : Attributes  0x32, // MaxPower           : Maximum Power  /* Interface Descriptor, Interface 0, Alternate Setting 0 */  0x09, // bLength            : Length  0x04, // bDescriptorType    : Interface descriptor  0x00, // bInterfaceNumber   : Zero-based index of this interface  0x00, // bAlternateSetting  : This alternate setting  0x02, // bNumEndpoints      : Number of endpoints used for this descriptor  0xFF, // bInterfaceClass    : Vendor specific  0x00, // bInterfaceSubClass :   0xFF, // bInterfaceProtocol : Vendor specific  0x00, // iInterface         : Index to sring describing this interface  /* Bulk IN Endpoint 1 Descriptor, Interface 0, Alternate Setting 0 */  0x07, // bLength            : Length of Descriptor  0x05, // bDescriptorType    : Endpoint  0x81, // bEndpointAddress   : IN endpoint 1  0x02, // bmAttributes       : Bulk endpoint  0x40, // wMaxPacketSize (L) : Maximum data transfer size (L)  0x00, // wMaxPacketSize (H) : Maximum data transfer size (H)  0x00, // bInterval          : Polling interval  /* Bulk OUT Endpoint 1 Descriptor, Interface 0, Alternate Setting 0 */  0x07, // bLength            : Length of Descriptor  0x05, // bDescriptorType    : Endpoint  0x01, // bEndpointAddress   : OUT endpoint 1  0x02, // bmAttributes       : Bulk endpoint  0x40, // wMaxPacketSize (L) : Maximum data transfer size (L)  0x00, // wMaxPacketSize (H) : Maximum data transfer size (H)  0x00, // bInterval          : Polling interval  };/* language ID string descriptor */static code byte string_langid[] = {0x04, 0x03, 0x00, 0x00};/* manufacturer ID string */static code byte string_mfg[] = {  0x22, 0x03,  /* standard requests */  'e',0,'z',0,'u',0,'s',0,'b',0,  '2',0,'1',0,'3',0,'1',0,'.',0,  's',0,'f',0,'.',0,'n',0,'e',0,  't',0};/* product ID string */static code byte string_prod[] = {  0x18, 0x03,  /* standard requests */  'C',0,'a',0,'m',0,' ',0,'C',0,  'o',0,'n',0,'t',0,'r',0,'o',0,  'l',0};#define NUM_STRINGS  3static data unsigned int string_index[NUM_STRINGS] = {  (unsigned int) string_langid,  (unsigned int) string_mfg,  (unsigned int) string_prod};/* setup packet structure */typedef struct {  byte bmRequestType;  byte bRequest;  byte wValueL;  byte wValueH;  byte wIndexL;  byte wIndexH;  byte wLengthL;  byte wLengthH;} setup_data;static xdata byte * data in0buf = (xdata byte *)&IN0BUF;static xdata byte * data out0buf = (xdata byte *)&OUT0BUF;static xdata byte * data in1buf = (xdata byte *)&IN1BUF;static xdata byte * data out1buf = (xdata byte *)&OUT1BUF;#endif /* CAM_CONTROL_FW_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -