Merge pull request #10558 from iNavFlight/MrD_Correct-comments-on-OSD-symbols
[inav.git] / src / main / drivers / resource.h
blobbe092ac209c0421fdba2992d7c1f595b98256d01
1 /*
2 * This file is part of Cleanflight.
4 * Cleanflight is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * Cleanflight 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. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
18 #pragma once
20 #define RESOURCE_INDEX(x) (x + 1)
22 typedef enum {
23 OWNER_FREE = 0,
24 OWNER_PWMIO,
25 OWNER_MOTOR,
26 OWNER_SERVO,
27 OWNER_SOFTSERIAL,
28 OWNER_ADC,
29 OWNER_SERIAL,
30 OWNER_TIMER,
31 OWNER_RANGEFINDER,
32 OWNER_SYSTEM,
33 OWNER_SPI,
34 OWNER_QUADSPI,
35 OWNER_I2C,
36 OWNER_SDCARD,
37 OWNER_FLASH,
38 OWNER_USB,
39 OWNER_BEEPER,
40 OWNER_OSD,
41 OWNER_BARO,
42 OWNER_MPU,
43 OWNER_INVERTER,
44 OWNER_LED_STRIP,
45 OWNER_LED,
46 OWNER_RX,
47 OWNER_TX,
48 OWNER_VTX,
49 OWNER_SPI_PREINIT,
50 OWNER_COMPASS,
51 OWNER_TEMPERATURE,
52 OWNER_1WIRE,
53 OWNER_AIRSPEED,
54 OWNER_OLED_DISPLAY,
55 OWNER_PINIO,
56 OWNER_IRLOCK,
57 OWNER_TOTAL_COUNT
58 } resourceOwner_e;
60 extern const char * const ownerNames[OWNER_TOTAL_COUNT];
62 // Currently TIMER should be shared resource (softserial dualtimer and timerqueue needs to allocate timer channel, but pin can be used for other function)
63 // with mode switching (shared serial ports, ...) this will need some improvement
64 typedef enum {
65 RESOURCE_NONE = 0,
66 RESOURCE_INPUT, RESOURCE_OUTPUT, RESOURCE_IO,
67 RESOURCE_TIMER,
68 RESOURCE_UART_TX, RESOURCE_UART_RX, RESOURCE_UART_TXRX,
69 RESOURCE_EXTI,
70 RESOURCE_I2C_SCL, RESOURCE_I2C_SDA,
71 RESOURCE_SPI_SCK, RESOURCE_SPI_MOSI, RESOURCE_SPI_MISO, RESOURCE_SPI_CS,
72 RESOURCE_QUADSPI_CLK, RESOURCE_QUADSPI_BK1IO0, RESOURCE_QUADSPI_BK1IO1,
73 RESOURCE_QUADSPI_BK1IO2, RESOURCE_QUADSPI_BK1IO3, RESOURCE_QUADSPI_BK1CS,
74 RESOURCE_QUADSPI_BK2IO0, RESOURCE_QUADSPI_BK2IO1, RESOURCE_QUADSPI_BK2IO2,
75 RESOURCE_QUADSPI_BK2IO3, RESOURCE_QUADSPI_BK2CS,
76 RESOURCE_ADC_CH1, RESOURCE_ADC_CH2, RESOURCE_ADC_CH3, RESOURCE_ADC_CH4,
77 RESOURCE_RX_CE,
78 RESOURCE_TOTAL_COUNT
79 } resourceType_e;
81 extern const char * const resourceNames[RESOURCE_TOTAL_COUNT];