mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Committer:
mbed_official
Date:
Fri Sep 04 09:30:10 2015 +0100
Revision:
619:034e698bc035
Parent:
targets/cmsis/TARGET_WIZNET/TARGET_W7500x/W7500x_uart.h@558:0880f51c4036
Child:
631:ff681937ffd8
Synchronized with git revision 92d1bfad30082571776c810a56fd471d30514ccf

Full URL: https://github.com/mbedmicro/mbed/commit/92d1bfad30082571776c810a56fd471d30514ccf/

Change directory structure and move files.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 558:0880f51c4036 1 /**
mbed_official 558:0880f51c4036 2 ******************************************************************************
mbed_official 558:0880f51c4036 3 * @file
mbed_official 558:0880f51c4036 4 * @author
mbed_official 558:0880f51c4036 5 * @version
mbed_official 558:0880f51c4036 6 * @date
mbed_official 558:0880f51c4036 7 * @brief This file contains all the functions prototypes for the UART
mbed_official 558:0880f51c4036 8 * firmware library.
mbed_official 558:0880f51c4036 9 ******************************************************************************
mbed_official 558:0880f51c4036 10 *
mbed_official 558:0880f51c4036 11 ******************************************************************************
mbed_official 558:0880f51c4036 12 */
mbed_official 558:0880f51c4036 13
mbed_official 558:0880f51c4036 14 /* Define to prevent recursive inclusion -------------------------------------*/
mbed_official 558:0880f51c4036 15 #ifndef __W7500X_UART_H
mbed_official 558:0880f51c4036 16 #define __W7500X_UART_H
mbed_official 558:0880f51c4036 17
mbed_official 558:0880f51c4036 18 #ifdef __cplusplus
mbed_official 558:0880f51c4036 19 extern "C" {
mbed_official 558:0880f51c4036 20 #endif
mbed_official 558:0880f51c4036 21
mbed_official 558:0880f51c4036 22 /* Includes ------------------------------------------------------------------*/
mbed_official 558:0880f51c4036 23 #include "W7500x.h"
mbed_official 558:0880f51c4036 24
mbed_official 558:0880f51c4036 25
mbed_official 558:0880f51c4036 26 /**
mbed_official 558:0880f51c4036 27 * @brief UART Init Structure definition
mbed_official 558:0880f51c4036 28 */
mbed_official 558:0880f51c4036 29
mbed_official 558:0880f51c4036 30 typedef struct
mbed_official 558:0880f51c4036 31 {
mbed_official 558:0880f51c4036 32 uint32_t UART_BaudRate;
mbed_official 558:0880f51c4036 33 uint16_t UART_WordLength;
mbed_official 558:0880f51c4036 34 uint16_t UART_StopBits;
mbed_official 558:0880f51c4036 35 uint16_t UART_Parity;
mbed_official 558:0880f51c4036 36 uint16_t UART_Mode;
mbed_official 558:0880f51c4036 37 uint16_t UART_HardwareFlowControl;
mbed_official 558:0880f51c4036 38 } UART_InitTypeDef;
mbed_official 558:0880f51c4036 39
mbed_official 558:0880f51c4036 40 /**
mbed_official 558:0880f51c4036 41 * @}
mbed_official 558:0880f51c4036 42 */
mbed_official 558:0880f51c4036 43
mbed_official 558:0880f51c4036 44
mbed_official 558:0880f51c4036 45 /** @defgroup UART_Exported_Constants
mbed_official 558:0880f51c4036 46 * @{
mbed_official 558:0880f51c4036 47 */
mbed_official 558:0880f51c4036 48
mbed_official 558:0880f51c4036 49 #define IS_UART_01_PERIPH(PERIPH) (((PERIPH) == UART0) || ((PERIPH) == UART1))
mbed_official 558:0880f51c4036 50 #define IS_UART_2_PERIPH(PERIPH) ((PERIPH) == UART2)
mbed_official 558:0880f51c4036 51
mbed_official 558:0880f51c4036 52 /**
mbed_official 558:0880f51c4036 53 * @}
mbed_official 558:0880f51c4036 54 */
mbed_official 558:0880f51c4036 55
mbed_official 558:0880f51c4036 56
mbed_official 558:0880f51c4036 57
mbed_official 558:0880f51c4036 58 /** @addtogroup UART_Word_Length
mbed_official 558:0880f51c4036 59 * @{
mbed_official 558:0880f51c4036 60 */
mbed_official 558:0880f51c4036 61
mbed_official 558:0880f51c4036 62 #define UART_WordLength_8b ((uint16_t)UART_LCR_H_WLEN(3))
mbed_official 558:0880f51c4036 63 #define UART_WordLength_7b ((uint16_t)UART_LCR_H_WLEN(2))
mbed_official 558:0880f51c4036 64 #define UART_WordLength_6b ((uint16_t)UART_LCR_H_WLEN(1))
mbed_official 558:0880f51c4036 65 #define UART_WordLength_5b ((uint16_t)UART_LCR_H_WLEN(0))
mbed_official 558:0880f51c4036 66 #define IS_UART_WORD_LENGTH(LENGTH) (((LENGTH) == UART_WordLength_8b) || \
mbed_official 558:0880f51c4036 67 ((LENGTH) == UART_WordLength_7b) || \
mbed_official 558:0880f51c4036 68 ((LENGTH) == UART_WordLength_6b) || \
mbed_official 558:0880f51c4036 69 ((LENGTH) == UART_WordLength_5b) )
mbed_official 558:0880f51c4036 70 /**
mbed_official 558:0880f51c4036 71 * @}
mbed_official 558:0880f51c4036 72 */
mbed_official 558:0880f51c4036 73
mbed_official 558:0880f51c4036 74
mbed_official 558:0880f51c4036 75 /** @addtogroup UART_Parity
mbed_official 558:0880f51c4036 76 * @{
mbed_official 558:0880f51c4036 77 */
mbed_official 558:0880f51c4036 78
mbed_official 558:0880f51c4036 79 #define UART_Parity_No ((uint16_t)0x0000)
mbed_official 558:0880f51c4036 80 #define UART_Parity_Even ((uint16_t)(UART_LCR_H_PEN | UART_LCR_H_EPS))
mbed_official 558:0880f51c4036 81 #define UART_Parity_Odd ((uint16_t)(UART_LCR_H_PEN))
mbed_official 558:0880f51c4036 82 #define IS_UART_PARITY(PARITY) (((PARITY) == UART_Parity_No) || \
mbed_official 558:0880f51c4036 83 ((PARITY) == UART_Parity_Even) || \
mbed_official 558:0880f51c4036 84 ((PARITY) == UART_Parity_Odd))
mbed_official 558:0880f51c4036 85
mbed_official 558:0880f51c4036 86 /**
mbed_official 558:0880f51c4036 87 * @}
mbed_official 558:0880f51c4036 88 */
mbed_official 558:0880f51c4036 89
mbed_official 558:0880f51c4036 90
mbed_official 558:0880f51c4036 91 /** @addtogroup UART_Stop_Bits
mbed_official 558:0880f51c4036 92 * @{
mbed_official 558:0880f51c4036 93 */
mbed_official 558:0880f51c4036 94
mbed_official 558:0880f51c4036 95 #define UART_StopBits_1 ((uint16_t)0x0000)
mbed_official 558:0880f51c4036 96 #define UART_StopBits_2 ((uint16_t)(UART_LCR_H_STP2))
mbed_official 558:0880f51c4036 97 #define IS_UART_STOPBITS(STOPBITS) (((STOPBITS) == UART_StopBits_1) || \
mbed_official 558:0880f51c4036 98 ((STOPBITS) == UART_StopBits_2))
mbed_official 558:0880f51c4036 99 /**
mbed_official 558:0880f51c4036 100 * @}
mbed_official 558:0880f51c4036 101 */
mbed_official 558:0880f51c4036 102
mbed_official 558:0880f51c4036 103
mbed_official 558:0880f51c4036 104 /** @addtogroup UART_Mode
mbed_official 558:0880f51c4036 105 * @{
mbed_official 558:0880f51c4036 106 */
mbed_official 558:0880f51c4036 107
mbed_official 558:0880f51c4036 108 #define UART_Mode_Rx ((uint16_t)(UART_CR_RXE))
mbed_official 558:0880f51c4036 109 #define UART_Mode_Tx ((uint16_t)(UART_CR_TXE))
mbed_official 558:0880f51c4036 110 #define IS_UART_MODE(MODE) (((MODE) == UART_Mode_Rx) || \
mbed_official 558:0880f51c4036 111 ((MODE) == UART_Mode_Tx))
mbed_official 558:0880f51c4036 112
mbed_official 558:0880f51c4036 113 /**
mbed_official 558:0880f51c4036 114 * @}
mbed_official 558:0880f51c4036 115 */
mbed_official 558:0880f51c4036 116
mbed_official 558:0880f51c4036 117
mbed_official 558:0880f51c4036 118 /** @addtogroup UART_Hardware_Flow_Control
mbed_official 558:0880f51c4036 119 * @{
mbed_official 558:0880f51c4036 120 */
mbed_official 558:0880f51c4036 121
mbed_official 558:0880f51c4036 122 #define UART_HardwareFlowControl_None ((uint16_t)0x0000)
mbed_official 558:0880f51c4036 123 #define UART_HardwareFlowControl_RTS ((uint16_t)UART_CR_RTSEn)
mbed_official 558:0880f51c4036 124 #define UART_HardwareFlowControl_CTS ((uint16_t)UART_CR_CTSEn)
mbed_official 558:0880f51c4036 125 #define UART_HardwareFlowControl_RTS_CTS ((uint16_t)(UART_CR_RTSEn | UART_CR_CTSEn))
mbed_official 558:0880f51c4036 126 #define IS_UART_HARDWARE_FLOW_CONTROL(CONTROL) \
mbed_official 558:0880f51c4036 127 (((CONTROL) == UART_HardwareFlowControl_None) || \
mbed_official 558:0880f51c4036 128 ((CONTROL) == UART_HardwareFlowControl_RTS) || \
mbed_official 558:0880f51c4036 129 ((CONTROL) == UART_HardwareFlowControl_CTS) || \
mbed_official 558:0880f51c4036 130 ((CONTROL) == UART_HardwareFlowControl_RTS_CTS))
mbed_official 558:0880f51c4036 131 /**
mbed_official 558:0880f51c4036 132 * @}
mbed_official 558:0880f51c4036 133 */
mbed_official 558:0880f51c4036 134
mbed_official 558:0880f51c4036 135
mbed_official 558:0880f51c4036 136 /** @addtogroup UART_Receive Status
mbed_official 558:0880f51c4036 137 * @{
mbed_official 558:0880f51c4036 138 */
mbed_official 558:0880f51c4036 139
mbed_official 558:0880f51c4036 140 #define UART_RECV_STATUS_OE ((uint16_t)0x01UL << 3) /*!< Overrun error */
mbed_official 558:0880f51c4036 141 #define UART_RECV_STATUS_BE ((uint16_t)0x01UL << 2) /*!< Break error */
mbed_official 558:0880f51c4036 142 #define UART_RECV_STATUS_PE ((uint16_t)0x01UL << 1) /*!< Parity error */
mbed_official 558:0880f51c4036 143 #define UART_RECV_STATUS_FE ((uint16_t)0x01UL << 0) /*!< Framing error */
mbed_official 558:0880f51c4036 144 #define IS_UART_RECV_STATUS(FLAG) (((FLAG) == UART_RECV_STATUS_OE) || ((FLAG) == UART_RECV_STATUS_BE) || \
mbed_official 558:0880f51c4036 145 ((FLAG) == UART_RECV_STATUS_PE) || ((FLAG) == UART_RECV_STATUS_FE))
mbed_official 558:0880f51c4036 146 /**
mbed_official 558:0880f51c4036 147 * @}
mbed_official 558:0880f51c4036 148 */
mbed_official 558:0880f51c4036 149
mbed_official 558:0880f51c4036 150
mbed_official 558:0880f51c4036 151
mbed_official 558:0880f51c4036 152 /** @addtogroup UART_Flags
mbed_official 558:0880f51c4036 153 * @{
mbed_official 558:0880f51c4036 154 */
mbed_official 558:0880f51c4036 155
mbed_official 558:0880f51c4036 156 #define UART_FLAG_RI ((uint16_t)0x01UL << 8) /*!< Ring indicator */
mbed_official 558:0880f51c4036 157 #define UART_FLAG_TXFE ((uint16_t)0x01UL << 7) /*!< Transmit FIFO empty */
mbed_official 558:0880f51c4036 158 #define UART_FLAG_RXFF ((uint16_t)0x01UL << 6) /*!< Receive FIFO full */
mbed_official 558:0880f51c4036 159 #define UART_FLAG_TXFF ((uint16_t)0x01UL << 5) /*!< Transmit FIFO full */
mbed_official 558:0880f51c4036 160 #define UART_FLAG_RXFE ((uint16_t)0x01UL << 4) /*!< Receive FIFO empty */
mbed_official 558:0880f51c4036 161 #define UART_FLAG_BUSY ((uint16_t)0x01UL << 3) /*!< UART busy */
mbed_official 558:0880f51c4036 162 #define UART_FLAG_DCD ((uint16_t)0x01UL << 2) /*!< Data carrier detect */
mbed_official 558:0880f51c4036 163 #define UART_FLAG_DSR ((uint16_t)0x01UL << 1) /*!< Data set ready */
mbed_official 558:0880f51c4036 164 #define UART_FLAG_CTS ((uint16_t)0x01UL << 0) /*!< Clear to send */
mbed_official 558:0880f51c4036 165 #define IS_UART_FLAG(FLAG) (((FLAG) == UART_FLAG_RI) || ((FLAG) == UART_FLAG_TXFE) || \
mbed_official 558:0880f51c4036 166 ((FLAG) == UART_FLAG_RXFF) || ((FLAG) == UART_FLAG_TXFF) || \
mbed_official 558:0880f51c4036 167 ((FLAG) == UART_FLAG_RXFE) || ((FLAG) == UART_FLAG_BUSY) || \
mbed_official 558:0880f51c4036 168 ((FLAG) == UART_FLAG_DCD) || ((FLAG) == UART_FLAG_DSR) || \
mbed_official 558:0880f51c4036 169 ((FLAG) == UART_FLAG_CTS))
mbed_official 558:0880f51c4036 170
mbed_official 558:0880f51c4036 171 /**
mbed_official 558:0880f51c4036 172 * @}
mbed_official 558:0880f51c4036 173 */
mbed_official 558:0880f51c4036 174
mbed_official 558:0880f51c4036 175
mbed_official 558:0880f51c4036 176 /** @addtogroup UART_IT_Flags
mbed_official 558:0880f51c4036 177 * @{
mbed_official 558:0880f51c4036 178 */
mbed_official 558:0880f51c4036 179
mbed_official 558:0880f51c4036 180 #define UART_IT_FLAG_OEI ((uint16_t)0x01UL << 10) /*!< Overrun error interrupt */
mbed_official 558:0880f51c4036 181 #define UART_IT_FLAG_BEI ((uint16_t)0x01UL << 9) /*!< Break error interrupt */
mbed_official 558:0880f51c4036 182 #define UART_IT_FLAG_PEI ((uint16_t)0x01UL << 8) /*!< Parity error interrupt */
mbed_official 558:0880f51c4036 183 #define UART_IT_FLAG_FEI ((uint16_t)0x01UL << 7) /*!< Framing error interrupt */
mbed_official 558:0880f51c4036 184 #define UART_IT_FLAG_RTI ((uint16_t)0x01UL << 6) /*!< Receive timeout interrupt */
mbed_official 558:0880f51c4036 185 #define UART_IT_FLAG_TXI ((uint16_t)0x01UL << 5) /*!< Transmit interrupt */
mbed_official 558:0880f51c4036 186 #define UART_IT_FLAG_RXI ((uint16_t)0x01UL << 4) /*!< Receive interrupt */
mbed_official 558:0880f51c4036 187 #define UART_IT_FLAG_DSRMI ((uint16_t)0x01UL << 3) /*!< UARTDSR modem interrupt */
mbed_official 558:0880f51c4036 188 #define UART_IT_FLAG_DCDMI ((uint16_t)0x01UL << 2) /*!< UARTDCD modem interrupt */
mbed_official 558:0880f51c4036 189 #define UART_IT_FLAG_CTSMI ((uint16_t)0x01UL << 1) /*!< UARTCTS modem interrupt */
mbed_official 558:0880f51c4036 190 #define UART_IT_FLAG_RIMI ((uint16_t)0x01UL << 0) /*!< UARTRI modem interrupt */
mbed_official 558:0880f51c4036 191 #define IS_UART_IT_FLAG(FLAG) (((FLAG) == UART_IT_FLAG_OEI) || ((FLAG) == UART_IT_FLAG_BEI) || \
mbed_official 558:0880f51c4036 192 ((FLAG) == UART_IT_FLAG_PEI) || ((FLAG) == UART_IT_FLAG_FEI) || \
mbed_official 558:0880f51c4036 193 ((FLAG) == UART_IT_FLAG_RTI) || ((FLAG) == UART_IT_FLAG_TXI) || \
mbed_official 558:0880f51c4036 194 ((FLAG) == UART_IT_FLAG_RXI) || ((FLAG) == UART_IT_FLAG_DSRMI) || \
mbed_official 558:0880f51c4036 195 ((FLAG) == UART_IT_FLAG_DCDMI)|| ((FLAG) == UART_IT_FLAG_CTSMI) || \
mbed_official 558:0880f51c4036 196 ((FLAG) == UART_IT_FLAG_RIMI))
mbed_official 558:0880f51c4036 197 /**
mbed_official 558:0880f51c4036 198 * @}
mbed_official 558:0880f51c4036 199 */
mbed_official 558:0880f51c4036 200 /** @addtogroup UART_FIFO_Level Select
mbed_official 558:0880f51c4036 201 * @{
mbed_official 558:0880f51c4036 202 */
mbed_official 558:0880f51c4036 203
mbed_official 558:0880f51c4036 204 #define UART_IFLS_RXIFLSEL7_8 ((uint16_t)(UART_IFLS_RXIFLSEL(4)))
mbed_official 558:0880f51c4036 205 #define UART_IFLS_RXIFLSEL3_4 ((uint16_t)(UART_IFLS_RXIFLSEL(3)))
mbed_official 558:0880f51c4036 206 #define UART_IFLS_RXIFLSEL1_2 ((uint16_t)(UART_IFLS_RXIFLSEL(2)))
mbed_official 558:0880f51c4036 207 #define UART_IFLS_RXIFLSEL1_4 ((uint16_t)(UART_IFLS_RXIFLSEL(1)))
mbed_official 558:0880f51c4036 208 #define UART_IFLS_RXIFLSEL1_8 ((uint16_t)(UART_IFLS_RXIFLSEL(0)))
mbed_official 558:0880f51c4036 209 #define UART_IFLS_TXIFLSEL7_8 ((uint16_t)(UART_IFLS_TXIFLSEL(4)))
mbed_official 558:0880f51c4036 210 #define UART_IFLS_TXIFLSEL3_4 ((uint16_t)(UART_IFLS_TXIFLSEL(3)))
mbed_official 558:0880f51c4036 211 #define UART_IFLS_TXIFLSEL1_2 ((uint16_t)(UART_IFLS_TXIFLSEL(2)))
mbed_official 558:0880f51c4036 212 #define UART_IFLS_TXIFLSEL1_4 ((uint16_t)(UART_IFLS_TXIFLSEL(1)))
mbed_official 558:0880f51c4036 213 #define UART_IFLS_TXIFLSEL1_8 ((uint16_t)(UART_IFLS_TXIFLSEL(0)))
mbed_official 558:0880f51c4036 214
mbed_official 558:0880f51c4036 215 #define IS_UART_FIFO_Level(FLAG) (((FLAG) == UART_IFLS_RXIFLSEL7_8) || ((FLAG) == UART_IFLS_RXIFLSEL3_4)|| \
mbed_official 558:0880f51c4036 216 ((FLAG) == UART_IFLS_RXIFLSEL1_2)|| ((FLAG) == UART_IFLS_RXIFLSEL1_4)|| ((FLAG) == UART_IFLS_RXIFLSEL1_8)||\
mbed_official 558:0880f51c4036 217 ((FLAG) == UART_IFLS_TXIFLSEL7_8)|| ((FLAG) == UART_IFLS_TXIFLSEL3_4)|| \
mbed_official 558:0880f51c4036 218 ((FLAG) == UART_IFLS_TXIFLSEL1_2)|| ((FLAG) == UART_IFLS_TXIFLSEL1_4)||((FLAG) == UART_IFLS_TXIFLSEL1_8))
mbed_official 558:0880f51c4036 219
mbed_official 558:0880f51c4036 220 /**
mbed_official 558:0880f51c4036 221 * @}
mbed_official 558:0880f51c4036 222 */
mbed_official 558:0880f51c4036 223
mbed_official 558:0880f51c4036 224 /** @addtogroup S_UART_Flags
mbed_official 558:0880f51c4036 225 * @{
mbed_official 558:0880f51c4036 226 */
mbed_official 558:0880f51c4036 227 #define S_UART_FLAG_RXO ((uint16_t)0x01UL << 3) /*!< RX buffer Overrun */
mbed_official 558:0880f51c4036 228 #define S_UART_FLAG_TXO ((uint16_t)0x01UL << 2) /*!< TX buffer Overrun */
mbed_official 558:0880f51c4036 229 #define S_UART_FLAG_RXF ((uint16_t)0x01UL << 1) /*!< RX buffer Full */
mbed_official 558:0880f51c4036 230 #define S_UART_FLAG_TXF ((uint16_t)0x01UL << 0) /*!< TX buffer Full */
mbed_official 558:0880f51c4036 231 #define IS_S_UART_FLAG(FLAG) (((FLAG) == S_UART_FLAG_RXO) || ((FLAG) == S_UART_FLAG_TXO) || \
mbed_official 558:0880f51c4036 232 ((FLAG) == S_UART_FLAG_RXF) || ((FLAG) == S_UART_FLAG_TXF))
mbed_official 558:0880f51c4036 233 /**
mbed_official 558:0880f51c4036 234 * @}
mbed_official 558:0880f51c4036 235 */
mbed_official 558:0880f51c4036 236
mbed_official 558:0880f51c4036 237
mbed_official 558:0880f51c4036 238 /** @addtogroup S_UART_IT_Flags
mbed_official 558:0880f51c4036 239 * @{
mbed_official 558:0880f51c4036 240 */
mbed_official 558:0880f51c4036 241
mbed_official 558:0880f51c4036 242 #define S_UART_IT_FLAG_RXOI ((uint16_t)0x01UL << 5) /*!< RX overrun interrupt */
mbed_official 558:0880f51c4036 243 #define S_UART_IT_FLAG_TXOI ((uint16_t)0x01UL << 4) /*!< TX overrun interrupt */
mbed_official 558:0880f51c4036 244 #define S_UART_IT_FLAG_RXI ((uint16_t)0x01UL << 3) /*!< RX interrupt */
mbed_official 558:0880f51c4036 245 #define S_UART_IT_FLAG_TXI ((uint16_t)0x01UL << 2) /*!< TX interrupt */
mbed_official 558:0880f51c4036 246 #define IS_S_UART_IT_FLAG(FLAG) (((FLAG) == S_UART_IT_FLAG_RXOI) || ((FLAG) == S_UART_IT_FLAG_TXOI) || \
mbed_official 558:0880f51c4036 247 ((FLAG) == S_UART_IT_FLAG_RXI) || ((FLAG) == S_UART_IT_FLAG_TXI))
mbed_official 558:0880f51c4036 248
mbed_official 558:0880f51c4036 249 /**
mbed_official 558:0880f51c4036 250 * @}
mbed_official 558:0880f51c4036 251 */
mbed_official 558:0880f51c4036 252
mbed_official 558:0880f51c4036 253
mbed_official 558:0880f51c4036 254 void UART_StructInit (UART_InitTypeDef* UART_InitStruct);
mbed_official 558:0880f51c4036 255
mbed_official 558:0880f51c4036 256 uint32_t UART_Init (UART_TypeDef *UARTx, UART_InitTypeDef* UART_InitStruct);
mbed_official 558:0880f51c4036 257 void UART_SendData (UART_TypeDef* UARTx, uint16_t Data);
mbed_official 558:0880f51c4036 258 uint16_t UART_ReceiveData (UART_TypeDef* UARTx);
mbed_official 558:0880f51c4036 259 void UART_SendBreak (UART_TypeDef* UARTx);
mbed_official 558:0880f51c4036 260 void UART_ClearRecvStatus (UART_TypeDef* UARTx, uint16_t UART_RECV_STATUS);
mbed_official 558:0880f51c4036 261 FlagStatus UART_GetFlagStatus (UART_TypeDef* UARTx, uint16_t UART_FLAG);
mbed_official 558:0880f51c4036 262 void UART_ITConfig (UART_TypeDef* UARTx, uint16_t UART_IT, FunctionalState NewState);
mbed_official 558:0880f51c4036 263 ITStatus UART_GetITStatus (UART_TypeDef* UARTx, uint16_t UART_IT);
mbed_official 558:0880f51c4036 264 void UART_ClearITPendingBit (UART_TypeDef* UARTx, uint16_t UART_IT);
mbed_official 558:0880f51c4036 265
mbed_official 558:0880f51c4036 266
mbed_official 558:0880f51c4036 267 void S_UART_DeInit(void);
mbed_official 558:0880f51c4036 268 uint32_t S_UART_Init(uint32_t baud);
mbed_official 558:0880f51c4036 269 void S_UART_SendData(uint16_t Data);
mbed_official 558:0880f51c4036 270 uint16_t S_UART_ReceiveData(void);
mbed_official 558:0880f51c4036 271
mbed_official 558:0880f51c4036 272
mbed_official 558:0880f51c4036 273
mbed_official 558:0880f51c4036 274 uint8_t UartPutc (UART_TypeDef* UARTx, uint8_t ch);
mbed_official 558:0880f51c4036 275 void UartPuts (UART_TypeDef* UARTx, uint8_t *str);
mbed_official 558:0880f51c4036 276 uint8_t UartGetc (UART_TypeDef* UARTx);
mbed_official 558:0880f51c4036 277
mbed_official 558:0880f51c4036 278 uint8_t S_UartPutc(uint8_t ch);
mbed_official 558:0880f51c4036 279 void S_UartPuts(uint8_t *str);
mbed_official 558:0880f51c4036 280 uint8_t S_UartGetc(void);
mbed_official 558:0880f51c4036 281
mbed_official 558:0880f51c4036 282
mbed_official 558:0880f51c4036 283 #ifdef __cplusplus
mbed_official 558:0880f51c4036 284 }
mbed_official 558:0880f51c4036 285 #endif
mbed_official 558:0880f51c4036 286
mbed_official 558:0880f51c4036 287
mbed_official 558:0880f51c4036 288 #endif // __W7500X_UART_H
mbed_official 558:0880f51c4036 289