OpenMPTL - STM32F10X
C++ Microprocessor Template Library
arch
arm
cortex
stm32
f1
include
arch
reg
usart.hpp
Go to the documentation of this file.
1
/*
2
* OpenMPTL - C++ Microprocessor Template Library
3
*
4
* Copyright (C) 2012-2017 Axel Burri <axel@tty0.ch>
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 3 of the License, or
9
* (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
*
19
*/
20
21
/*
22
* This program contains derivative representations of CMSIS System
23
* View Description (SVD) files, and is subject to the "End User
24
* License Agreement for STMicroelectronics" (see "STM_License.html"
25
* in the containing directory).
26
*/
27
28
#ifndef ARCH_REG_USART_HPP_INCLUDED
29
#define ARCH_REG_USART_HPP_INCLUDED
30
31
#include "../../../../common/reg/usart.hpp"
32
33
namespace
mptl
{
34
35
template
<
unsigned
usart_no>
36
class
USART
37
{
38
/* See available template specialisations below if the compiler asserts here! */
39
static_assert(usart_no == !usart_no,
"unsupported USART number"
);
// assertion needs to be dependent of template parameter
40
};
41
42
template
<>
class
USART
<1> :
public
USART_common
< 0x40013800 > { };
43
template
<>
class
USART
<2> :
public
USART_common
< 0x40004400 > { };
44
#if !defined (STM32F10X_LD) && !defined (STM32F10X_LD_VL)
45
template
<>
class
USART
<3> :
public
USART_common
< 0x40004800 > { };
46
#endif
47
48
}
// namespace mptl
49
50
#endif // ARCH_REG_USART_HPP_INCLUDED
mptl::USART_common
mptl::USART
Definition:
usart.hpp:36
mptl
Generated by
1.8.13