Skip to content

Commit 69101b8

Browse files
committed
uVisor: Update the RPC header files
This follows: ARMmbed/uvisor#02ecf05 - "Remove unused TFN_RPC_Callback" ARMmbed/uvisor#483ddda - "rpc: Add `rpc_fncall_wait`" ARMmbed/uvisor#fdb7dce - "rpc: Add missing UVISOR_EXTERN to rpc_fncall_waitfor declaration"
1 parent 2f2fbc4 commit 69101b8

File tree

1 file changed

+16
-2
lines changed
  • features/FEATURE_UVISOR/includes/uvisor/api/inc

1 file changed

+16
-2
lines changed

features/FEATURE_UVISOR/includes/uvisor/api/inc/rpc.h

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
typedef uint32_t uvisor_rpc_result_t;
3434

3535
typedef uint32_t (*TFN_Ptr)(uint32_t, uint32_t, uint32_t, uint32_t);
36-
typedef int (*TFN_RPC_Callback)(int);
3736

3837
/** Wait for incoming RPC.
3938
*
@@ -43,6 +42,21 @@ typedef int (*TFN_RPC_Callback)(int);
4342
* @param timeout_ms specifies how long to wait (in ms) for an incoming RPC
4443
* message before returning
4544
*/
46-
int rpc_fncall_waitfor(const TFN_Ptr fn_ptr_array[], size_t fn_count, uint32_t timeout_ms);
45+
UVISOR_EXTERN int rpc_fncall_waitfor(const TFN_Ptr fn_ptr_array[], size_t fn_count, uint32_t timeout_ms);
46+
47+
/** Wait for an outgoing RPC to finish.
48+
*
49+
* Wait for the result of a previously started asynchronous RPC. After this
50+
* call, ret will contain the return value of the RPC. The return value of this
51+
* function may indicate that there was an error or a timeout with non-zero.
52+
*
53+
* @param result[in] The token to wait on for the result of an asynchronous RPC
54+
* @param timeout_ms[in] How long to wait (in ms) for the asynchronous RPC
55+
* message to finish before returning
56+
* @param ret[out] The return value resulting from the finished RPC to
57+
* the target function
58+
* @returns Non-zero on error or timeout, zero on successful wait
59+
*/
60+
UVISOR_EXTERN int rpc_fncall_wait(uvisor_rpc_result_t result, uint32_t timeout_ms, uint32_t * ret);
4761

4862
#endif /* __UVISOR_API_RPC_H__ */

0 commit comments

Comments
 (0)