STM8S/A Standard Peripherals Firmware Library: stm8s_uart2.h Source File

STM8S/A

stm8s_uart2.h
Go to the documentation of this file.
00001 /**
00002   ********************************************************************************
00003   * @file    stm8s_uart2.h
00004   * @author  MCD Application Team
00005   * @version V2.2.0
00006   * @date    30-September-2014
00007   * @brief   This file contains all functions prototypes and macros for the UART2 peripheral.
00008    ******************************************************************************
00009   * @attention
00010   *
00011   * <h2><center>&copy; 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_UART2_H
00030 #define __STM8S_UART2_H
00031 
00032 /* Includes ------------------------------------------------------------------*/
00033 #include "stm8s.h"
00034 
00035 /** @addtogroup STM8S_StdPeriph_Driver
00036   * @{
00037   */
00038 
00039 /* Exported types ------------------------------------------------------------*/
00040 
00041 /** @addtogroup UART2_Exported_Types
00042   * @{
00043   */
00044 
00045 /**
00046   * @brief  UART2 Irda Modes
00047   */
00048 
00049 typedef enum { UART2_IRDAMODE_NORMAL     = (uint8_t)0x00, /**< 0x00 Irda Normal Mode   */
00050                UART2_IRDAMODE_LOWPOWER   = (uint8_t)0x01  /**< 0x01 Irda Low Power Mode */
00051 
00052              } UART2_IrDAMode_TypeDef;
00053 
00054 /**
00055   * @brief  UART2 WakeUP Modes
00056   */
00057 
00058 typedef enum { UART2_WAKEUP_IDLELINE       = (uint8_t)0x00, /**< 0x01 Idle Line wake up */
00059                UART2_WAKEUP_ADDRESSMARK    = (uint8_t)0x08  /**< 0x02 Address Mark wake up */
00060              } UART2_WakeUp_TypeDef;
00061 
00062 
00063 /**
00064   * @brief  UART2 LIN Break detection length possible values
00065   */
00066 typedef enum { UART2_LINBREAKDETECTIONLENGTH_10BITS = (uint8_t)0x00, /**< 0x01 10 bits Lin Break detection */
00067                UART2_LINBREAKDETECTIONLENGTH_11BITS = (uint8_t)0x01  /**< 0x02 11 bits Lin Break detection */
00068              } UART2_LINBreakDetectionLength_TypeDef;
00069 
00070 /**
00071   * @brief  UART2 stop bits possible values
00072   */
00073 
00074 typedef enum { UART2_STOPBITS_1   = (uint8_t)0x00,    /**< One stop bit is  transmitted at the end of frame*/
00075                UART2_STOPBITS_0_5 = (uint8_t)0x10,    /**< Half stop bits is transmitted at the end of frame*/
00076                UART2_STOPBITS_2   = (uint8_t)0x20,    /**< Two stop bits are  transmitted at the end of frame*/
00077                UART2_STOPBITS_1_5 = (uint8_t)0x30     /**< One and half stop bits*/
00078              } UART2_StopBits_TypeDef;
00079 
00080 
00081 /**
00082   * @brief  UART2 parity possible values
00083   */
00084 typedef enum { UART2_PARITY_NO     = (uint8_t)0x00,      /**< No Parity*/
00085                UART2_PARITY_EVEN   = (uint8_t)0x04,      /**< Even Parity*/
00086                UART2_PARITY_ODD    = (uint8_t)0x06       /**< Odd Parity*/
00087              } UART2_Parity_TypeDef;
00088 /**
00089   * @brief  UART2 Mode possible values
00090   */
00091 typedef enum { UART2_LIN_MODE_MASTER  = (uint8_t)0x00, /**<  LIN Master Mode*/
00092                UART2_LIN_MODE_SLAVE   = (uint8_t)0x01  /**<  LIN Slave Mode*/
00093              } UART2_LinMode_TypeDef;
00094 /**
00095   * @brief  UART2 automatic resynchronisation possible values
00096   */
00097 typedef enum { UART2_LIN_AUTOSYNC_DISABLE   = (uint8_t)0x00,  /**< LIN Autosynchronization Disable*/
00098                UART2_LIN_AUTOSYNC_ENABLE    = (uint8_t)0x01   /**< LIN Autosynchronization Enable*/
00099              } UART2_LinAutosync_TypeDef;
00100 /**
00101   * @brief  UART2 Divider Update Method possible values
00102   */
00103 typedef enum { UART2_LIN_DIVUP_LBRR1    = (uint8_t)0x00, /**<  LIN LDIV is updated as soon as LBRR1 is written*/
00104                UART2_LIN_DIVUP_NEXTRXNE = (uint8_t)0x01  /**<  LIN LDIV is updated at the next received character*/
00105              } UART2_LinDivUp_TypeDef;
00106 
00107 /**
00108   * @brief  UART2 Synchrone modes
00109   */
00110 typedef enum { UART2_SYNCMODE_CLOCK_DISABLE    = (uint8_t)0x80, /**< 0x80 Sync mode Disable, SLK pin Disable */
00111                UART2_SYNCMODE_CLOCK_ENABLE     = (uint8_t)0x08, /**< 0x08 Sync mode Enable, SLK pin Enable     */
00112                UART2_SYNCMODE_CPOL_LOW         = (uint8_t)0x40, /**< 0x40 Steady low value on SCLK pin outside transmission window */
00113                UART2_SYNCMODE_CPOL_HIGH        = (uint8_t)0x04, /**< 0x04 Steady high value on SCLK pin outside transmission window */
00114                UART2_SYNCMODE_CPHA_MIDDLE      = (uint8_t)0x20, /**< 0x20 SCLK clock line activated in middle of data bit     */
00115                UART2_SYNCMODE_CPHA_BEGINING    = (uint8_t)0x02, /**< 0x02 SCLK clock line activated at beginning of data bit  */
00116                UART2_SYNCMODE_LASTBIT_DISABLE  = (uint8_t)0x10, /**< 0x10 The clock pulse of the last data bit is not output to the SCLK pin */
00117                UART2_SYNCMODE_LASTBIT_ENABLE   = (uint8_t)0x01  /**< 0x01 The clock pulse of the last data bit is output to the SCLK pin */
00118              } UART2_SyncMode_TypeDef;
00119 
00120 /**
00121   * @brief  UART2 Word length possible values
00122   */
00123 typedef enum { UART2_WORDLENGTH_8D = (uint8_t)0x00,/**< 0x00 8 bits Data  */
00124                UART2_WORDLENGTH_9D = (uint8_t)0x10 /**< 0x10 9 bits Data  */
00125              } UART2_WordLength_TypeDef;
00126 
00127 /**
00128   * @brief  UART2 Mode possible values
00129   */
00130 typedef enum { UART2_MODE_RX_ENABLE     = (uint8_t)0x08,  /**< 0x08 Receive Enable */
00131                UART2_MODE_TX_ENABLE     = (uint8_t)0x04,  /**< 0x04 Transmit Enable */
00132                UART2_MODE_TX_DISABLE    = (uint8_t)0x80,  /**< 0x80 Transmit Disable */
00133                UART2_MODE_RX_DISABLE    = (uint8_t)0x40,  /**< 0x40 Single-wire Half-duplex mode */
00134                UART2_MODE_TXRX_ENABLE   = (uint8_t)0x0C  /**< 0x0C Transmit Enable and Receive Enable */
00135              } UART2_Mode_TypeDef;
00136 /**
00137   * @brief  UART2 Flag possible values
00138   */
00139 typedef enum
00140 {
00141   UART2_FLAG_TXE          = (uint16_t)0x0080, /*!< Transmit Data Register Empty flag */
00142   UART2_FLAG_TC           = (uint16_t)0x0040, /*!< Transmission Complete flag */
00143   UART2_FLAG_RXNE         = (uint16_t)0x0020, /*!< Read Data Register Not Empty flag */
00144   UART2_FLAG_IDLE         = (uint16_t)0x0010, /*!< Idle line detected flag */
00145   UART2_FLAG_OR_LHE       = (uint16_t)0x0008, /*!< OverRun error flag */
00146   UART2_FLAG_NF           = (uint16_t)0x0004, /*!< Noise error flag */
00147   UART2_FLAG_FE           = (uint16_t)0x0002, /*!< Framing Error flag */
00148   UART2_FLAG_PE           = (uint16_t)0x0001, /*!< Parity Error flag */
00149   UART2_FLAG_SBK          = (uint16_t)0x0101,  /**< Send Break Complete interrupt flag */
00150   UART2_FLAG_LBDF         = (uint16_t)0x0210, /**< LIN Break Detection Flag           */
00151   UART2_FLAG_LHDF         = (uint16_t)0x0302, /**< LIN Header Detection Flag*/
00152   UART2_FLAG_LSF          = (uint16_t)0x0301  /**< LIN Sync Field Flag*/
00153 } UART2_Flag_TypeDef;
00154 
00155 /**
00156   * @brief  UART2 Interrupt definition
00157   * UART2_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   *     UART2_IT_TXE
00162   *     UART2_IT_TC
00163   *     UART2_IT_RXNE
00164   *     UART2_IT_IDLE 
00165   *     UART2_IT_OR 
00166   *   - For the UART2_IT_PE value, X means the flag position in the CR1 register.
00167   *   - For the UART2_IT_LBDF value, X means the flag position in the CR4 register.
00168   *   - For the UART2_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   *     UART2_IT_TXE
00172   *     UART2_IT_TC
00173   *     UART2_IT_RXNE
00174   *     UART2_IT_IDLE 
00175   *     UART2_IT_OR
00176   *     UART2_IT_PE
00177   *  - For the UART2_IT_LBDF value, Y means the flag position in the CR4 register.
00178   *  - For the UART2_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 { UART2_IT_TXE        = (uint16_t)0x0277, /**< Transmit interrupt */
00186                UART2_IT_TC         = (uint16_t)0x0266, /**< Transmission Complete interrupt */
00187                UART2_IT_RXNE       = (uint16_t)0x0255, /**< Data Register Not Empty interrupt */
00188                UART2_IT_IDLE       = (uint16_t)0x0244, /**< Idle line detected interrupt */
00189                UART2_IT_OR         = (uint16_t)0x0235, /**< OverRun error interrupt */
00190                UART2_IT_PE         = (uint16_t)0x0100, /**< Parity Error interrupt */
00191                UART2_IT_LBDF       = (uint16_t)0x0346, /**< LIN Break Detection interrupt */
00192                UART2_IT_LHDF       = (uint16_t)0x0412, /**< LIN Header Detection interrupt*/
00193                UART2_IT_RXNE_OR    = (uint16_t)0x0205  /*!< Receive/Overrun interrupt */
00194              } UART2_IT_TypeDef;
00195 
00196 /**
00197   * @}
00198   */
00199 
00200 /* Exported constants --------------------------------------------------------*/
00201 /* Exported macros ------------------------------------------------------------*/
00202 
00203 /* Private macros ------------------------------------------------------------*/
00204 
00205 /** @addtogroup UART2_Private_Macros
00206   * @{
00207   */
00208 
00209 /**
00210   * @brief  Macro used by the assert function to check the different functions parameters.
00211   */
00212 
00213 /**
00214  * @brief Macro used by the assert_param function in order to check the different
00215  *        sensitivity values for the MODEs possible combination should be one of
00216  *        the following.
00217  */
00218  
00219 #define IS_UART2_MODE_OK(Mode) \
00220   (((Mode) == (uint8_t)UART2_MODE_RX_ENABLE) || \
00221    ((Mode) == (uint8_t)UART2_MODE_RX_DISABLE) || \
00222    ((Mode) == (uint8_t)UART2_MODE_TX_ENABLE) || \
00223    ((Mode) == (uint8_t)UART2_MODE_TX_DISABLE) || \
00224    ((Mode) == (uint8_t)UART2_MODE_TXRX_ENABLE) || \
00225    ((Mode) == (uint8_t)((uint8_t)UART2_MODE_TX_ENABLE|(uint8_t)UART2_MODE_RX_ENABLE)) || \
00226    ((Mode) == (uint8_t)((uint8_t)UART2_MODE_TX_ENABLE|(uint8_t)UART2_MODE_RX_DISABLE)) || \
00227    ((Mode) == (uint8_t)((uint8_t)UART2_MODE_TX_DISABLE|(uint8_t)UART2_MODE_RX_DISABLE)) || \
00228    ((Mode) == (uint8_t)((uint8_t)UART2_MODE_TX_DISABLE|(uint8_t)UART2_MODE_RX_ENABLE)))
00229 
00230 /**
00231  * @brief Macro used by the assert_param function in order to check the different
00232  *        sensitivity values for the WordLengths
00233  */
00234 #define IS_UART2_WORDLENGTH_OK(WordLength) \
00235   (((WordLength) == UART2_WORDLENGTH_8D) || \
00236    ((WordLength) == UART2_WORDLENGTH_9D))
00237 
00238 /**
00239   * @brief  Macro used by the assert_param function in order to check the different
00240   *         sensitivity values for the SyncModes; it should exclude values such 
00241   *         as  UART2_CLOCK_ENABLE|UART2_CLOCK_DISABLE
00242   */
00243 #define IS_UART2_SYNCMODE_OK(SyncMode) \
00244   (!((((SyncMode)&(((uint8_t)UART2_SYNCMODE_CLOCK_ENABLE)|((uint8_t)UART2_SYNCMODE_CLOCK_DISABLE))) == (((uint8_t)UART2_SYNCMODE_CLOCK_ENABLE)|((uint8_t)UART2_SYNCMODE_CLOCK_DISABLE))) || \
00245      (((SyncMode)&(((uint8_t)UART2_SYNCMODE_CPOL_LOW )|((uint8_t)UART2_SYNCMODE_CPOL_HIGH))) == (((uint8_t)UART2_SYNCMODE_CPOL_LOW )|((uint8_t)UART2_SYNCMODE_CPOL_HIGH))) || \
00246      (((SyncMode)&(((uint8_t)UART2_SYNCMODE_CPHA_MIDDLE)|((uint8_t)UART2_SYNCMODE_CPHA_BEGINING))) == (((uint8_t)UART2_SYNCMODE_CPHA_MIDDLE)|((uint8_t)UART2_SYNCMODE_CPHA_BEGINING))) || \
00247      (((SyncMode)&(((uint8_t)UART2_SYNCMODE_LASTBIT_DISABLE)|((uint8_t)UART2_SYNCMODE_LASTBIT_ENABLE))) == (((uint8_t)UART2_SYNCMODE_LASTBIT_DISABLE)|((uint8_t)UART2_SYNCMODE_LASTBIT_ENABLE)))))
00248 
00249 /**
00250   * @brief  Macro used by the assert_param function in order to check the 
00251   *         different sensitivity values for the FLAGs
00252   */
00253 #define IS_UART2_FLAG_OK(Flag) \
00254   (((Flag) == UART2_FLAG_TXE) || \
00255    ((Flag) == UART2_FLAG_TC)  || \
00256    ((Flag) == UART2_FLAG_RXNE) || \
00257    ((Flag) == UART2_FLAG_IDLE) || \
00258    ((Flag) == UART2_FLAG_OR_LHE) || \
00259    ((Flag) == UART2_FLAG_NF) || \
00260    ((Flag) == UART2_FLAG_FE) || \
00261    ((Flag) == UART2_FLAG_PE) || \
00262    ((Flag) == UART2_FLAG_SBK) || \
00263    ((Flag) == UART2_FLAG_LSF) || \
00264    ((Flag) == UART2_FLAG_LHDF) || \
00265    ((Flag) == UART2_FLAG_LBDF))
00266 
00267 
00268 /**
00269   * @brief  Macro used by the assert_param function in order to check the 
00270   *         different sensitivity values for the FLAGs that can be cleared by writing 0
00271   */
00272 #define IS_UART2_CLEAR_FLAG_OK(Flag) \
00273   (((Flag) == UART2_FLAG_RXNE) || \
00274    ((Flag) == UART2_FLAG_LHDF) || \
00275    ((Flag) == UART2_FLAG_LSF) || \
00276    ((Flag) == UART2_FLAG_LBDF))
00277 
00278 /**
00279   * @brief  Macro used by the assert_param function in order to check 
00280   *         the different sensitivity values for the Interrupts
00281   */
00282 
00283 #define IS_UART2_CONFIG_IT_OK(Interrupt) \
00284   (((Interrupt) == UART2_IT_PE) || \
00285    ((Interrupt) == UART2_IT_TXE) || \
00286    ((Interrupt) == UART2_IT_TC) || \
00287    ((Interrupt) == UART2_IT_RXNE_OR ) || \
00288    ((Interrupt) == UART2_IT_IDLE) || \
00289    ((Interrupt) == UART2_IT_LHDF) || \
00290    ((Interrupt) == UART2_IT_LBDF))
00291 
00292 /**
00293   * @brief  Macro used by the assert function in order to check the different 
00294   *         sensitivity values for the pending bit
00295   */
00296 #define IS_UART2_GET_IT_OK(ITPendingBit) \
00297   (((ITPendingBit) == UART2_IT_TXE)  || \
00298    ((ITPendingBit) == UART2_IT_TC)   || \
00299    ((ITPendingBit) == UART2_IT_RXNE) || \
00300    ((ITPendingBit) == UART2_IT_IDLE) || \
00301    ((ITPendingBit) == UART2_IT_OR)  || \
00302    ((ITPendingBit) == UART2_IT_LBDF)  || \
00303    ((ITPendingBit) == UART2_IT_LHDF)  || \
00304    ((ITPendingBit) == UART2_IT_PE))
00305 
00306 /**
00307   * @brief  Macro used by the assert function in order to check the different 
00308   *         sensitivity values for the pending bit that can be cleared by writing 0
00309   */
00310 #define IS_UART2_CLEAR_IT_OK(ITPendingBit) \
00311   (((ITPendingBit) == UART2_IT_RXNE) || \
00312    ((ITPendingBit) == UART2_IT_LHDF) || \
00313    ((ITPendingBit) == UART2_IT_LBDF))
00314 
00315 
00316 /**
00317  * @brief Macro used by the assert_param function in order to check the different
00318  *        sensitivity values for the IrDAModes
00319  */
00320 #define IS_UART2_IRDAMODE_OK(IrDAMode) \
00321   (((IrDAMode) == UART2_IRDAMODE_LOWPOWER) || \
00322    ((IrDAMode) == UART2_IRDAMODE_NORMAL))
00323 
00324 /**
00325   * @brief  Macro used by the assert_param function in order to check the different
00326   *         sensitivity values for the WakeUps
00327   */
00328 #define IS_UART2_WAKEUP_OK(WakeUp) \
00329   (((WakeUp) == UART2_WAKEUP_IDLELINE) || \
00330    ((WakeUp) == UART2_WAKEUP_ADDRESSMARK))
00331 
00332 /**
00333   * @brief  Macro used by the assert_param function in order to check the different
00334   *         sensitivity values for the LINBreakDetectionLengths
00335   */
00336 #define IS_UART2_LINBREAKDETECTIONLENGTH_OK(LINBreakDetectionLength) \
00337   (((LINBreakDetectionLength) == UART2_LINBREAKDETECTIONLENGTH_10BITS) || \
00338    ((LINBreakDetectionLength) == UART2_LINBREAKDETECTIONLENGTH_11BITS))
00339 
00340 /**
00341   * @brief  Macro used by the assert_param function in order to check the different
00342   *         sensitivity values for the UART2_StopBits
00343   */
00344 #define IS_UART2_STOPBITS_OK(StopBit) (((StopBit) == UART2_STOPBITS_1) || \
00345                                        ((StopBit) == UART2_STOPBITS_0_5) || \
00346                                        ((StopBit) == UART2_STOPBITS_2) || \
00347                                        ((StopBit) == UART2_STOPBITS_1_5 ))
00348 
00349 /**
00350  * @brief Macro used by the assert_param function in order to check the different
00351  *        sensitivity values for the Paritys
00352  */
00353 #define IS_UART2_PARITY_OK(Parity) (((Parity) == UART2_PARITY_NO) || \
00354                                     ((Parity) == UART2_PARITY_EVEN) || \
00355                                     ((Parity) == UART2_PARITY_ODD ))
00356 
00357 /**
00358  * @brief Macro used by the assert_param function in order to check the maximum
00359  *        baudrate value
00360  */
00361 #define IS_UART2_BAUDRATE_OK(NUM) ((NUM) <= (uint32_t)625000)
00362 
00363 
00364 /**
00365  * @brief Macro used by the assert_param function in order to check the address 
00366  *        of the UART2 or UART node
00367  */
00368 #define UART2_ADDRESS_MAX ((uint8_t)16)
00369 #define IS_UART2_ADDRESS_OK(node) ((node) < UART2_ADDRESS_MAX )
00370 
00371 /**
00372  * @brief Macro used by the assert_param function in order to check the LIN mode
00373  */
00374 #define IS_UART2_SLAVE_OK(Mode) \
00375   (((Mode) == UART2_LIN_MODE_MASTER) || \
00376    ((Mode) == UART2_LIN_MODE_SLAVE))
00377 
00378 /**
00379  * @brief Macro used by the assert_param function in order to check the LIN 
00380  *        automatic resynchronization mode
00381  */
00382 #define IS_UART2_AUTOSYNC_OK(AutosyncMode) \
00383   (((AutosyncMode) ==  UART2_LIN_AUTOSYNC_ENABLE) || \
00384    ((AutosyncMode) == UART2_LIN_AUTOSYNC_DISABLE))
00385 
00386 /**
00387  * @brief Macro used by the assert_param function in order to check the LIN divider update method
00388  */
00389 #define IS_UART2_DIVUP_OK(DivupMethode) \
00390   (((DivupMethode) == UART2_LIN_DIVUP_LBRR1) || \
00391    ((DivupMethode) == UART2_LIN_DIVUP_NEXTRXNE))
00392 
00393 
00394 /**
00395   * @}
00396   */
00397 
00398 /* Exported functions ------------------------------------------------------- */
00399 
00400 /** @addtogroup UART2_Exported_Functions
00401   * @{
00402   */
00403 
00404 void UART2_DeInit(void);
00405 void UART2_Init(uint32_t BaudRate, UART2_WordLength_TypeDef WordLength, 
00406                 UART2_StopBits_TypeDef StopBits, UART2_Parity_TypeDef Parity, 
00407                 UART2_SyncMode_TypeDef SyncMode, UART2_Mode_TypeDef Mode);
00408 void UART2_Cmd(FunctionalState NewState);
00409 void UART2_ITConfig(UART2_IT_TypeDef UART2_IT, FunctionalState NewState);
00410 void UART2_HalfDuplexCmd(FunctionalState NewState);
00411 void UART2_IrDAConfig(UART2_IrDAMode_TypeDef UART2_IrDAMode);
00412 void UART2_IrDACmd(FunctionalState NewState);
00413 void UART2_LINBreakDetectionConfig(UART2_LINBreakDetectionLength_TypeDef UART2_LINBreakDetectionLength);
00414 void UART2_LINConfig(UART2_LinMode_TypeDef UART2_Mode, 
00415                      UART2_LinAutosync_TypeDef UART2_Autosync, 
00416                      UART2_LinDivUp_TypeDef UART2_DivUp);
00417 void UART2_LINCmd(FunctionalState NewState);
00418 void UART2_SmartCardCmd(FunctionalState NewState);
00419 void UART2_SmartCardNACKCmd(FunctionalState NewState);
00420 void UART2_WakeUpConfig(UART2_WakeUp_TypeDef UART2_WakeUp);
00421 void UART2_ReceiverWakeUpCmd(FunctionalState NewState);
00422 uint8_t UART2_ReceiveData8(void);
00423 uint16_t UART2_ReceiveData9(void);
00424 void UART2_SendData8(uint8_t Data);
00425 void UART2_SendData9(uint16_t Data);
00426 void UART2_SendBreak(void);
00427 void UART2_SetAddress(uint8_t UART2_Address);
00428 void UART2_SetGuardTime(uint8_t UART2_GuardTime);
00429 void UART2_SetPrescaler(uint8_t UART2_Prescaler);
00430 FlagStatus UART2_GetFlagStatus(UART2_Flag_TypeDef UART2_FLAG);
00431 void UART2_ClearFlag(UART2_Flag_TypeDef UART2_FLAG);
00432 ITStatus UART2_GetITStatus(UART2_IT_TypeDef UART2_IT);
00433 void UART2_ClearITPendingBit(UART2_IT_TypeDef UART2_IT);
00434 
00435 
00436 /**
00437   * @}
00438   */
00439 
00440 #endif /* __STM8S_UART2_H */
00441 
00442 /**
00443   * @}
00444   */
00445   
00446 
00447 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
STM8 Standard Peripherals Library: Footer

 

 

 

      For complete documentation on STM8 8-bit Microcontrollers platform visit www.st.com