vtx: fix VTX_SETTINGS_POWER_COUNT and add dummy entries to saPowerNames
[inav.git] / src / test / unit / platform.h
blob4f921e9612e5862e2bd58b187d2b5b1e822d8de1
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 #include <stdint.h>
22 #define U_ID_0 0
23 #define U_ID_1 1
24 #define U_ID_2 2
26 typedef enum {
27 Mode_TEST = 0x0,
28 Mode_Out_PP = 0x10,
29 } GPIO_Mode;
31 typedef struct {
32 void * test;
33 } GPIO_TypeDef;
35 typedef struct {
36 void * test;
37 } SPI_TypeDef;
39 typedef struct {
40 void * test;
41 } I2C_TypeDef;
43 typedef struct {
44 void * test;
45 } TIM_TypeDef;
47 typedef enum {
48 EXTI_Trigger_Rising = 0x08,
49 EXTI_Trigger_Falling = 0x0C,
50 EXTI_Trigger_Rising_Falling = 0x10
51 } EXTITrigger_TypeDef;
53 typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
55 typedef enum {TEST_IRQ = 0 } IRQn_Type;
57 typedef struct {
58 void* test;
59 } DMA_Channel_TypeDef;
61 uint8_t DMA_GetFlagStatus(uint32_t);
62 void DMA_Cmd(DMA_Channel_TypeDef*, FunctionalState );
63 void DMA_ClearFlag(uint32_t);
65 typedef struct
67 uint32_t CTRL; /*!< Offset: 0x000 (R/W) SysTick Control and Status Register */
68 uint32_t LOAD; /*!< Offset: 0x004 (R/W) SysTick Reload Value Register */
69 uint32_t VAL; /*!< Offset: 0x008 (R/W) SysTick Current Value Register */
70 uint32_t CALIB; /*!< Offset: 0x00C (R/ ) SysTick Calibration Register */
71 } SysTick_Type;
73 #define SysTick_CTRL_COUNTFLAG_Pos 16 /*!< SysTick CTRL: COUNTFLAG Position */
74 #define SysTick_CTRL_COUNTFLAG_Msk (1UL << SysTick_CTRL_COUNTFLAG_Pos) /*!< SysTick CTRL: COUNTFLAG Mask */
76 extern SysTick_Type *SysTick;
79 #define WS2811_DMA_TC_FLAG 1
80 #define WS2811_DMA_HANDLER_IDENTIFER 0
82 #include "target.h"
84 #define FAST_CODE
85 #define NOINLINE
86 #define EXTENDED_FASTRAM