STM8S/A Standard Peripherals Drivers
|
stm8s_uart4.h
Go to the documentation of this file.
00001 /** 00002 ******************************************************************************** 00003 * @file stm8s_uart4.h 00004 * @author MCD Application Team 00005 * @version V2.3.0 00006 * @date 16-June-2017 00007 * @brief This file contains all functions prototypes and macros for the UART4 peripheral. 00008 ****************************************************************************** 00009 * @attention 00010 * 00011 * <h2><center>© COPYRIGHT 2014 STMicroelectronics</center></h2> 00012 * 00013 * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); 00014 * You may not use this file except in compliance with the License. 00015 * You may obtain a copy of the License at: 00016 * 00017 * http://www.st.com/software_license_agreement_liberty_v2 00018 * 00019 * Unless required by applicable law or agreed to in writing, software 00020 * distributed under the License is distributed on an "AS IS" BASIS, 00021 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00022 * See the License for the specific language governing permissions and 00023 * limitations under the License. 00024 * 00025 ****************************************************************************** 00026 */ 00027 00028 /* Define to prevent recursive inclusion -------------------------------------*/ 00029 #ifndef __STM8S_UART4_H 00030 #define __STM8S_UART4_H 00031 00032 /* Includes ------------------------------------------------------------------*/ 00033 #include "stm8s.h" 00034 00035 /** @addtogroup STM8S_StdPeriph_Driver 00036 * @{ 00037 */ 00038 00039 /* Exported types ------------------------------------------------------------*/ 00040 00041 /** @addtogroup UART4_Exported_Types 00042 * @{ 00043 */ 00044 00045 /** 00046 * @brief UART4 Irda Modes 00047 */ 00048 00049 typedef enum { UART4_IRDAMODE_NORMAL = (uint8_t)0x00, /**< 0x00 Irda Normal Mode */ 00050 UART4_IRDAMODE_LOWPOWER = (uint8_t)0x01 /**< 0x01 Irda Low Power Mode */ 00051 00052 } UART4_IrDAMode_TypeDef; 00053 00054 /** 00055 * @brief UART4 WakeUP Modes 00056 */ 00057 00058 typedef enum { UART4_WAKEUP_IDLELINE = (uint8_t)0x00, /**< 0x01 Idle Line wake up */ 00059 UART4_WAKEUP_ADDRESSMARK = (uint8_t)0x08 /**< 0x02 Address Mark wake up */ 00060 } UART4_WakeUp_TypeDef; 00061 00062 00063 /** 00064 * @brief UART4 LIN Break detection length possible values 00065 */ 00066 typedef enum { UART4_LINBREAKDETECTIONLENGTH_10BITS = (uint8_t)0x00, /**< 0x01 10 bits Lin Break detection */ 00067 UART4_LINBREAKDETECTIONLENGTH_11BITS = (uint8_t)0x01 /**< 0x02 11 bits Lin Break detection */ 00068 } UART4_LINBreakDetectionLength_TypeDef; 00069 00070 /** 00071 * @brief UART4 stop bits possible values 00072 */ 00073 00074 typedef enum { UART4_STOPBITS_1 = (uint8_t)0x00, /**< One stop bit is transmitted at the end of frame*/ 00075 UART4_STOPBITS_0_5 = (uint8_t)0x10, /**< Half stop bits is transmitted at the end of frame*/ 00076 UART4_STOPBITS_2 = (uint8_t)0x20, /**< Two stop bits are transmitted at the end of frame*/ 00077 UART4_STOPBITS_1_5 = (uint8_t)0x30 /**< One and half stop bits*/ 00078 } UART4_StopBits_TypeDef; 00079 00080 00081 /** 00082 * @brief UART4 parity possible values 00083 */ 00084 typedef enum { UART4_PARITY_NO = (uint8_t)0x00, /**< No Parity*/ 00085 UART4_PARITY_EVEN = (uint8_t)0x04, /**< Even Parity*/ 00086 UART4_PARITY_ODD = (uint8_t)0x06 /**< Odd Parity*/ 00087 } UART4_Parity_TypeDef; 00088 /** 00089 * @brief UART4 Mode possible values 00090 */ 00091 typedef enum { UART4_LIN_MODE_MASTER = (uint8_t)0x00, /**< LIN Master Mode*/ 00092 UART4_LIN_MODE_SLAVE = (uint8_t)0x01 /**< LIN Slave Mode*/ 00093 } UART4_LinMode_TypeDef; 00094 /** 00095 * @brief UART4 automatic resynchronisation possible values 00096 */ 00097 typedef enum { UART4_LIN_AUTOSYNC_DISABLE = (uint8_t)0x00, /**< LIN Autosynchronization Disable*/ 00098 UART4_LIN_AUTOSYNC_ENABLE = (uint8_t)0x01 /**< LIN Autosynchronization Enable*/ 00099 } UART4_LinAutosync_TypeDef; 00100 /** 00101 * @brief UART4 Divider Update Method possible values 00102 */ 00103 typedef enum { UART4_LIN_DIVUP_LBRR1 = (uint8_t)0x00, /**< LIN LDIV is updated as soon as LBRR1 is written*/ 00104 UART4_LIN_DIVUP_NEXTRXNE = (uint8_t)0x01 /**< LIN LDIV is updated at the next received character*/ 00105 } UART4_LinDivUp_TypeDef; 00106 00107 /** 00108 * @brief UART4 Synchrone modes 00109 */ 00110 typedef enum { UART4_SYNCMODE_CLOCK_DISABLE = (uint8_t)0x80, /**< 0x80 Sync mode Disable, SLK pin Disable */ 00111 UART4_SYNCMODE_CLOCK_ENABLE = (uint8_t)0x08, /**< 0x08 Sync mode Enable, SLK pin Enable */ 00112 UART4_SYNCMODE_CPOL_LOW = (uint8_t)0x40, /**< 0x40 Steady low value on SCLK pin outside transmission window */ 00113 UART4_SYNCMODE_CPOL_HIGH = (uint8_t)0x04, /**< 0x04 Steady high value on SCLK pin outside transmission window */ 00114 UART4_SYNCMODE_CPHA_MIDDLE = (uint8_t)0x20, /**< 0x20 SCLK clock line activated in middle of data bit */ 00115 UART4_SYNCMODE_CPHA_BEGINING = (uint8_t)0x02, /**< 0x02 SCLK clock line activated at beginning of data bit */ 00116 UART4_SYNCMODE_LASTBIT_DISABLE = (uint8_t)0x10, /**< 0x10 The clock pulse of the last data bit is not output to the SCLK pin */ 00117 UART4_SYNCMODE_LASTBIT_ENABLE = (uint8_t)0x01 /**< 0x01 The clock pulse of the last data bit is output to the SCLK pin */ 00118 } UART4_SyncMode_TypeDef; 00119 00120 /** 00121 * @brief UART4 Word length possible values 00122 */ 00123 typedef enum { UART4_WORDLENGTH_8D = (uint8_t)0x00,/**< 0x00 8 bits Data */ 00124 UART4_WORDLENGTH_9D = (uint8_t)0x10 /**< 0x10 9 bits Data */ 00125 } UART4_WordLength_TypeDef; 00126 00127 /** 00128 * @brief UART4 Mode possible values 00129 */ 00130 typedef enum { UART4_MODE_RX_ENABLE = (uint8_t)0x08, /**< 0x08 Receive Enable */ 00131 UART4_MODE_TX_ENABLE = (uint8_t)0x04, /**< 0x04 Transmit Enable */ 00132 UART4_MODE_TX_DISABLE = (uint8_t)0x80, /**< 0x80 Transmit Disable */ 00133 UART4_MODE_RX_DISABLE = (uint8_t)0x40, /**< 0x40 Single-wire Half-duplex mode */ 00134 UART4_MODE_TXRX_ENABLE = (uint8_t)0x0C /**< 0x0C Transmit Enable and Receive Enable */ 00135 } UART4_Mode_TypeDef; 00136 /** 00137 * @brief UART4 Flag possible values 00138 */ 00139 typedef enum 00140 { 00141 UART4_FLAG_TXE = (uint16_t)0x0080, /*!< Transmit Data Register Empty flag */ 00142 UART4_FLAG_TC = (uint16_t)0x0040, /*!< Transmission Complete flag */ 00143 UART4_FLAG_RXNE = (uint16_t)0x0020, /*!< Read Data Register Not Empty flag */ 00144 UART4_FLAG_IDLE = (uint16_t)0x0010, /*!< Idle line detected flag */ 00145 UART4_FLAG_OR_LHE = (uint16_t)0x0008, /*!< OverRun error flag */ 00146 UART4_FLAG_NF = (uint16_t)0x0004, /*!< Noise error flag */ 00147 UART4_FLAG_FE = (uint16_t)0x0002, /*!< Framing Error flag */ 00148 UART4_FLAG_PE = (uint16_t)0x0001, /*!< Parity Error flag */ 00149 UART4_FLAG_SBK = (uint16_t)0x0101, /**< Send Break Complete interrupt flag */ 00150 UART4_FLAG_LBDF = (uint16_t)0x0210, /**< LIN Break Detection Flag */ 00151 UART4_FLAG_LHDF = (uint16_t)0x0302, /**< LIN Header Detection Flag*/ 00152 UART4_FLAG_LSF = (uint16_t)0x0301 /**< LIN Sync Field Flag*/ 00153 } UART4_Flag_TypeDef; 00154 00155 /** 00156 * @brief UART4 Interrupt definition 00157 * UART4_IT possible values 00158 * Elements values convention: 0xZYX 00159 * X: Position of the corresponding Interrupt 00160 * - For the following values, X means the interrupt position in the CR2 register. 00161 * UART4_IT_TXE 00162 * UART4_IT_TC 00163 * UART4_IT_RXNE 00164 * UART4_IT_IDLE 00165 * UART4_IT_OR 00166 * - For the UART4_IT_PE value, X means the flag position in the CR1 register. 00167 * - For the UART4_IT_LBDF value, X means the flag position in the CR4 register. 00168 * - For the UART4_IT_LHDF value, X means the flag position in the CR6 register. 00169 * Y: Flag position 00170 * - For the following values, Y means the flag (pending bit) position in the SR register. 00171 * UART4_IT_TXE 00172 * UART4_IT_TC 00173 * UART4_IT_RXNE 00174 * UART4_IT_IDLE 00175 * UART4_IT_OR 00176 * UART4_IT_PE 00177 * - For the UART4_IT_LBDF value, Y means the flag position in the CR4 register. 00178 * - For the UART4_IT_LHDF value, Y means the flag position in the CR6 register. 00179 * Z: Register index: indicate in which register the dedicated interrupt source is: 00180 * - 1==> CR1 register 00181 * - 2==> CR2 register 00182 * - 3==> CR4 register 00183 * - 4==> CR6 register 00184 */ 00185 typedef enum { UART4_IT_TXE = (uint16_t)0x0277, /**< Transmit interrupt */ 00186 UART4_IT_TC = (uint16_t)0x0266, /**< Transmission Complete interrupt */ 00187 UART4_IT_RXNE = (uint16_t)0x0255, /**< Data Register Not Empty interrupt */ 00188 UART4_IT_IDLE = (uint16_t)0x0244, /**< Idle line detected interrupt */ 00189 UART4_IT_OR = (uint16_t)0x0235, /**< OverRun error interrupt */ 00190 UART4_IT_PE = (uint16_t)0x0100, /**< Parity Error interrupt */ 00191 UART4_IT_LBDF = (uint16_t)0x0346, /**< LIN Break Detection interrupt */ 00192 UART4_IT_LHDF = (uint16_t)0x0412, /**< LIN Header Detection interrupt*/ 00193 UART4_IT_RXNE_OR = (uint16_t)0x0205 /*!< Receive/Overrun interrupt */ 00194 } UART4_IT_TypeDef; 00195 00196 /** 00197 * @} 00198 */ 00199 00200 /* Exported constants --------------------------------------------------------*/ 00201 /* Exported macros -----------------------------------------------------------*/ 00202 /* Private macros ------------------------------------------------------------*/ 00203 00204 /** @addtogroup UART4_Private_Macros 00205 * @{ 00206 */ 00207 00208 /** 00209 * @brief Macro used by the assert function to check the different functions parameters. 00210 */ 00211 00212 /** 00213 * @brief Macro used by the assert_param function in order to check the different 00214 * sensitivity values for the MODEs possible combination should be one of 00215 * the following. 00216 */ 00217 00218 #define IS_UART4_MODE_OK(Mode) \ 00219 (((Mode) == (uint8_t)UART4_MODE_RX_ENABLE) || \ 00220 ((Mode) == (uint8_t)UART4_MODE_RX_DISABLE) || \ 00221 ((Mode) == (uint8_t)UART4_MODE_TX_ENABLE) || \ 00222 ((Mode) == (uint8_t)UART4_MODE_TX_DISABLE) || \ 00223 ((Mode) == (uint8_t)UART4_MODE_TXRX_ENABLE) || \ 00224 ((Mode) == (uint8_t)((uint8_t)UART4_MODE_TX_ENABLE|(uint8_t)UART4_MODE_RX_ENABLE)) || \ 00225 ((Mode) == (uint8_t)((uint8_t)UART4_MODE_TX_ENABLE|(uint8_t)UART4_MODE_RX_DISABLE)) || \ 00226 ((Mode) == (uint8_t)((uint8_t)UART4_MODE_TX_DISABLE|(uint8_t)UART4_MODE_RX_DISABLE)) || \ 00227 ((Mode) == (uint8_t)((uint8_t)UART4_MODE_TX_DISABLE|(uint8_t)UART4_MODE_RX_ENABLE))) 00228 00229 /** 00230 * @brief Macro used by the assert_param function in order to check the different 00231 * sensitivity values for the WordLengths 00232 */ 00233 #define IS_UART4_WORDLENGTH_OK(WordLength) \ 00234 (((WordLength) == UART4_WORDLENGTH_8D) || \ 00235 ((WordLength) == UART4_WORDLENGTH_9D)) 00236 00237 /** 00238 * @brief Macro used by the assert_param function in order to check the different 00239 * sensitivity values for the SyncModes; it should exclude values such 00240 * as UART4_CLOCK_ENABLE|UART4_CLOCK_DISABLE 00241 */ 00242 #define IS_UART4_SYNCMODE_OK(SyncMode) \ 00243 (!((((SyncMode)&(((uint8_t)UART4_SYNCMODE_CLOCK_ENABLE)|((uint8_t)UART4_SYNCMODE_CLOCK_DISABLE))) == (((uint8_t)UART4_SYNCMODE_CLOCK_ENABLE)|((uint8_t)UART4_SYNCMODE_CLOCK_DISABLE))) || \ 00244 (((SyncMode)&(((uint8_t)UART4_SYNCMODE_CPOL_LOW )|((uint8_t)UART4_SYNCMODE_CPOL_HIGH))) == (((uint8_t)UART4_SYNCMODE_CPOL_LOW )|((uint8_t)UART4_SYNCMODE_CPOL_HIGH))) || \ 00245 (((SyncMode)&(((uint8_t)UART4_SYNCMODE_CPHA_MIDDLE)|((uint8_t)UART4_SYNCMODE_CPHA_BEGINING))) == (((uint8_t)UART4_SYNCMODE_CPHA_MIDDLE)|((uint8_t)UART4_SYNCMODE_CPHA_BEGINING))) || \ 00246 (((SyncMode)&(((uint8_t)UART4_SYNCMODE_LASTBIT_DISABLE)|((uint8_t)UART4_SYNCMODE_LASTBIT_ENABLE))) == (((uint8_t)UART4_SYNCMODE_LASTBIT_DISABLE)|((uint8_t)UART4_SYNCMODE_LASTBIT_ENABLE))))) 00247 00248 /** 00249 * @brief Macro used by the assert_param function in order to check the 00250 * different sensitivity values for the FLAGs 00251 */ 00252 #define IS_UART4_FLAG_OK(Flag) \ 00253 (((Flag) == UART4_FLAG_TXE) || \ 00254 ((Flag) == UART4_FLAG_TC) || \ 00255 ((Flag) == UART4_FLAG_RXNE) || \ 00256 ((Flag) == UART4_FLAG_IDLE) || \ 00257 ((Flag) == UART4_FLAG_OR_LHE) || \ 00258 ((Flag) == UART4_FLAG_NF) || \ 00259 ((Flag) == UART4_FLAG_FE) || \ 00260 ((Flag) == UART4_FLAG_PE) || \ 00261 ((Flag) == UART4_FLAG_SBK) || \ 00262 ((Flag) == UART4_FLAG_LSF) || \ 00263 ((Flag) == UART4_FLAG_LHDF) || \ 00264 ((Flag) == UART4_FLAG_LBDF)) 00265 00266 00267 /** 00268 * @brief Macro used by the assert_param function in order to check the 00269 * different sensitivity values for the FLAGs that can be cleared by writing 0 00270 */ 00271 #define IS_UART4_CLEAR_FLAG_OK(Flag) \ 00272 (((Flag) == UART4_FLAG_RXNE) || \ 00273 ((Flag) == UART4_FLAG_LHDF) || \ 00274 ((Flag) == UART4_FLAG_LSF) || \ 00275 ((Flag) == UART4_FLAG_LBDF)) 00276 00277 /** 00278 * @brief Macro used by the assert_param function in order to check 00279 * the different sensitivity values for the Interrupts 00280 */ 00281 00282 #define IS_UART4_CONFIG_IT_OK(Interrupt) \ 00283 (((Interrupt) == UART4_IT_PE) || \ 00284 ((Interrupt) == UART4_IT_TXE) || \ 00285 ((Interrupt) == UART4_IT_TC) || \ 00286 ((Interrupt) == UART4_IT_RXNE_OR ) || \ 00287 ((Interrupt) == UART4_IT_IDLE) || \ 00288 ((Interrupt) == UART4_IT_LHDF) || \ 00289 ((Interrupt) == UART4_IT_LBDF)) 00290 00291 /** 00292 * @brief Macro used by the assert function in order to check the different 00293 * sensitivity values for the pending bit 00294 */ 00295 #define IS_UART4_GET_IT_OK(ITPendingBit) \ 00296 (((ITPendingBit) == UART4_IT_TXE) || \ 00297 ((ITPendingBit) == UART4_IT_TC) || \ 00298 ((ITPendingBit) == UART4_IT_RXNE) || \ 00299 ((ITPendingBit) == UART4_IT_IDLE) || \ 00300 ((ITPendingBit) == UART4_IT_OR) || \ 00301 ((ITPendingBit) == UART4_IT_LBDF) || \ 00302 ((ITPendingBit) == UART4_IT_LHDF) || \ 00303 ((ITPendingBit) == UART4_IT_PE)) 00304 00305 /** 00306 * @brief Macro used by the assert function in order to check the different 00307 * sensitivity values for the pending bit that can be cleared by writing 0 00308 */ 00309 #define IS_UART4_CLEAR_IT_OK(ITPendingBit) \ 00310 (((ITPendingBit) == UART4_IT_RXNE) || \ 00311 ((ITPendingBit) == UART4_IT_LHDF) || \ 00312 ((ITPendingBit) == UART4_IT_LBDF)) 00313 00314 00315 /** 00316 * @brief Macro used by the assert_param function in order to check the different 00317 * sensitivity values for the IrDAModes 00318 */ 00319 #define IS_UART4_IRDAMODE_OK(IrDAMode) \ 00320 (((IrDAMode) == UART4_IRDAMODE_LOWPOWER) || \ 00321 ((IrDAMode) == UART4_IRDAMODE_NORMAL)) 00322 00323 /** 00324 * @brief Macro used by the assert_param function in order to check the different 00325 * sensitivity values for the WakeUps 00326 */ 00327 #define IS_UART4_WAKEUP_OK(WakeUp) \ 00328 (((WakeUp) == UART4_WAKEUP_IDLELINE) || \ 00329 ((WakeUp) == UART4_WAKEUP_ADDRESSMARK)) 00330 00331 /** 00332 * @brief Macro used by the assert_param function in order to check the different 00333 * sensitivity values for the LINBreakDetectionLengths 00334 */ 00335 #define IS_UART4_LINBREAKDETECTIONLENGTH_OK(LINBreakDetectionLength) \ 00336 (((LINBreakDetectionLength) == UART4_LINBREAKDETECTIONLENGTH_10BITS) || \ 00337 ((LINBreakDetectionLength) == UART4_LINBREAKDETECTIONLENGTH_11BITS)) 00338 00339 /** 00340 * @brief Macro used by the assert_param function in order to check the different 00341 * sensitivity values for the UART4_StopBits 00342 */ 00343 #define IS_UART4_STOPBITS_OK(StopBit) (((StopBit) == UART4_STOPBITS_1) || \ 00344 ((StopBit) == UART4_STOPBITS_0_5) || \ 00345 ((StopBit) == UART4_STOPBITS_2) || \ 00346 ((StopBit) == UART4_STOPBITS_1_5 )) 00347 00348 /** 00349 * @brief Macro used by the assert_param function in order to check the different 00350 * sensitivity values for the Paritys 00351 */ 00352 #define IS_UART4_PARITY_OK(Parity) (((Parity) == UART4_PARITY_NO) || \ 00353 ((Parity) == UART4_PARITY_EVEN) || \ 00354 ((Parity) == UART4_PARITY_ODD )) 00355 00356 /** 00357 * @brief Macro used by the assert_param function in order to check the maximum 00358 * baudrate value 00359 */ 00360 #define IS_UART4_BAUDRATE_OK(NUM) ((NUM) <= (uint32_t)625000) 00361 00362 /** 00363 * @brief Macro used by the assert_param function in order to check the address 00364 * of the UART4 or UART node 00365 */ 00366 #define UART4_ADDRESS_MAX ((uint8_t)16) 00367 #define IS_UART4_ADDRESS_OK(node) ((node) < UART4_ADDRESS_MAX ) 00368 00369 /** 00370 * @brief Macro used by the assert_param function in order to check the LIN mode 00371 */ 00372 #define IS_UART4_SLAVE_OK(Mode) \ 00373 (((Mode) == UART4_LIN_MODE_MASTER) || \ 00374 ((Mode) == UART4_LIN_MODE_SLAVE)) 00375 00376 /** 00377 * @brief Macro used by the assert_param function in order to check the LIN 00378 * automatic resynchronization mode 00379 */ 00380 #define IS_UART4_AUTOSYNC_OK(AutosyncMode) \ 00381 (((AutosyncMode) == UART4_LIN_AUTOSYNC_ENABLE) || \ 00382 ((AutosyncMode) == UART4_LIN_AUTOSYNC_DISABLE)) 00383 00384 /** 00385 * @brief Macro used by the assert_param function in order to check the LIN divider update method 00386 */ 00387 #define IS_UART4_DIVUP_OK(DivupMethod) \ 00388 (((DivupMethod) == UART4_LIN_DIVUP_LBRR1) || \ 00389 ((DivupMethod) == UART4_LIN_DIVUP_NEXTRXNE)) 00390 00391 00392 /** 00393 * @} 00394 */ 00395 00396 /* Exported functions ------------------------------------------------------- */ 00397 00398 /** @addtogroup UART4_Exported_Functions 00399 * @{ 00400 */ 00401 void UART4_DeInit(void); 00402 void UART4_Init(uint32_t BaudRate, UART4_WordLength_TypeDef WordLength, 00403 UART4_StopBits_TypeDef StopBits, UART4_Parity_TypeDef Parity, 00404 UART4_SyncMode_TypeDef SyncMode, UART4_Mode_TypeDef Mode); 00405 void UART4_Cmd(FunctionalState NewState); 00406 void UART4_ITConfig(UART4_IT_TypeDef UART4_IT, FunctionalState NewState); 00407 void UART4_HalfDuplexCmd(FunctionalState NewState); 00408 void UART4_IrDAConfig(UART4_IrDAMode_TypeDef UART4_IrDAMode); 00409 void UART4_IrDACmd(FunctionalState NewState); 00410 void UART4_LINBreakDetectionConfig(UART4_LINBreakDetectionLength_TypeDef UART4_LINBreakDetectionLength); 00411 void UART4_LINConfig(UART4_LinMode_TypeDef UART4_Mode, 00412 UART4_LinAutosync_TypeDef UART4_Autosync, 00413 UART4_LinDivUp_TypeDef UART4_DivUp); 00414 void UART4_LINCmd(FunctionalState NewState); 00415 void UART4_SmartCardCmd(FunctionalState NewState); 00416 void UART4_SmartCardNACKCmd(FunctionalState NewState); 00417 void UART4_WakeUpConfig(UART4_WakeUp_TypeDef UART4_WakeUp); 00418 void UART4_ReceiverWakeUpCmd(FunctionalState NewState); 00419 uint8_t UART4_ReceiveData8(void); 00420 uint16_t UART4_ReceiveData9(void); 00421 void UART4_SendData8(uint8_t Data); 00422 void UART4_SendData9(uint16_t Data); 00423 void UART4_SendBreak(void); 00424 void UART4_SetAddress(uint8_t UART4_Address); 00425 void UART4_SetGuardTime(uint8_t UART4_GuardTime); 00426 void UART4_SetPrescaler(uint8_t UART4_Prescaler); 00427 FlagStatus UART4_GetFlagStatus(UART4_Flag_TypeDef UART4_FLAG); 00428 void UART4_ClearFlag(UART4_Flag_TypeDef UART4_FLAG); 00429 ITStatus UART4_GetITStatus(UART4_IT_TypeDef UART4_IT); 00430 void UART4_ClearITPendingBit(UART4_IT_TypeDef UART4_IT); 00431 00432 00433 /** 00434 * @} 00435 */ 00436 00437 #endif /* __STM8S_UART4_H */ 00438 00439 /** 00440 * @} 00441 */ 00442 00443 00444 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/