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 *----------------------------------------------------------------------------*/
33 #define PB0 3 // RESET --------------------------------- #define GPIO_PIN_RST
34 #define PB7 4 // TX_ENABLE ------------------------------#define GPIO_
35 #define PB6 5 // USART1, half duplex ------------------- #define GPIO_PIN_RCSIGNAL_RX
37 #define PF0 7 // XO, don't use!
38 #define PF1 8 // XO, don't use!
39 #define PA8 9 // ??????
40 #define PA11 10 // ??????
41 #define PB5 11 // MOSI pin ------------------------------ #define GPIO_PIN_MISO
42 #define PB4 12 // MISO pin ------------------------------ #define GPIO_PIN_MISO
43 #define PB3 13 // SCK ----------------------------------- #define GPIO_PIN_SCK
44 #define PA0 14 // ???????
45 #define PA1 15 // DIO1 ---------------------------------- #define GPIO_PIN_DIO1
46 #define PA3 16 // BUSY pin ------------------------------ #define GPIO_PIN_BUSY
47 #define PA4 17 // ???????
48 #define PA5 18 // if SB18 ON (default) connected to PB7 -
49 #define PA6 19 // if SB16 ON (default) connected to PB6 -
50 #define PA7 20 // LED ----------------------------------- #define GPIO_PIN_LED_WS2812
51 #define PA2 21 // STLink Tx ----------------------------- #define GPIO_PIN_RCSIGNAL_TX
52 #define PA15 22 // NSS ----------------------------------- #define GPIO_PIN_NSS
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 9
60 #define PIN_WIRE_SDA NC //4
61 #define PIN_WIRE_SCL NC //5
64 // Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
65 #define TIMER_TONE TIM6
66 //#define TIMER_SERVO TIM7
69 #define SERIAL_UART_INSTANCE 2 //Connected to ST-Link
72 #define PIN_SERIAL_RX PA10
73 #define PIN_SERIAL_TX PA9
75 /* Extra HAL modules */
76 //#define HAL_DAC_MODULE_ENABLED
77 #define HAL_DAC_MODULE_DISABLED
78 #define HAL_ADC_MODULE_DISABLED
79 //#define HAL_I2C_MODULE_DISABLED
81 // Adjust IRQ priority
82 #define TIM_IRQ_PRIO 4
83 #define EXTI_IRQ_PRIO 4
88 /*----------------------------------------------------------------------------
89 * Arduino objects - C++ only
90 *----------------------------------------------------------------------------*/
93 // These serial port names are intended to allow libraries and architecture-neutral
94 // sketches to automatically default to the correct port name for a particular type
95 // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
96 // the first hardware serial port whose RX/TX pins are not dedicated to another use.
98 // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
100 // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
102 // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
104 // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
106 // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
107 // pins are NOT connected to anything by default.
108 #define SERIAL_PORT_MONITOR Serial
109 #define SERIAL_PORT_HARDWARE Serial
112 #endif /* _VARIANT_ARDUINO_STM32_ */