src.dualinventive.com/dinet/libdi/include/di/drv/hl854x/cme_error.h

51 lines
1.5 KiB
C

#ifndef DI_DRV_HL854X_CME_ERROR_H_
#define DI_DRV_HL854X_CME_ERROR_H_
#ifdef __cplusplus
extern "C" {
#endif
/** CME Error Codes */
enum di_drv_hl854x_cme_error {
HL854X_CME_ERR_SIM_NOT_INSERTED = 10,
HL854X_CME_ERR_SIM_PIN_REQUIRED = 11,
HL854X_CME_ERR_NO_SOCK_AVAIL = 902,
HL854X_CME_ERR_MEMORY = 903,
HL854X_CME_ERR_DNS = 904,
HL854X_CME_ERR_TCP_DISCON_SRV = 905,
HL854X_CME_ERR_TCP_UDP_CON = 906,
HL854X_CME_ERR_BAD_SESSION_ID = 910,
HL854X_CME_ERR_SESSION_IS_RUNNING = 911,
HL854X_CME_ERR_NO_MORE_SESSIONS = 912,
HL854X_CME_ERR_SESSION_STATE = 922,
HL854X_CME_ERR_INVAL_TERM_PORT_DATA_MODE = 923,
HL854X_CME_ERR_UNSET = UINT32_MAX
};
/**
* CME error callback
* @param ctx Configuration context
* @param offset Write offset in bytes
* @param data Address of data to write
* @param size Size of data in bytes
*/
typedef void (*di_drv_hl854x_cme_error_cb_t)(struct di_drv_hl854x_ctx *ctx);
/**
* Enable CMEE, Report Mobile Termination Error
*/
void di_drv_hl854x_cme_error_enable(struct di_drv_hl854x_ctx *ctx);
void di_drv_hl854x_cme_error_reset(struct di_drv_hl854x_ctx *ctx);
/**
* Set application specific CME Error callback
*/
void di_drv_hl854x_cme_error_set_callback(struct di_drv_hl854x_ctx *ctx, di_drv_hl854x_cme_error_cb_t cb);
#ifdef __cplusplus
}
#endif
#endif /* DI_DRV_HL854X_CME_ERROR_H_ */