ATmega2560
Hardware definitions
Loading...
Searching...
No Matches
PWM.h
Go to the documentation of this file.
1
5
6#ifndef ATMEGA2560_DEFINITIONS_PWM_H
7#define ATMEGA2560_DEFINITIONS_PWM_H
8
9#include <stdint.h>
10#include "Config.h"
11#include "Pin.h"
12
14namespace atmega2560
15{
17 namespace pwm
18 {
20 enum class Channel : uint8_t
21 {
22 OC0A = 0,
23 OC0B = 1,
24 OC1A = 2,
25 OC1B = 3,
26 OC1C = 4,
27 OC2A = 5,
28 OC2B = 6,
29 OC3A = 7,
30 OC3B = 8,
31 OC3C = 9,
32 OC4A = 10,
33 OC4B = 11,
34 OC4C = 12,
35 OC5A = 13,
36 OC5B = 14,
37 OC5C = 15,
38 };
39
40 enum class OutputPin : uint8_t
41 {
42 OC0A = 0x17,
43 OC0B = 0x65,
44 OC1A = 0x15,
45 OC1B = 0x16,
46 OC1C = 0x17,
47 OC2A = 0x14,
48 OC2B = 0x76,
49 OC3A = 0x43,
50 OC3B = 0x44,
51 OC3C = 0x45,
52 OC4A = 0x73,
53 OC4B = 0x74,
54 OC4C = 0x75,
55 OC5A = 0xA3,
56 OC5B = 0xA4,
57 OC5C = 0xA5,
58 };
59
60 enum : uint8_t
61 {
70 };
71 }
72}
73
74#endif
Device, package and operating-grade selection.
Logical GPIO pin and port identifiers.
Pwm definitions.
Definition PWM.h:18
Channel
16 hardware compare outputs.
Definition PWM.h:21
@ OC5A
Timer5 compare A.
Definition PWM.h:35
@ OC5C
Timer5 compare C.
Definition PWM.h:37
@ OC2A
Timer2 compare A.
Definition PWM.h:27
@ OC5B
Timer5 compare B.
Definition PWM.h:36
@ OC1C
Timer1 compare C.
Definition PWM.h:26
@ OC4B
Timer4 compare B.
Definition PWM.h:33
@ OC2B
Timer2 compare B.
Definition PWM.h:28
@ OC0A
Timer0 compare A.
Definition PWM.h:22
@ OC0B
Timer0 compare B.
Definition PWM.h:23
@ OC1B
Timer1 compare B.
Definition PWM.h:25
@ OC3A
Timer3 compare A.
Definition PWM.h:29
@ OC3C
Timer3 compare C.
Definition PWM.h:31
@ OC3B
Timer3 compare B.
Definition PWM.h:30
@ OC1A
Timer1 compare A.
Definition PWM.h:24
@ OC4A
Timer4 compare A.
Definition PWM.h:32
@ OC4C
Timer4 compare C.
Definition PWM.h:34
OutputPin
Physical GPIO mapping for compare outputs.
Definition PWM.h:41
@ timer3_channel_count
timer3 channel count.
Definition PWM.h:67
@ timer5_channel_count
timer5 channel count.
Definition PWM.h:69
@ channel_count
channel count.
Definition PWM.h:62
@ timer4_channel_count
timer4 channel count.
Definition PWM.h:68
@ timer2_channel_count
timer2 channel count.
Definition PWM.h:66
@ distinct_pin_count
distinct pin count.
Definition PWM.h:63
@ timer1_channel_count
timer1 channel count.
Definition PWM.h:65
@ timer0_channel_count
timer0 channel count.
Definition PWM.h:64
ATmega2560 hardware definitions.
Definition ADC.h:15