2 *******************************************************************************
3 * Copyright (c) 2019, STMicroelectronics
6 * This software component is licensed by ST under BSD 3-Clause license,
7 * the "License"; You may not use this file except in compliance with the
8 * License. You may obtain a copy of the License at:
9 * opensource.org/licenses/BSD-3-Clause
11 *******************************************************************************
14 #ifndef _VARIANT_ARDUINO_STM32_
15 #define _VARIANT_ARDUINO_STM32_
21 /*----------------------------------------------------------------------------
23 *----------------------------------------------------------------------------*/
25 #define PA10 0 // SB33 ON / SB32 OFF
26 #define PA9 1 // SB35 ON / SB34 OFF
38 #define PB13 13 // LED
48 #define PC13 21 // User Button
65 // #define PA10 35 - Already defined as 0 (SB33 ON / SB32 OFF)
66 // #define PA9 36 - Already defined as 1 (SB35 ON / SB34 OFF)
75 #define PA3 45 // STLink Rx
76 #define PA2 46 // STLink Tx
84 // This must be a literal
85 #define NUM_DIGITAL_PINS 53
87 // This must be a literal
88 #define NUM_ANALOG_INPUTS 12
90 // On-board LED pin number
91 #define LED_BUILTIN PB13
92 #define LED_GREEN LED_BUILTIN
94 // On-board user button
97 // Timer Definitions (optional)
98 // Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
99 #define TIMER_TONE TIM6
100 #define TIMER_SERVO TIM7
103 // Define here Serial instance number to map on Serial generic name
104 #define SERIAL_UART_INSTANCE 0
106 // Default pin used for 'Serial' instance (ex: ST-Link)
107 // Mandatory for Firmata
108 #define PIN_SERIAL_RX PA3
109 #define PIN_SERIAL_TX PA2
112 #define HAL_DAC_MODULE_ENABLED
114 // Adjust IRQ priority
115 #define TIM_IRQ_PRIO 4
116 #define EXTI_IRQ_PRIO 4
121 /*----------------------------------------------------------------------------
122 * Arduino objects - C++ only
123 *----------------------------------------------------------------------------*/
126 // These serial port names are intended to allow libraries and architecture-neutral
127 // sketches to automatically default to the correct port name for a particular type
128 // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
129 // the first hardware serial port whose RX/TX pins are not dedicated to another use.
131 // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
133 // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
135 // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
137 // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
139 // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
140 // pins are NOT connected to anything by default.
141 #define SERIAL_PORT_MONITOR Serial
142 #define SERIAL_PORT_HARDWARE Serial
145 #endif /* _VARIANT_ARDUINO_STM32_ */