15 #include "switype_256bit.h" 16 #define SDU_HDR_LEN (3) 17 #define MINREQBKLEN (2048) 18 #define MSGID_AND_LEN (4) 19 #define MSGID_DONT_CARE (0xffff) 22 #define UNUSEDPARAM( x ) (void)x 25 #define DEAULT_LOC_TIMEOUT_IN_SEC 2 26 #define SDK_VALIDATE_INPUT_PACK_PARAM(pCtx, pBuf, pLen ) \ 27 if ((pCtx == NULL) || (pBuf == NULL) || (pLen == NULL) ) \ 29 liteqmi_log(eLOG_DEBUG,"[ pack] %s parameter NULL\n",__func__); \ 30 return eQCWWAN_ERR_INVALID_ARG; \ 33 #define SDK_VALIDATE_INPUT_PACK_PARAM_AND_FILL_XID(pCtx, pBuf, pLen ) \ 34 if ((pCtx == NULL) || (pBuf == NULL) || (pLen == NULL) ) \ 36 liteqmi_log(eLOG_DEBUG,"[ pack] %s parameter NULL\n",__func__); \ 37 return eQCWWAN_ERR_INVALID_ARG; \ 40 return eQCWWAN_ERR_INVALID_XID; \ 42 pBuf[1] = pCtx->xid & 0xff; \ 43 pBuf[2] = pCtx->xid >> 8; 45 #define SDK_VALIDATE_INPUT_UNPACK_PARAM(pResp, respLen, pOutput ) \ 46 if ((pResp == NULL) || (respLen == 0) || (pOutput == NULL) ) \ 48 liteqmi_log(eLOG_DEBUG,"[ unpack] %s parameter NULL or invalid\n",__func__); \ 49 return eQCWWAN_ERR_INVALID_ARG; \ 52 #ifdef SIERRA_ANDROID_RIL 54 #define logger swilogger 57 typedef void (* logger)(uint8_t lvl,
const char* buff, ...);
60 extern uint8_t gloglvl;
83 eTIMEOUT_10_S = 10000,
84 eTIMEOUT_20_S = 20000,
85 eTIMEOUT_30_S = 30000,
86 eTIMEOUT_60_S = 60000,
87 eTIMEOUT_300_S = 300000,
88 eTIMEOUT_DEFAULT = eTIMEOUT_8_S
319 uint8_t *encoded_str,
341 #define SWI_INIT_UNPACK_RESULT_VALUE {0, SWI_UINT256_INT_VALUE} 353 swi_uint256_t ParamPresenceMask;
uint16_t helper_get_msgid(uint8_t *qmi_resp)
eLOG_LEVEL
Definition: common.h:67
unsigned unpack_result_code_only(uint8_t *pMdmResp)
uint16_t helper_get_xid(uint8_t *qmi_resp)
const char * helper_get_req_str(uint8_t svc, uint8_t *req, uint32_t len)
int helper_set_log_lvl(uint8_t lvl)
int helper_isBootLoader_DebugEnabled(const char *szPath, const char *pQsn)
void liteqmi_log(uint8_t lvl, const char *fmt,...)
msgtype
Definition: common.h:124
eTimeout
Definition: common.h:78
char * liteqmi_GetVersion()
int helper_set_log_func(logger func)
void liteqmi_helper_decode7bitAsciiEncString(uint8_t *encoded_str, uint8_t encoded_len, uint8_t *decoded_str)
eQMI_SVC
Definition: common.h:96
char * helper_get_error_reason(uint16_t retVal)
const char * helper_get_resp_ctx(uint8_t svc, uint8_t *pbuf, uint16_t len, unpack_qmi_t *pCtx)
uint16_t helper_get_error_code(uint8_t *qmi_resp)