source: rtems/c/src/lib/libbsp/arm/stm32f4/include/stm32f4.h @ 1485a58

4.115
Last change on this file since 1485a58 was 1485a58, checked in by Christian Mauderer <Christian.Mauderer@…>, on Sep 18, 2013 at 1:44:42 PM

bsp/stm32f4: Add STM32F10XXX support.

  • Property mode set to 100644
File size: 2.1 KB
Line 
1/*
2 * Copyright (c) 2012 Sebastian Huber.  All rights reserved.
3 *
4 *  embedded brains GmbH
5 *  Obere Lagerstr. 30
6 *  82178 Puchheim
7 *  Germany
8 *  <rtems@embedded-brains.de>
9 *
10 * The license and distribution terms for this file may be
11 * found in the file LICENSE in this distribution or at
12 * http://www.rtems.com/license/LICENSE.
13 */
14
15#ifndef LIBBSP_ARM_STM32F4_STM32F4_H
16#define LIBBSP_ARM_STM32F4_STM32F4_H
17
18#include <bsp/utility.h>
19#include <bspopts.h>
20
21#define STM32F4_BASE 0x00
22
23#ifdef STM32F4_FAMILY_F4XXXX
24
25#include <bsp/stm32f4xxxx_gpio.h>
26#define STM32F4_GPIO(i) ((volatile stm32f4_gpio *) (STM32F4_BASE + 0x40020000) + (i))
27
28#include <bsp/stm32f4xxxx_rcc.h>
29#define STM32F4_RCC ((volatile stm32f4_rcc *) (STM32F4_BASE + 0x40023800))
30
31#include <bsp/stm32_usart.h>
32#define STM32F4_USART_1 ((volatile stm32f4_usart *) (STM32F4_BASE + 0x40011000))
33#define STM32F4_USART_2 ((volatile stm32f4_usart *) (STM32F4_BASE + 0x40004400))
34#define STM32F4_USART_3 ((volatile stm32f4_usart *) (STM32F4_BASE + 0x40004800))
35#define STM32F4_USART_4 ((volatile stm32f4_usart *) (STM32F4_BASE + 0x40004c00))
36#define STM32F4_USART_5 ((volatile stm32f4_usart *) (STM32F4_BASE + 0x40005000))
37#define STM32F4_USART_6 ((volatile stm32f4_usart *) (STM32F4_BASE + 0x40011400))
38
39#endif /* STM32F4_FAMILY_F4XXXX */
40
41#ifdef STM32F4_FAMILY_F10XXX
42
43#include <bsp/stm32f10xxx_gpio.h>
44#define STM32F4_GPIO(i) ((volatile stm32f4_gpio *) (STM32F4_BASE + 0x40010800 + i * 0x400))
45#define STM32F4_AFIO ((volatile stm32f4_afio *) (STM32F4_BASE + 0x40010000))
46
47#include <bsp/stm32f10xxx_rcc.h>
48#define STM32F4_RCC ((volatile stm32f4_rcc *) (STM32F4_BASE + 0x40021000))
49
50#include <bsp/stm32_usart.h>
51#define STM32F4_USART_1 ((volatile stm32f4_usart *) (STM32F4_BASE + 0x40013800))
52#define STM32F4_USART_2 ((volatile stm32f4_usart *) (STM32F4_BASE + 0x40004400))
53#define STM32F4_USART_3 ((volatile stm32f4_usart *) (STM32F4_BASE + 0x40004800))
54#define STM32F4_USART_4 ((volatile stm32f4_usart *) (STM32F4_BASE + 0x40004c00))
55#define STM32F4_USART_5 ((volatile stm32f4_usart *) (STM32F4_BASE + 0x40005000))
56
57#endif /* STM32F4_FAMILY_F10XXX */
58
59#endif /* LIBBSP_ARM_STM32F4_STM32F4_H */
Note: See TracBrowser for help on using the repository browser.