usb_reg.h 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. /***********************************************************************************
  2. Filename: usb_reg.h
  3. Description: Register bit defintions for CCxx11 and CC2531.
  4. ***********************************************************************************/
  5. #ifndef USBREG_H
  6. #define USBREG_H
  7. // USBADDR
  8. #define USBADDR_UPDATE 0x80
  9. #define USBADDR_USBADDR 0x7F
  10. // USBPOW
  11. #define USBPOW_ISO_WAIT_SOF 0x80
  12. #define USBPOW_RST 0x08
  13. #define USBPOW_RESUME 0x04
  14. #define USBPOW_SUSPEND 0x02
  15. #define USBPOW_SUSPEND_EN 0x01
  16. // USBIIF
  17. #define USBIIF_INEP5IF 0x20
  18. #define USBIIF_INEP4IF 0x10
  19. #define USBIIF_INEP3IF 0x08
  20. #define USBIIF_INEP2IF 0x04
  21. #define USBIIF_INEP1IF 0x02
  22. #define USBIIF_EP0IF 0x01
  23. // USBOIF
  24. #define USBOIF_OUTEP5IF 0x20
  25. #define USBOIF_OUTEP4IF 0x10
  26. #define USBOIF_OUTEP3IF 0x08
  27. #define USBOIF_OUTEP2IF 0x04
  28. #define USBOIF_OUTEP1IF 0x02
  29. // USBCIF
  30. #define USBCIF_SOFIF 0x08
  31. #define USBCIF_RSTIF 0x04
  32. #define USBCIF_RESUMEIF 0x02
  33. #define USBCIF_SUSPENDIF 0x01
  34. // USBIIE
  35. #define USBIIE_INEP5IE 0x20
  36. #define USBIIE_INEP4IE 0x10
  37. #define USBIIE_INEP3IE 0x08
  38. #define USBIIE_INEP2IE 0x04
  39. #define USBIIE_INEP1IE 0x02
  40. #define USBIIE_EP0IE 0x01
  41. // USBOIE
  42. #define USBOIE_OUTEP5IE 0x20
  43. #define USBOIE_OUTEP4IE 0x10
  44. #define USBOIE_OUTEP3IE 0x08
  45. #define USBOIE_OUTEP2IE 0x04
  46. #define USBOIE_OUTEP1IE 0x02
  47. // USBCIE
  48. #define USBCIE_SOFIE 0x08
  49. #define USBCIE_RSTIE 0x04
  50. #define USBCIE_RESUMEIE 0x02
  51. #define USBCIE_SUSPENDIE 0x01
  52. // USBCS0
  53. #define USBCS0_CLR_SETUP_END 0x80
  54. #define USBCS0_CLR_OUTPKT_RDY 0x40
  55. #define USBCS0_SEND_STALL 0x20
  56. #define USBCS0_SETUP_END 0x10
  57. #define USBCS0_DATA_END 0x08
  58. #define USBCS0_SENT_STALL 0x04
  59. #define USBCS0_INPKT_RDY 0x02
  60. #define USBCS0_OUTPKT_RDY 0x01
  61. // USBCSIL
  62. #define USBCSIL_CLR_DATA_TOG 0x40
  63. #define USBCSIL_SENT_STALL 0x20
  64. #define USBCSIL_SEND_STALL 0x10
  65. #define USBCSIL_FLUSH_PACKET 0x08
  66. #define USBCSIL_UNDERRUN 0x04
  67. #define USBCSIL_PKT_PRESENT 0x02
  68. #define USBCSIL_INPKT_RDY 0x01
  69. // USBCSIH
  70. #define USBCSIH_AUTOSET 0x80
  71. #define USBCSIH_ISO 0x40
  72. #define USBCSIH_FORCE_DATA_TOG 0x08
  73. #define USBCSIH_IN_DBL_BUF 0x01
  74. // USBCSOL
  75. #define USBCSOL_CLR_DATA_TOG 0x80
  76. #define USBCSOL_SENT_STALL 0x40
  77. #define USBCSOL_SEND_STALL 0x20
  78. #define USBCSOL_FLUSH_PACKET 0x10
  79. #define USBCSOL_DATA_ERROR 0x08
  80. #define USBCSOL_OVERRUN 0x04
  81. #define USBCSOL_FIFO_FULL 0x02
  82. #define USBCSOL_OUTPKT_RDY 0x01
  83. // USBCSOH
  84. #define USBCSOH_AUTOCLEAR 0x80
  85. #define USBCSOH_ISO 0x40
  86. #define USBCSOH_OUT_DBL_BUF 0x01
  87. #define SLEEP_USB_EN 0x80
  88. /*
  89. +------------------------------------------------------------------------------
  90. | Copyright 2004-2007 Texas Instruments Incorporated. All rights reserved.
  91. |
  92. | IMPORTANT: Your use of this Software is limited to those specific rights
  93. | granted under the terms of a software license agreement between the user who
  94. | downloaded the software, his/her employer (which must be your employer) and
  95. | Texas Instruments Incorporated (the "License"). You may not use this Software
  96. | unless you agree to abide by the terms of the License. The License limits
  97. | your use, and you acknowledge, that the Software may not be modified, copied
  98. | or distributed unless embedded on a Texas Instruments microcontroller or used
  99. | solely and exclusively in conjunction with a Texas Instruments radio
  100. | frequency transceiver, which is integrated into your product. Other than for
  101. | the foregoing purpose, you may not use, reproduce, copy, prepare derivative
  102. | works of, modify, distribute, perform, display or sell this Software and/or
  103. | its documentation for any purpose.
  104. |
  105. | YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
  106. | PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
  107. | INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
  108. | NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
  109. | TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
  110. | NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
  111. | LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING
  112. | BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
  113. | CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
  114. | SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
  115. | (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
  116. |
  117. | Should you have any questions regarding your right to use this Software,
  118. | contact Texas Instruments Incorporated at www.TI.com.
  119. |
  120. +------------------------------------------------------------------------------
  121. */
  122. #endif