| Nano100BN Series BSP V3.03.002 The Board Support Package for Nano100BN Series

NuEdu-Basic01_PWM_Capture.h
Go to the documentation of this file.
1 /****************************************************************************/
12 #ifndef __NuEdu_Basic01_PWM_Capture_H__
13 #define __NuEdu_Basic01_PWM_Capture_H__
14
25 #define _PWM_Source_Clock 12000000 //XTAL's 12 MHz
26 #define _PWM_Resolution 65536
27 #define _PWM_Prescale_Max 256
28 #define _PWM_Duty_Scale 100 //0 ~ 100 %
29
30 typedef struct
31 {
32 __IO uint32_t Capture_Rising[2];
33 __IO uint32_t Capture_Falling[2];
34 __IO uint32_t Last_Edge;
35 __IO uint32_t High_Period;
36 __IO uint32_t Low_Period;
37 __IO uint32_t Signal_Period;
38 __IO float Signal_Frequency;
39 } PWM_Capture_T;
40
41 typedef enum
42 {
43 Rising = 0,
44 Falling = 1
45 } E_Edge;
46
47 extern uint32_t PWM67_Clock;
48 extern uint32_t Open_PWM6_OUT_Fail;
49 extern uint32_t Open_PWM3_Capture_Fail;
50 extern uint32_t Open_PWM7_Capture_Fail;
51 extern PWM_Capture_T PWM3;
52 extern PWM_Capture_T PWM7;
53
54 void Open_PWM6_OUT(uint32_t PWM_Frequency, uint32_t PWM_Duty);
55 void Close_PWM6_OUT(void);
56
57 void Open_PWM7_Capture(void);
58 void Close_PWM7_Capture(void);
59 void Get_PWM7_Capture_Data(void);
60
61 void Open_PWM3_Capture(void);
62 void Close_PWM3_Capture(void);
63 void Get_PWM3_Capture_Data(void);
64 /* end of group Nano130_Basic01_FUNCTIONS */
66 /* end of group NuEdu-SDK-Nano130_Basic01 */
68 /* end of group NANO100_Library */
70 #endif
71
72 /*** (C) COPYRIGHT 2013-2014 Nuvoton Technology Corp. ***/
Close_PWM3_Capture
void Close_PWM3_Capture(void)
Definition: NuEdu-Basic01_PWM_Capture.c:332
Get_PWM3_Capture_Data
void Get_PWM3_Capture_Data(void)
Definition: NuEdu-Basic01_PWM_Capture.c:357
PWM3
PWM_Capture_T PWM3
Definition: NuEdu-Basic01_PWM_Capture.c:22
Open_PWM3_Capture
void Open_PWM3_Capture(void)
Definition: NuEdu-Basic01_PWM_Capture.c:273
Close_PWM6_OUT
void Close_PWM6_OUT(void)
Definition: NuEdu-Basic01_PWM_Capture.c:113
PWM_Capture_T::Last_Edge
__IO uint32_t Last_Edge
Definition: NuEdu-Basic01_PWM_Capture.h:34
Open_PWM7_Capture
void Open_PWM7_Capture(void)
Definition: NuEdu-Basic01_PWM_Capture.c:132
E_Edge
E_Edge
Definition: NuEdu-Basic01_PWM_Capture.h:41
PWM_Capture_T::Low_Period
__IO uint32_t Low_Period
Definition: NuEdu-Basic01_PWM_Capture.h:36
PWM7
PWM_Capture_T PWM7
Definition: NuEdu-Basic01_PWM_Capture.c:23
Open_PWM6_OUT
void Open_PWM6_OUT(uint32_t PWM_Frequency, uint32_t PWM_Duty)
Definition: NuEdu-Basic01_PWM_Capture.c:25
PWM_Capture_T
Definition: NuEdu-Basic01_PWM_Capture.h:30
Open_PWM7_Capture_Fail
uint32_t Open_PWM7_Capture_Fail
Definition: NuEdu-Basic01_PWM_Capture.c:20
Get_PWM7_Capture_Data
void Get_PWM7_Capture_Data(void)
Definition: NuEdu-Basic01_PWM_Capture.c:212
PWM_Capture_T::High_Period
__IO uint32_t High_Period
Definition: NuEdu-Basic01_PWM_Capture.h:35
PWM67_Clock
uint32_t PWM67_Clock
Definition: NuEdu-Basic01_PWM_Capture.c:17
Open_PWM3_Capture_Fail
uint32_t Open_PWM3_Capture_Fail
Definition: NuEdu-Basic01_PWM_Capture.c:19
Rising
Definition: NuEdu-Basic01_PWM_Capture.h:43
Falling
Definition: NuEdu-Basic01_PWM_Capture.h:44
Close_PWM7_Capture
void Close_PWM7_Capture(void)
Definition: NuEdu-Basic01_PWM_Capture.c:189
Open_PWM6_OUT_Fail
uint32_t Open_PWM6_OUT_Fail
Definition: NuEdu-Basic01_PWM_Capture.c:18
PWM_Capture_T::Signal_Frequency
__IO float Signal_Frequency
Definition: NuEdu-Basic01_PWM_Capture.h:38
PWM_Capture_T::Signal_Period
__IO uint32_t Signal_Period
Definition: NuEdu-Basic01_PWM_Capture.h:37