• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
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  * Description: plat_device.h 的头文件
15  */
16 
17 
18 #ifndef SERVICE_PLAT_DEVICE_C_H
19 #define SERVICE_PLAT_DEVICE_C_H
20 
21 #include "errcode.h"
22 
23 #ifdef __cplusplus
24 #if __cplusplus
25 extern "C" {
26 #endif
27 #endif
28 
29 /**
30  * @defgroup middleware_service_plat_device PLAT Device
31  * @ingroup  middleware_service_plat
32  * @{
33  */
34 
35 /**
36  * @if Eng
37  * @brief  Set pm enable.
38  * @param  [in]  pm_switch        Set linkloss parameters. 1: open, 0 close.
39  * @retval EXT_ERR_SUCCESS        Execute successfully.
40  * @retval Other                  Error code.
41  * @else
42  * @brief  设置平台低功耗开关。
43  * @param  [in]  pm_switch        开关参数。 1: 开启, 0 关闭。
44  * @retval EXT_ERR_SUCCESS        成功。
45  * @retval Other                  失败。
46  * @endif
47  */
48 errcode_t plat_set_pm_mode(int32_t pm_switch);
49 
50 /**
51  * @if Eng
52  * @brief  Reset board.
53  * @retval ERRCODE_SUCC        Execute successfully.
54  * @retval Other               Execute failed.
55  * @else
56  * @brief  复位单板。
57  * @retval ERRCODE_SUCC        成功。
58  * @retval Other               失败。
59  * @endif
60  */
61 errcode_t plat_reset_board(void);
62 
63 /**
64  * @}
65  */
66 
67 #ifdef __cplusplus
68 #if __cplusplus
69 }
70 #endif
71 #endif
72 
73 #endif // SERVICE_PLAT_DEVICE_C_H
74