mss_comblk.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*******************************************************************************
  2. * (c) Copyright 2012-2016 Microsemi SoC Products Group. All rights reserved.
  3. *
  4. * SmartFusion2 COMBLK access functions.
  5. *
  6. * SVN $Revision: 8345 $
  7. * SVN $Date: 2016-03-23 11:53:04 +0530 (Wed, 23 Mar 2016) $
  8. */
  9. #ifndef __MSS_COMBLK_H_
  10. #define __MSS_COMBLK_H_ 1
  11. #include "../../CMSIS/m2sxxx.h"
  12. #include "mss_comblk_page_handler.h"
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. /*------------------------------------------------------------------------------
  17. *
  18. */
  19. typedef void(*comblk_completion_handler_t)(uint8_t * p_response, uint16_t response_size);
  20. typedef void (*comblk_async_event_handler_t)(uint8_t event_opcode);
  21. /*------------------------------------------------------------------------------
  22. *
  23. */
  24. void MSS_COMBLK_init
  25. (
  26. comblk_async_event_handler_t async_event_handler,
  27. uint8_t* p_response
  28. );
  29. /*------------------------------------------------------------------------------
  30. *
  31. */
  32. void MSS_COMBLK_send_cmd_with_ptr
  33. (
  34. uint8_t cmd_opcode,
  35. uint32_t cmd_params_ptr,
  36. uint8_t * p_response,
  37. uint16_t response_size,
  38. comblk_completion_handler_t completion_handler
  39. );
  40. /*------------------------------------------------------------------------------
  41. *
  42. */
  43. void MSS_COMBLK_send_cmd
  44. (
  45. const uint8_t * p_cmd,
  46. uint16_t cmd_size,
  47. const uint8_t * p_data,
  48. uint32_t data_size,
  49. uint8_t * p_response,
  50. uint16_t response_size,
  51. comblk_completion_handler_t completion_handler
  52. );
  53. /*------------------------------------------------------------------------------
  54. *
  55. */
  56. void MSS_COMBLK_read
  57. (
  58. const uint8_t * p_data,
  59. uint16_t cmd_size,
  60. uint8_t * p_response,
  61. uint16_t response_size,
  62. comblk_completion_handler_t completion_handler
  63. );
  64. /*------------------------------------------------------------------------------
  65. *
  66. */
  67. void MSS_COMBLK_send_paged_cmd
  68. (
  69. const uint8_t * p_cmd,
  70. uint16_t cmd_size,
  71. uint8_t * p_response,
  72. uint16_t response_size,
  73. comblk_page_handler_t page_read_handler,
  74. comblk_completion_handler_t completion_handler
  75. );
  76. #ifdef __cplusplus
  77. }
  78. #endif
  79. #endif /* __MSS_COMBLK_H_ */