Keyboard firmwares for Atmel AVR and Cortex-M
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

usb_function_setting.h 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. /*******************************************************************************
  2. * DISCLAIMER
  3. * This software is supplied by Renesas Electronics Corporation and is only
  4. * intended for use with Renesas products. No other uses are authorized. This
  5. * software is owned by Renesas Electronics Corporation and is protected under
  6. * all applicable laws, including copyright laws.
  7. * THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
  8. * THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
  9. * LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
  10. * AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
  11. * TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
  12. * ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
  13. * FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
  14. * ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
  15. * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
  16. * Renesas reserves the right, without notice, to make changes to this software
  17. * and to discontinue the availability of this software. By using this software,
  18. * you agree to the additional terms and conditions found by accessing the
  19. * following link:
  20. * http://www.renesas.com/disclaimer
  21. * Copyright (C) 2014 - 2015 Renesas Electronics Corporation. All rights reserved.
  22. *******************************************************************************/
  23. #ifndef USB_FUNCTION_SETTING_H
  24. #define USB_FUNCTION_SETTING_H
  25. #ifdef __cplusplus
  26. extern "C" {
  27. #endif
  28. #define USB_FUNCTION_CH 0
  29. #define USB_FUNCTION_HISPEED 1
  30. #if (USB_FUNCTION_CH == 0)
  31. #include "usb0_function.h"
  32. #define USB20X USB200
  33. #define USBIX_IRQn USBI0_IRQn
  34. #define g_usbx_function_bit_set g_usb0_function_bit_set
  35. #define g_usbx_function_PipeDataSize g_usb0_function_PipeDataSize
  36. #define g_usbx_function_data_count g_usb0_function_data_count
  37. #define g_usbx_function_PipeTbl g_usb0_function_PipeTbl
  38. #define g_usbx_function_DmaStatus g_usb0_function_DmaStatus
  39. #define g_usbx_function_pipecfg g_usb0_function_pipecfg
  40. #define g_usbx_function_pipe_status g_usb0_function_pipe_status
  41. #define g_usbx_function_data_pointer g_usb0_function_data_pointer
  42. #define g_usbx_function_pipebuf g_usb0_function_pipebuf
  43. #define g_usbx_function_pipemaxp g_usb0_function_pipemaxp
  44. #define g_usbx_function_pipeperi g_usb0_function_pipeperi
  45. #define g_usbx_function_TestModeFlag g_usb0_function_TestModeFlag
  46. #define usbx_function_BRDYInterruptPIPE0 usb0_function_BRDYInterruptPIPE0
  47. #define usbx_function_BRDYInterrupt usb0_function_BRDYInterrupt
  48. #define usbx_function_NRDYInterruptPIPE0 usb0_function_NRDYInterruptPIPE0
  49. #define usbx_function_NRDYInterrupt usb0_function_NRDYInterrupt
  50. #define usbx_function_BEMPInterruptPIPE0 usb0_function_BEMPInterruptPIPE0
  51. #define usbx_function_BEMPInterrupt usb0_function_BEMPInterrupt
  52. #define usbx_function_read_buffer_c usb0_function_read_buffer_c
  53. #define usbx_function_set_pid_buf usb0_function_set_pid_buf
  54. #define usbx_function_disable_brdy_int usb0_function_disable_brdy_int
  55. #define usbx_function_set_pid_stall usb0_function_set_pid_stall
  56. #define usbx_function_dma_interrupt_d0fifo usb0_function_dma_interrupt_d0fifo
  57. #define usbx_function_read_dma usb0_function_read_dma
  58. #define usbx_function_dma_interrupt_d1fifo usb0_function_dma_interrupt_d1fifo
  59. #define usbx_function_write_buffer usb0_function_write_buffer
  60. #define usbx_function_set_pid_nak usb0_function_set_pid_nak
  61. #define usbx_function_get_mbw usb0_function_get_mbw
  62. #define usbx_function_set_curpipe usb0_function_set_curpipe
  63. #define usbx_function_aclrm usb0_function_aclrm
  64. #define usbx_function_enable_nrdy_int usb0_function_enable_nrdy_int
  65. #define usbx_function_enable_brdy_int usb0_function_enable_brdy_int
  66. #define usbx_function_get_pid usb0_function_get_pid
  67. #define usbx_function_get_inbuf usb0_function_get_inbuf
  68. #define usbx_function_disable_bemp_int usb0_function_disable_bemp_int
  69. #define usbx_function_EpToPipe usb0_function_EpToPipe
  70. #define usbx_function_clear_pipe_tbl usb0_function_clear_pipe_tbl
  71. #define Userdef_USB_usbx_function_d0fifo_dmaintid Userdef_USB_usb0_function_d0fifo_dmaintid
  72. #define Userdef_USB_usbx_function_d1fifo_dmaintid Userdef_USB_usb0_function_d1fifo_dmaintid
  73. #define usbx_function_reset_module usb0_function_reset_module
  74. #define usbx_function_init_status usb0_function_init_status
  75. #define usbx_function_InitModule usb0_function_InitModule
  76. #define usbx_function_clear_alt usb0_function_clear_alt
  77. #define usbx_function_set_sqclr usb0_function_set_sqclr
  78. #define usbx_api_function_CtrlWriteStart usb0_api_function_CtrlWriteStart
  79. #define usbx_api_function_CtrlReadStart usb0_api_function_CtrlReadStart
  80. #define usbx_function_write_buffer_c usb0_function_write_buffer_c
  81. #define usbx_api_function_check_pipe_status usb0_api_function_check_pipe_status
  82. #define usbx_api_function_set_pid_nak usb0_api_function_set_pid_nak
  83. #define usbx_api_function_clear_pipe_status usb0_api_function_clear_pipe_status
  84. #define usbx_api_function_start_receive_transfer usb0_api_function_start_receive_transfer
  85. #define usbx_function_read_buffer usb0_function_read_buffer
  86. #define usbx_api_function_start_send_transfer usb0_api_function_start_send_transfer
  87. #define usbx_function_stop_transfer usb0_function_stop_transfer
  88. #define usbx_function_clear_pid_stall usb0_function_clear_pid_stall
  89. #define usbx_function_CheckVBUStaus usb0_function_CheckVBUStaus
  90. #define usbx_function_USB_FUNCTION_Attach usb0_function_USB_FUNCTION_Attach
  91. #define usbx_function_USB_FUNCTION_Detach usb0_function_USB_FUNCTION_Detach
  92. #define usbx_function_is_hispeed usb0_function_is_hispeed
  93. #define usbx_function_ResetDescriptor usb0_function_ResetDescriptor
  94. #define usbx_function_USB_FUNCTION_Suspend usb0_function_USB_FUNCTION_Suspend
  95. #define usbx_function_USB_FUNCTION_TestMode usb0_function_USB_FUNCTION_TestMode
  96. #else
  97. #include "usb1_function.h"
  98. #define USB20X USB201
  99. #define USBIX_IRQn USBI1_IRQn
  100. #define g_usbx_function_bit_set g_usb1_function_bit_set
  101. #define g_usbx_function_PipeDataSize g_usb1_function_PipeDataSize
  102. #define g_usbx_function_data_count g_usb1_function_data_count
  103. #define g_usbx_function_PipeTbl g_usb1_function_PipeTbl
  104. #define g_usbx_function_DmaStatus g_usb1_function_DmaStatus
  105. #define g_usbx_function_pipecfg g_usb1_function_pipecfg
  106. #define g_usbx_function_pipe_status g_usb1_function_pipe_status
  107. #define g_usbx_function_data_pointer g_usb1_function_data_pointer
  108. #define g_usbx_function_pipebuf g_usb1_function_pipebuf
  109. #define g_usbx_function_pipemaxp g_usb1_function_pipemaxp
  110. #define g_usbx_function_pipeperi g_usb1_function_pipeperi
  111. #define g_usbx_function_TestModeFlag g_usb1_function_TestModeFlag
  112. #define usbx_function_BRDYInterruptPIPE0 usb1_function_BRDYInterruptPIPE0
  113. #define usbx_function_BRDYInterrupt usb1_function_BRDYInterrupt
  114. #define usbx_function_NRDYInterruptPIPE0 usb1_function_NRDYInterruptPIPE0
  115. #define usbx_function_NRDYInterrupt usb1_function_NRDYInterrupt
  116. #define usbx_function_BEMPInterruptPIPE0 usb1_function_BEMPInterruptPIPE0
  117. #define usbx_function_BEMPInterrupt usb1_function_BEMPInterrupt
  118. #define usbx_function_read_buffer_c usb1_function_read_buffer_c
  119. #define usbx_function_set_pid_buf usb1_function_set_pid_buf
  120. #define usbx_function_disable_brdy_int usb1_function_disable_brdy_int
  121. #define usbx_function_set_pid_stall usb1_function_set_pid_stall
  122. #define usbx_function_dma_interrupt_d0fifo usb1_function_dma_interrupt_d0fifo
  123. #define usbx_function_read_dma usb1_function_read_dma
  124. #define usbx_function_dma_interrupt_d1fifo usb1_function_dma_interrupt_d1fifo
  125. #define usbx_function_write_buffer usb1_function_write_buffer
  126. #define usbx_function_set_pid_nak usb1_function_set_pid_nak
  127. #define usbx_function_get_mbw usb1_function_get_mbw
  128. #define usbx_function_set_curpipe usb1_function_set_curpipe
  129. #define usbx_function_aclrm usb1_function_aclrm
  130. #define usbx_function_enable_nrdy_int usb1_function_enable_nrdy_int
  131. #define usbx_function_enable_brdy_int usb1_function_enable_brdy_int
  132. #define usbx_function_get_pid usb1_function_get_pid
  133. #define usbx_function_get_inbuf usb1_function_get_inbuf
  134. #define usbx_function_disable_bemp_int usb1_function_disable_bemp_int
  135. #define usbx_function_EpToPipe usb1_function_EpToPipe
  136. #define usbx_function_clear_pipe_tbl usb1_function_clear_pipe_tbl
  137. #define Userdef_USB_usbx_function_d0fifo_dmaintid Userdef_USB_usb1_function_d0fifo_dmaintid
  138. #define Userdef_USB_usbx_function_d1fifo_dmaintid Userdef_USB_usb1_function_d1fifo_dmaintid
  139. #define usbx_function_reset_module usb1_function_reset_module
  140. #define usbx_function_init_status usb1_function_init_status
  141. #define usbx_function_InitModule usb1_function_InitModule
  142. #define usbx_function_clear_alt usb1_function_clear_alt
  143. #define usbx_function_set_sqclr usb1_function_set_sqclr
  144. #define usbx_api_function_CtrlWriteStart usb1_api_function_CtrlWriteStart
  145. #define usbx_api_function_CtrlReadStart usb1_api_function_CtrlReadStart
  146. #define usbx_function_write_buffer_c usb1_function_write_buffer_c
  147. #define usbx_api_function_check_pipe_status usb1_api_function_check_pipe_status
  148. #define usbx_api_function_set_pid_nak usb1_api_function_set_pid_nak
  149. #define usbx_api_function_clear_pipe_status usb1_api_function_clear_pipe_status
  150. #define usbx_api_function_start_receive_transfer usb1_api_function_start_receive_transfer
  151. #define usbx_function_read_buffer usb1_function_read_buffer
  152. #define usbx_api_function_start_send_transfer usb1_api_function_start_send_transfer
  153. #define usbx_function_stop_transfer usb1_function_stop_transfer
  154. #define usbx_function_clear_pid_stall usb1_function_clear_pid_stall
  155. #define usbx_function_CheckVBUStaus usb1_function_CheckVBUStaus
  156. #define usbx_function_USB_FUNCTION_Attach usb1_function_USB_FUNCTION_Attach
  157. #define usbx_function_USB_FUNCTION_Detach usb1_function_USB_FUNCTION_Detach
  158. #define usbx_function_is_hispeed usb1_function_is_hispeed
  159. #define usbx_function_ResetDescriptor usb1_function_ResetDescriptor
  160. #define usbx_function_USB_FUNCTION_Suspend usb1_function_USB_FUNCTION_Suspend
  161. #define usbx_function_USB_FUNCTION_TestMode usb1_function_USB_FUNCTION_TestMode
  162. #endif
  163. #ifdef __cplusplus
  164. }
  165. #endif
  166. #endif /* USB_FUNCTION_SETTING_H */