-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpin-map.h
121 lines (88 loc) · 3.13 KB
/
pin-map.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
////////////////////////////////////////////
// CONTROL BOARD PIN OUT
////////////////////////////////////////////
// Only change if you using a different PCB
////////////////////////////////////////////
#ifdef USE_SDCARD
///////////////////////////////////
// --- Lifter mechanism
#define PIN_LIFTER_ENCODER_A 34
#define PIN_LIFTER_ENCODER_B 35
/* Lifter Motor */
#define PIN_LIFTER_PWM1 32
#define PIN_LIFTER_PWM2 33
#define PIN_LIFTER_DIAG 36
///////////////////////////////////
// --- Rotary mechanism
#define PIN_ROTARY_ENCODER_A 27
#define PIN_ROTARY_ENCODER_B 13
/* Rotary Motor */
#define PIN_ROTARY_PWM1 25
#define PIN_ROTARY_PWM2 26
#define PIN_ROTARY_DIAG 39
///////////////////////////////////
#define PIN_STATUSLED 5
#define PIN_PPMIN_RC 14
#define PIN_RXD2 16
#define PIN_TXD2 0 /* not used */
///////////////////////////////////
#define PIN_SD_CS 4
#define PIN_SCK 18
#define PIN_MISO 19
#define PIN_MOSI 23
///////////////////////////////////
#define PIN_SDA 21
#define PIN_SCL 22
///////////////////////////////////
#define PIN_GPIO_INTERRUPT 17
#define USE_I2C_GPIO_EXPANDER
#define GPIO_PIN_BASE 200
#define PIN_ROTARY_LIMIT GPIO_PIN_BASE+0
#define PIN_LIGHTKIT_A GPIO_PIN_BASE+1
#define PIN_LIGHTKIT_B GPIO_PIN_BASE+2
#define PIN_LIGHTKIT_C GPIO_PIN_BASE+3
#define PIN_MOTOR_EN GPIO_PIN_BASE+4
#define PIN_MOTOR_ENB GPIO_PIN_BASE+5
#define PIN_LIFTER_BOTLIMIT GPIO_PIN_BASE+6
#define PIN_LIFTER_TOPLIMIT GPIO_PIN_BASE+7
#else
///////////////////////////////////
// --- Lifter mechanism
#define PIN_LIFTER_ENCODER_A 34
#define PIN_LIFTER_ENCODER_B 35
/* Lifter Motor */
#define PIN_LIFTER_PWM1 32
#define PIN_LIFTER_PWM2 33
#define PIN_LIFTER_DIAG 36
#define PIN_LIFTER_TOPLIMIT 18
#define PIN_LIFTER_BOTLIMIT 19
///////////////////////////////////
// --- Rotary mechanism
#define PIN_ROTARY_ENCODER_A 27
#define PIN_ROTARY_ENCODER_B 13
/* Rotary Motor */
#define PIN_ROTARY_PWM1 25
#define PIN_ROTARY_PWM2 26
#define PIN_ROTARY_DIAG 39
#define PIN_ROTARY_LIMIT 23
///////////////////////////////////
#define PIN_STATUSLED 5
#define PIN_PPMIN_RC 14
#define PIN_RXD2 16
#define PIN_TXD2 0 /* not used */
///////////////////////////////////
#define PIN_SDA 21
#define PIN_SCL 22
///////////////////////////////////
#define PIN_GPIO_INTERRUPT 17
#define USE_I2C_GPIO_EXPANDER
#define GPIO_PIN_BASE 200
#define PIN_INPUT_A GPIO_PIN_BASE+0 /* INPUT A */
#define PIN_LIGHTKIT_A GPIO_PIN_BASE+1
#define PIN_LIGHTKIT_B GPIO_PIN_BASE+2
#define PIN_LIGHTKIT_C GPIO_PIN_BASE+3
#define PIN_MOTOR_EN GPIO_PIN_BASE+4
#define PIN_MOTOR_ENB GPIO_PIN_BASE+5
#define PIN_INPUT_B GPIO_PIN_BASE+6 /* INPUT B */
#define PIN_INPUT_C GPIO_PIN_BASE+7 /* INPUT B */
#endif