• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef DISP_HAL_H
17 #define DISP_HAL_H
18 #include "disp_common.h"
19 #include "display_type.h"
20 
21 #define DISP_SERVICE_NAME    "hdf_disp"
22 
23 enum DispCmd {
24     DISP_CMD_GET_PANELINFO = 1,
25     DISP_CMD_SET_POWERSTATUS,
26     DISP_CMD_SET_BACKLIGHT,
27     DISP_CMD_GET_POWERSTATUS,
28     DISP_CMD_GET_BACKLIGHT,
29 };
30 
31 struct DispPara {
32     uint32_t devId;
33     void *par;
34     uint32_t size;
35 };
36 
37 typedef struct {
38     int32_t (*SetPowerStatus)(uint32_t devId, DispPowerStatus pStatus);
39     int32_t (*GetPowerStatus)(uint32_t devId, DispPowerStatus *pStatus);
40     int32_t (*SetBacklight)(uint32_t devId, uint32_t level);
41     int32_t (*GetBacklight)(uint32_t devId, uint32_t *level);
42     int32_t (*GetInfo)(uint32_t devId, struct DispInfo *info);
43 } HalFuncs;
44 
45 HalFuncs *GetHalFuncs(void);
46 #endif // DISP_HAL_H
47