-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtimer2.h
More file actions
39 lines (25 loc) · 989 Bytes
/
Copy pathtimer2.h
File metadata and controls
39 lines (25 loc) · 989 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
* timer2.h
*
* Created: 04-Mar-2018
* Author: Alsayed Alsisi
* Contact Details:
- (+2)01066769510
- alsayed.alsisi@gmail.com
*/
#ifndef TIMER2_H_
#define TIMER2_H_
/*----------------------------------------------------------------
--------------------- File Inclusions ----------------------------
----------------------------------------------------------------*/
#include <stdint.h>
/*----------------------------------------------------------------
--------------------- Public Function Prototypes ----------------
----------------------------------------------------------------*/
//To configure the timer to work in PWM mode.
extern void timer2_pwm_init(void);
// To start the PWM signal:
extern void timer2_pwm_start(void);
//To change the duty cycle as required. And note that 0% duty cycle means no output on the pwm OC2 pin.
extern void timer2_pwm_duty_cycle_set(uint8_t duty_cycle_percentage);
#endif /* TIMER2_H_ */