• Main Page
  • Modules
  • Index
  • File List
  • Globals

hal/nrf24lu1p/usb.h

Go to the documentation of this file.
00001 /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved.
00002  *
00003  * The information contained herein is confidential property of Nordic 
00004  * Semiconductor ASA.Terms and conditions of usage are described in detail 
00005  * in NORDIC SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 
00006  *
00007  * Licensees are granted free, non-transferable use of the information. NO
00008  * WARRENTY of ANY KIND is provided. This heading must NOT be removed from
00009  * the file.
00010  *              
00011  * $LastChangedRevision: 133 $
00012  */ 
00013 
00018 #ifndef USB_H__
00019 #define USB_H__
00020 
00021 #include <stdint.h>
00022 
00023 #include "hal_usb.h"
00024 
00025 #define USB_ENDPOINT_IN_COUNT 5
00026 #define USB_ENDPOINT_OUT_COUNT 5
00027 
00028 #define USB_EP0_HSNAK() do { ep0cs = 0x02; } while(0)
00029 #define USB_EP0_STALL() do { ep0cs = 0x11; } while(0) // Set both DSTALL and STALL when we want to stall a request during a SETUP transaction
00030 #define USB_EP0_DSTALL() do { ep0cs |= 0x10; } while(0)
00031 
00032 #define INT_SUDAV    0x00
00033 #define INT_SOF      0x04
00034 #define INT_SUTOK    0x08
00035 #define INT_SUSPEND  0x0C
00036 #define INT_USBRESET 0x10
00037 #define INT_EP0IN    0x18
00038 #define INT_EP0OUT   0x1C
00039 #define INT_EP1IN    0x20
00040 #define INT_EP1OUT   0x24
00041 #define INT_EP2IN    0x28
00042 #define INT_EP2OUT   0x2C
00043 #define INT_EP3IN    0x30
00044 #define INT_EP3OUT   0x34
00045 #define INT_EP4IN    0x38
00046 #define INT_EP4OUT   0x3C
00047 #define INT_EP5IN    0x40
00048 #define INT_EP5OUT   0x44
00049 
00050 #define BM_REQUEST_TYPE  0
00051 #define B_REQUEST        1
00052 #define W_VALUE          2
00053 #define W_INDEX          4
00054 #define W_LENGTH         6
00055 
00056 typedef struct
00057 {
00058     uint8_t *data_ptr;
00059     uint8_t data_size;
00060     uint8_t pkt_size;
00061 } packetizer_t;
00062 
00063 #endif

Generated on Fri Apr 20 2012 14:11:45 for nRFGo SDK by  doxygen 1.7.2