hal_usbh.c 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. /*
  2. * BSD 2-Clause License
  3. * Copyright (c) 2022, LiteEMF
  4. * All rights reserved.
  5. * This software component is licensed by LiteEMF under BSD 2-Clause license,
  6. * the "License"; You may not use this file except in compliance with the
  7. * License. You may obtain a copy of the License at:
  8. * opensource.org/licenses/BSD-2-Clause
  9. *
  10. */
  11. /************************************************************************************************************
  12. ** Description:
  13. ************************************************************************************************************/
  14. #include "hw_config.h"
  15. #if API_USBH_BIT_ENABLE
  16. #include "api/usb/usb_typedef.h"
  17. #include "api/usb/host/usbh.h"
  18. #include "api/api_log.h"
  19. /******************************************************************************************************
  20. ** Defined
  21. *******************************************************************************************************/
  22. /******************************************************************************************************
  23. ** public Parameters
  24. *******************************************************************************************************/
  25. /******************************************************************************************************
  26. ** static Parameters
  27. *******************************************************************************************************/
  28. /*****************************************************************************************************
  29. ** static Function
  30. ******************************************************************************************************/
  31. /*****************************************************************************************************
  32. ** Function
  33. ******************************************************************************************************/
  34. /*******************************************************************
  35. ** Parameters:
  36. ** Returns:
  37. ** Description:
  38. *******************************************************************/
  39. error_t hal_usbh_port_en(uint8_t id,uint8_t en, usb_speed_t* pspeed)
  40. {
  41. UNUSED_PARAMETER(id);
  42. UNUSED_PARAMETER(en);
  43. UNUSED_PARAMETER(pspeed);
  44. return ERROR_SUCCESS;
  45. }
  46. error_t hal_usbh_set_speed(uint8_t id, usb_speed_t speed)
  47. {
  48. UNUSED_PARAMETER(id);
  49. UNUSED_PARAMETER(speed);
  50. return ERROR_SUCCESS;
  51. }
  52. error_t hal_usbh_port_reset(uint8_t id, uint8_t reset_ms)
  53. {
  54. UNUSED_PARAMETER(id);
  55. UNUSED_PARAMETER(reset_ms);
  56. return ERROR_SUCCESS;
  57. }
  58. error_t hal_usbh_set_addr(uint8_t id,uint8_t addr)
  59. {
  60. UNUSED_PARAMETER(id);
  61. UNUSED_PARAMETER(addr);
  62. return ERROR_SUCCESS;
  63. }
  64. error_t hal_usbh_endp_unregister(uint8_t id,usb_endp_t *endpp)
  65. {
  66. UNUSED_PARAMETER(id);
  67. UNUSED_PARAMETER(endpp);
  68. return ERROR_SUCCESS;
  69. }
  70. error_t hal_usbh_endp_register(uint8_t id,usb_endp_t *endpp)
  71. {
  72. UNUSED_PARAMETER(id);
  73. UNUSED_PARAMETER(endpp);
  74. return ERROR_SUCCESS;
  75. }
  76. error_t hal_usbh_ctrl_transfer( uint8_t id, usb_control_request_t* preq,uint8_t* buf, uint16_t* plen)
  77. {
  78. UNUSED_PARAMETER(id);
  79. UNUSED_PARAMETER(preq);
  80. UNUSED_PARAMETER(buf);
  81. UNUSED_PARAMETER(plen);
  82. return ERROR_SUCCESS;
  83. }
  84. error_t hal_usbh_in(uint8_t id,usb_endp_t *endpp, uint8_t* buf,uint16_t* plen,uint16_t timeout_ms)
  85. {
  86. UNUSED_PARAMETER(id);
  87. UNUSED_PARAMETER(endpp);
  88. UNUSED_PARAMETER(buf);
  89. UNUSED_PARAMETER(plen);
  90. UNUSED_PARAMETER(timeout_ms);
  91. return ERROR_SUCCESS;
  92. }
  93. error_t hal_usbh_out(uint8_t id, usb_endp_t *endpp,uint8_t* buf, uint16_t len)
  94. {
  95. UNUSED_PARAMETER(id);
  96. UNUSED_PARAMETER(endpp);
  97. UNUSED_PARAMETER(buf);
  98. UNUSED_PARAMETER(len);
  99. return ERROR_SUCCESS;
  100. }
  101. error_t hal_usbh_driver_init(uint8_t id)
  102. {
  103. UNUSED_PARAMETER(id);
  104. return ERROR_SUCCESS;
  105. }
  106. error_t hal_usbh_driver_deinit(uint8_t id)
  107. {
  108. UNUSED_PARAMETER(id);
  109. return ERROR_SUCCESS;
  110. }
  111. void hal_usbh_driver_task(uint32_t dt_ms)
  112. {
  113. UNUSED_PARAMETER(dt_ms);
  114. }
  115. #endif