Elijah Orr / mbed-renbed

Dependents:   1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB

Fork of mbed by mbed official

Committer:
Kojto
Date:
Tue Jun 09 14:29:26 2015 +0100
Revision:
101:7cff1c4259d7
Release 101 of the mbed library

Changes:
- new platform: APPNEARME_MICRONFCBOARD, MTS_DRAGONFLY_F411RE, MAX32600MBED, WIZwiki_W7500
- Silabs memory optimization in gpio, pwm fixes
- SPI - ssel documentation fixes and its use

Who changed what in which revision?

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