iLLD_TC29x
1.0
PwmHl.h
Go to the documentation of this file.
1
/**
2
* \file PwmHl.h
3
* \brief Multi-channels, dual-complementary PWM interface
4
*
5
* \version iLLD_1_0_0_11_0
6
* \copyright Copyright (c) 2013 Infineon Technologies AG. All rights reserved.
7
*
8
*
9
* IMPORTANT NOTICE
10
*
11
*
12
* Infineon Technologies AG (Infineon) is supplying this file for use
13
* exclusively with Infineon's microcontroller products. This file can be freely
14
* distributed within development tools that are supporting such microcontroller
15
* products.
16
*
17
* THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
18
* OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
19
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
20
* INFINEON SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL,
21
* OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
22
*
23
* \defgroup library_srvsw_if_pwmhl PWM HL interface
24
* \ingroup library_srvsw_if
25
*
26
*/
27
28
#ifndef PWMHL_H_
29
#define PWMHL_H_ 1
30
31
#include "
Cpu/Std/Ifx_Types.h
"
32
33
typedef
struct
PwmHl_s
PwmHl
;
34
typedef
void (*
PwmHl_Start
)(
PwmHl
*handle);
35
typedef
void (*
PwmHl_Pause
)(
PwmHl
*handle);
36
typedef
void (*
PwmHl_Resume
)(
PwmHl
*handle);
37
typedef
void (*
PwmHl_Stop
)(
PwmHl
*handle);
38
39
typedef
struct
40
{
41
PwmHl_Start
start
;
42
PwmHl_Stop
stop
;
43
}
PwmHl_Functions
;
44
45
/** \brief Structure of the TPwm interface */
46
struct
PwmHl_s
47
{
48
float32
t12Frequency
;
/**< \brief Actual timer12 frequency */
49
Ifx_TimerValue
t12Period
;
/**< \brief Actual timer 12 period */
50
float32
t13Frequency
;
/**< \brief Actual timer13 frequency */
51
Ifx_TimerValue
t13Period
;
/**< \brief Actual timer 13 period */
52
#if IFX_CFG_USE_STANDARD_INTERFACE
53
PwmHl_Functions
functions;
/**< \brief Actual timer period */
54
#endif
55
};
56
57
/** \brief Configuration structure of the TPwm interface */
58
typedef
struct
59
{
60
float32
t12Frequency
;
/**< \brief Specify expected T12 PWM frequency in Hertz */
61
Ifx_TimerValue
t12Period
;
/**< \brief Specify expected T12 PWM period in ticks. */
62
float32
t13Frequency
;
/**< \brief Specify expected T13 PWM frequency in Hertz */
63
Ifx_TimerValue
t13Period
;
/**< \brief Specify expected T13 PWM period in ticks. */
64
Ifx_TimerValue
phaseDelay
;
/**< \brief Specify the ticks before before updating each ouput hall pattern */
65
Ifx_TimerValue
noiseFilter
;
/**< \brief Specify hall sensor noise filter */
66
67
Ifx_ActiveState
activeState
;
/**< \brief Active state select for PWM output. Active high means that the PWM edge is rising at the elapsed of waitingTicks */
68
}
PwmHl_Config
;
69
70
#if IFX_CFG_USE_STANDARD_INTERFACE
71
IFX_INLINE
void
PwmHl_start(
PwmHl
*handle) {handle->functions.start(handle); }
72
IFX_INLINE
void
PwmHl_stop(
PwmHl
*handle) {handle->functions.stop(handle); }
73
#endif
74
75
#endif
/* TPWM_H_ */
home
mclld
Libraries
release
iLLD_1_0_0_11_0
src
ifx
SrvSw
If
Ccu6If
PwmHl.h
Generated by
1.8.4