亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? usb_drv.h

?? 源碼程序包
?? H
字號:
/*H**************************************************************************
* NAME:         usb_drv.h         
*----------------------------------------------------------------------------
* Copyright (c) 2003 Atmel.
*----------------------------------------------------------------------------
* RELEASE:      snd1c-refd-nf-4_0_3      
* REVISION:     1.11     
*----------------------------------------------------------------------------
* PURPOSE:
* This file contains the USB driver definition
*****************************************************************************/

#ifndef _USB_DRV_H_
#define _USB_DRV_H_

/*_____ I N C L U D E S ____________________________________________________*/


/*_____ M A C R O S ________________________________________________________*/

#define CONTROL               0x80
#define BULK_IN               0x86
#define BULK_OUT              0x82
#define INTERRUPT_IN          0x87
#define INTERRUPT_OUT         0x83
#define ISOCHRONOUS_IN        0x85
#define ISOCHRONOUS_OUT       0x81
#define BULK_MAX_SIZE         ((Byte)64)

#define GET_DEVICE_DESCRIPTOR           1
#define GET_CONFIGURATION_DESCRIPTOR    4


/*_____ S T A N D A R D    R E Q U E S T S __________________________________*/

#define GET_STATUS            0x00
#define GET_DEVICE            0x01
#define CLEAR_FEATURE         0x01        /* see FEATURES below */
#define GET_STRING            0x03
#define SET_FEATURE           0x03        /* see FEATURES below */
#define SET_ADDRESS           0x05
#define GET_DESCRIPTOR        0x06
#define SET_DESCRIPTOR        0x07
#define GET_CONFIGURATION     0x08
#define SET_CONFIGURATION     0x09
#define GET_INTERFACE         0x0A
#define SET_INTERFACE         0x0B
#define SYNC_FRAME            0x0C
#define GET_MAX_LUN           0xFE
#define MASS_STORAGE_RESET    0xFF


/*_____ D E S C R I P T O R    T Y P E S ____________________________________*/

#define DEVICE                0x01
#define CONFIGURATION         0x02
#define STRING                0x03
#define INTERFACE             0x04
#define ENDPOINT              0x05

#define LANG_ID               0x00
#define MAN_INDEX             0x01
#define PROD_INDEX            0x02
#define SN_INDEX              0x03


/*_____ S T A N D A R D    F E A T U R E S __________________________________*/

#define DEVICE_REMOTE_WAKEUP_FEATURE     0x01
#define ENDPOINT_HALT_FEATURE            0x00

/*_____ D E V I C E   S T A T U S ___________________________________________*/

#define SELF_POWERED       1

/*_____ D E V I C E   S T A T E _____________________________________________*/

#define ATTACHED                  0
#define POWERED                   1
#define DEFAULT                   2
#define ADDRESSED                 3
#define CONFIGURED                4
#define SUSPENDED                 5

#define USB_CONFIG_BUSPOWERED     0x80
#define USB_CONFIG_SELFPOWERED    0x40
#define USB_CONFIG_REMOTEWAKEUP   0x20

/*_____ M A S S   S T O R A G E   E N D P O I N T S _________________________*/

#define EP_CONTROL                0x00
#define EP_IN                     0x01
#define EP_OUT                    0x02
#define EP_CONTROL_LENGTH         8
#define EP_IN_LENGTH              64
#define EP_OUT_LENGTH             64

/*_________________________________________________________ S T R U C T _____*/
/*_____ U S B   D E V I C E   R E Q U E S T _________________________________*/
struct Endpoint_information_st
 {
  Uint16  fifo_size ;             /* size of the endpoint FIFO */
  Uint16  fifo_left ;
 };

struct USB_request_st
  {
    Byte    bmRequestType;        /* Characteristics of the request */
    Byte    bRequest;             /* Specific request */
    Uint16  wValue;               /* field that varies according to request */
    Uint16  wIndex;               /* field that varies according to request */
    Uint16  wLength;              /* Number of bytes to transfer if Data */
  };


/*_____ U S B   D E V I C E   D E S C R I P T O R ___________________________*/

struct usb_st_device_descriptor
  {
    Byte   bLength;               /* Size of this descriptor in bytes */
    Byte   bDescriptorType;       /* DEVICE descriptor type */
    Uint16 bscUSB;                /* Binay Coded Decimal Spec. release */
    Byte   bDeviceClass;          /* Class code assigned by the USB */
    Byte   bDeviceSubClass;       /* Sub-class code assigned by the USB */
    Byte   bDeviceProtocol;       /* Protocol code assigned by the USB */
    Byte   bMaxPacketSize0;       /* Max packet size for EP0 */
    Uint16 idVendor;              /* Vendor ID. ATMEL = 0x03EB */
    Uint16 idProduct;             /* Product ID assigned by the manufacturer */
    Uint16 bcdDevice;             /* Device release number */
    Byte   iManufacturer;         /* Index of manu. string descriptor */
    Byte   iProduct;              /* Index of prod. string descriptor */
    Byte   iSerialNumber;         /* Index of S.N.  string descriptor */
    Byte   bNumConfigurations;    /* Number of possible configurations */
  };


/*_____ U S B   C O N F I G U R A T I O N   D E S C R I P T O R _____________*/

struct usb_st_configuration_descriptor
  {
    Byte   bLength;               /* size of this descriptor in bytes */
    Byte   bDescriptorType;       /* CONFIGURATION descriptor type */
    Uint16 wTotalLength;          /* total length of data returned */
    Byte   bNumInterfaces;        /* number of interfaces for this conf. */
    Byte   bConfigurationValue;   /* value for SetConfiguration resquest */
    Byte   iConfiguration;        /* index of string descriptor */
    Byte   bmAttibutes;           /* Configuration characteristics */
    Byte   MaxPower;              /* maximum power consumption */
  };


/*_____ U S B   M A N U F A C T U R E R   D E S C R I P T O R _______________*/

struct usb_st_manufacturer
  {
    Byte   bLength;               /* size of this descriptor in bytes */
    Byte   bDescriptorType;       /* STRING descriptor type */
    Uint16 wstring[USB_MN_LENGTH];/* unicode characters */
  };


/*_____ U S B   P R O D U C T   D E S C R I P T O R _________________________*/

struct usb_st_product
  {
    Byte   bLength;               /* size of this descriptor in bytes */
    Byte   bDescriptorType;       /* STRING descriptor type */
    Uint16 wstring[USB_PN_LENGTH];/* unicode characters */
  };


/*_____ U S B   S E R I A L   N U M B E R   D E S C R I P T O R _____________*/

struct usb_st_serial_number
  {
    Byte   bLength;               /* size of this descriptor in bytes */
    Byte   bDescriptorType;       /* STRING descriptor type */
    Uint16 wstring[USB_SN_LENGTH];/* unicode characters */
  };


/*_____ U S B   L A N G U A G E    D E S C R I P T O R ______________________*/

struct usb_st_language_descriptor
  {
    Byte   bLength;               /* size of this descriptor in bytes */
    Byte   bDescriptorType;       /* STRING descriptor type */
    Uint16 wlangid;               /* language id */
  };


/*_____ U S B   I N T E R F A C E   D E S C R I P T O R _____________________*/

struct usb_st_interface_descriptor
  {
    Byte  bLength;                /* size of this descriptor in bytes */
    Byte  bDescriptorType;        /* INTERFACE descriptor type */
    Byte  bInterfaceNumber;       /* Number of interface */
    Byte  bAlternateSetting;      /* value to select alternate setting */
    Byte  bNumEndpoints;          /* Number of EP except EP 0 */
    Byte  bInterfaceClass;        /* Class code assigned by the USB */
    Byte  bInterfaceSubClass;     /* Sub-class code assigned by the USB */
    Byte  bInterfaceProtocol;     /* Protocol code assigned by the USB */
    Byte  iInterface;             /* Index of string descriptor */
  };


/*_____ U S B   E N D P O I N T   D E S C R I P T O R _______________________*/

struct usb_st_endpoint_descriptor
  {
    Byte   bLength;               /* Size of this descriptor in bytes */
    Byte   bDescriptorType;       /* ENDPOINT descriptor type */
    Byte   bEndpointAddress;      /* Address of the endpoint */
    Byte   bmAttributes;          /* Endpoint's attributes */
    Uint16 wMaxPacketSize;        /* Maximum packet size for this EP */
    Byte   bInterval;             /* Interval for polling EP in ms */
  };



/*_____ U S B   L I T T L E   E N D I A N  <-->  B I G   E N D I A N _________*/

extern  bdata bit   bmCBWFlag7;
extern  bdata bit   status_ready;
extern  data  Byte  status;
extern  bdata bit   rx_bank;


/*_____ D E C L A R A T I O N ______________________________________________*/

void    usb_init(void);
void    usb_enumeration_process(void);
                                      /* Standard define */
#define Usb_enable()                  (USBCON |= MSK_USBE)
#define Usb_disable()                 (USBCON &= ~MSK_USBE)
#define Usb_enable_int()              (IEN1 |= MSK_EUSB)
#define Usb_disable_int()             (IEN1 &= ~MSK_EUSB)
#define Usb_set_clock(c)              (USBCLK = c)
#define Usb_clear_EORINT()            (USBINT &= ~MSK_EORINT)
#define Usb_clear_WUPCPU()            (USBINT &= ~MSK_WUPCPU)
#define Usb_clear_SOFINT()            (USBINT &= ~MSK_SOFINT)
#define Usb_clear_SPINT()             (USBINT &= ~MSK_SPINT)
#define Usb_enable_SPINT()            (USBIEN |= MSK_SPINT)
#define Usb_suspend()                 (USBINT & MSK_SPINT)
#define Usb_resume()                  (USBINT & MSK_WUPCPU)
#define Usb_reset()                   (USBINT & MSK_EORINT)
#define Usb_clear_RXOUT()             (UEPSTAX &= ~MSK_RXOUT)
#define Usb_clear_RXOUT_PP()          {if(rx_bank){UEPSTAX&=~MSK_RXOUTB1;}else{UEPSTAX&=(~MSK_RXOUTB0);}rx_bank=~rx_bank;}
#define Usb_rx_complete()             (UEPSTAX & MSK_RXOUTB0B1)
#define Usb_clear_RXSETUP()           (UEPSTAX &= ~MSK_RXSETUP)
#define Usb_setup_received()          (UEPSTAX & MSK_RXSETUP)
#define Usb_set_TXRDY()               (UEPSTAX |= MSK_TXRDY)
#define Usb_clear_DIR()               (UEPSTAX &= ~MSK_DIR)
#define Usb_set_DIR()                 (UEPSTAX |= MSK_DIR)
#define Usb_clear_TXCMPL()            (UEPSTAX &= ~MSK_TXCMPL)
#define Usb_tx_complete()             (UEPSTAX & MSK_TXCMPL)
#define Usb_configure_address(x)      (USBADDR = (0x80 | x))
#define Usb_set_CONFG()               (USBCON |= MSK_CONFG)
#define Usb_clear_CONFG()             (USBCON &= ~MSK_CONFG)
#define Usb_set_FADDEN()              (USBCON |= MSK_FADDEN)
#define Usb_clear_FADDEN()            (USBCON &= ~MSK_FADDEN)
#define Usb_select_ep(e)              (UEPNUM = e)

#define Usb_clear_rx_bank()            (rx_bank = FALSE)

#define MSK_EP_DIR                    0x7F
#define REQUEST_DEVICE_STATUS         0x80
#define REQUEST_INTERFACE_STATUS      0x81
#define REQUEST_ENDPOINT_STATUS       0x82
#define ENDPOINT_0                    0x00
#define ENDPOINT_1                    0x81
#define ENDPOINT_2                    0x02
#define ZERO_TYPE                     0x00
#define INTERFACE_TYPE                0x01
#define ENDPOINT_TYPE                 0x02

                                      /* mass storage define */
#define FREE                          0x00
#define Usb_set_STALLRQ()             (UEPSTAX |= MSK_STALLRQ)
#define Usb_clear_STALLRQ()           (UEPSTAX &= ~MSK_STALLRQ)
#define Usb_clear_STALLED()           (UEPSTAX &= ~MSK_STALLED)
#define Usb_STALL_requested()         (UEPSTAX & MSK_STALLRQ)
#define Usb_STALL_sent()              (UEPSTAX & MSK_STALLED)
#define Usb_set_no_data_phase()       (no_data_phase = 1)
#define Usb_clear_no_data_phase()     (no_data_phase = 0)

#define Usb_read_byte()               (UEPDATX)
#define Usb_write_byte(x)             (UEPDATX = x)

#define Usb_set_no_data_phase()       (no_data_phase = 1)
#define Usb_clear_no_data_phase()     (no_data_phase = 0)
#define Usb_set_status_ready()        (status_ready = 1)
#define Usb_clear_status_ready()      (status_ready = 0)
#define Usb_set_status(x)             (status = x); (status_ready = 1) 
#define Usb_CBWFlag_out()             (bmCBWFlag7 = 0)
#define Usb_CBWFlag_in()              (bmCBWFlag7 = 1)
#define Usb_get_CBWFlag()             (bmCBWFlag7)

#define COMMAND_PASSED                0x00
#define COMMAND_FAILED                0x01
#define PHASE_ERROR                   0x02

#ifndef USB_PU_CTRL
  #error USB_PU_CTRL must be defined in config.h
#else
  #if USB_PU_CTRL == TRUE
    #ifndef USB_PULL_UP_PORT
      #error USB_PULL_UP_PORT must be defined in board definition header file
    #else
      #define Usb_enable_pull_up()    (USB_PULL_UP_PORT = 0)
      #define Usb_disable_pull_up()   (USB_PULL_UP_PORT = 1)
    #endif
  #else
    #define Usb_enable_pull_up()
    #define Usb_disable_pull_up()
  #endif
#endif


#endif  /* _USB_DRV_H_ */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美综合天天夜夜久久| 九九视频精品免费| 色天使色偷偷av一区二区| 国产精品家庭影院| 色综合久久天天| 亚洲高清三级视频| 91精品国产高清一区二区三区| 日本中文字幕一区二区有限公司| 日韩一区二区三区精品视频| 韩国女主播一区| 国产日韩欧美一区二区三区乱码| jiyouzz国产精品久久| 亚洲男同性视频| 欧美色电影在线| 久久99国内精品| 奇米影视一区二区三区小说| 久久综合久久99| 99久久免费精品高清特色大片| 伊人一区二区三区| 日韩欧美国产一区二区在线播放| 狠狠狠色丁香婷婷综合激情| 亚洲日本免费电影| 欧美一区二区三区在| 风间由美一区二区三区在线观看| 亚洲欧美偷拍另类a∨色屁股| 欧美裸体bbwbbwbbw| 国产99久久久精品| 亚洲高清视频中文字幕| 久久久久久99久久久精品网站| 色婷婷av一区二区三区软件| 麻豆一区二区99久久久久| 国产精品久久久久久亚洲毛片| 欧美日韩在线免费视频| 国产成人在线色| 亚洲成人黄色小说| 国产日韩精品一区二区三区| 欧美日韩精品一区二区| 成人美女在线观看| 日韩成人午夜精品| 日韩一区中文字幕| 亚洲精品一区二区三区四区高清| 色婷婷精品久久二区二区蜜臂av| 麻豆高清免费国产一区| 一区二区三区在线观看欧美| 久久综合久久鬼色中文字| 欧美另类一区二区三区| 99精品国产99久久久久久白柏| 久久69国产一区二区蜜臀| 亚洲亚洲精品在线观看| 国产精品成人免费| 久久综合九色综合97婷婷女人| 欧美日韩亚洲不卡| 色一情一伦一子一伦一区| 国产麻豆91精品| 蜜臀精品一区二区三区在线观看 | 一级中文字幕一区二区| 中文字幕欧美激情一区| 精品日韩成人av| 在线看不卡av| 97久久人人超碰| 精品国产一区二区三区av性色| 一本久久综合亚洲鲁鲁五月天 | 久久伊人中文字幕| 日韩亚洲欧美成人一区| 欧美日韩精品欧美日韩精品一 | 三级影片在线观看欧美日韩一区二区| 中文字幕日韩av资源站| 国产精品免费人成网站| 国产亚洲成年网址在线观看| 精品国产一区二区亚洲人成毛片| 69p69国产精品| 这里是久久伊人| 精品视频免费看| 欧美日韩一区二区在线观看视频| 在线欧美一区二区| 欧美视频日韩视频| 欧美丝袜丝交足nylons| 日本精品免费观看高清观看| 91小视频在线| 欧美亚洲一区三区| 欧美日韩亚洲另类| 欧美一区二区三区电影| 日韩精品一区二区三区视频播放| 日韩免费一区二区三区在线播放| 日韩一级二级三级| 久久亚洲综合色一区二区三区| 久久久亚洲欧洲日产国码αv| 国产日韩三级在线| 国产精品免费观看视频| 亚洲精品五月天| 亚洲一区二区三区四区的| 国产精品91一区二区| 高清不卡一二三区| 色一情一乱一乱一91av| 宅男在线国产精品| 精品欧美一区二区久久| 欧美国产欧美综合| 亚洲精品国产精品乱码不99| 香港成人在线视频| 韩国中文字幕2020精品| jizzjizzjizz欧美| 欧美精品18+| 久久久激情视频| 亚洲美女视频在线| 日本不卡视频在线| 成人自拍视频在线观看| 欧美在线短视频| 欧美精品一区二区久久久| 中文字幕在线不卡一区 | 欧美高清性hdvideosex| 精品久久久久久久久久久久久久久久久| 久久这里都是精品| 一区二区三区蜜桃网| 欧美a级理论片| av中文字幕在线不卡| 欧美高清视频在线高清观看mv色露露十八| 精品精品国产高清a毛片牛牛 | 精品国产乱码久久久久久久 | 99精品视频中文字幕| 91精品国产91久久久久久一区二区 | 中文字幕在线不卡国产视频| 亚洲成国产人片在线观看| 国产精品99久久久久| 欧美人xxxx| 中文字幕中文乱码欧美一区二区| 午夜电影网一区| 成人av电影在线观看| 欧美一级理论片| 亚洲欧美电影一区二区| 国产一区二三区| 欧美色手机在线观看| 免费观看成人鲁鲁鲁鲁鲁视频| 成人黄色免费短视频| 91麻豆精品91久久久久久清纯| 国产精品日韩精品欧美在线 | 蜜桃视频免费观看一区| 色综合天天综合网国产成人综合天| 日韩一区二区三| 亚洲美女精品一区| 粉嫩aⅴ一区二区三区四区五区| 在线播放视频一区| 亚洲综合色网站| www.亚洲人| 国产欧美精品区一区二区三区| 美女在线观看视频一区二区| 欧美最猛性xxxxx直播| 中文字幕中文在线不卡住| 狠狠狠色丁香婷婷综合久久五月| 在线播放/欧美激情| 一区二区成人在线视频| 91免费版在线看| 国产精品免费观看视频| 国产91丝袜在线播放0| xf在线a精品一区二区视频网站| 免费精品视频最新在线| 欧美丰满嫩嫩电影| 婷婷久久综合九色综合伊人色| 91视视频在线观看入口直接观看www | 欧美日韩高清在线播放| 亚洲国产日韩a在线播放性色| 99精品国产视频| 成人欧美一区二区三区1314 | 久久99国产精品成人| 91精品国产乱码久久蜜臀| 婷婷丁香久久五月婷婷| 欧美日韩免费一区二区三区视频| 亚洲欧美另类在线| 色天使色偷偷av一区二区| 亚洲免费观看高清完整版在线观看 | 日韩综合一区二区| 欧美日韩小视频| 偷拍亚洲欧洲综合| 欧美一区二区黄| 青青草原综合久久大伊人精品优势| 欧美男生操女生| 蜜臀av一区二区在线观看| 日韩欧美国产综合一区 | 国产亚洲精久久久久久| 国产成人鲁色资源国产91色综| 国产日韩一级二级三级| 波多野结衣在线一区| 亚洲色图一区二区| 欧美亚洲自拍偷拍| 日韩精品视频网站| 欧美成人精品福利| 国产一区在线视频| 中文字幕高清不卡| 色系网站成人免费| 午夜私人影院久久久久| 欧美一区二区三区婷婷月色| 久久99精品国产麻豆婷婷洗澡| 久久先锋影音av| 99国产精品久久久| 一区2区3区在线看| 日韩免费福利电影在线观看| 国内精品国产三级国产a久久| 国产欧美精品一区二区色综合朱莉| av一本久道久久综合久久鬼色| 一级精品视频在线观看宜春院 | 91色.com|