/* * Copyright (c) 2016-2018 Arm Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * \file uart_pl011_drv.h * \brief Driver for ARM UART PL011. */ #ifndef __UART_PL011_DRV_H__ #define __UART_PL011_DRV_H__ #include #include #ifdef __cplusplus extern "C" { #endif /** * \brief ARM UART PL011 state types */ enum uart_pl011_state_t { UART_PL011_UNINITIALIZED = 0x0u, UART_PL011_INITIALIZED = 0x1u, }; #define UART_PL011_UARTRSR_FE_ERR_OFF 0x0u /*!< Receive Status Register Frame Error bit field offset */ #define UART_PL011_UARTRSR_PE_ERR_OFF 0x1u /*!< Receive Status Register Parity Error bit field offset */ #define UART_PL011_UARTRSR_BE_ERR_OFF 0x2u /*!< Receive Status Register Break Error bit field offset */ #define UART_PL011_UARTRSR_OE_ERR_OFF 0x3u /*!< Receive Status Register Overrun Error bit field offset */ #define UART_PL011_RX_ERR_MASK ( \ 0x1u<