CCAux  2.15.2.0
CCAux API reference
PWMOut.h
Go to the documentation of this file.
1 /************************************************
2  *
3  * CROSSCONTROL AUX API
4  *
5  * PWMOut.h
6  *
7  * Version 2.15.2.0, 2020-07-08
8  *
9  * (c) CrossControl 2010-2020
10  *
11 
12  * File description:
13  * PWM Output
14  *
15  * Use the function GetPWMOut() to get a handle to pass on to the other functions.
16  * Use the method PWMOut_release(PWMOUTHANDLE) to return the handle.
17  *
18  * Note: The rise and fall times of the hardware limits the signal's usefulness in high frequencies.
19  * The duty cycle of the PWM signal affects the maximum attainable frequency: at 50% duty cycle, the attainable frequecy is at it's maximum.
20  * If the duty cycle is near 0 or 100%, the rise/fall times of the signal means that the maximum attainable frequency is significantly lower.
21  * A PWM signal is generated when both the frequency and the duty cycle of a channel is not zero.
22  *
23  * Example Usage:
24  * @include pwmout_example.cpp
25  *
26  ************************************************/
27 #ifndef CC_PWMOUT_H
28 #define CC_PWMOUT_H
29 
30 #include "CCAuxErrors.h"
31 #include "CCPlatform.h"
32 
33 #ifdef __cplusplus
34 namespace CrossControl {
35 #endif
36 
37  typedef void* PWMOUTHANDLE;
38 
52  EXTERN_C
53  CCAUXDLL_API
55  CCAUXDLL_CALLING_CONV
56  GetPWMOut(void);
57 
68  EXTERN_C
69  CCAUXDLL_API
70  void
71  CCAUXDLL_CALLING_CONV
73 
90  EXTERN_C
91  CCAUXDLL_API
92  eErr
93  CCAUXDLL_CALLING_CONV
95 
110  EXTERN_C
111  CCAUXDLL_API
112  eErr
113  CCAUXDLL_CALLING_CONV
115 
132  EXTERN_C
133  CCAUXDLL_API
134  eErr
135  CCAUXDLL_CALLING_CONV
137 
152  EXTERN_C
153  CCAUXDLL_API
154  eErr
155  CCAUXDLL_CALLING_CONV
157 
174  EXTERN_C
175  CCAUXDLL_API
176  eErr
177  CCAUXDLL_CALLING_CONV
179 
193  EXTERN_C
194  CCAUXDLL_API
195  eErr
196  CCAUXDLL_CALLING_CONV
198 
199 #ifdef __cplusplus
200 } /* namespace CrossControl */
201 #endif
202 
203 #endif /* CC_PWMOUT_H */
204 
eErr
Definition: CCAuxTypes.h:159
EXTERN_C CCAUXDLL_API PWMOUTHANDLE CCAUXDLL_CALLING_CONV GetPWMOut(void)
float float32_t
Definition: CCAuxTypes.h:25
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV PWMOut_setPWMOutputChannelFrequency(PWMOUTHANDLE, uint8_t channel, float32_t frequency)
Definition: About.h:30
EXTERN_C CCAUXDLL_API void CCAUXDLL_CALLING_CONV PWMOut_release(PWMOUTHANDLE)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV PWMOut_setPWMOutputChannelDutyCycle(PWMOUTHANDLE, uint8_t channel, uint8_t duty_cycle)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV PWMOut_setPWMOutOff(PWMOUTHANDLE, uint8_t channel)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV PWMOut_getPWMOutputChannelDutyCycle(PWMOUTHANDLE, uint8_t channel, uint8_t *duty_cycle)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV PWMOut_getPWMOutputStatus(PWMOUTHANDLE, uint8_t *status)
unsigned char uint8_t
Definition: CCAuxTypes.h:47
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV PWMOut_getPWMOutputChannelFrequency(PWMOUTHANDLE, uint8_t channel, float32_t *frequency)
void * PWMOUTHANDLE
Definition: PWMOut.h:37