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.h 6.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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) 2012 - 2014 Renesas Electronics Corporation. All rights reserved.
  22. *******************************************************************************/
  23. /*******************************************************************************
  24. * File Name : usb_function.h
  25. * $Rev: 1116 $
  26. * $Date:: 2014-07-09 16:29:19 +0900#$
  27. * Description : RZ/A1H R7S72100 USB Sample Program
  28. *******************************************************************************/
  29. #ifndef USB_FUNCTION_H
  30. #define USB_FUNCTION_H
  31. /*******************************************************************************
  32. Includes <System Includes> , "Project Includes"
  33. *******************************************************************************/
  34. #include "r_typedefs.h"
  35. #include "iodefine.h"
  36. #include "rza_io_regrw.h"
  37. /*******************************************************************************
  38. Macro definitions
  39. *******************************************************************************/
  40. #define USB_FUNCTION_ALT_NO (255)
  41. #define USB_FUNCTION_ALT_SET (0xff)
  42. #define USB_FUNCTION_BITUPLLE (0x0002u)
  43. #define USB_FUNCTION_BITUCKSEL (0x0004u)
  44. #define USB_FUNCTION_BITBWAIT (0x003fu)
  45. #define USB_FUNCTION_BUSWAIT_02 (0x0000u)
  46. #define USB_FUNCTION_BUSWAIT_03 (0x0001u)
  47. #define USB_FUNCTION_BUSWAIT_04 (0x0002u)
  48. #define USB_FUNCTION_BUSWAIT_05 (0x0003u)
  49. #define USB_FUNCTION_BUSWAIT_06 (0x0004u)
  50. #define USB_FUNCTION_BUSWAIT_07 (0x0005u)
  51. #define USB_FUNCTION_BUSWAIT_08 (0x0006u)
  52. #define USB_FUNCTION_BUSWAIT_09 (0x0007u)
  53. #define USB_FUNCTION_BUSWAIT_10 (0x0008u)
  54. #define USB_FUNCTION_BUSWAIT_11 (0x0009u)
  55. #define USB_FUNCTION_BUSWAIT_12 (0x000au)
  56. #define USB_FUNCTION_BUSWAIT_13 (0x000bu)
  57. #define USB_FUNCTION_BUSWAIT_14 (0x000cu)
  58. #define USB_FUNCTION_BUSWAIT_15 (0x000du)
  59. #define USB_FUNCTION_BUSWAIT_16 (0x000eu)
  60. #define USB_FUNCTION_BUSWAIT_17 (0x000fu)
  61. #define USB_FUNCTION_BITRESUME (0x0020u)
  62. #define USB_FUNCTION_BITUACT (0x0010u)
  63. #define USB_FUNCTION_HSPROC (0x0004u)
  64. #define USB_FUNCTION_HSMODE (0x0003u)
  65. #define USB_FUNCTION_FSMODE (0x0002u)
  66. #define USB_FUNCTION_LSMODE (0x0001u)
  67. #define USB_FUNCTION_UNDECID (0x0000u)
  68. #define USB_FUNCTION_BITRCNT (0x8000u)
  69. #define USB_FUNCTION_BITDREQE (0x1000u)
  70. #define USB_FUNCTION_BITMBW (0x0c00u)
  71. #define USB_FUNCTION_BITMBW_8 (0x0000u)
  72. #define USB_FUNCTION_BITMBW_16 (0x0400u)
  73. #define USB_FUNCTION_BITMBW_32 (0x0800u)
  74. #define USB_FUNCTION_BITBYTE_LITTLE (0x0000u)
  75. #define USB_FUNCTION_BITBYTE_BIG (0x0100u)
  76. #define USB_FUNCTION_BITISEL (0x0020u)
  77. #define USB_FUNCTION_BITCURPIPE (0x000fu)
  78. #define USB_FUNCTION_CFIFO_READ (0x0000u)
  79. #define USB_FUNCTION_CFIFO_WRITE (0x0020u)
  80. #define USB_FUNCTION_BITBVAL (0x8000u)
  81. #define USB_FUNCTION_BITBCLR (0x4000u)
  82. #define USB_FUNCTION_BITFRDY (0x2000u)
  83. #define USB_FUNCTION_BITDTLN (0x0fffu)
  84. #define USB_FUNCTION_BITVBSE (0x8000u)
  85. #define USB_FUNCTION_BITRSME (0x4000u)
  86. #define USB_FUNCTION_BITSOFE (0x2000u)
  87. #define USB_FUNCTION_BITDVSE (0x1000u)
  88. #define USB_FUNCTION_BITCTRE (0x0800u)
  89. #define USB_FUNCTION_BITVBINT (0x8000u)
  90. #define USB_FUNCTION_BITRESM (0x4000u)
  91. #define USB_FUNCTION_BITSOFR (0x2000u)
  92. #define USB_FUNCTION_BITDVST (0x1000u)
  93. #define USB_FUNCTION_BITCTRT (0x0800u)
  94. #define USB_FUNCTION_BITBEMPE (0x0400u)
  95. #define USB_FUNCTION_BITNRDYE (0x0200u)
  96. #define USB_FUNCTION_BITBRDYE (0x0100u)
  97. #define USB_FUNCTION_BITBEMP (0x0400u)
  98. #define USB_FUNCTION_BITNRDY (0x0200u)
  99. #define USB_FUNCTION_BITBRDY (0x0100u)
  100. #define USB_FUNCTION_BITDVSQ (0x0070u)
  101. #define USB_FUNCTION_BITDVSQS (0x0030u)
  102. #define USB_FUNCTION_DS_SPD_CNFG (0x0070u)
  103. #define USB_FUNCTION_DS_SPD_ADDR (0x0060u)
  104. #define USB_FUNCTION_DS_SPD_DFLT (0x0050u)
  105. #define USB_FUNCTION_DS_SPD_POWR (0x0040u)
  106. #define USB_FUNCTION_DS_CNFG (0x0030u)
  107. #define USB_FUNCTION_DS_ADDS (0x0020u)
  108. #define USB_FUNCTION_DS_DFLT (0x0010u)
  109. #define USB_FUNCTION_DS_POWR (0x0000u)
  110. #define USB_FUNCTION_BITVALID (0x0008u)
  111. #define USB_FUNCTION_BITCTSQ (0x0007u)
  112. #define USB_FUNCTION_CS_SQER (0x0006u)
  113. #define USB_FUNCTION_CS_WRND (0x0005u)
  114. #define USB_FUNCTION_CS_WRSS (0x0004u)
  115. #define USB_FUNCTION_CS_WRDS (0x0003u)
  116. #define USB_FUNCTION_CS_RDSS (0x0002u)
  117. #define USB_FUNCTION_CS_RDDS (0x0001u)
  118. #define USB_FUNCTION_CS_IDST (0x0000u)
  119. #define USB_FUNCTION_PIPExBUF (64u)
  120. #define USB_FUNCTION_D0FIFO (0)
  121. #define USB_FUNCTION_D1FIFO (1)
  122. #define USB_FUNCTION_DMA_READY (0)
  123. #define USB_FUNCTION_DMA_BUSY (1)
  124. #define USB_FUNCTION_DMA_BUSYEND (2)
  125. #define USB_FUNCTION_FIFO_USE (0x7000)
  126. #endif /* USB_FUNCTION_FUNCTION_H */
  127. /* End of File */