7#ifndef ZEPHYR_INCLUDE_SIP_SVC_PROTO_H_
8#define ZEPHYR_INCLUDE_SIP_SVC_PROTO_H_
25#define SIP_SVC_ID_INVALID 0xFFFFFFFF
30#define SIP_SVC_PROTO_VER 0x0
32#define SIP_SVC_PROTO_HEADER_CODE_OFFSET 0
33#define SIP_SVC_PROTO_HEADER_CODE_MASK 0xFFFF
35#define SIP_SVC_PROTO_HEADER_TRANS_ID_OFFSET 16
36#define SIP_SVC_PROTO_HEADER_TRANS_ID_MASK 0xFF
38#define SIP_SVC_PROTO_HEADER_VER_OFFSET 30
39#define SIP_SVC_PROTO_HEADER_VER_MASK 0x3
41#define SIP_SVC_PROTO_HEADER(code, trans_id) \
42 ((((code)&SIP_SVC_PROTO_HEADER_CODE_MASK) << SIP_SVC_PROTO_HEADER_CODE_OFFSET) | \
43 (((trans_id)&SIP_SVC_PROTO_HEADER_TRANS_ID_MASK) \
44 << SIP_SVC_PROTO_HEADER_TRANS_ID_OFFSET) | \
45 ((SIP_SVC_PROTO_VER & SIP_SVC_PROTO_HEADER_VER_MASK) << SIP_SVC_PROTO_HEADER_VER_OFFSET))
47#define SIP_SVC_PROTO_HEADER_GET_CODE(header) \
48 (((header) >> SIP_SVC_PROTO_HEADER_CODE_OFFSET) & SIP_SVC_PROTO_HEADER_CODE_MASK)
50#define SIP_SVC_PROTO_HEADER_GET_TRANS_ID(header) \
51 (((header) >> SIP_SVC_PROTO_HEADER_TRANS_ID_OFFSET) & SIP_SVC_PROTO_HEADER_TRANS_ID_MASK)
53#define SIP_SVC_PROTO_HEADER_SET_TRANS_ID(header, trans_id) \
54 (header) &= ~(SIP_SVC_PROTO_HEADER_TRANS_ID_MASK << SIP_SVC_PROTO_HEADER_TRANS_ID_OFFSET); \
55 (header) |= (((trans_id)&SIP_SVC_PROTO_HEADER_TRANS_ID_MASK) \
56 << SIP_SVC_PROTO_HEADER_TRANS_ID_OFFSET);
70#define SIP_SVC_PROTO_CMD_SYNC 0x0
71#define SIP_SVC_PROTO_CMD_ASYNC 0x1
72#define SIP_SVC_PROTO_CMD_MAX SIP_SVC_PROTO_CMD_ASYNC
98#define SIP_SVC_PROTO_STATUS_OK 0x0
99#define SIP_SVC_PROTO_STATUS_UNKNOWN 0xFFFF
100#define SIP_SVC_PROTO_STATUS_BUSY 0x1
101#define SIP_SVC_PROTO_STATUS_REJECT 0x2
102#define SIP_SVC_PROTO_STATUS_NO_RESPONSE 0x3
103#define SIP_SVC_PROTO_STATUS_ERROR 0x4
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90
__UINT64_TYPE__ uint64_t
Definition: stdint.h:91
SiP Service communication protocol request format.
Definition: sip_svc_proto.h:133
void * priv_data
Definition: sip_svc_proto.h:145
unsigned long a6
Definition: sip_svc_proto.h:141
unsigned long a1
Definition: sip_svc_proto.h:136
unsigned long a5
Definition: sip_svc_proto.h:140
unsigned long a3
Definition: sip_svc_proto.h:138
unsigned long a4
Definition: sip_svc_proto.h:139
unsigned long a0
Definition: sip_svc_proto.h:135
uint64_t resp_data_addr
Definition: sip_svc_proto.h:143
unsigned long a2
Definition: sip_svc_proto.h:137
uint32_t header
Definition: sip_svc_proto.h:134
unsigned long a7
Definition: sip_svc_proto.h:142
uint32_t resp_data_size
Definition: sip_svc_proto.h:144
SiP Services service communication protocol response format.
Definition: sip_svc_proto.h:177
uint32_t resp_data_size
Definition: sip_svc_proto.h:184
unsigned long a0
Definition: sip_svc_proto.h:179
uint64_t resp_data_addr
Definition: sip_svc_proto.h:183
void * priv_data
Definition: sip_svc_proto.h:185
unsigned long a3
Definition: sip_svc_proto.h:182
uint32_t header
Definition: sip_svc_proto.h:178
unsigned long a1
Definition: sip_svc_proto.h:180
unsigned long a2
Definition: sip_svc_proto.h:181