Mistake on this page?
Report an issue in GitHub or email us
tfm_psa_call_param.h
1 /*
2  * Copyright (c) 2021, Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 #ifndef __TFM_PSA_CALL_PARAM_H__
9 #define __TFM_PSA_CALL_PARAM_H__
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 #define TYPE_OFFSET 16U
16 #define TYPE_MASK (0xFFFFUL << TYPE_OFFSET)
17 #define IN_LEN_OFFSET 8U
18 #define IN_LEN_MASK (0xFFUL << IN_LEN_OFFSET)
19 #define OUT_LEN_OFFSET 0U
20 #define OUT_LEN_MASK (0xFFUL << OUT_LEN_OFFSET)
21 
22 #define PARAM_PACK(type, in_len, out_len) \
23  (((((uint32_t)type) << TYPE_OFFSET) & TYPE_MASK) | \
24  ((((uint32_t)in_len) << IN_LEN_OFFSET) & IN_LEN_MASK) | \
25  ((((uint32_t)out_len) << OUT_LEN_OFFSET) & OUT_LEN_MASK))
26 
27 #ifdef __cplusplus
28 }
29 #endif
30 
31 #endif /* __TFM_PSA_CALL_PARAM_H__ */
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.