4G_module/include/cmiot/cm_sim.h

81 lines
1.9 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* @file cm_sim.h
* @brief SIM接口
* @copyright Copyright © 2021 China Mobile IOT. All rights reserved.
* @author By WangPeng
* @date 2021/10/27
*
* @defgroup sim sim
* @ingroup PHONE
* @{
*/
#ifndef __CM_SIM_H__
#define __CM_SIM_H__
/****************************************************************************
* Included Files
****************************************************************************/
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
#define CM_IMSI_LEN 16 /*!< IMSI存储长度 */
/****************************************************************************
* Public Types
****************************************************************************/
/****************************************************************************
* Public Data
****************************************************************************/
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
#ifdef __cplusplus
#define EXTERN extern "C"
extern "C"
{
#else
#define EXTERN extern
#endif
/**
* @brief 获取设备IMSI
*
* @param [out] imsi 存储IMSI长度16字节申请内存后传入
* @return
* = 0 - 成功 \n
* < 0 - 失败, 返回值为错误码.
*
* @details More details
*
*/
int32_t cm_sim_get_imsi(char* imsi);
/**
* @brief 获取设备ICCID
*
* @param [out] iccid 存储ICCID长度21字节申请内存后传入
* @return
* = 0 - 成功 \n
* < 0 - 失败, 返回值为错误码.
*
* @details More details
*
*/
int32_t cm_sim_get_iccid(char* iccid);
#undef EXTERN
#ifdef __cplusplus
}
#endif
#endif /* __CM_SIM_H__ */