1 /*******************************************************************************
\r
2 * (c) Copyright 2012 Microsemi SoC Products Group. All rights reserved.
\r
4 * SmartFusion2 COMBLK access functions.
\r
6 * SVN $Revision: 5160 $
\r
7 * SVN $Date: 2013-03-14 14:50:49 +0000 (Thu, 14 Mar 2013) $
\r
9 #ifndef __MSS_COMBLK_H_
\r
10 #define __MSS_COMBLK_H_ 1
\r
12 #include "../../CMSIS/m2sxxx.h"
\r
18 /*------------------------------------------------------------------------------
\r
21 typedef void(*comblk_completion_handler_t)(uint8_t * p_response, uint16_t response_size);
\r
23 typedef uint32_t (*comblk_page_handler_t)(uint8_t const ** pp_next_page);
\r
25 typedef void (*comblk_async_event_handler_t)(uint8_t event_opcode);
\r
27 /*------------------------------------------------------------------------------
\r
30 void MSS_COMBLK_init(comblk_async_event_handler_t async_event_handler);
\r
32 /*------------------------------------------------------------------------------
\r
35 void MSS_COMBLK_send_cmd_with_ptr
\r
38 uint32_t cmd_params_ptr,
\r
39 uint8_t * p_response,
\r
40 uint16_t response_size,
\r
41 comblk_completion_handler_t completion_handler
\r
44 /*------------------------------------------------------------------------------
\r
47 void MSS_COMBLK_send_cmd
\r
49 const uint8_t * p_cmd,
\r
51 const uint8_t * p_data,
\r
53 uint8_t * p_response,
\r
54 uint16_t response_size,
\r
55 comblk_completion_handler_t completion_handler
\r
58 /*------------------------------------------------------------------------------
\r
61 void MSS_COMBLK_read
\r
63 const uint8_t * p_data,
\r
65 uint8_t * p_response,
\r
66 uint16_t response_size,
\r
67 comblk_completion_handler_t completion_handler
\r
70 /*------------------------------------------------------------------------------
\r
73 void MSS_COMBLK_send_paged_cmd
\r
75 const uint8_t * p_cmd,
\r
77 uint8_t * p_response,
\r
78 uint16_t response_size,
\r
79 uint32_t (*)(uint8_t const **),
\r
80 void (*completion_handler)(uint8_t *, uint16_t)
\r
87 #endif /* __MSS_COMBLK_H_ */
\r