Add missing wifi targets for some DIY modules (#1210)
[ExpressLRS.git] / src / variants / L432K / variant.h
blob4286ef0905d7a9a917cf2323f31b521a6e8ccb47
1 /*
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_
22 #ifdef __cplusplus
23 extern "C" {
24 #endif // __cplusplus
26 /*----------------------------------------------------------------------------
27 * Pins
28 *----------------------------------------------------------------------------*/
30 #define PA10 0
31 #define PA9 1
32 #define PA12 2
33 #define PB0 3
34 #define PB7 4
35 #define PB6 5
36 #define PB1 6
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
39 #define PA8 9
40 #define PA11 10
41 #define PB5 11
42 #define PB4 12
43 #define PB3 13 // LED
44 #define PA0 14 // A0
45 #define PA1 15 // A1
46 #define PA3 16 // A2
47 #define PA4 17 // A3
48 #define PA5 18 // A4
49 #define PA6 19 // A5
50 #define PA7 20 // A6
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
65 //#define USER_BTN NC
67 // I2C Definitions
68 #define PIN_WIRE_SDA 4
69 #define PIN_WIRE_SCL 5
71 // Timer Definitions
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
76 // UART Definitions
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
90 #ifdef __cplusplus
91 } // extern "C"
92 #endif
93 /*----------------------------------------------------------------------------
94 * Arduino objects - C++ only
95 *----------------------------------------------------------------------------*/
97 #ifdef __cplusplus
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
115 #endif
117 #endif /* _VARIANT_ARDUINO_STM32_ */