/**
 * \file
 * \brief CMSIS proxy header for architecture
 *
 * \author Copyright (C) 2016 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info
 *
 * \par License
 * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
 * distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

#ifndef SOURCE_CHIP_STM32_STM32F1_INCLUDE_DISTORTOS_CHIP_CMSIS_PROXY_H_
#define SOURCE_CHIP_STM32_STM32F1_INCLUDE_DISTORTOS_CHIP_CMSIS_PROXY_H_

#include "distortos/distortosConfiguration.h"

#if defined(CONFIG_CHIP_STM32F100C4) || defined(CONFIG_CHIP_STM32F100R4) || defined(CONFIG_CHIP_STM32F100C6) || \
		defined(CONFIG_CHIP_STM32F100R6) || defined(CONFIG_CHIP_STM32F100C8) || defined(CONFIG_CHIP_STM32F100R8) || \
		defined(CONFIG_CHIP_STM32F100V8) || defined(CONFIG_CHIP_STM32F100CB) || defined(CONFIG_CHIP_STM32F100RB) || \
		defined(CONFIG_CHIP_STM32F100VB)
	#define STM32F100xB
#elif defined(CONFIG_CHIP_STM32F100RC) || defined(CONFIG_CHIP_STM32F100VC) || defined(CONFIG_CHIP_STM32F100ZC) || \
		defined(CONFIG_CHIP_STM32F100RD) || defined(CONFIG_CHIP_STM32F100VD) || defined(CONFIG_CHIP_STM32F100ZD) || \
		defined(CONFIG_CHIP_STM32F100RE) || defined(CONFIG_CHIP_STM32F100VE) || defined(CONFIG_CHIP_STM32F100ZE)
	#define STM32F100xE
#elif defined(CONFIG_CHIP_STM32F101C4) || defined(CONFIG_CHIP_STM32F101R4) || defined(CONFIG_CHIP_STM32F101T4) || \
		defined(CONFIG_CHIP_STM32F101C6) || defined(CONFIG_CHIP_STM32F101R6) || defined(CONFIG_CHIP_STM32F101T6)
	#define STM32F101x6
#elif defined(CONFIG_CHIP_STM32F101C8) || defined(CONFIG_CHIP_STM32F101R8) || defined(CONFIG_CHIP_STM32F101T8) || \
		defined(CONFIG_CHIP_STM32F101V8) || defined(CONFIG_CHIP_STM32F101CB) || defined(CONFIG_CHIP_STM32F101RB) || \
		defined(CONFIG_CHIP_STM32F101TB) || defined(CONFIG_CHIP_STM32F101VB)
	#define STM32F101xB
#elif defined(CONFIG_CHIP_STM32F101RC) || defined(CONFIG_CHIP_STM32F101VC) || defined(CONFIG_CHIP_STM32F101ZC) || \
		defined(CONFIG_CHIP_STM32F101RD) || defined(CONFIG_CHIP_STM32F101VD) || defined(CONFIG_CHIP_STM32F101ZD) || \
		defined(CONFIG_CHIP_STM32F101RE) || defined(CONFIG_CHIP_STM32F101VE) || defined(CONFIG_CHIP_STM32F101ZE)
	#define STM32F101xE
#elif defined(CONFIG_CHIP_STM32F101RF) || defined(CONFIG_CHIP_STM32F101VF) || defined(CONFIG_CHIP_STM32F101ZF) || \
		defined(CONFIG_CHIP_STM32F101RG) || defined(CONFIG_CHIP_STM32F101VG) || defined(CONFIG_CHIP_STM32F101ZG)
	#define STM32F101xG
#elif defined(CONFIG_CHIP_STM32F102C4) || defined(CONFIG_CHIP_STM32F102R4) || defined(CONFIG_CHIP_STM32F102C6) || \
		defined(CONFIG_CHIP_STM32F102R6)
	#define STM32F102x6
#elif defined(CONFIG_CHIP_STM32F102C8) || defined(CONFIG_CHIP_STM32F102R8) || defined(CONFIG_CHIP_STM32F102CB) || \
		defined(CONFIG_CHIP_STM32F102RB)
	#define STM32F102xB
#elif defined(CONFIG_CHIP_STM32F103C4) || defined(CONFIG_CHIP_STM32F103R4) || defined(CONFIG_CHIP_STM32F103T4) || \
		defined(CONFIG_CHIP_STM32F103C6) || defined(CONFIG_CHIP_STM32F103R6) || defined(CONFIG_CHIP_STM32F103T6)
	#define STM32F103x6
#elif defined(CONFIG_CHIP_STM32F103C8) || defined(CONFIG_CHIP_STM32F103R8) || defined(CONFIG_CHIP_STM32F103T8) || \
		defined(CONFIG_CHIP_STM32F103V8) || defined(CONFIG_CHIP_STM32F103CB) || defined(CONFIG_CHIP_STM32F103RB) || \
		defined(CONFIG_CHIP_STM32F103TB) || defined(CONFIG_CHIP_STM32F103VB)
	#define STM32F103xB
#elif defined(CONFIG_CHIP_STM32F103RC) || defined(CONFIG_CHIP_STM32F103VC) || defined(CONFIG_CHIP_STM32F103ZC) || \
		defined(CONFIG_CHIP_STM32F103RD) || defined(CONFIG_CHIP_STM32F103VD) || defined(CONFIG_CHIP_STM32F103ZD) || \
		defined(CONFIG_CHIP_STM32F103RE) || defined(CONFIG_CHIP_STM32F103VE) || defined(CONFIG_CHIP_STM32F103ZE)
	#define STM32F103xE
#elif defined(CONFIG_CHIP_STM32F103RF) || defined(CONFIG_CHIP_STM32F103VF) || defined(CONFIG_CHIP_STM32F103ZF) || \
		defined(CONFIG_CHIP_STM32F103RG) || defined(CONFIG_CHIP_STM32F103VG) || defined(CONFIG_CHIP_STM32F103ZG)
	#define STM32F103xG
#elif defined(CONFIG_CHIP_STM32F105R8) || defined(CONFIG_CHIP_STM32F105V8) || defined(CONFIG_CHIP_STM32F105RB) || \
		defined(CONFIG_CHIP_STM32F105VB) || defined(CONFIG_CHIP_STM32F105RC) || defined(CONFIG_CHIP_STM32F105VC)
	#define STM32F105xC
#elif defined(CONFIG_CHIP_STM32F107RB) || defined(CONFIG_CHIP_STM32F107VB) || defined(CONFIG_CHIP_STM32F107RC) || \
		defined(CONFIG_CHIP_STM32F107VC)
	#define STM32F107xC
#else
	#error "Unsupported STM32F1 chip!"
#endif

#include "stm32f1xx.h"

#endif	/* SOURCE_CHIP_STM32_STM32F1_INCLUDE_DISTORTOS_CHIP_CMSIS_PROXY_H_ */
