mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 12:25:20 +03:00
65 lines
1.7 KiB
C
65 lines
1.7 KiB
C
/*
|
|
* 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
|
|
|
|
#if defined(STM32F40_41xxx) || defined (STM32F411xE)
|
|
#include "stm32f4xx_conf.h"
|
|
#include "stm32f4xx_rcc.h"
|
|
#include "stm32f4xx_gpio.h"
|
|
#include "core_cm4.h"
|
|
#include "target/common_stm32f4xx.h"
|
|
|
|
// Chip Unique ID on F405
|
|
#define U_ID_0 (*(uint32_t*)0x1fff7a10)
|
|
#define U_ID_1 (*(uint32_t*)0x1fff7a14)
|
|
#define U_ID_2 (*(uint32_t*)0x1fff7a18)
|
|
|
|
#define STM32F4
|
|
#endif
|
|
|
|
#ifdef STM32F303xC
|
|
#include "stm32f30x_conf.h"
|
|
#include "stm32f30x_rcc.h"
|
|
#include "stm32f30x_gpio.h"
|
|
#include "core_cm4.h"
|
|
|
|
// Chip Unique ID on F303
|
|
#define U_ID_0 (*(uint32_t*)0x1FFFF7AC)
|
|
#define U_ID_1 (*(uint32_t*)0x1FFFF7B0)
|
|
#define U_ID_2 (*(uint32_t*)0x1FFFF7B4)
|
|
|
|
#define STM32F3
|
|
#endif
|
|
|
|
#ifdef STM32F10X
|
|
|
|
#include "stm32f10x_conf.h"
|
|
#include "stm32f10x_gpio.h"
|
|
#include "core_cm3.h"
|
|
|
|
// Chip Unique ID on F103
|
|
#define U_ID_0 (*(uint32_t*)0x1FFFF7E8)
|
|
#define U_ID_1 (*(uint32_t*)0x1FFFF7EC)
|
|
#define U_ID_2 (*(uint32_t*)0x1FFFF7F0)
|
|
|
|
#define STM32F1
|
|
#endif // STM32F10X
|
|
|
|
#include "target/common.h"
|
|
#include "target.h"
|
|
|