• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020-2021 Huawei Device Co., Ltd.
3  *
4  * HDF is dual licensed: you can use it either under the terms of
5  * the GPL, or the BSD license, at your option.
6  * See the LICENSE file in the root of this repository for complete details.
7  */
8 
9 #include "mipi_dsi_if.h"
10 #include "mipi_dsi_core.h"
11 
12 #define HDF_LOG_TAG mipi_dsi_if
13 
MipiDsiOpen(uint8_t id)14 DevHandle MipiDsiOpen(uint8_t id)
15 {
16     return (DevHandle)MipiDsiCntlrOpen(id);
17 }
18 
MipiDsiClose(DevHandle handle)19 void MipiDsiClose(DevHandle handle)
20 {
21     MipiDsiCntlrClose((struct MipiDsiCntlr *)handle);
22 }
23 
MipiDsiSetCfg(DevHandle handle,struct MipiCfg * cfg)24 int32_t MipiDsiSetCfg(DevHandle handle, struct MipiCfg *cfg)
25 {
26     return MipiDsiCntlrSetCfg((struct MipiDsiCntlr *)handle, cfg);
27 }
28 
MipiDsiGetCfg(DevHandle handle,struct MipiCfg * cfg)29 int32_t MipiDsiGetCfg(DevHandle handle, struct MipiCfg *cfg)
30 {
31     return MipiDsiCntlrGetCfg((struct MipiDsiCntlr *)handle, cfg);
32 }
33 
MipiDsiSetLpMode(DevHandle handle)34 void MipiDsiSetLpMode(DevHandle handle)
35 {
36     MipiDsiCntlrSetLpMode((struct MipiDsiCntlr *)handle);
37 }
38 
MipiDsiSetHsMode(DevHandle handle)39 void MipiDsiSetHsMode(DevHandle handle)
40 {
41     MipiDsiCntlrSetHsMode((struct MipiDsiCntlr *)handle);
42 }
43 
MipiDsiTx(DevHandle handle,struct DsiCmdDesc * cmd)44 int32_t MipiDsiTx(DevHandle handle, struct DsiCmdDesc *cmd)
45 {
46     return MipiDsiCntlrTx((struct MipiDsiCntlr *)handle, cmd);
47 }
48 
MipiDsiRx(DevHandle handle,struct DsiCmdDesc * cmd,int32_t readLen,uint8_t * out)49 int32_t MipiDsiRx(DevHandle handle, struct DsiCmdDesc *cmd, int32_t readLen, uint8_t *out)
50 {
51     return MipiDsiCntlrRx((struct MipiDsiCntlr *)handle, cmd, readLen, out);
52 }
53 
MipiDsiAttach(DevHandle handle,uint8_t * name)54 int32_t MipiDsiAttach(DevHandle handle, uint8_t *name)
55 {
56     return MipiDsiCntlrAttach((struct MipiDsiCntlr *)handle, name);
57 }
58 
MipiDsiSetDrvData(DevHandle handle,void * panelData)59 int32_t MipiDsiSetDrvData(DevHandle handle, void *panelData)
60 {
61     return MipiDsiCntlrSetDrvData((struct MipiDsiCntlr *)handle, panelData);
62 }
63