Add missing wifi targets for some DIY modules (#1210)
[ExpressLRS.git] / src / variants / FM30_mini / variant.h
blob9369305575a7ebf88a08def199536cc1e9ae996a
1 /*
2 *******************************************************************************
3 * Copyright (c) 2021, STMicroelectronics
4 * All rights reserved.
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_
16 #ifdef __cplusplus
17 extern "C" {
18 #endif // __cplusplus
20 /*----------------------------------------------------------------------------
21 * STM32 pins number
22 *----------------------------------------------------------------------------*/
23 #define PA0 A0
24 #define PA1 A1
25 #define PA2 A2
26 #define PA3 A3
27 #define PA4 A4
28 #define PA5 A5
29 #define PA6 A6
30 #define PA8 7
31 #define PA9 8
32 #define PA10 9
33 #define PA11 10
34 #define PA12 11
35 #define PA13 12
36 #define PA14 13
37 #define PA15 14
38 #define PB0 A7
39 #define PB1 A8
40 #define PB2 17
41 #define PB3 18
42 #define PB4 19
43 #define PB5 20
44 #define PB6 21
45 #define PB7 22
46 #define PB8 23
47 #define PB9 24
48 #define PB14 25
49 #define PB15 26
50 #define PC13 27
51 #define PC14 28
52 #define PC15 29
53 #define PD8 30
54 #define PE8 31
55 #define PE9 32
56 #define PF0 33
57 #define PF1 34
58 #define PF6 35
59 #define PF7 36
61 #define NUM_DIGITAL_PINS 37
62 #define NUM_ANALOG_INPUTS 9
64 // Timer Definitions
65 // Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
66 #ifndef TIMER_TONE
67 #define TIMER_TONE TIM6
68 #endif
69 #ifndef TIMER_SERVO
70 #define TIMER_SERVO TIM7
71 #endif
73 // UART Definitions
74 #ifndef SERIAL_UART_INSTANCE
75 #define SERIAL_UART_INSTANCE 1
76 #endif
78 // Default pin used for generic 'Serial' instance
79 // Mandatory for Firmata
80 #ifndef PIN_SERIAL_RX
81 #define PIN_SERIAL_RX PA10
82 #endif
83 #ifndef PIN_SERIAL_TX
84 #define PIN_SERIAL_TX PA9
85 #endif
87 // Extra HAL modules
88 //#define HAL_DAC_MODULE_ENABLED
90 #define ALT1 (1 << (STM_PIN_AFNUM_SHIFT+0))
91 #define ALT2 (1 << (STM_PIN_AFNUM_SHIFT+1))
92 #define ALT3 (1 << (STM_PIN_AFNUM_SHIFT+2))
93 #define ALT4 (1 << (STM_PIN_AFNUM_SHIFT+3))
95 // Adjust IRQ priority
96 #define TIM_IRQ_PRIO 4
97 #define EXTI_IRQ_PRIO 4
99 #ifdef __cplusplus
100 } // extern "C"
101 #endif
103 /*----------------------------------------------------------------------------
104 * Arduino objects - C++ only
105 *----------------------------------------------------------------------------*/
107 #ifdef __cplusplus
108 // These serial port names are intended to allow libraries and architecture-neutral
109 // sketches to automatically default to the correct port name for a particular type
110 // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
111 // the first hardware serial port whose RX/TX pins are not dedicated to another use.
113 // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
115 // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
117 // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
119 // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
121 // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
122 // pins are NOT connected to anything by default.
123 #define SERIAL_PORT_MONITOR Serial
124 #define SERIAL_PORT_HARDWARE Serial
125 #endif
127 #endif /* _VARIANT_ARDUINO_STM32_ */