當前位置: 首頁>>代碼示例>>C++>>正文


C++ DSI_HDR_DATA2函數代碼示例

本文整理匯總了C++中DSI_HDR_DATA2函數的典型用法代碼示例。如果您正苦於以下問題:C++ DSI_HDR_DATA2函數的具體用法?C++ DSI_HDR_DATA2怎麽用?C++ DSI_HDR_DATA2使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了DSI_HDR_DATA2函數的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: mipi_dsi_swrite

/*
 * mipi dsi short write with 0, 1 2 parameters
 * Write to GEN_HDR 24 bit register the value:
 * 1. 00h, MCS_command[15:8] ,VC[7:6],13h
 * 2. Data1[23:16], MCS_command[15:8] ,VC[7:6],23h
 */
int mipi_dsi_swrite(struct dsi_cmd_desc *cm)
{
    u32 hdr = 0;
    int len = 0;

    if (cm->dlen && cm->payload == 0) {
        k3fb_loge("NO payload error!\n");
        return 0;
    }

    len = (cm->dlen > 2) ? 2 : cm->dlen;

    hdr |= DSI_HDR_DTYPE(cm->dtype);
    hdr |= DSI_HDR_VC(cm->vc);
    if (len == 1) {
        hdr |= DSI_HDR_DATA1(cm->payload[0]);
        hdr |= DSI_HDR_DATA2(0);
    } else if (len == 2) {
        hdr |= DSI_HDR_DATA1(cm->payload[0]);
        hdr |= DSI_HDR_DATA2(cm->payload[1]);
    } else {
        hdr |= DSI_HDR_DATA1(0);
        hdr |= DSI_HDR_DATA2(0);
    }

    set_MIPIDSI_GEN_HDR(hdr);

    return len;  /* 4 bytes */
}
開發者ID:printusrzero,項目名稱:hwp6s-kernel,代碼行數:35,代碼來源:mipi_dsi_host.c

示例2: mdss_dsi_set_max_pktsize

static int mdss_dsi_set_max_pktsize(struct dsi_buf *dp, struct dsi_cmd_desc *cm)
{
	struct dsi_ctrl_hdr *dchdr;
	u32 *hp;

	dchdr = &cm->dchdr;
	if (cm->payload == 0) {
		pr_err("%s: NO payload error\n", __func__);
		return 0;
	}

	mdss_dsi_buf_reserve_hdr(dp, DSI_HOST_HDR_SIZE);
	hp = dp->hdr;
	*hp = 0;
	*hp |= DSI_HDR_VC(dchdr->vc);
	*hp |= DSI_HDR_DTYPE(DTYPE_MAX_PKTSIZE);
	if (dchdr->last)
		*hp |= DSI_HDR_LAST;

	*hp |= DSI_HDR_DATA1(cm->payload[0]);
	*hp |= DSI_HDR_DATA2(cm->payload[1]);

	mdss_dsi_buf_push(dp, DSI_HOST_HDR_SIZE);
	return DSI_HOST_HDR_SIZE; /* 4 bytes */
}
開發者ID:StarKissed,項目名稱:Note-4-AEL-Kernel,代碼行數:25,代碼來源:mdss_dsi_cmd.c

示例3: mdss_dsi_dcs_read

static int mdss_dsi_dcs_read(struct dsi_buf *dp, struct dsi_cmd_desc *cm)
{
	struct dsi_ctrl_hdr *dchdr;
	u32 *hp;

	dchdr = &cm->dchdr;
	if (cm->payload == 0) {
		pr_err("%s: NO payload error\n", __func__);
		return -EINVAL;
	}

	mdss_dsi_buf_reserve_hdr(dp, DSI_HOST_HDR_SIZE);
	hp = dp->hdr;
	*hp = 0;
	*hp |= DSI_HDR_VC(dchdr->vc);
	*hp |= DSI_HDR_BTA;
	*hp |= DSI_HDR_DTYPE(DTYPE_DCS_READ);
	if (dchdr->last)
		*hp |= DSI_HDR_LAST;

	*hp |= DSI_HDR_DATA1(cm->payload[0]);	/* dcs command byte */
	*hp |= DSI_HDR_DATA2(0);

	mdss_dsi_buf_push(dp, DSI_HOST_HDR_SIZE);
	return DSI_HOST_HDR_SIZE; /* 4 bytes */
}
開發者ID:StarKissed,項目名稱:Note-4-AEL-Kernel,代碼行數:26,代碼來源:mdss_dsi_cmd.c

示例4: mdss_dsi_dcs_swrite1

/*
 * mipi dsi dcs short write with 1 parameters
 */
static int mdss_dsi_dcs_swrite1(struct dsi_buf *dp, struct dsi_cmd_desc *cm)
{
	struct dsi_ctrl_hdr *dchdr;
	u32 *hp;

	dchdr = &cm->dchdr;
	if (dchdr->dlen < 2 || cm->payload == 0) {
		pr_err("%s: NO payload error\n", __func__);
		return -EINVAL;
	}

	mdss_dsi_buf_reserve_hdr(dp, DSI_HOST_HDR_SIZE);
	hp = dp->hdr;
	*hp = 0;
	*hp |= DSI_HDR_VC(dchdr->vc);
	if (dchdr->ack)		/* ask ACK trigger msg from peripeheral */
		*hp |= DSI_HDR_BTA;
	if (dchdr->last)
		*hp |= DSI_HDR_LAST;

	*hp |= DSI_HDR_DTYPE(DTYPE_DCS_WRITE1);
	*hp |= DSI_HDR_DATA1(cm->payload[0]);	/* dcs comamnd byte */
	*hp |= DSI_HDR_DATA2(cm->payload[1]);	/* parameter */

	mdss_dsi_buf_push(dp, DSI_HOST_HDR_SIZE);
	return DSI_HOST_HDR_SIZE; /* 4 bytes */
}
開發者ID:StarKissed,項目名稱:Note-4-AEL-Kernel,代碼行數:30,代碼來源:mdss_dsi_cmd.c

示例5: mipi_dsi_dcs_read

static int mipi_dsi_dcs_read(struct dsi_buf *dp, struct dsi_cmd_desc *cm)
{
    uint32 *hp;

    if (cm->payload == 0) {
        PR_DISP_ERR("%s: NO payload error\n", __func__);
        return -EINVAL;
    }

    mipi_dsi_buf_reserve_hdr(dp, DSI_HOST_HDR_SIZE);
    hp = dp->hdr;
    *hp = 0;
    *hp |= DSI_HDR_VC(cm->vc);
    *hp |= DSI_HDR_BTA;
    *hp |= DSI_HDR_DTYPE(DTYPE_DCS_READ);
    if (cm->last)
        *hp |= DSI_HDR_LAST;

    *hp |= DSI_HDR_DATA1(cm->payload[0]);	/* dcs command byte */
    *hp |= DSI_HDR_DATA2(0);

    mipi_dsi_buf_push(dp, DSI_HOST_HDR_SIZE);

    return dp->len;	/* 4 bytes */
}
開發者ID:ryrzy,項目名稱:android_kernel_htc_shooter_u_cm10,代碼行數:25,代碼來源:mipi_dsi_host.c

示例6: mipi_dsi_dcs_swrite1

/*
 * mipi dsi dcs short write with 1 parameters
 */
static int mipi_dsi_dcs_swrite1(struct dsi_buf *dp, struct dsi_cmd_desc *cm)
{
    uint32 *hp;

    if (cm->dlen < 2 || cm->payload == 0) {
        PR_DISP_ERR("%s: NO payload error\n", __func__);
        return -EINVAL;
    }

    mipi_dsi_buf_reserve_hdr(dp, DSI_HOST_HDR_SIZE);
    hp = dp->hdr;
    *hp = 0;
    *hp |= DSI_HDR_VC(cm->vc);
    if (cm->ack)		/* ask ACK trigger msg from peripeheral */
        *hp |= DSI_HDR_BTA;
    if (cm->last)
        *hp |= DSI_HDR_LAST;

    *hp |= DSI_HDR_DTYPE(DTYPE_DCS_WRITE1);
    *hp |= DSI_HDR_DATA1(cm->payload[0]);	/* dcs comamnd byte */
    *hp |= DSI_HDR_DATA2(cm->payload[1]);	/* parameter */

    mipi_dsi_buf_push(dp, DSI_HOST_HDR_SIZE);

    return dp->len;
}
開發者ID:ryrzy,項目名稱:android_kernel_htc_shooter_u_cm10,代碼行數:29,代碼來源:mipi_dsi_host.c

示例7: mdss_dsi_generic_swrite

/*
 * mipi dsi generic short write with 0, 1 2 parameters
 */
static int mdss_dsi_generic_swrite(struct dsi_buf *dp, struct dsi_cmd_desc *cm)
{
	struct dsi_ctrl_hdr *dchdr;
	u32 *hp;
	int len;

	dchdr = &cm->dchdr;
	if (dchdr->dlen && cm->payload == 0) {
		pr_err("%s: NO payload error\n", __func__);
		return 0;
	}

	mdss_dsi_buf_reserve_hdr(dp, DSI_HOST_HDR_SIZE);
	hp = dp->hdr;
	*hp = 0;
	*hp |= DSI_HDR_VC(dchdr->vc);
	if (dchdr->last)
		*hp |= DSI_HDR_LAST;


	len = (dchdr->dlen > 2) ? 2 : dchdr->dlen;

	if (len == 1) {
		*hp |= DSI_HDR_DTYPE(DTYPE_GEN_WRITE1);
		*hp |= DSI_HDR_DATA1(cm->payload[0]);
		*hp |= DSI_HDR_DATA2(0);
	} else if (len == 2) {
		*hp |= DSI_HDR_DTYPE(DTYPE_GEN_WRITE2);
		*hp |= DSI_HDR_DATA1(cm->payload[0]);
		*hp |= DSI_HDR_DATA2(cm->payload[1]);
	} else {
		*hp |= DSI_HDR_DTYPE(DTYPE_GEN_WRITE);
		*hp |= DSI_HDR_DATA1(0);
		*hp |= DSI_HDR_DATA2(0);
	}

	mdss_dsi_buf_push(dp, DSI_HOST_HDR_SIZE);

	return dp->len;	/* 4 bytes */
}
開發者ID:AbdulrahmanAmir,項目名稱:Dorimanx-LG-G2-D802-Kernel,代碼行數:43,代碼來源:mdss_dsi_host.c

示例8: mipi_dsi_set_max_pktsize

static int mipi_dsi_set_max_pktsize(struct dsi_buf *dp, struct dsi_cmd_desc *cm)
{
    uint32 *hp;

    if (cm->payload == 0) {
        PR_DISP_ERR("%s: NO payload error\n", __func__);
        return 0;
    }

    mipi_dsi_buf_reserve_hdr(dp, DSI_HOST_HDR_SIZE);
    hp = dp->hdr;
    *hp = 0;
    *hp |= DSI_HDR_VC(cm->vc);
    *hp |= DSI_HDR_DTYPE(DTYPE_MAX_PKTSIZE);
    if (cm->last)
        *hp |= DSI_HDR_LAST;

    *hp |= DSI_HDR_DATA1(cm->payload[0]);
    *hp |= DSI_HDR_DATA2(cm->payload[1]);

    mipi_dsi_buf_push(dp, DSI_HOST_HDR_SIZE);

    return dp->len;	/* 4 bytes */
}
開發者ID:ryrzy,項目名稱:android_kernel_htc_shooter_u_cm10,代碼行數:24,代碼來源:mipi_dsi_host.c


注:本文中的DSI_HDR_DATA2函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。