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 *----------------------------------------------------------------------------*/
43 #define PA5 13 // A8 - LED
51 #define PA13 19 // SWD
52 #define PA14 20 // SWD
88 // This must be a literal
89 #define NUM_DIGITAL_PINS 60
90 // This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS
91 #define NUM_ANALOG_INPUTS 14
92 #define NUM_ANALOG_FIRST 46
94 // On-board LED pin number
95 #define LED_BUILTIN 13
96 #define LED_GREEN LED_BUILTIN
98 // On-board user button
102 // Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
103 #define TIMER_TONE TIM3
104 #define TIMER_SERVO TIM4
107 #define SERIAL_UART_INSTANCE 1 //Connected to ST-Link
108 // Default pin used for 'Serial' instance (ex: ST-Link)
109 // Mandatory for Firmata
110 #define PIN_SERIAL_RX 0
111 #define PIN_SERIAL_TX 1
112 //#define PIN_SERIAL_RX PA10
113 //#define PIN_SERIAL_TX PA9
115 // Adjust IRQ priority
116 #define TIM_IRQ_PRIO 4
117 #define EXTI_IRQ_PRIO 4
122 /*----------------------------------------------------------------------------
123 * Arduino objects - C++ only
124 *----------------------------------------------------------------------------*/
127 // These serial port names are intended to allow libraries and architecture-neutral
128 // sketches to automatically default to the correct port name for a particular type
129 // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
130 // the first hardware serial port whose RX/TX pins are not dedicated to another use.
132 // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
134 // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
136 // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
138 // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
140 // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
141 // pins are NOT connected to anything by default.
142 #define SERIAL_PORT_MONITOR Serial
143 #define SERIAL_PORT_HARDWARE Serial
146 #endif /* _VARIANT_ARDUINO_STM32_ */