-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Expand file tree
/
Copy pathresource.h
More file actions
84 lines (78 loc) · 2.54 KB
/
Copy pathresource.h
File metadata and controls
84 lines (78 loc) · 2.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*
* This file is part of Cleanflight.
*
* Cleanflight is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Cleanflight is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#define RESOURCE_INDEX(x) (x + 1)
typedef enum {
OWNER_FREE = 0,
OWNER_PWMIO,
OWNER_MOTOR,
OWNER_SERVO,
OWNER_SOFTSERIAL,
OWNER_ADC,
OWNER_SERIAL,
OWNER_TIMER,
OWNER_RANGEFINDER,
OWNER_SYSTEM,
OWNER_SPI,
OWNER_QUADSPI,
OWNER_I2C,
OWNER_SDCARD,
OWNER_FLASH,
OWNER_USB,
OWNER_BEEPER,
OWNER_OSD,
OWNER_BARO,
OWNER_MPU,
OWNER_INVERTER,
OWNER_LED_STRIP,
OWNER_LED,
OWNER_RX,
OWNER_TX,
OWNER_VTX,
OWNER_SPI_PREINIT,
OWNER_COMPASS,
OWNER_TEMPERATURE,
OWNER_1WIRE,
OWNER_AIRSPEED,
OWNER_OLED_DISPLAY,
OWNER_PINIO,
OWNER_IRLOCK,
OWNER_DRONECAN,
OWNER_CURRENT_METER,
OWNER_TOTAL_COUNT
} resourceOwner_e;
extern const char * const ownerNames[OWNER_TOTAL_COUNT];
// Currently TIMER should be shared resource (softserial dualtimer and timerqueue needs to allocate timer channel, but pin can be used for other function)
// with mode switching (shared serial ports, ...) this will need some improvement
typedef enum {
RESOURCE_NONE = 0,
RESOURCE_INPUT, RESOURCE_OUTPUT, RESOURCE_IO,
RESOURCE_TIMER,
RESOURCE_UART_TX, RESOURCE_UART_RX, RESOURCE_UART_TXRX,
RESOURCE_EXTI,
RESOURCE_I2C_SCL, RESOURCE_I2C_SDA,
RESOURCE_SPI_SCK, RESOURCE_SPI_MOSI, RESOURCE_SPI_MISO, RESOURCE_SPI_CS,
RESOURCE_QUADSPI_CLK, RESOURCE_QUADSPI_BK1IO0, RESOURCE_QUADSPI_BK1IO1,
RESOURCE_QUADSPI_BK1IO2, RESOURCE_QUADSPI_BK1IO3, RESOURCE_QUADSPI_BK1CS,
RESOURCE_QUADSPI_BK2IO0, RESOURCE_QUADSPI_BK2IO1, RESOURCE_QUADSPI_BK2IO2,
RESOURCE_QUADSPI_BK2IO3, RESOURCE_QUADSPI_BK2CS,
RESOURCE_ADC_CH1, RESOURCE_ADC_CH2, RESOURCE_ADC_CH3, RESOURCE_ADC_CH4,
RESOURCE_RX_CE,
RESOURCE_CAN_TX, RESOURCE_CAN_RX, RESOURCE_CAN_STANDBY,
RESOURCE_TOTAL_COUNT
} resourceType_e;
extern const char * const resourceNames[RESOURCE_TOTAL_COUNT];