CCAux  2.20.0.0
CCAux API reference
FrontLED.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  * Front LED control
13  *
14  * CCpilot VC platform - Button backlight control.
15  * For VC, the API works the same way as for front LED control on other platforms, but without color support.
16  *
17  * Use the function GetFrontLED() to get a handle to pass on to the other functions.
18  * Use the method FrontLED_release(FRONTLEDHANDLE) to return the handle.
19  *
20  * Example Usage:
21  * @include frontled_example.cpp
22  *
23  ************************************************/
24 #ifndef CC_FRONT_LED_H
25 #define CC_FRONT_LED_H
26 
27 #include "CCAuxErrors.h"
28 #include "CCAuxTypes.h"
29 #include "CCPlatform.h"
30 
31 #ifdef __cplusplus
32 namespace CrossControl
33 {
34 #endif
35 
36 typedef void *FRONTLEDHANDLE;
37 
57 EXTERN_C
58 CCAUXDLL_API
60 CCAUXDLL_CALLING_CONV
62 
73 EXTERN_C
74 CCAUXDLL_API
75 void CCAUXDLL_CALLING_CONV FrontLED_release(FRONTLEDHANDLE);
76 
91 EXTERN_C
92 CCAUXDLL_API
93 eErr CCAUXDLL_CALLING_CONV FrontLED_getSignal(FRONTLEDHANDLE, float64_t *frequency, uint8_t *dutyCycle);
94 
104 EXTERN_C
105 CCAUXDLL_API
106 eErr CCAUXDLL_CALLING_CONV FrontLED_setActive(FRONTLEDHANDLE, ComponentLocation location);
107 
117 EXTERN_C
118 CCAUXDLL_API
119 eErr CCAUXDLL_CALLING_CONV FrontLED_getActive(FRONTLEDHANDLE, ComponentLocation *location);
120 
130 EXTERN_C
131 CCAUXDLL_API
132 eErr CCAUXDLL_CALLING_CONV FrontLED_getOnTime(FRONTLEDHANDLE, uint8_t *onTime);
133 
143 EXTERN_C
144 CCAUXDLL_API
145 eErr CCAUXDLL_CALLING_CONV FrontLED_getOffTime(FRONTLEDHANDLE, uint8_t *offTime);
146 
156 EXTERN_C
157 CCAUXDLL_API
158 eErr CCAUXDLL_CALLING_CONV FrontLED_getIdleTime(FRONTLEDHANDLE, uint8_t *idleTime);
159 
169 EXTERN_C
170 CCAUXDLL_API
171 eErr CCAUXDLL_CALLING_CONV FrontLED_getNrOfPulses(FRONTLEDHANDLE, uint8_t *nrOfPulses);
172 
189 EXTERN_C
190 CCAUXDLL_API
191 eErr CCAUXDLL_CALLING_CONV FrontLED_getColor(FRONTLEDHANDLE, uint8_t *red, uint8_t *green, uint8_t *blue);
192 
207 EXTERN_C
208 CCAUXDLL_API
209 eErr CCAUXDLL_CALLING_CONV FrontLED_getColorExt(FRONTLEDHANDLE, uint8_t *red, uint8_t *green, uint8_t *blue);
210 
222 EXTERN_C
223 CCAUXDLL_API
225 
236 EXTERN_C
237 CCAUXDLL_API
239 
268 EXTERN_C
269 CCAUXDLL_API
270 eErr CCAUXDLL_CALLING_CONV FrontLED_setSignal(FRONTLEDHANDLE, float64_t frequency, uint8_t dutyCycle);
271 
284 EXTERN_C
285 CCAUXDLL_API
286 eErr CCAUXDLL_CALLING_CONV FrontLED_setOnTime(FRONTLEDHANDLE, uint8_t onTime);
287 
300 EXTERN_C
301 CCAUXDLL_API
302 eErr CCAUXDLL_CALLING_CONV FrontLED_setOffTime(FRONTLEDHANDLE, uint8_t offTime);
303 
313 EXTERN_C
314 CCAUXDLL_API
315 eErr CCAUXDLL_CALLING_CONV FrontLED_setIdleTime(FRONTLEDHANDLE, uint8_t idleTime);
316 
326 EXTERN_C
327 CCAUXDLL_API
328 eErr CCAUXDLL_CALLING_CONV FrontLED_setNrOfPulses(FRONTLEDHANDLE, uint8_t nrOfPulses);
329 
346 EXTERN_C
347 CCAUXDLL_API
348 eErr CCAUXDLL_CALLING_CONV FrontLED_setColor(FRONTLEDHANDLE, uint8_t red, uint8_t green, uint8_t blue);
349 
364 EXTERN_C
365 CCAUXDLL_API
366 eErr CCAUXDLL_CALLING_CONV FrontLED_setColorExt(FRONTLEDHANDLE, uint8_t red, uint8_t green, uint8_t blue);
367 
381 EXTERN_C
382 CCAUXDLL_API
384 
392 EXTERN_C
393 CCAUXDLL_API
394 eErr CCAUXDLL_CALLING_CONV FrontLED_setOff(FRONTLEDHANDLE);
395 
406 EXTERN_C
407 CCAUXDLL_API
409 
426 EXTERN_C
427 CCAUXDLL_API
428 eErr CCAUXDLL_CALLING_CONV FrontLED_getBootLEDConfig(FRONTLEDHANDLE, uint8_t *red, uint8_t *green, uint8_t *blue,
429  float32_t *frequency, uint8_t *dutyCycle);
430 
447 EXTERN_C
448 CCAUXDLL_API
449 eErr CCAUXDLL_CALLING_CONV FrontLED_getBootLEDConfigExt(FRONTLEDHANDLE, uint8_t *red, uint8_t *green, uint8_t *blue,
450  float32_t *frequency, uint8_t *dutyCycle);
451 
468 EXTERN_C
469 CCAUXDLL_API
470 eErr CCAUXDLL_CALLING_CONV FrontLED_setBootLEDConfig(FRONTLEDHANDLE, uint8_t red, uint8_t green, uint8_t blue,
471  float32_t frequency, uint8_t dutyCycle);
472 
489 EXTERN_C
490 CCAUXDLL_API
491 eErr CCAUXDLL_CALLING_CONV FrontLED_setBootLEDConfigExt(FRONTLEDHANDLE, uint8_t red, uint8_t green, uint8_t blue,
492  float32_t frequency, uint8_t dutyCycle);
493 
512 EXTERN_C
513 CCAUXDLL_API
514 eErr CCAUXDLL_CALLING_CONV FrontLED_getPostBootLEDConfig(FRONTLEDHANDLE, uint8_t *red, uint8_t *green, uint8_t *blue,
515  float32_t *frequency, uint8_t *dutyCycle);
516 
535 EXTERN_C
536 CCAUXDLL_API
537 eErr CCAUXDLL_CALLING_CONV FrontLED_getPostBootLEDConfigExt(FRONTLEDHANDLE, uint8_t *red, uint8_t *green, uint8_t *blue,
538  float32_t *frequency, uint8_t *dutyCycle);
539 
558 EXTERN_C
559 CCAUXDLL_API
560 eErr CCAUXDLL_CALLING_CONV FrontLED_setPostBootLEDConfig(FRONTLEDHANDLE, uint8_t red, uint8_t green, uint8_t blue,
561  float32_t frequency, uint8_t dutyCycle);
562 
581 EXTERN_C
582 CCAUXDLL_API
584  float32_t frequency, uint8_t dutyCycle);
585 
587 #ifdef __cplusplus
588 } /* namespace CrossControl */
589 #endif
590 
591 #ifdef PLATFORM_VI2
592 #pragma message "FrontLED is deprecated for CCpilot VI2"
593 #endif
594 
595 #endif /* CC_FRONT_LED_H */
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 FrontLED_getIdleTime(FRONTLEDHANDLE, uint8_t *idleTime)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV FrontLED_getBootLEDConfig(FRONTLEDHANDLE, uint8_t *red, uint8_t *green, uint8_t *blue, float32_t *frequency, uint8_t *dutyCycle)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV FrontLED_getEnabledDuringStartup(FRONTLEDHANDLE, CCStatus *status)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV FrontLED_getOffTime(FRONTLEDHANDLE, uint8_t *offTime)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV FrontLED_setColorExt(FRONTLEDHANDLE, uint8_t red, uint8_t green, uint8_t blue)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV FrontLED_setOnTime(FRONTLEDHANDLE, uint8_t onTime)
EXTERN_C CCAUXDLL_API FRONTLEDHANDLE CCAUXDLL_CALLING_CONV GetFrontLED(void)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV FrontLED_setPostBootLEDConfig(FRONTLEDHANDLE, uint8_t red, uint8_t green, uint8_t blue, float32_t frequency, uint8_t dutyCycle)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV FrontLED_getSignal(FRONTLEDHANDLE, float64_t *frequency, uint8_t *dutyCycle)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV FrontLED_getNrOfPulses(FRONTLEDHANDLE, uint8_t *nrOfPulses)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV FrontLED_getColor(FRONTLEDHANDLE, uint8_t *red, uint8_t *green, uint8_t *blue)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV FrontLED_setOffTime(FRONTLEDHANDLE, uint8_t offTime)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV FrontLED_setActive(FRONTLEDHANDLE, ComponentLocation location)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV FrontLED_setEnabledDuringStartup(FRONTLEDHANDLE, CCStatus status)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV FrontLED_setPostBootLEDConfigExt(FRONTLEDHANDLE, uint8_t red, uint8_t green, uint8_t blue, float32_t frequency, uint8_t dutyCycle)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV FrontLED_setStandardColor(FRONTLEDHANDLE, CCAuxColor color)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV FrontLED_setNrOfPulses(FRONTLEDHANDLE, uint8_t nrOfPulses)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV FrontLED_getColorExt(FRONTLEDHANDLE, uint8_t *red, uint8_t *green, uint8_t *blue)
EXTERN_C CCAUXDLL_API void CCAUXDLL_CALLING_CONV FrontLED_release(FRONTLEDHANDLE)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV FrontLED_getPostBootLEDConfigExt(FRONTLEDHANDLE, uint8_t *red, uint8_t *green, uint8_t *blue, float32_t *frequency, uint8_t *dutyCycle)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV FrontLED_getStandardColor(FRONTLEDHANDLE, CCAuxColor *color)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV FrontLED_setIdleTime(FRONTLEDHANDLE, uint8_t idleTime)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV FrontLED_getPostBootLEDConfig(FRONTLEDHANDLE, uint8_t *red, uint8_t *green, uint8_t *blue, float32_t *frequency, uint8_t *dutyCycle)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV FrontLED_setOff(FRONTLEDHANDLE)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV FrontLED_getBootLEDConfigExt(FRONTLEDHANDLE, uint8_t *red, uint8_t *green, uint8_t *blue, float32_t *frequency, uint8_t *dutyCycle)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV FrontLED_setSignal(FRONTLEDHANDLE, float64_t frequency, uint8_t dutyCycle)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV FrontLED_setColor(FRONTLEDHANDLE, uint8_t red, uint8_t green, uint8_t blue)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV FrontLED_getActive(FRONTLEDHANDLE, ComponentLocation *location)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV FrontLED_getOnTime(FRONTLEDHANDLE, uint8_t *onTime)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV FrontLED_setBootLEDConfig(FRONTLEDHANDLE, uint8_t red, uint8_t green, uint8_t blue, float32_t frequency, uint8_t dutyCycle)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV FrontLED_setBootLEDConfigExt(FRONTLEDHANDLE, uint8_t red, uint8_t green, uint8_t blue, float32_t frequency, uint8_t dutyCycle)
Definition: About.h:30
CCAuxColor
Definition: CCAuxTypes.h:555
CCStatus
Definition: CCAuxTypes.h:153
void * FRONTLEDHANDLE
Definition: FrontLED.h:36
ComponentLocation
Definition: CCAuxTypes.h:569
eErr
Definition: CCAuxTypes.h:162