Skip to content

Commit a4cd321

Browse files
maidnlfacchinm
authored andcommitted
corrected definition of pins for science kit
1 parent 2dd76cb commit a4cd321

File tree

2 files changed

+54
-22
lines changed

2 files changed

+54
-22
lines changed

variants/MUXTO/pins_arduino.h

+38-6
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,25 @@ extern "C" unsigned int SCI_COUNT_fn();
2828
#define PIN_A3 (19u)
2929
#define PIN_A4 (20u)
3030
#define PIN_A5 (21u)
31+
#define PIN_A6 (22u)
32+
33+
3134

3235
#undef A0
3336
#undef A1
3437
#undef A2
3538
#undef A3
3639
#undef A4
3740
#undef A5
41+
#undef A6
42+
3843
static const uint8_t A0 = PIN_A0;
3944
static const uint8_t A1 = PIN_A1;
4045
static const uint8_t A2 = PIN_A2;
4146
static const uint8_t A3 = PIN_A3;
4247
static const uint8_t A4 = PIN_A4;
4348
static const uint8_t A5 = PIN_A5;
49+
static const uint8_t A6 = PIN_A6;
4450

4551
// Digital pins
4652
// -----------
@@ -60,6 +66,20 @@ static const uint8_t A5 = PIN_A5;
6066
#undef D13
6167
#undef D14
6268
#undef D15
69+
#undef D16
70+
#undef D17
71+
#undef D18
72+
#undef D19
73+
#undef D20
74+
#undef D21
75+
#undef D22
76+
#undef D23
77+
#undef D24
78+
#undef D25
79+
#undef D26
80+
#undef D27
81+
82+
6383
#define D0 (0u)
6484
#define D1 (1u)
6585
#define D2 (2u)
@@ -76,14 +96,26 @@ static const uint8_t A5 = PIN_A5;
7696
#define D13 (13u)
7797
#define D14 (14u)
7898
#define D15 (15u)
99+
#define D16 (16u)
100+
#define D17 (17u)
101+
#define D18 (18u)
102+
#define D19 (19u)
103+
#define D20 (20u)
104+
#define D21 (21u)
105+
#define D22 (22u)
106+
#define D23 (23u)
107+
#define D24 (24u)
108+
#define D25 (25u)
109+
#define D26 (26u)
110+
#define D27 (27u)
79111

80112
// LEDs
81113
// ----
82-
#define PIN_LED (3u)
83-
#define LED_BUILTIN PIN_LED
84-
#define LEDR (22u)
85-
#define LEDG (13u)
86-
#define LEDB (23u)
114+
//#define PIN_LED (3u)
115+
//#define LED_BUILTIN PIN_LED
116+
//#define LEDR (22u)
117+
//#define LEDG (13u)
118+
//#define LEDB (23u)
87119

88120
/****** UART CORE DEFINES ******/
89121

@@ -95,7 +127,7 @@ static const uint8_t A5 = PIN_A5;
95127

96128
#define USB_VID (0x2341)
97129
#define USB_PID (0x0058)
98-
#define USB_NAME "Nano Every"
130+
#define USB_NAME "SCIENCE R3"
99131

100132
#define NO_1200_BPS_RESET 1
101133

variants/MUXTO/variant.cpp

+16-16
Original file line numberDiff line numberDiff line change
@@ -78,28 +78,28 @@ extern "C" const PinMuxCfg_t g_pin_cfg[] = {
7878
{ BSP_IO_PORT_00_PIN_14, P014 }, /* (4) D4 */
7979
{ BSP_IO_PORT_00_PIN_15, P015 }, /* (5) D5~ */
8080
{ BSP_IO_PORT_04_PIN_00, P400 }, /* (6) D6~ */
81-
{ BSP_IO_PORT_05_PIN_01, P501 }, /* (8) D8 */
82-
{ BSP_IO_PORT_04_PIN_01, P401 }, /* (7) D7 */
81+
{ BSP_IO_PORT_05_PIN_01, P501 }, /* (7) D8 */
82+
{ BSP_IO_PORT_04_PIN_01, P401 }, /* (8) D7 */
8383
{ BSP_IO_PORT_05_PIN_02, P502 }, /* (9) D9~ */
84-
{ BSP_IO_PORT_02_PIN_14, P214 }, /* (11) D11~ */
85-
{ BSP_IO_PORT_02_PIN_15, P215 }, /* (10) D10~ */
84+
{ BSP_IO_PORT_02_PIN_14, P214 }, /* (10) D11~ */
85+
{ BSP_IO_PORT_02_PIN_15, P215 }, /* (11) D10~ */
8686
{ BSP_IO_PORT_02_PIN_13, P213 }, /* (12) D12 */
8787
{ BSP_IO_PORT_02_PIN_12, P212 }, /* (13) D13 */
8888
{ BSP_IO_PORT_01_PIN_08, P108 }, /* (14) D14 */
8989
{ BSP_IO_PORT_03_PIN_00, P300 }, /* (15) D15 */
90-
{ BSP_IO_PORT_01_PIN_01, P101 }, /* (16) A0 -------------------------- ANALOG */
91-
{ BSP_IO_PORT_01_PIN_02, P102 }, /* (17) A1 */
92-
{ BSP_IO_PORT_01_PIN_03, P103 }, /* (18) A2 */
93-
{ BSP_IO_PORT_01_PIN_04, P104 }, /* (19) A3 */
94-
{ BSP_IO_PORT_04_PIN_08, P408 }, /* (20) A4 */
95-
{ BSP_IO_PORT_04_PIN_09, P409 }, /* (21) A5 */
96-
{ BSP_IO_PORT_01_PIN_05, P105 }, /* (22) A6 */
90+
{ BSP_IO_PORT_01_PIN_01, P101 }, /* (16) A0 D16 -------------------------- ANALOG */
91+
{ BSP_IO_PORT_01_PIN_02, P102 }, /* (17) A1 D17 */
92+
{ BSP_IO_PORT_01_PIN_03, P103 }, /* (18) A2 D18 */
93+
{ BSP_IO_PORT_01_PIN_04, P104 }, /* (19) A3 D19 */
94+
{ BSP_IO_PORT_04_PIN_08, P408 }, /* (20) A4 D20 */
95+
{ BSP_IO_PORT_04_PIN_09, P409 }, /* (21) A5 D21 */
96+
{ BSP_IO_PORT_01_PIN_05, P105 }, /* (22) A6 D22 */
9797

98-
{ BSP_IO_PORT_01_PIN_09, P109 }, /* (23) D16 ------------------------- TX */
99-
{ BSP_IO_PORT_01_PIN_10, P110 }, /* (24) D17 ------------------------- RX */
100-
{ BSP_IO_PORT_00_PIN_13, P013 }, /* (25) D18 ------------------------- DAC1 */
101-
{ BSP_IO_PORT_05_PIN_00, P500 }, /* (26) D19 ------------------------- DAC2 */
102-
{ BSP_IO_PORT_02_PIN_06, P206 }, /* (27) D20 */
98+
{ BSP_IO_PORT_01_PIN_09, P109 }, /* (23) D23 ------------------------- TX */
99+
{ BSP_IO_PORT_01_PIN_10, P110 }, /* (24) D24 ------------------------- RX */
100+
{ BSP_IO_PORT_00_PIN_13, P013 }, /* (25) D25 ------------------------- DAC1 */
101+
{ BSP_IO_PORT_05_PIN_00, P500 }, /* (26) D26 ------------------------- DAC2 */
102+
{ BSP_IO_PORT_02_PIN_06, P206 }, /* (27) D27 */
103103

104104

105105

0 commit comments

Comments
 (0)