CCAux  2.20.0.0
CCAux API reference
SoftKey.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  * Get current status of buttons connected to SS
13  *
14  * Use the function GetSoftKey() to get a handle to pass on to the other functions.
15  * Use the method SoftKey_release(SOFTKEYHANDLE) to return the handle.
16  *
17  * Example Usage:
18  * @include softkey_example.cpp
19  *
20  ************************************************/
21 
22 #ifndef CC_SOFTKEY_H_
23 #define CC_SOFTKEY_H_
24 
25 #include "CCAuxErrors.h"
26 #include "CCPlatform.h"
27 #include "CCAuxTypes.h"
28 
29 #ifdef __cplusplus
30 namespace CrossControl
31 {
32 #endif
33 
34 typedef void *SOFTKEYHANDLE;
35 
56 EXTERN_C
57 CCAUXDLL_API
59 CCAUXDLL_CALLING_CONV
60 GetSoftKey(void);
61 
72 EXTERN_C
73 CCAUXDLL_API
74 void CCAUXDLL_CALLING_CONV SoftKey_release(SOFTKEYHANDLE);
75 
88 EXTERN_C
89 CCAUXDLL_API
90 eErr CCAUXDLL_CALLING_CONV SoftKey_getStatus(SOFTKEYHANDLE, uint16_t *value);
91 
104 EXTERN_C
105 CCAUXDLL_API
106 eErr CCAUXDLL_CALLING_CONV SoftKey_setBacklightIntensity(SOFTKEYHANDLE, uint8_t key, uint8_t intensity);
107 
123 EXTERN_C
124 CCAUXDLL_API
125 eErr CCAUXDLL_CALLING_CONV SoftKey_getBacklightIntensity(SOFTKEYHANDLE, uint8_t key, uint8_t *intensity);
126 
144 EXTERN_C
145 CCAUXDLL_API
146 eErr CCAUXDLL_CALLING_CONV SoftKey_setMultipleBacklightIntensities(SOFTKEYHANDLE, uint8_t *keys, uint8_t *intensities,
147  uint8_t array_size);
148 
165 EXTERN_C
166 CCAUXDLL_API
167 eErr CCAUXDLL_CALLING_CONV SoftKey_getMultipleBacklightIntensities(SOFTKEYHANDLE, uint8_t *keys, uint8_t *intensities,
168  uint8_t array_size);
169 
184 EXTERN_C
185 CCAUXDLL_API
186 eErr CCAUXDLL_CALLING_CONV SoftKey_getBacklightSignal(SOFTKEYHANDLE, float64_t *frequency, uint8_t *dutyCycle);
187 
197 EXTERN_C
198 CCAUXDLL_API
199 eErr CCAUXDLL_CALLING_CONV SoftKey_getBacklightOnTime(SOFTKEYHANDLE, uint8_t *onTime);
200 
210 EXTERN_C
211 CCAUXDLL_API
212 eErr CCAUXDLL_CALLING_CONV SoftKey_getBacklightOffTime(SOFTKEYHANDLE, uint8_t *offTime);
213 
223 EXTERN_C
224 CCAUXDLL_API
225 eErr CCAUXDLL_CALLING_CONV SoftKey_getBacklightIdleTime(SOFTKEYHANDLE, uint8_t *idleTime);
226 
236 EXTERN_C
237 CCAUXDLL_API
238 eErr CCAUXDLL_CALLING_CONV SoftKey_getBacklightNrOfPulses(SOFTKEYHANDLE, uint8_t *nrOfPulses);
239 
268 EXTERN_C
269 CCAUXDLL_API
270 eErr CCAUXDLL_CALLING_CONV SoftKey_setBacklightSignal(SOFTKEYHANDLE, float64_t frequency, uint8_t dutyCycle);
271 
284 EXTERN_C
285 CCAUXDLL_API
286 eErr CCAUXDLL_CALLING_CONV SoftKey_setBacklightOnTime(SOFTKEYHANDLE, uint8_t onTime);
287 
300 EXTERN_C
301 CCAUXDLL_API
302 eErr CCAUXDLL_CALLING_CONV SoftKey_setBacklightOffTime(SOFTKEYHANDLE, uint8_t offTime);
303 
313 EXTERN_C
314 CCAUXDLL_API
315 eErr CCAUXDLL_CALLING_CONV SoftKey_setBacklightIdleTime(SOFTKEYHANDLE, uint8_t idleTime);
316 
326 EXTERN_C
327 CCAUXDLL_API
328 eErr CCAUXDLL_CALLING_CONV SoftKey_setBacklightNrOfPulses(SOFTKEYHANDLE, uint8_t nrOfPulses);
329 
337 EXTERN_C
338 CCAUXDLL_API
340 
351 EXTERN_C
352 CCAUXDLL_API
354 
365 EXTERN_C
366 CCAUXDLL_API
368 
389 EXTERN_C
390 CCAUXDLL_API
391 eErr CCAUXDLL_CALLING_CONV SoftKey_getBootBacklightConfig(SOFTKEYHANDLE, uint8_t *bootIntensity,
392  float32_t *bootFrequency, uint8_t *bootDutyCycle,
393  uint8_t *postBootIntensity, float32_t *postBootFrequency,
394  uint8_t *postBootDutyCycle, CCStatus *postBootConfig);
395 
415 EXTERN_C
416 CCAUXDLL_API
417 eErr CCAUXDLL_CALLING_CONV SoftKey_setBootBacklightConfig(SOFTKEYHANDLE, uint8_t bootIntensity, float32_t bootFrequency,
418  uint8_t bootDutyCycle, uint8_t postBootIntensity,
419  float32_t postBootFrequency, uint8_t postBootDutyCycle,
420  CCStatus postBootConfig);
421 
423 #ifdef __cplusplus
424 } /* namespace CrossControl */
425 #endif
426 
427 #endif /* CC_SOFTKEY_H_ */
unsigned short uint16_t
Definition: CCAuxTypes.h:38
float float32_t
Definition: CCAuxTypes.h:15
unsigned char uint8_t
Definition: CCAuxTypes.h:37
double float64_t
Definition: CCAuxTypes.h:16
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV SoftKey_setBacklightOffTime(SOFTKEYHANDLE, uint8_t offTime)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV SoftKey_getBacklightOffTime(SOFTKEYHANDLE, uint8_t *offTime)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV SoftKey_getBootBacklightConfig(SOFTKEYHANDLE, uint8_t *bootIntensity, float32_t *bootFrequency, uint8_t *bootDutyCycle, uint8_t *postBootIntensity, float32_t *postBootFrequency, uint8_t *postBootDutyCycle, CCStatus *postBootConfig)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV SoftKey_getStatus(SOFTKEYHANDLE, uint16_t *value)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV SoftKey_setBacklightIntensity(SOFTKEYHANDLE, uint8_t key, uint8_t intensity)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV SoftKey_setBacklightIdleTime(SOFTKEYHANDLE, uint8_t idleTime)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV SoftKey_setBacklightOnTime(SOFTKEYHANDLE, uint8_t onTime)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV SoftKey_setMultipleBacklightIntensities(SOFTKEYHANDLE, uint8_t *keys, uint8_t *intensities, uint8_t array_size)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV SoftKey_setBacklightOff(SOFTKEYHANDLE)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV SoftKey_setBacklightSignal(SOFTKEYHANDLE, float64_t frequency, uint8_t dutyCycle)
EXTERN_C CCAUXDLL_API void CCAUXDLL_CALLING_CONV SoftKey_release(SOFTKEYHANDLE)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV SoftKey_getBacklightIdleTime(SOFTKEYHANDLE, uint8_t *idleTime)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV SoftKey_setBacklightEnabledDuringStartup(SOFTKEYHANDLE, CCStatus status)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV SoftKey_getBacklightNrOfPulses(SOFTKEYHANDLE, uint8_t *nrOfPulses)
EXTERN_C CCAUXDLL_API SOFTKEYHANDLE CCAUXDLL_CALLING_CONV GetSoftKey(void)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV SoftKey_getBacklightEnabledDuringStartup(SOFTKEYHANDLE, CCStatus *status)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV SoftKey_getBacklightSignal(SOFTKEYHANDLE, float64_t *frequency, uint8_t *dutyCycle)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV SoftKey_getBacklightOnTime(SOFTKEYHANDLE, uint8_t *onTime)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV SoftKey_setBacklightNrOfPulses(SOFTKEYHANDLE, uint8_t nrOfPulses)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV SoftKey_setBootBacklightConfig(SOFTKEYHANDLE, uint8_t bootIntensity, float32_t bootFrequency, uint8_t bootDutyCycle, uint8_t postBootIntensity, float32_t postBootFrequency, uint8_t postBootDutyCycle, CCStatus postBootConfig)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV SoftKey_getMultipleBacklightIntensities(SOFTKEYHANDLE, uint8_t *keys, uint8_t *intensities, uint8_t array_size)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV SoftKey_getBacklightIntensity(SOFTKEYHANDLE, uint8_t key, uint8_t *intensity)
Definition: About.h:30
void * SOFTKEYHANDLE
Definition: SoftKey.h:34
CCStatus
Definition: CCAuxTypes.h:153
eErr
Definition: CCAuxTypes.h:162