From a51ecb4719995a3de117922d756e8b5634a2fa76 Mon Sep 17 00:00:00 2001 From: Guillaume Revaillot Date: Mon, 21 Jan 2019 15:20:46 +0100 Subject: stm32g0: add usart. --- include/libopencm3/stm32/g0/usart.h | 48 +++++++++++++++++++++++++++++++++++++ include/libopencm3/stm32/usart.h | 2 ++ 2 files changed, 50 insertions(+) create mode 100644 include/libopencm3/stm32/g0/usart.h (limited to 'include') diff --git a/include/libopencm3/stm32/g0/usart.h b/include/libopencm3/stm32/g0/usart.h new file mode 100644 index 00000000..2078bf53 --- /dev/null +++ b/include/libopencm3/stm32/g0/usart.h @@ -0,0 +1,48 @@ +/** @defgroup usart_defines USART Defines + * + * @ingroup STM32G0xx_defines + * + * @brief Defined Constants and Types for the STM32G0xx USART + * + * @version 1.0.0 + * + * LGPL License Terms @ref lgpl_license + * */ +/* + * This file is part of the libopencm3 project. + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This library 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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#ifndef LIBOPENCM3_USART_H +#define LIBOPENCM3_USART_H + +#include +#include + +/**@{*/ + +/** @defgroup usart_reg_base USART register base addresses + * Holds all the U(S)ART peripherals supported. + * @{ + */ +#define USART1 USART1_BASE +#define USART2 USART2_BASE +#define USART3 USART3_BASE +#define USART4 USART4_BASE +#define LPUART1 LPUART1_BASE +/**@}*/ + +/**@}*/ +#endif diff --git a/include/libopencm3/stm32/usart.h b/include/libopencm3/stm32/usart.h index 7f3b11e9..7b22d4bf 100644 --- a/include/libopencm3/stm32/usart.h +++ b/include/libopencm3/stm32/usart.h @@ -38,6 +38,8 @@ # include #elif defined(STM32L4) # include +#elif defined(STM32G0) +# include #else # error "stm32 family not defined." #endif -- cgit v1.2.3