CCAux  2.17.0.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.17.0.0", 2019-10-22
8 *
9 * (c) CrossControl 2010-2019
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 
58  EXTERN_C
59  CCAUXDLL_API
61  CCAUXDLL_CALLING_CONV
62  GetPWMOut(void);
63 
74  EXTERN_C
75  CCAUXDLL_API
76  void
77  CCAUXDLL_CALLING_CONV
79 
96  EXTERN_C
97  CCAUXDLL_API
98  eErr
99  CCAUXDLL_CALLING_CONV
101 
116  EXTERN_C
117  CCAUXDLL_API
118  eErr
119  CCAUXDLL_CALLING_CONV
121 
138  EXTERN_C
139  CCAUXDLL_API
140  eErr
141  CCAUXDLL_CALLING_CONV
143 
158  EXTERN_C
159  CCAUXDLL_API
160  eErr
161  CCAUXDLL_CALLING_CONV
163 
180  EXTERN_C
181  CCAUXDLL_API
182  eErr
183  CCAUXDLL_CALLING_CONV
185 
199  EXTERN_C
200  CCAUXDLL_API
201  eErr
202  CCAUXDLL_CALLING_CONV
204 
206 #ifdef __cplusplus
207 } /* namespace CrossControl */
208 #endif
209 
210 #endif /* CC_PWMOUT_H */
211 
eErr
Definition: CCAuxTypes.h:159
float float32_t
Definition: CCAuxTypes.h:25
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)
Definition: About.h:30
unsigned char uint8_t
Definition: CCAuxTypes.h:47
EXTERN_C CCAUXDLL_API PWMOUTHANDLE CCAUXDLL_CALLING_CONV GetPWMOut(void)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV PWMOut_setPWMOutOff(PWMOUTHANDLE, uint8_t channel)
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_getPWMOutputChannelFrequency(PWMOUTHANDLE, uint8_t channel, float32_t *frequency)
void * PWMOUTHANDLE
Definition: PWMOut.h:37
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV PWMOut_setPWMOutputChannelFrequency(PWMOUTHANDLE, uint8_t channel, float32_t frequency)