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 #include <stdio.h>
21 
22 #ifdef STM32F303xC
23 #include "stm32f30x_conf.h"
24 #include "stm32f30x_rcc.h"
25 #include "stm32f30x_gpio.h"
26 #include "core_cm4.h"
27 
28 // Chip Unique ID on F303
29 #define U_ID_0 (*(uint32_t*)0x1FFFF7AC)
30 #define U_ID_1 (*(uint32_t*)0x1FFFF7B0)
31 #define U_ID_2 (*(uint32_t*)0x1FFFF7B4)
32 
33 #endif
34 
35 #ifdef STM32F10X
36 
37 #include "stm32f10x_conf.h"
38 #include "stm32f10x_gpio.h"
39 #include "core_cm3.h"
40 
41 // Chip Unique ID on F103
42 #define U_ID_0 (*(uint32_t*)0x1FFFF7E8)
43 #define U_ID_1 (*(uint32_t*)0x1FFFF7EC)
44 #define U_ID_2 (*(uint32_t*)0x1FFFF7F0)
45 
46 #endif // STM32F10X
47 
48 #include "target.h"
49