2 Copyright (c) 2011 Arduino. All right reserved.
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 See the GNU Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with this library; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 #ifndef _VARIANT_ARDUINO_STM32_
20 #define _VARIANT_ARDUINO_STM32_
26 /*----------------------------------------------------------------------------
28 *----------------------------------------------------------------------------*/
37 #define PC14 7 // By default, SB6 open PF0/PC14 not connected to D7
38 #define PC15 8 // By default, SB8 open PF1/PC15 not connected to D8
51 #define PA2 21 // A7 - STLink Tx
52 #define PA15 22 // STLink Rx
54 // This must be a literal
55 #define NUM_DIGITAL_PINS 23
56 // This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS
57 #define NUM_ANALOG_INPUTS 7
58 #define NUM_ANALOG_FIRST 14
60 // On-board LED pin number
61 //#define LED_BUILTIN 13
62 //#define LED_GREEN LED_BUILTIN
64 // On-board user button
68 #define PIN_WIRE_SDA 4
69 #define PIN_WIRE_SCL 5
72 // Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
73 #define TIMER_TONE TIM6
74 #define TIMER_SERVO TIM7
77 #define SERIAL_UART_INSTANCE 2 //Connected to ST-Link
78 // Default pin used for 'Serial' instance (ex: ST-Link)
79 // Mandatory for Firmata
80 #define PIN_SERIAL_RX PA15
81 #define PIN_SERIAL_TX PA2
83 /* Extra HAL modules */
84 //#define HAL_DAC_MODULE_ENABLED
86 // Adjust IRQ priority
87 #define TIM_IRQ_PRIO 4
88 #define EXTI_IRQ_PRIO 4
93 /*----------------------------------------------------------------------------
94 * Arduino objects - C++ only
95 *----------------------------------------------------------------------------*/
98 // These serial port names are intended to allow libraries and architecture-neutral
99 // sketches to automatically default to the correct port name for a particular type
100 // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
101 // the first hardware serial port whose RX/TX pins are not dedicated to another use.
103 // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
105 // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
107 // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
109 // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
111 // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
112 // pins are NOT connected to anything by default.
113 #define SERIAL_PORT_MONITOR Serial
114 #define SERIAL_PORT_HARDWARE Serial
117 #endif /* _VARIANT_ARDUINO_STM32_ */