CCAux
2.7.2.0
CCAux API reference
Main Page
Namespaces
Data Structures
Files
File List
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
IncludeFiles
PWMOut.h
Go to the documentation of this file.
1
/************************************************
2
*
3
* CROSSCONTROL AUX API
4
*
5
* PWMOut.h
6
*
7
* Version 2.7.2.0, 2014-08-25
8
*
9
* (c) maximatecc 2013
10
*
11
* File description:
12
* PWM Output
13
*
14
* Use the function GetPWMOut() to get a handle to pass on to the other functions.
15
* Use the method PWMOut_release(PWMOUTHANDLE) to return the handle.
16
*
17
* Note: The rise and fall times of the hardware limits the signal's usefulness in high frequencies.
18
* The duty cycle of the PWM signal affects the maximum attainable frequency: at 50% duty cycle, the attainable frequecy is at it's maximum.
19
* 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.
20
* A PWM signal is generated when both the frequency and the duty cycle of a channel is not zero.
21
*
22
* Example Usage:
23
* @include pwmout_example.cpp
24
*
25
************************************************/
26
#ifndef CC_PWMOUT_H
27
#define CC_PWMOUT_H
28
29
#include "
CCAuxErrors.h
"
30
#include "
CCPlatform.h
"
31
32
#ifdef __cplusplus
33
namespace
CrossControl {
34
#endif
35
36
typedef
void
*
PWMOUTHANDLE
;
37
51
EXTERN_C
52
CCAUXDLL_API
53
PWMOUTHANDLE
54
CCAUXDLL_CALLING_CONV
55
GetPWMOut
(
void
);
56
67
EXTERN_C
68
CCAUXDLL_API
69
void
70
CCAUXDLL_CALLING_CONV
71
PWMOut_release
(
PWMOUTHANDLE
);
72
73
88
EXTERN_C
89
CCAUXDLL_API
90
eErr
91
CCAUXDLL_CALLING_CONV
92
PWMOut_setPWMOutputChannelDutyCycle
(
PWMOUTHANDLE
,
unsigned
char
channel,
unsigned
char
duty_cycle);
93
94
109
EXTERN_C
110
CCAUXDLL_API
111
eErr
112
CCAUXDLL_CALLING_CONV
113
PWMOut_setPWMOutputChannelFrequency
(
PWMOUTHANDLE
,
unsigned
char
channel,
float
frequency);
114
115
130
EXTERN_C
131
CCAUXDLL_API
132
eErr
133
CCAUXDLL_CALLING_CONV
134
PWMOut_getPWMOutputChannelDutyCycle
(
PWMOUTHANDLE
,
unsigned
char
channel,
unsigned
char
* duty_cycle);
135
136
151
EXTERN_C
152
CCAUXDLL_API
153
eErr
154
CCAUXDLL_CALLING_CONV
155
PWMOut_getPWMOutputChannelFrequency
(
PWMOUTHANDLE
,
unsigned
char
channel,
float
* frequency);
156
157
173
EXTERN_C
174
CCAUXDLL_API
175
eErr
176
CCAUXDLL_CALLING_CONV
177
PWMOut_getPWMOutputStatus
(
PWMOUTHANDLE
,
unsigned
char
* status);
178
179
193
EXTERN_C
194
CCAUXDLL_API
195
eErr
196
CCAUXDLL_CALLING_CONV
197
PWMOut_setPWMOutOff
(
PWMOUTHANDLE
,
unsigned
char
channel);
198
199
200
#ifdef __cplusplus
201
}
/* namespace CrossControl */
202
#endif
203
204
#endif
/* CC_PWMOUT_H */
205
Generated on Mon Aug 25 2014 17:48:49 for CCAux by
1.8.3.1