29
29
#if EXPLICIT_PINMAP_READY
30
30
#include "PeripheralPinMaps.h"
31
31
32
+
32
33
#if DEVICE_PWMOUT
33
34
MSTD_CONSTEXPR_FN_14 PinMap get_pwm_pinmap (const PinName pin )
34
35
{
@@ -37,7 +38,7 @@ MSTD_CONSTEXPR_FN_14 PinMap get_pwm_pinmap(const PinName pin)
37
38
return {pin , pinmap .peripheral , pinmap .function };
38
39
}
39
40
}
40
- return {NC , NC , NC };
41
+ return {NC , ( int ) NC , ( int ) NC };
41
42
}
42
43
#endif // DEVICE_PWMOUT
43
44
@@ -49,7 +50,7 @@ MSTD_CONSTEXPR_FN_14 PinMap get_analogin_pinmap(const PinName pin)
49
50
return {pin , pinmap .peripheral , pinmap .function };
50
51
}
51
52
}
52
- return {NC , NC , NC };
53
+ return {NC , ( int ) NC , ( int ) NC };
53
54
}
54
55
#endif // DEVICE_ANALOGIN
55
56
@@ -61,7 +62,7 @@ MSTD_CONSTEXPR_FN_14 PinMap get_analogout_pinmap(const PinName pin)
61
62
return {pin , pinmap .peripheral , pinmap .function };
62
63
}
63
64
}
64
- return {NC , NC , NC };
65
+ return {NC , ( int ) NC , ( int ) NC };
65
66
}
66
67
#endif // DEVICE_ANALOGOUT
67
68
@@ -85,7 +86,7 @@ MSTD_CONSTEXPR_FN_14 i2c_pinmap_t get_i2c_pinmap(const PinName sda, const PinNam
85
86
}
86
87
87
88
if (!sda_map || !scl_map || sda_map -> peripheral != scl_map -> peripheral ) {
88
- return {NC , NC , NC , NC , NC };
89
+ return {( int ) NC , NC , ( int ) NC , NC , ( int ) NC };
89
90
}
90
91
91
92
return {sda_map -> peripheral , sda_map -> pin , sda_map -> function , scl_map -> pin , scl_map -> function };
@@ -112,7 +113,7 @@ MSTD_CONSTEXPR_FN_14 serial_pinmap_t get_uart_pinmap(const PinName tx, const Pin
112
113
}
113
114
114
115
if (!tx_map || !rx_map || rx_map -> peripheral != tx_map -> peripheral ) {
115
- return {NC , NC , NC , NC , NC , false};
116
+ return {( int ) NC , NC , ( int ) NC , NC , ( int ) NC , false};
116
117
}
117
118
118
119
if (tx_map -> pin == STDIO_UART_TX && rx_map -> pin == STDIO_UART_RX ) {
@@ -142,7 +143,7 @@ MSTD_CONSTEXPR_FN_14 serial_fc_pinmap_t get_uart_fc_pinmap(const PinName rxflow,
142
143
}
143
144
144
145
if ((!rts_map || !cts_map ) || (rts_map -> peripheral != cts_map -> peripheral )) {
145
- return {NC , NC , NC , NC , NC };
146
+ return {( int ) NC , NC , ( int ) NC , NC , ( int ) NC };
146
147
}
147
148
148
149
return {cts_map -> peripheral , cts_map -> pin , cts_map -> function , rts_map -> pin , rts_map -> function };
@@ -188,7 +189,7 @@ MSTD_CONSTEXPR_FN_14 spi_pinmap_t get_spi_pinmap(const PinName mosi, const PinNa
188
189
if ((!mosi_map || !miso_map || !sclk_map || !ssel_map ) ||
189
190
(mosi_map -> peripheral != miso_map -> peripheral || mosi_map -> peripheral != sclk_map -> peripheral ) ||
190
191
(ssel_map -> pin != NC && mosi_map -> peripheral != ssel_map -> peripheral )) {
191
- return {NC , NC , NC , NC , NC , NC , NC , NC , NC };
192
+ return {( int ) NC , NC , ( int ) NC , NC , ( int ) NC , NC , ( int ) NC , NC , ( int ) NC };
192
193
}
193
194
194
195
return {mosi_map -> peripheral , mosi_map -> pin , mosi_map -> function , miso_map -> pin , miso_map -> function , sclk_map -> pin , sclk_map -> function , ssel_map -> pin , ssel_map -> function };
@@ -200,49 +201,49 @@ MSTD_CONSTEXPR_FN_14 spi_pinmap_t get_spi_pinmap(const PinName mosi, const PinNa
200
201
#if DEVICE_PWMOUT
201
202
MSTD_CONSTEXPR_FN_14 PinMap get_pwm_pinmap (const PinName pin )
202
203
{
203
- return {pin , NC , NC };
204
+ return {pin , ( int ) NC , ( int ) NC };
204
205
}
205
206
#endif // DEVICE_PWMOUT
206
207
207
208
#if DEVICE_ANALOGIN
208
209
MSTD_CONSTEXPR_FN_14 PinMap get_analogin_pinmap (const PinName pin )
209
210
{
210
- return {pin , NC , NC };
211
+ return {pin , ( int ) NC , ( int ) NC };
211
212
}
212
213
#endif // DEVICE_ANALOGIN
213
214
214
215
#if DEVICE_ANALOGOUT
215
216
MSTD_CONSTEXPR_FN_14 PinMap get_analogout_pinmap (const PinName pin )
216
217
{
217
- return {pin , NC , NC };
218
+ return {pin , ( int ) NC , ( int ) NC };
218
219
}
219
220
#endif // DEVICE_ANALOGOUT
220
221
221
222
#if DEVICE_I2C
222
223
MSTD_CONSTEXPR_FN_14 i2c_pinmap_t get_i2c_pinmap (const PinName sda , const PinName scl )
223
224
{
224
- return {NC , sda , NC , scl , NC };
225
+ return {( int ) NC , sda , ( int ) NC , scl , ( int ) NC };
225
226
}
226
227
#endif //DEVICE_I2C
227
228
228
229
#if DEVICE_SERIAL
229
230
MSTD_CONSTEXPR_FN_14 serial_pinmap_t get_uart_pinmap (const PinName tx , const PinName rx )
230
231
{
231
- return {NC , tx , NC , rx , NC , false};
232
+ return {( int ) NC , tx , ( int ) NC , rx , ( int ) NC , false};
232
233
}
233
234
234
235
#if DEVICE_SERIAL_FC
235
236
MSTD_CONSTEXPR_FN_14 serial_fc_pinmap_t get_uart_fc_pinmap (const PinName rxflow , const PinName txflow )
236
237
{
237
- return {NC , txflow , NC , rxflow , NC };
238
+ return {( int ) NC , txflow , ( int ) NC , rxflow , ( int ) NC };
238
239
}
239
240
#endif // DEVICE_SERIAL_FC
240
241
#endif // DEVICE_SERIAL
241
242
242
243
#if DEVICE_SPI
243
244
MSTD_CONSTEXPR_FN_14 spi_pinmap_t get_spi_pinmap (const PinName mosi , const PinName miso , const PinName sclk , const PinName ssel )
244
245
{
245
- return {NC , mosi , NC , miso , NC , sclk , NC , ssel , NC };
246
+ return {( int ) NC , mosi , ( int ) NC , miso , ( int ) NC , sclk , ( int ) NC , ssel , ( int ) NC };
246
247
}
247
248
#endif // DEVICE_SERIAL
248
249
0 commit comments