@@ -57,11 +57,11 @@ extern "C"
57
57
*----------------------------------------------------------------------------*/
58
58
59
59
// Number of pins defined in PinDescription array
60
- #define PINS_COUNT (26u )
61
- #define NUM_DIGITAL_PINS (20u )
62
- #define NUM_ANALOG_INPUTS (8u )
63
- #define NUM_ANALOG_OUTPUTS (2u )
64
- #define analogInputToDigitalPin (p ) ((p < 6u ) ? (p) + 14u : -1)
60
+ #define PINS_COUNT (52u )
61
+ #define NUM_DIGITAL_PINS (42u )
62
+ #define NUM_ANALOG_INPUTS (9u )
63
+ #define NUM_ANALOG_OUTPUTS (1u )
64
+ #define analogInputToDigitalPin (p ) ((p < 10u ) ? (p) + 14u : -1)
65
65
66
66
#define digitalPinToPort (P ) ( &(PORT->Group[g_APinDescription[P].ulPort]) )
67
67
#define digitalPinToBitMask (P ) ( 1 << g_APinDescription[P].ulPin )
@@ -82,11 +82,11 @@ extern "C"
82
82
83
83
// LEDs
84
84
#define PIN_LED_13 (13u)
85
- #define PIN_LED_RXL (27u)
86
- #define PIN_LED_TXL (28u)
85
+ // #define PIN_LED_RXL (27u)
86
+ // #define PIN_LED_TXL (28u)
87
87
#define PIN_LED PIN_LED_13
88
- #define PIN_LED2 PIN_LED_RXL
89
- #define PIN_LED3 PIN_LED_TXL
88
+ // #define PIN_LED2 PIN_LED_RXL
89
+ // #define PIN_LED3 PIN_LED_TXL
90
90
#define LED_BUILTIN PIN_LED_13
91
91
92
92
/*
@@ -100,25 +100,29 @@ extern "C"
100
100
#define PIN_A5 (PIN_A0 + 5)
101
101
#define PIN_A6 (PIN_A0 + 6)
102
102
#define PIN_A7 (PIN_A0 + 7)
103
+ #define PIN_A8 (PIN_A0 + 8)
104
+ #define PIN_A9 (PIN_A0 + 9)
105
+ #define PIN_DAC PIN_A0
103
106
#define PIN_DAC0 PIN_A0
104
- #define PIN_DAC1 PIN_A1
105
107
106
108
static const uint8_t A0 = PIN_A0 ;
107
109
static const uint8_t A1 = PIN_A1 ;
108
110
static const uint8_t A2 = PIN_A2 ;
109
111
static const uint8_t A3 = PIN_A3 ;
110
112
static const uint8_t A4 = PIN_A4 ;
111
113
static const uint8_t A5 = PIN_A5 ;
112
- static const uint8_t A6 = PIN_A6 ;
113
- static const uint8_t A7 = PIN_A7 ;
114
+ static const uint8_t A6 = PIN_A6 ;
115
+ static const uint8_t A7 = PIN_A7 ;
116
+ static const uint8_t A8 = PIN_A8 ;
117
+ static const uint8_t A9 = PIN_A9 ;
114
118
119
+ static const uint8_t DAC = PIN_DAC ;
115
120
static const uint8_t DAC0 = PIN_DAC0 ;
116
- static const uint8_t DAC1 = PIN_DAC1 ;
117
121
118
122
#define ADC_RESOLUTION 12
119
123
120
124
// Other pins
121
- #define PIN_ATN (39ul)
125
+ #define PIN_ATN (39ul) // ???
122
126
static const uint8_t ATN = PIN_ATN ;
123
127
124
128
/*
@@ -136,26 +140,26 @@ static const uint8_t ATN = PIN_ATN;
136
140
*/
137
141
#define SPI_INTERFACES_COUNT 1
138
142
139
- #define PIN_SPI_MISO (24u )
140
- #define PIN_SPI_MOSI (26u )
141
- #define PIN_SPI_SCK (25u )
143
+ #define PIN_SPI_MISO (31u )
144
+ #define PIN_SPI_MOSI (29u )
145
+ #define PIN_SPI_SCK (30u )
142
146
#define PERIPH_SPI sercom2
143
147
#define PAD_SPI_TX SPI_PAD_0_SCK_1
144
148
#define PAD_SPI_RX SERCOM_RX_PAD_2
145
149
146
- static const uint8_t SS = PIN_A2 ;
147
- static const uint8_t MOSI = PIN_SPI_MOSI ;
148
- static const uint8_t MISO = PIN_SPI_MISO ;
149
- static const uint8_t SCK = PIN_SPI_SCK ;
150
+ static const uint8_t SS = PIN_A2 ; // ???
151
+ static const uint8_t MOSI = PIN_SPI_MOSI ;
152
+ static const uint8_t MISO = PIN_SPI_MISO ;
153
+ static const uint8_t SCK = PIN_SPI_SCK ;
150
154
151
155
152
156
/*
153
157
* Wire Interfaces
154
158
*/
155
159
#define WIRE_INTERFACES_COUNT 1
156
160
157
- #define PIN_WIRE_SDA (22u )
158
- #define PIN_WIRE_SCL (23u )
161
+ #define PIN_WIRE_SDA (27u )
162
+ #define PIN_WIRE_SCL (28u )
159
163
#define PERIPH_WIRE sercom5
160
164
#define WIRE_IT_HANDLER SERCOM5_Handler
161
165
@@ -165,46 +169,17 @@ static const uint8_t SCL = PIN_WIRE_SCL;
165
169
/*
166
170
* USB
167
171
*/
168
- #define PIN_USB_HOST_ENABLE (29ul)
169
- #define PIN_USB_DM (30ul)
170
- #define PIN_USB_DP (31ul)
171
-
172
- /*
173
- * I2S Interfaces
174
- */
175
- #define I2S_INTERFACES_COUNT 1
176
-
177
- #define I2S_DEVICE 0
178
- #define I2S_CLOCK_GENERATOR 3
179
-
180
- #define PIN_I2S_SDO (8u)
181
- #define PIN_I2S_SDI (1u)
182
- #define PIN_I2S_SCK (3u)
183
- #define PIN_I2S_FS (9u)
184
- #define PIN_I2S_MCK (2u)
172
+ #define PIN_USB_HOST_ENABLE (29ul) // ???
173
+ #define PIN_USB_DM (48ul)
174
+ #define PIN_USB_DP (49ul)
185
175
186
176
//QSPI Pins
187
- #define PIN_QSPI_SCK (41u)
188
- #define PIN_QSPI_CS (42u)
189
- #define PIN_QSPI_IO0 (43u)
190
- #define PIN_QSPI_IO1 (44u)
191
- #define PIN_QSPI_IO2 (45u)
192
- #define PIN_QSPI_IO3 (46u)
193
-
194
- //PCC Pins
195
- #define PIN_PCC_DEN1 (PIN_SPI_MOSI)
196
- #define PIN_PCC_DEN2 (PIN_SPI_SCK)
197
- #define PIN_PCC_CLK (PIN_SPI_MISO)
198
- #define PIN_PCC_D0 (13u)
199
- #define PIN_PCC_D1 (12u)
200
- #define PIN_PCC_D2 (10u)
201
- #define PIN_PCC_D3 (11u)
202
- #define PIN_PCC_D4 (9u)
203
- #define PIN_PCC_D5 (8u)
204
- #define PIN_PCC_D6 (1u)
205
- #define PIN_PCC_D7 (0u)
206
- #define PIN_PCC_D8 (5u)
207
- #define PIN_PCC_D9 (6u)
177
+ #define PIN_QSPI_SCK (42u)
178
+ #define PIN_QSPI_CS (43u)
179
+ #define PIN_QSPI_IO0 (44u)
180
+ #define PIN_QSPI_IO1 (45u)
181
+ #define PIN_QSPI_IO2 (46u)
182
+ #define PIN_QSPI_IO3 (47u)
208
183
209
184
//TODO: meaningful value for this
210
185
#define VARIANT_QSPI_BAUD_DEFAULT 5000000
0 commit comments