forked from stm32duino/Arduino_Core_STM32
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathvariant.cpp
47 lines (41 loc) · 1.32 KB
/
variant.cpp
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
/*
*******************************************************************************
* Copyright (c) 2020-{{year}}, STMicroelectronics
* All rights reserved.
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
*******************************************************************************
*/
#if defined(ARDUINO_GENERIC_{{generic_list[0].board}}){% for name in generic_list[1:] %} || defined(ARDUINO_GENERIC_{{name.board}}){% endfor %}
#include "pins_arduino.h"
#ifdef __cplusplus
extern "C" {
#endif
// Digital PinName array
const PinName digitalPin[] = {
{% for pinname in pinnames_list %}
{% if not loop.last %}
{{pinname}},
{% else %}
{{pinname}}
{% endif %}
{% endfor %}
};
// Analog (Ax) pin number array
const uint32_t analogInputPin[] = {
{% for analog_pin in analog_pins_list %}
{% if not loop.last %}
{{"%-3s // %-4s %s"|format("{},".format(analog_pin.val), "{},".format(analog_pin.ax), analog_pin.pyn)}}
{% else %}
{{"%-2s // %-4s %s"|format(analog_pin.val, "{},".format(analog_pin.ax), analog_pin.pyn)}}
{% endif %}
{% endfor %}
};
#ifdef __cplusplus
} // extern "C"
#endif
#endif /* ARDUINO_GENERIC_* */