diff options
author | Anton Staaf <robotboy@chromium.org> | 2014-07-23 14:25:35 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-09-23 00:04:56 +0000 |
commit | 0a147973bb6a16714925cc7d701b9b6cffc73cb2 (patch) | |
tree | 94e385317bdff8ccc5d06082429b50d62ae7a2d5 /chip/stm32/usart-stm32l.h | |
parent | ccb45ff8a2285fbee6d87c02789dc7b00250dc82 (diff) | |
download | chrome-ec-0a147973bb6a16714925cc7d701b9b6cffc73cb2.tar.gz |
stm32-USART: Add generic stream based usart driver
This driver can be used to access multiple usarts using an abstract
stream interface. The stream interface can also be used in drivers
for the host interface and USB console interface, providing a
consistent API across all character stream style IO.
Signed-off-by: Anton Staaf <robotboy@chromium.org>
BRANCH=None
BUG=None
TEST=make buildall -j
Change-Id: Icf567f0b0fa4eb0e9ad4cdb0be8edc31c937a7de
Reviewed-on: https://chromium-review.googlesource.com/209671
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Tested-by: Anton Staaf <robotboy@chromium.org>
Commit-Queue: Anton Staaf <robotboy@chromium.org>
Diffstat (limited to 'chip/stm32/usart-stm32l.h')
-rw-r--r-- | chip/stm32/usart-stm32l.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/chip/stm32/usart-stm32l.h b/chip/stm32/usart-stm32l.h new file mode 100644 index 0000000000..2011a6517d --- /dev/null +++ b/chip/stm32/usart-stm32l.h @@ -0,0 +1,20 @@ +/* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ +#ifndef CHIP_STM32_USART_STM32L_H +#define CHIP_STM32_USART_STM32L_H + +#include "usart.h" + +#define STM32_USARTS_MAX 3 + +/* + * The STM32L series can have as many as three UARTS. These are the HW configs + * for those UARTS. They can be used to initialize STM32 generic UART configs. + */ +extern struct usart_hw_config const usart1_hw; +extern struct usart_hw_config const usart2_hw; +extern struct usart_hw_config const usart3_hw; + +#endif /* CHIP_STM32_USART_STM32L_H */ |