NinjaFlight
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
platform.h
Go to the documentation of this file.
1 /*
2  * This file is part of Ninjaflight.
3  *
4  * Ninjaflight 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.
8  *
9  * Ninjaflight 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.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with Ninjaflight. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #pragma once
19 
20 #define U_ID_0 0
21 #define U_ID_1 1
22 #define U_ID_2 2
23 
24 #define MAG
25 #define BARO
26 #define GPS
27 #define TELEMETRY
28 #define LED_STRIP
29 #define USE_SERVOS
30 
31 #define USART1 ((USART_TypeDef *) 1)
32 #define USART2 ((USART_TypeDef *) 2)
33 #define USART3 ((USART_TypeDef *) 3)
34 #define UART4 ((USART_TypeDef *) 4)
35 #define UART5 ((USART_TypeDef *) 5)
36 
37 typedef enum
38 {
39  Mode_TEST = 0x0,
40  Mode_Out_PP = 0x10,
41 } GPIO_Mode;
42 
43 typedef struct
44 {
45  void* test;
46 } GPIO_TypeDef;
47 
48 typedef struct
49 {
50  void* test;
51 } TIM_TypeDef;
52 
53 typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus;
54 typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
55 
56 typedef enum {TEST_IRQ = 0 } IRQn_Type;
57 
58 typedef struct {
59  void* test;
61 
62 //typedef struct DMA_Channel_Struct DMA_Channel_TypeDef;
63 typedef struct USART_Struct USART_TypeDef;
64 
65 uint8_t DMA_GetFlagStatus(uint32_t);
67 void DMA_ClearFlag(uint32_t);
68 
69 #define WS2811_DMA_TC_FLAG 1
70 #define WS2811_DMA_HANDLER_IDENTIFER 0
71 
72 #define MAX_SIMULTANEOUS_ADJUSTMENT_COUNT 6
73 
74 typedef enum
75 {
81 } FLASH_Status;
82 
83 void FLASH_Unlock(void);
84 void FLASH_Lock(void);
85 FLASH_Status FLASH_ErasePage(uint32_t Page_Address);
86 FLASH_Status FLASH_ProgramWord(uint32_t Address, uint32_t Data);
87 
88 #include "target.h"
Definition: platform.h:78
FLASH_Status FLASH_ErasePage(uint32_t Page_Address)
Definition: mock_flash.cc:102
Definition: platform.h:79
struct USART_Struct USART_TypeDef
Definition: platform.h:63
FLASH_Status FLASH_ProgramWord(uint32_t Address, uint32_t Data)
Definition: mock_flash.cc:107
enum FlagStatus ITStatus
FlagStatus
Definition: platform.h:53
void DMA_Cmd(DMA_Channel_TypeDef *, FunctionalState)
Definition: ws2811_unittest.cc:101
Definition: platform.h:54
void DMA_ClearFlag(uint32_t)
Definition: ws2811_unittest.cc:102
void * test
Definition: platform.h:50
Definition: platform.h:76
Definition: platform.h:77
Definition: platform.h:40
IRQn_Type
Definition: platform.h:56
uint8_t DMA_GetFlagStatus(uint32_t)
Definition: ws2811_unittest.cc:100
Definition: platform.h:43
Definition: platform.h:53
void * test
Definition: platform.h:59
void FLASH_Unlock(void)
Definition: mock_flash.cc:90
Definition: platform.h:48
Definition: platform.h:39
FunctionalState
Definition: platform.h:54
void FLASH_Lock(void)
Definition: mock_flash.cc:96
Definition: platform.h:58
FLASH_Status
Definition: platform.h:74
Definition: platform.h:56
void * test
Definition: platform.h:45
Definition: platform.h:53
GPIO_Mode
Definition: platform.h:37
Definition: platform.h:80
Definition: platform.h:54