USB_Config.h 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. /******************************************************************************
  2. *
  3. * Freescale Semiconductor Inc.
  4. * (c) Copyright 2004-2010 Freescale Semiconductor, Inc.
  5. * ALL RIGHTS RESERVED.
  6. *
  7. ******************************************************************************
  8. *
  9. * THIS SOFTWARE IS PROVIDED BY FREESCALE "AS IS" AND ANY EXPRESSED OR
  10. * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  11. * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  12. * IN NO EVENT SHALL FREESCALE OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
  13. * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  14. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  15. * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  16. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  17. * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
  18. * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  19. * THE POSSIBILITY OF SUCH DAMAGE.
  20. *
  21. **************************************************************************//*!
  22. *
  23. * @file USB_Config.h
  24. *
  25. * @author B14088
  26. *
  27. * @version
  28. *
  29. * @date Oct 31, 2010
  30. *
  31. * @brief
  32. *****************************************************************************/
  33. #ifndef USB_CONFIG_H_
  34. #define USB_CONFIG_H_
  35. /*****************************************************************************/
  36. /* Includes Section */
  37. /*****************************************************************************/
  38. /*****************************************************************************/
  39. /* Typedef Section */
  40. /*****************************************************************************/
  41. /*****************************************************************************/
  42. /* Function's Prototypes */
  43. /*****************************************************************************/
  44. /* PHDC class services */
  45. extern void USB_Class_PHDC_Endpoint_Service (PTR_USB_DEV_EVENT_STRUCT event);
  46. extern void USB_NULL_CALLBACK (PTR_USB_DEV_EVENT_STRUCT event);
  47. /*****************************************************************************/
  48. /* Defines & Macros Section */
  49. /*****************************************************************************/
  50. #define REMOTE_WAKEUP_SUPPORT (TRUE)
  51. /* Hardware components configuration */
  52. #define USB_HW_VREG_EN TRUE
  53. #define USB_HW_PU_EN TRUE
  54. /* Event callbacks assignation */
  55. #define USB_EP0_CALLBACK USB_Control_Service
  56. #define USB_EP1_CALLBACK USB_Class_PHDC_Endpoint_Service
  57. #define USB_EP2_CALLBACK USB_Class_PHDC_Endpoint_Service
  58. #ifndef _MC9S08JS16_H
  59. #define USB_EP3_CALLBACK USB_Class_PHDC_Endpoint_Service
  60. #else
  61. #define USB_EP3_CALLBACK USB_NULL_CALLBACK
  62. #endif
  63. #define USB_EP4_CALLBACK USB_NULL_CALLBACK
  64. #define USB_EP5_CALLBACK USB_NULL_CALLBACK
  65. #define USB_EP6_CALLBACK USB_NULL_CALLBACK
  66. #define USB_EP7_CALLBACK USB_NULL_CALLBACK
  67. #define USB_EP8_CALLBACK USB_NULL_CALLBACK
  68. #define USB_EP9_CALLBACK USB_NULL_CALLBACK
  69. #define USB_EP10_CALLBACK USB_NULL_CALLBACK
  70. #define USB_EP11_CALLBACK USB_NULL_CALLBACK
  71. #define USB_EP12_CALLBACK USB_NULL_CALLBACK
  72. #define USB_EP13_CALLBACK USB_NULL_CALLBACK
  73. #define USB_EP14_CALLBACK USB_NULL_CALLBACK
  74. #define USB_EP15_CALLBACK USB_NULL_CALLBACK
  75. #define USB_BUS_RESET_CALLBACK USB_Reset_Service
  76. #define USB_SUSPEND_CALLBACK USB_NULL_CALLBACK
  77. #define USB_SOF_CALLBACK USB_Sof_Service
  78. #define USB_RESUME_CALLBACK USB_Resume_Service
  79. #define USB_SLEEP_CALLBACK USB_Suspend_Service
  80. #define USB_SPEED_DETECTION_CALLBACK USB_NULL_CALLBACK
  81. #define USB_ERROR_CALLBACK USB_Error_Service
  82. #define USB_STALL_CALLBACK USB_Stall_Service
  83. /* Endpoints configuration */
  84. #define USB_EP0_ENABLE TRUE
  85. #define USB_EP0_DIR EP_CTRL
  86. #define USB_EP0_HSHK TRUE
  87. #define USB_EP0_SIZE 32
  88. #define USB_EP1_ENABLE TRUE
  89. #define USB_EP1_DIR EP_IN
  90. #define USB_EP1_HSHK TRUE
  91. #define USB_EP1_SIZE 8
  92. #define USB_EP2_ENABLE TRUE
  93. #define USB_EP2_DIR EP_OUT
  94. #define USB_EP2_HSHK TRUE
  95. #define USB_EP2_SIZE 4
  96. #ifndef _MC9S08JS16_H
  97. #define USB_EP3_ENABLE TRUE
  98. #define USB_EP3_DIR EP_IN
  99. #define USB_EP3_HSHK TRUE
  100. #define USB_EP3_SIZE 8
  101. #else
  102. #define USB_EP3_ENABLE FALSE
  103. #define USB_EP3_DIR EP_IN
  104. #define USB_EP3_HSHK TRUE
  105. #define USB_EP3_SIZE 0
  106. #endif
  107. #define USB_EP4_ENABLE FALSE
  108. #define USB_EP4_DIR NA
  109. #define USB_EP4_HSHK TRUE
  110. #define USB_EP4_SIZE 0
  111. #define USB_EP5_ENABLE FALSE
  112. #define USB_EP5_DIR NA
  113. #define USB_EP5_HSHK TRUE
  114. #define USB_EP5_SIZE 0
  115. #define USB_EP6_ENABLE FALSE
  116. #define USB_EP6_DIR NA
  117. #define USB_EP6_HSHK TRUE
  118. #define USB_EP6_SIZE 0
  119. #define USB_EP7_ENABLE FALSE
  120. #define USB_EP7_DIR NA
  121. #define USB_EP7_HSHK TRUE
  122. #define USB_EP7_SIZE 0
  123. #define USB_EP8_ENABLE FALSE
  124. #define USB_EP8_DIR NA
  125. #define USB_EP8_HSHK TRUE
  126. #define USB_EP8_SIZE 0
  127. #define USB_EP9_ENABLE FALSE
  128. #define USB_EP9_DIR NA
  129. #define USB_EP9_HSHK TRUE
  130. #define USB_EP9_SIZE 0
  131. #define USB_EP10_ENABLE FALSE
  132. #define USB_EP10_DIR NA
  133. #define USB_EP10_HSHK TRUE
  134. #define USB_EP10_SIZE 0
  135. #define USB_EP11_ENABLE FALSE
  136. #define USB_EP11_DIR NA
  137. #define USB_EP11_HSHK TRUE
  138. #define USB_EP11_SIZE 0
  139. #define USB_EP12_ENABLE FALSE
  140. #define USB_EP12_DIR NA
  141. #define USB_EP12_HSHK TRUE
  142. #define USB_EP12_SIZE 0
  143. #define USB_EP13_ENABLE FALSE
  144. #define USB_EP13_DIR NA
  145. #define USB_EP13_HSHK TRUE
  146. #define USB_EP13_SIZE 0
  147. #define USB_EP14_ENABLE FALSE
  148. #define USB_EP14_DIR NA
  149. #define USB_EP14_HSHK TRUE
  150. #define USB_EP14_SIZE 0
  151. #define USB_EP15_ENABLE FALSE
  152. #define USB_EP15_DIR NA
  153. #define USB_EP15_HSHK TRUE
  154. #define USB_EP15_SIZE 0
  155. /*****************************************************************************/
  156. /* Extern Variables Section */
  157. /*****************************************************************************/
  158. /*****************************************************************************/
  159. /* Function Prototypes Section */
  160. /*****************************************************************************/
  161. /*****************************************************************************/
  162. #endif /* USB_CONFIG_H_ */