STM8S/A Standard Peripherals Firmware Library: UART2_Private_Macros

STM8S/A

STM8S/A Standard Peripherals Firmware Library
UART2_Private_Macros

Defines

#define IS_UART2_ADDRESS_OK(node)   ((node) < UART2_ADDRESS_MAX )
#define IS_UART2_AUTOSYNC_OK(AutosyncMode)
 Macro used by the assert_param function in order to check the LIN automatic resynchronization mode.
#define IS_UART2_BAUDRATE_OK(NUM)   ((NUM) <= (uint32_t)625000)
 Macro used by the assert_param function in order to check the maximum baudrate value.
#define IS_UART2_CLEAR_FLAG_OK(Flag)
 Macro used by the assert_param function in order to check the different sensitivity values for the FLAGs that can be cleared by writing 0.
#define IS_UART2_CLEAR_IT_OK(ITPendingBit)
 Macro used by the assert function in order to check the different sensitivity values for the pending bit that can be cleared by writing 0.
#define IS_UART2_CONFIG_IT_OK(Interrupt)
 Macro used by the assert_param function in order to check the different sensitivity values for the Interrupts.
#define IS_UART2_DIVUP_OK(DivupMethode)
 Macro used by the assert_param function in order to check the LIN divider update method.
#define IS_UART2_FLAG_OK(Flag)
 Macro used by the assert_param function in order to check the different sensitivity values for the FLAGs.
#define IS_UART2_GET_IT_OK(ITPendingBit)
 Macro used by the assert function in order to check the different sensitivity values for the pending bit.
#define IS_UART2_IRDAMODE_OK(IrDAMode)
 Macro used by the assert_param function in order to check the different sensitivity values for the IrDAModes.
#define IS_UART2_LINBREAKDETECTIONLENGTH_OK(LINBreakDetectionLength)
 Macro used by the assert_param function in order to check the different sensitivity values for the LINBreakDetectionLengths.
#define IS_UART2_MODE_OK(Mode)
 Macro used by the assert function to check the different functions parameters.
#define IS_UART2_PARITY_OK(Parity)
 Macro used by the assert_param function in order to check the different sensitivity values for the Paritys.
#define IS_UART2_SLAVE_OK(Mode)
 Macro used by the assert_param function in order to check the LIN mode.
#define IS_UART2_STOPBITS_OK(StopBit)
 Macro used by the assert_param function in order to check the different sensitivity values for the UART2_StopBits.
#define IS_UART2_SYNCMODE_OK(SyncMode)
 Macro used by the assert_param function in order to check the different sensitivity values for the SyncModes; it should exclude values such as UART2_CLOCK_ENABLE|UART2_CLOCK_DISABLE.
#define IS_UART2_WAKEUP_OK(WakeUp)
 Macro used by the assert_param function in order to check the different sensitivity values for the WakeUps.
#define IS_UART2_WORDLENGTH_OK(WordLength)
 Macro used by the assert_param function in order to check the different sensitivity values for the WordLengths.
#define UART2_ADDRESS_MAX   ((uint8_t)16)
 Macro used by the assert_param function in order to check the address of the UART2 or UART node.

Define Documentation

#define IS_UART2_ADDRESS_OK (   node)    ((node) < UART2_ADDRESS_MAX )

Definition at line 369 of file stm8s_uart2.h.

Referenced by UART2_SetAddress().

#define IS_UART2_AUTOSYNC_OK (   AutosyncMode)
Value:
(((AutosyncMode) ==  UART2_LIN_AUTOSYNC_ENABLE) || \
   ((AutosyncMode) == UART2_LIN_AUTOSYNC_DISABLE))

Macro used by the assert_param function in order to check the LIN automatic resynchronization mode.

Definition at line 382 of file stm8s_uart2.h.

Referenced by UART2_LINConfig().

#define IS_UART2_BAUDRATE_OK (   NUM)    ((NUM) <= (uint32_t)625000)

Macro used by the assert_param function in order to check the maximum baudrate value.

Definition at line 361 of file stm8s_uart2.h.

Referenced by UART2_Init().

#define IS_UART2_CLEAR_FLAG_OK (   Flag)
Value:
(((Flag) == UART2_FLAG_RXNE) || \
   ((Flag) == UART2_FLAG_LHDF) || \
   ((Flag) == UART2_FLAG_LSF) || \
   ((Flag) == UART2_FLAG_LBDF))

Macro used by the assert_param function in order to check the different sensitivity values for the FLAGs that can be cleared by writing 0.

Definition at line 272 of file stm8s_uart2.h.

Referenced by UART2_ClearFlag().

#define IS_UART2_CLEAR_IT_OK (   ITPendingBit)
Value:
(((ITPendingBit) == UART2_IT_RXNE) || \
   ((ITPendingBit) == UART2_IT_LHDF) || \
   ((ITPendingBit) == UART2_IT_LBDF))

Macro used by the assert function in order to check the different sensitivity values for the pending bit that can be cleared by writing 0.

Definition at line 310 of file stm8s_uart2.h.

Referenced by UART2_ClearITPendingBit().

#define IS_UART2_CONFIG_IT_OK (   Interrupt)
Value:
(((Interrupt) == UART2_IT_PE) || \
   ((Interrupt) == UART2_IT_TXE) || \
   ((Interrupt) == UART2_IT_TC) || \
   ((Interrupt) == UART2_IT_RXNE_OR ) || \
   ((Interrupt) == UART2_IT_IDLE) || \
   ((Interrupt) == UART2_IT_LHDF) || \
   ((Interrupt) == UART2_IT_LBDF))

Macro used by the assert_param function in order to check the different sensitivity values for the Interrupts.

Definition at line 283 of file stm8s_uart2.h.

Referenced by UART2_ITConfig().

#define IS_UART2_DIVUP_OK (   DivupMethode)
Value:
(((DivupMethode) == UART2_LIN_DIVUP_LBRR1) || \
   ((DivupMethode) == UART2_LIN_DIVUP_NEXTRXNE))

Macro used by the assert_param function in order to check the LIN divider update method.

Definition at line 389 of file stm8s_uart2.h.

Referenced by UART2_LINConfig().

#define IS_UART2_FLAG_OK (   Flag)
Value:
(((Flag) == UART2_FLAG_TXE) || \
   ((Flag) == UART2_FLAG_TC)  || \
   ((Flag) == UART2_FLAG_RXNE) || \
   ((Flag) == UART2_FLAG_IDLE) || \
   ((Flag) == UART2_FLAG_OR_LHE) || \
   ((Flag) == UART2_FLAG_NF) || \
   ((Flag) == UART2_FLAG_FE) || \
   ((Flag) == UART2_FLAG_PE) || \
   ((Flag) == UART2_FLAG_SBK) || \
   ((Flag) == UART2_FLAG_LSF) || \
   ((Flag) == UART2_FLAG_LHDF) || \
   ((Flag) == UART2_FLAG_LBDF))

Macro used by the assert_param function in order to check the different sensitivity values for the FLAGs.

Definition at line 253 of file stm8s_uart2.h.

Referenced by UART2_GetFlagStatus().

#define IS_UART2_GET_IT_OK (   ITPendingBit)
Value:
(((ITPendingBit) == UART2_IT_TXE)  || \
   ((ITPendingBit) == UART2_IT_TC)   || \
   ((ITPendingBit) == UART2_IT_RXNE) || \
   ((ITPendingBit) == UART2_IT_IDLE) || \
   ((ITPendingBit) == UART2_IT_OR)  || \
   ((ITPendingBit) == UART2_IT_LBDF)  || \
   ((ITPendingBit) == UART2_IT_LHDF)  || \
   ((ITPendingBit) == UART2_IT_PE))

Macro used by the assert function in order to check the different sensitivity values for the pending bit.

Definition at line 296 of file stm8s_uart2.h.

Referenced by UART2_GetITStatus().

#define IS_UART2_IRDAMODE_OK (   IrDAMode)
Value:
(((IrDAMode) == UART2_IRDAMODE_LOWPOWER) || \
   ((IrDAMode) == UART2_IRDAMODE_NORMAL))

Macro used by the assert_param function in order to check the different sensitivity values for the IrDAModes.

Definition at line 320 of file stm8s_uart2.h.

Referenced by UART2_IrDAConfig().

#define IS_UART2_LINBREAKDETECTIONLENGTH_OK (   LINBreakDetectionLength)
Value:
(((LINBreakDetectionLength) == UART2_LINBREAKDETECTIONLENGTH_10BITS) || \
   ((LINBreakDetectionLength) == UART2_LINBREAKDETECTIONLENGTH_11BITS))

Macro used by the assert_param function in order to check the different sensitivity values for the LINBreakDetectionLengths.

Definition at line 336 of file stm8s_uart2.h.

Referenced by UART2_LINBreakDetectionConfig().

#define IS_UART2_MODE_OK (   Mode)
Value:
(((Mode) == (uint8_t)UART2_MODE_RX_ENABLE) || \
   ((Mode) == (uint8_t)UART2_MODE_RX_DISABLE) || \
   ((Mode) == (uint8_t)UART2_MODE_TX_ENABLE) || \
   ((Mode) == (uint8_t)UART2_MODE_TX_DISABLE) || \
   ((Mode) == (uint8_t)UART2_MODE_TXRX_ENABLE) || \
   ((Mode) == (uint8_t)((uint8_t)UART2_MODE_TX_ENABLE|(uint8_t)UART2_MODE_RX_ENABLE)) || \
   ((Mode) == (uint8_t)((uint8_t)UART2_MODE_TX_ENABLE|(uint8_t)UART2_MODE_RX_DISABLE)) || \
   ((Mode) == (uint8_t)((uint8_t)UART2_MODE_TX_DISABLE|(uint8_t)UART2_MODE_RX_DISABLE)) || \
   ((Mode) == (uint8_t)((uint8_t)UART2_MODE_TX_DISABLE|(uint8_t)UART2_MODE_RX_ENABLE)))

Macro used by the assert function to check the different functions parameters.

Macro used by the assert_param function in order to check the different sensitivity values for the MODEs possible combination should be one of the following.

Definition at line 219 of file stm8s_uart2.h.

Referenced by UART2_Init().

#define IS_UART2_PARITY_OK (   Parity)
Value:
(((Parity) == UART2_PARITY_NO) || \
                                    ((Parity) == UART2_PARITY_EVEN) || \
                                    ((Parity) == UART2_PARITY_ODD ))

Macro used by the assert_param function in order to check the different sensitivity values for the Paritys.

Definition at line 353 of file stm8s_uart2.h.

Referenced by UART2_Init().

#define IS_UART2_SLAVE_OK (   Mode)
Value:
(((Mode) == UART2_LIN_MODE_MASTER) || \
   ((Mode) == UART2_LIN_MODE_SLAVE))

Macro used by the assert_param function in order to check the LIN mode.

Definition at line 374 of file stm8s_uart2.h.

Referenced by UART2_LINConfig().

#define IS_UART2_STOPBITS_OK (   StopBit)
Value:
(((StopBit) == UART2_STOPBITS_1) || \
                                       ((StopBit) == UART2_STOPBITS_0_5) || \
                                       ((StopBit) == UART2_STOPBITS_2) || \
                                       ((StopBit) == UART2_STOPBITS_1_5 ))

Macro used by the assert_param function in order to check the different sensitivity values for the UART2_StopBits.

Definition at line 344 of file stm8s_uart2.h.

Referenced by UART2_Init().

#define IS_UART2_SYNCMODE_OK (   SyncMode)
Value:
(!((((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))) || \
     (((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))) || \
     (((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))) || \
     (((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)))))

Macro used by the assert_param function in order to check the different sensitivity values for the SyncModes; it should exclude values such as UART2_CLOCK_ENABLE|UART2_CLOCK_DISABLE.

Definition at line 243 of file stm8s_uart2.h.

Referenced by UART2_Init().

#define IS_UART2_WAKEUP_OK (   WakeUp)
Value:
(((WakeUp) == UART2_WAKEUP_IDLELINE) || \
   ((WakeUp) == UART2_WAKEUP_ADDRESSMARK))

Macro used by the assert_param function in order to check the different sensitivity values for the WakeUps.

Definition at line 328 of file stm8s_uart2.h.

Referenced by UART2_WakeUpConfig().

#define IS_UART2_WORDLENGTH_OK (   WordLength)
Value:
(((WordLength) == UART2_WORDLENGTH_8D) || \
   ((WordLength) == UART2_WORDLENGTH_9D))

Macro used by the assert_param function in order to check the different sensitivity values for the WordLengths.

Definition at line 234 of file stm8s_uart2.h.

Referenced by UART2_Init().

#define UART2_ADDRESS_MAX   ((uint8_t)16)

Macro used by the assert_param function in order to check the address of the UART2 or UART node.

Definition at line 368 of file stm8s_uart2.h.

STM8 Standard Peripherals Library: Footer

 

 

 

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