#ifndef EM_LITE
#define EM_LITE

#ifdef __cplusplus
extern "C" {
#endif

#define EM_LITE_SUCCESS                         0

#define EM_LITE_POS_TYPE_1                      20480
#define EM_LITE_LEN_TYPE_1                      69632
#define EM_LITE_READ_TYPE_1                     1
#define EM_LITE_WRITE_TYPE_1                    2

#define EM_LITE_POS_TYPE_2                      8256
#define EM_LITE_LEN_TYPE_2                      32
#define EM_LITE_READ_TYPE_2                     3
#define EM_LITE_WRITE_TYPE_2                    4

#define EM_LITE_POS_TYPE_3                      8384
#define EM_LITE_LEN_TYPE_3                      25
#define EM_LITE_READ_TYPE_3                     5
#define EM_LITE_WRITE_TYPE_3                    6

#define EM_LITE_POS_TYPE_4                      8320
#define EM_LITE_LEN_TYPE_4                      3
#define EM_LITE_READ_TYPE_4                     7
#define EM_LITE_WRITE_TYPE_4                    8

#define EM_ERR_EM_CLIENT_IO_FAIL               -1
#define EM_ERR_EM_CLIENT_IO_NOT_SUPPORT_TYPE   -2

int em_lite_entry(unsigned char *req_buf, int req_buf_len, unsigned char *rsp_buf, uint32_t *rsp_buf_len);

int em_lite_ess_command(unsigned char *command, int len_command, unsigned char *model, unsigned char *did,
			unsigned char *out, int *out_len, int (*em_lite_client_io)(int type, unsigned char *buf));

int em_lite_get_status(int mode, unsigned char *did, int (*em_lite_client_io)(int type, unsigned char *buf));

int em_lite_install_token(unsigned char *token, int len_token, unsigned char *did,
			  int (*em_lite_client_io)(int type, unsigned char *buf));

#ifdef __cplusplus
}
#endif

/*
please refer below code for em_lite_client_io
static int example_io(int type, unsigned char *buf)
{
	int ret;

	if (type == EM_LITE_READ_TYPE_1) {
		ret = read_from_steady(EM_LITE_POS_TYPE_1, buf, EM_LITE_LEN_TYPE_1);
	} else if (type == EM_LITE_WRITE_TYPE_1) {
		ret = write_to_steady(EM_LITE_POS_TYPE_1, buf, EM_LITE_LEN_TYPE_1);
	} else if (type == EM_LITE_READ_TYPE_2) {
		ret = read_from_steady(EM_LITE_POS_TYPE_2, buf, EM_LITE_LEN_TYPE_2);
	} else if (type == EM_LITE_WRITE_TYPE_2) {
		ret = write_to_steady(EM_LITE_POS_TYPE_2, buf, EM_LITE_LEN_TYPE_2);
	} else if (type == EM_LITE_READ_TYPE_3) {
		ret = read_from_steady(EM_LITE_POS_TYPE_3, buf, EM_LITE_LEN_TYPE_3);
	} else if (type == EM_LITE_WRITE_TYPE_3) {
		ret = write_to_steady(EM_LITE_POS_TYPE_3, buf, EM_LITE_LEN_TYPE_3);
	} else if (type == EM_LITE_READ_TYPE_4) {
		ret = read_from_steady(EM_LITE_POS_TYPE_4, buf, EM_LITE_LEN_TYPE_4);
	} else if (type == EM_LITE_WRITE_TYPE_4) {
		ret = write_to_steady(EM_LITE_POS_TYPE_4, buf, EM_LITE_LEN_TYPE_4);
	} else {
		ret = EM_ERR_EM_CLIENT_IO_NOT_SUPPORT_TYPE;
	}

	if (ret != EM_LITE_SUCCESS) {
		LOGE("Failed to read or write(%d/%d)\n", type, ret);
		ret = EM_ERR_EM_CLIENT_IO_FAIL;
		goto out;
	}

	ret = EM_LITE_SUCCESS;
out:
	return ret;
}
*/
#endif
