CCAux  2.20.0.0
CCAux API reference
Power.h
Go to the documentation of this file.
1 
2 /*
3  * Copyright (C) 2023 CrossControl AB
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; with
8  * version 2.1 of the License.
9  */
10 /*
11  * File description:
12  * Power control access functions
13  *
14  * Use the function GetPower() to get a handle to pass on to the other functions.
15  * Use the method Power_release(POWERHANDLE) to return the handle.
16  *
17  * Example Usage:
18  * @include power_example.cpp
19  *
20  ************************************************/
21 #ifndef CC_POWER_H
22 #define CC_POWER_H
23 
24 #include "CCAuxErrors.h"
25 #include "CCAuxTypes.h"
26 #include "CCPlatform.h"
27 
28 #ifdef __cplusplus
29 namespace CrossControl
30 {
31 #endif
32 
33 typedef void *POWERHANDLE;
34 
54 EXTERN_C
55 CCAUXDLL_API
57 CCAUXDLL_CALLING_CONV
58 GetPower(void);
59 
70 EXTERN_C
71 CCAUXDLL_API
72 void CCAUXDLL_CALLING_CONV Power_release(POWERHANDLE);
73 
86 EXTERN_C
87 CCAUXDLL_API
88 eErr CCAUXDLL_CALLING_CONV Power_getBLPowerStatus(POWERHANDLE, CCStatus *status);
89 
99 EXTERN_C
100 CCAUXDLL_API
101 eErr CCAUXDLL_CALLING_CONV Power_getCanPowerStatus(POWERHANDLE, CCStatus *status);
102 
115 EXTERN_C
116 CCAUXDLL_API
117 eErr CCAUXDLL_CALLING_CONV Power_getVideoPowerStatus(POWERHANDLE, uint8_t *videoStatus);
118 
128 EXTERN_C
129 CCAUXDLL_API
130 eErr CCAUXDLL_CALLING_CONV Power_getExtFanPowerStatus(POWERHANDLE, CCStatus *status);
131 
141 EXTERN_C
142 CCAUXDLL_API
144 
161 EXTERN_C
162 CCAUXDLL_API
163 eErr CCAUXDLL_CALLING_CONV Power_getVideoOCDStatus(POWERHANDLE, OCDStatus *status);
164 
182 EXTERN_C
183 CCAUXDLL_API
184 eErr CCAUXDLL_CALLING_CONV Power_getCanOCDStatus(POWERHANDLE, OCDStatus *status);
185 
198 EXTERN_C
199 CCAUXDLL_API
200 eErr CCAUXDLL_CALLING_CONV Power_setBLPowerStatus(POWERHANDLE, CCStatus status);
201 
211 EXTERN_C
212 CCAUXDLL_API
213 eErr CCAUXDLL_CALLING_CONV Power_setCanPowerStatus(POWERHANDLE, CCStatus status);
214 
228 EXTERN_C
229 CCAUXDLL_API
230 eErr CCAUXDLL_CALLING_CONV Power_setVideoPowerStatus(POWERHANDLE, uint8_t status);
231 
241 EXTERN_C
242 CCAUXDLL_API
243 eErr CCAUXDLL_CALLING_CONV Power_setExtFanPowerStatus(POWERHANDLE, CCStatus status);
244 
256 EXTERN_C
257 CCAUXDLL_API
258 eErr CCAUXDLL_CALLING_CONV Power_ackPowerRequest(POWERHANDLE);
259 
261 #ifdef __cplusplus
262 } /* namespace CrossControl */
263 #endif
264 
265 #endif /* CC_POWER_H */
unsigned char uint8_t
Definition: CCAuxTypes.h:37
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Power_setVideoPowerStatus(POWERHANDLE, uint8_t status)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Power_getVideoOCDStatus(POWERHANDLE, OCDStatus *status)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Power_getBLPowerStatus(POWERHANDLE, CCStatus *status)
EXTERN_C CCAUXDLL_API POWERHANDLE CCAUXDLL_CALLING_CONV GetPower(void)
EXTERN_C CCAUXDLL_API void CCAUXDLL_CALLING_CONV Power_release(POWERHANDLE)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Power_getCanOCDStatus(POWERHANDLE, OCDStatus *status)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Power_setCanPowerStatus(POWERHANDLE, CCStatus status)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Power_getVideoPowerStatus(POWERHANDLE, uint8_t *videoStatus)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Power_ackPowerRequest(POWERHANDLE)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Power_setExtFanPowerStatus(POWERHANDLE, CCStatus status)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Power_setBLPowerStatus(POWERHANDLE, CCStatus status)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Power_getExtFanPowerStatus(POWERHANDLE, CCStatus *status)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Power_getButtonPowerTransitionStatus(POWERHANDLE, ButtonPowerTransitionStatus *status)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Power_getCanPowerStatus(POWERHANDLE, CCStatus *status)
Definition: About.h:30
void * POWERHANDLE
Definition: Power.h:33
ButtonPowerTransitionStatus
Definition: CCAuxTypes.h:454
CCStatus
Definition: CCAuxTypes.h:153
OCDStatus
Definition: CCAuxTypes.h:474
eErr
Definition: CCAuxTypes.h:162