forked from Makkev-blip/Microcontrollers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pinDefines.h
91 lines (73 loc) · 2.95 KB
/
pinDefines.h
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
// ---------------
// Pin Defines
// ---------------
#define LED_PORT PORTB
#define LED_PIN PINB
#define LED_DDR DDRB
#define LED0 PB0
#define LED1 PB1
#define LED2 PB2
#define LED3 PB3
#define LED4 PB4
#define LED5 PB5
#define LED6 PB6
#define LED7 PB7
#define BUTTON_PORT PORTD
#define BUTTON_PIN PIND
#define BUTTON_DDR DDRD
#define BUTTON PD2
#define BUTTON2 PD3
#define BUTTON3 PD4
#define SPEAKER PD6 /* OC0A */
#define SPEAKER_PORT PORTD
#define SPEAKER_PIN PIND
#define SPEAKER_DDR DDRD
#define ANTENNA PD5 /* OC0B */
#define ANTENNA_PORT PORTD
#define ANTENNA_PIN PIND
#define ANTENNA_DDR DDRD
#define MODULATION PD3 /* OC2B */
#define MODULATION_PORT PORTD
#define MODULATION_PIN PIND
#define MODULATION_DDR DDRD
#define LIGHT_SENSOR PC0 /* ADC0 */
#define LIGHT_SENSOR_PORT PORTC
#define LIGHT_SENSOR_PIN PINC
#define LIGHT_SENSOR_DDR DDRC
#define CAP_SENSOR PC1 /* ADC1 */
#define CAP_SENSOR_PORT PORTC
#define CAP_SENSOR_PIN PINC
#define CAP_SENSOR_DDR DDRC
#define PIEZO PC2 /* ADC2 */
#define PIEZO_PORT PORTC
#define PIEZO_PIN PINC
#define PIEZO_DDR DDRC
#define POT PC3 /* ADC3 */
#define POT_PORT PORTC
#define POT_PIN PINC
#define POT_DDR DDRC
// SPI and I2C serial mode defines
#define SPI_SS PB2
#define SPI_SS_PORT PORTB
#define SPI_SS_PIN PINB
#define SPI_SS_DDR DDRB
#define SPI_MOSI PB3
#define SPI_MOSI_PORT PORTB
#define SPI_MOSI_PIN PINB
#define SPI_MOSI_DDR DDRB
#define SPI_MISO PB4
#define SPI_MISO_PORT PORTB
#define SPI_MISO_PIN PINB
#define SPI_MISO_DDR DDRB
#define SPI_SCK PB5
#define SPI_SCK_PORT PORTB
#define SPI_SCK_PIN PINB
#define SPI_SCK_DDR DDRB
#define I2C_SDA PC4
#define I2C_SDA_PORT PORTC
#define I2C_SDA_PIN PINC
#define I2C_SDA_DDR DDRC
#define I2C_SCL PC5
#define I2C_SCL_PORT PORTC
#define I2C_SCL_PIN PINC
#define I2C_SCL_DDR DDRC