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.

usb0_function_api.h 5.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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 : usb0_function_api.h
  25. * $Rev: 1116 $
  26. * $Date:: 2014-07-09 16:29:19 +0900#$
  27. * Description : RZ/A1H R7S72100 USB Sample Program
  28. *******************************************************************************/
  29. #ifndef USB0_FUNCTION_API_H
  30. #define USB0_FUNCTION_API_H
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34. /*******************************************************************************
  35. Includes <System Includes> , "Project Includes"
  36. *******************************************************************************/
  37. /*******************************************************************************
  38. Typedef definitions
  39. *******************************************************************************/
  40. /*******************************************************************************
  41. Macro definitions
  42. *******************************************************************************/
  43. /*******************************************************************************
  44. Variable Externs
  45. *******************************************************************************/
  46. /*******************************************************************************
  47. Exported global variables and functions (to be accessed by other files)
  48. *******************************************************************************/
  49. void usb0_api_function_init(uint8_t int_level, uint16_t mode, uint16_t clockmode);
  50. uint16_t usb0_api_function_IsConfigured(void);
  51. uint16_t usb0_function_GetDeviceState(void);
  52. uint16_t usb0_api_function_CtrlReadStart(uint32_t size, uint8_t *data);
  53. void usb0_api_function_CtrlWriteStart(uint32_t size, uint8_t *data);
  54. uint16_t usb0_api_function_start_send_transfer(uint16_t pipe, uint32_t size, uint8_t *data);
  55. uint16_t usb0_api_function_check_pipe_status(uint16_t pipe, uint32_t *size);
  56. void usb0_api_function_clear_pipe_status(uint16_t pipe);
  57. void usb0_api_function_start_receive_transfer(uint16_t pipe, uint32_t size, uint8_t *data);
  58. void usb0_api_function_set_pid_buf(uint16_t pipe);
  59. void usb0_api_function_set_pid_nak(uint16_t pipe);
  60. void usb0_api_function_set_pid_stall(uint16_t pipe);
  61. void usb0_api_function_clear_pid_stall(uint16_t pipe);
  62. uint16_t usb0_api_function_get_pid(uint16_t pipe);
  63. int32_t usb0_api_function_check_stall(uint16_t pipe);
  64. void usb0_api_function_set_sqclr(uint16_t pipe);
  65. void usb0_api_function_set_sqset(uint16_t pipe);
  66. void usb0_api_function_set_csclr(uint16_t pipe);
  67. void usb0_api_function_set_curpipe(uint16_t pipe, uint16_t fifosel, uint16_t isel, uint16_t mbw);
  68. void usb0_api_function_clear_brdy_sts(uint16_t pipe);
  69. void usb0_api_function_clear_bemp_sts(uint16_t pipe);
  70. void usb0_api_function_clear_nrdy_sts(uint16_t pipe);
  71. void usb0_function_ClearFeature(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
  72. void usb0_function_SetFeature(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
  73. void usb0_function_SetAddress(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
  74. void usb0_function_SetDescriptor(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
  75. void usb0_function_SetConfiguration(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
  76. void usb0_function_SetInterface(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
  77. void usb0_function_SynchFrame(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
  78. void usb0_function_GetStatus(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
  79. void usb0_function_GetDescriptor(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
  80. void usb0_function_GetConfiguration(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
  81. void usb0_function_GetInterface(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
  82. void usb0_function_Resrv_0(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
  83. void usb0_function_Resrv_123(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
  84. void usb0_function_Resrv_4(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
  85. void usb0_function_Resrv_5(uint16_t type, uint16_t value, uint16_t index, uint16_t length);
  86. #ifdef __cplusplus
  87. }
  88. #endif
  89. #endif /* USB0_FUNCTION_API_H */
  90. /* End of File */