CCAux  2.20.0.0
CCAux API reference
Buzzer.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  * Buzzer settings
13  *
14  * Use the function GetBuzzer() to get a handle to pass on to the other functions.
15  * Use the method Buzzer_release(BUZZERHANDLE) to return the handle.
16  *
17  * Example Usage:
18  * @include buzzer_example.cpp
19  *
20  ************************************************/
21 #ifndef CC_BUZZER_H
22 #define CC_BUZZER_H
23 
24 #include "CCAuxErrors.h"
25 #include "CCPlatform.h"
26 
27 #ifdef __cplusplus
28 namespace CrossControl
29 {
30 #endif
31 
32 typedef void *BUZZERHANDLE;
33 
53 EXTERN_C
54 CCAUXDLL_API
56 CCAUXDLL_CALLING_CONV
57 GetBuzzer(void);
58 
69 EXTERN_C
70 CCAUXDLL_API
71 void CCAUXDLL_CALLING_CONV Buzzer_release(BUZZERHANDLE);
72 
82 EXTERN_C
83 CCAUXDLL_API
84 eErr CCAUXDLL_CALLING_CONV Buzzer_getFrequency(BUZZERHANDLE, uint16_t *frequency);
85 
101 EXTERN_C
102 CCAUXDLL_API
103 eErr CCAUXDLL_CALLING_CONV Buzzer_getVolume(BUZZERHANDLE, uint16_t *volume);
104 
119 EXTERN_C
120 CCAUXDLL_API
121 eErr CCAUXDLL_CALLING_CONV Buzzer_getScaledVolume(BUZZERHANDLE, uint8_t *volume);
122 
132 EXTERN_C
133 CCAUXDLL_API
134 eErr CCAUXDLL_CALLING_CONV Buzzer_getTrigger(BUZZERHANDLE, bool *trigger);
135 
148 EXTERN_C
149 CCAUXDLL_API
150 eErr CCAUXDLL_CALLING_CONV Buzzer_setFrequency(BUZZERHANDLE, uint16_t frequency);
151 
166 EXTERN_C
167 CCAUXDLL_API
168 eErr CCAUXDLL_CALLING_CONV Buzzer_setVolume(BUZZERHANDLE, uint16_t volume);
169 
182 EXTERN_C
183 CCAUXDLL_API
184 eErr CCAUXDLL_CALLING_CONV Buzzer_setScaledVolume(BUZZERHANDLE, uint8_t volume);
185 
195 EXTERN_C
196 CCAUXDLL_API
197 eErr CCAUXDLL_CALLING_CONV Buzzer_setTrigger(BUZZERHANDLE, bool trigger);
198 
212 EXTERN_C
213 CCAUXDLL_API
214 eErr CCAUXDLL_CALLING_CONV Buzzer_buzze(BUZZERHANDLE, int32_t time, bool blocking);
215 
225 EXTERN_C
226 CCAUXDLL_API
227 eErr CCAUXDLL_CALLING_CONV Buzzer_setActive(BUZZERHANDLE, ComponentLocation location);
228 
238 EXTERN_C
239 CCAUXDLL_API
240 eErr CCAUXDLL_CALLING_CONV Buzzer_getActive(BUZZERHANDLE, ComponentLocation *location);
242 #ifdef __cplusplus
243 } /* namespace CrossControl */
244 #endif
245 
246 #endif /* CC_BUZZER_H */
unsigned short uint16_t
Definition: CCAuxTypes.h:38
signed int int32_t
Definition: CCAuxTypes.h:36
unsigned char uint8_t
Definition: CCAuxTypes.h:37
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Buzzer_getTrigger(BUZZERHANDLE, bool *trigger)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Buzzer_setVolume(BUZZERHANDLE, uint16_t volume)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Buzzer_getScaledVolume(BUZZERHANDLE, uint8_t *volume)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Buzzer_getVolume(BUZZERHANDLE, uint16_t *volume)
EXTERN_C CCAUXDLL_API BUZZERHANDLE CCAUXDLL_CALLING_CONV GetBuzzer(void)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Buzzer_setScaledVolume(BUZZERHANDLE, uint8_t volume)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Buzzer_getFrequency(BUZZERHANDLE, uint16_t *frequency)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Buzzer_setTrigger(BUZZERHANDLE, bool trigger)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Buzzer_getActive(BUZZERHANDLE, ComponentLocation *location)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Buzzer_buzze(BUZZERHANDLE, int32_t time, bool blocking)
EXTERN_C CCAUXDLL_API void CCAUXDLL_CALLING_CONV Buzzer_release(BUZZERHANDLE)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Buzzer_setFrequency(BUZZERHANDLE, uint16_t frequency)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Buzzer_setActive(BUZZERHANDLE, ComponentLocation location)
Definition: About.h:30
ComponentLocation
Definition: CCAuxTypes.h:569
void * BUZZERHANDLE
Definition: Buzzer.h:32
eErr
Definition: CCAuxTypes.h:162