TR-mbed
1.0
Loading...
Searching...
No Matches
core
util
communications
PwmIn.h
Go to the documentation of this file.
1
/* mbed PwmIn Library
2
* Copyright (c) 2008-2010, sford
3
*
4
* Permission is hereby granted, free of charge, to any person obtaining a copy
5
* of this software and associated documentation files (the "Software"), to deal
6
* in the Software without restriction, including without limitation the rights
7
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
* copies of the Software, and to permit persons to whom the Software is
9
* furnished to do so, subject to the following conditions:
10
*
11
* The above copyright notice and this permission notice shall be included in
12
* all copies or substantial portions of the Software.
13
*
14
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
* THE SOFTWARE.
21
*/
22
23
#ifndef MBED_PWMIN_H
24
#define MBED_PWMIN_H
25
26
#include "mbed.h"
27
35
class
PwmIn
{
36
public
:
41
PwmIn
(PinName
p
);
42
47
float
period
();
48
53
float
pulsewidth
();
54
59
float
dutycycle
();
60
61
protected
:
62
void
rise
();
63
void
fall
();
64
65
InterruptIn
_p
;
66
Timer
_t
;
67
float
_pulsewidth
,
_period
;
68
};
69
70
#endif
PwmIn
Definition
PwmIn.h:35
PwmIn::fall
void fall()
Definition
PwmIn.cpp:53
PwmIn::_p
InterruptIn _p
Definition
PwmIn.h:65
PwmIn::_t
Timer _t
Definition
PwmIn.h:66
PwmIn::dutycycle
float dutycycle()
Definition
PwmIn.cpp:41
PwmIn::pulsewidth
float pulsewidth()
Definition
PwmIn.cpp:37
PwmIn::rise
void rise()
Definition
PwmIn.cpp:48
PwmIn::_pulsewidth
float _pulsewidth
Definition
PwmIn.h:67
PwmIn::period
float period()
Definition
PwmIn.cpp:33
PwmIn::_period
float _period
Definition
PwmIn.h:67
p
IMU::EulerAngles p
Definition
imuExampleAllData.cpp:21
Generated by
1.9.8