STM8S/A Standard Peripherals Drivers: UART1_Private_Macros

STM8S/A Standard Peripherals Library

STM8S/A Standard Peripherals Drivers
UART1_Private_Macros

Defines

#define IS_UART1_ADDRESS_OK(node)   ((node) < UART1_ADDRESS_MAX )
#define IS_UART1_BAUDRATE_OK(NUM)   ((NUM) <= (uint32_t)625000)
 Macro used by the assert_param function in order to check the maximum baudrate value.
#define IS_UART1_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_UART1_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_UART1_CONFIG_IT_OK(Interrupt)
 Macro used by the assert_param function in order to check the different sensitivity values for the Interrupts.
#define IS_UART1_FLAG_OK(Flag)
 Macro used by the assert_param function in order to check the different sensitivity values for the FLAGs.
#define IS_UART1_GET_IT_OK(ITPendingBit)
 Macro used by the assert function in order to check the different sensitivity values for the pending bit.
#define IS_UART1_IRDAMODE_OK(IrDAMode)
 Macro used by the assert_param function in order to check the different sensitivity values for the IrDAModes.
#define IS_UART1_LINBREAKDETECTIONLENGTH_OK(LINBreakDetectionLength)
 Macro used by the assert_param function in order to check the different sensitivity values for the LINBreakDetectionLengths.
#define IS_UART1_MODE_OK(Mode)
 Macro used by the assert function to check the different functions parameters.
#define IS_UART1_PARITY_OK(Parity)
 Macro used by the assert_param function in order to check the different sensitivity values for the Paritys.
#define IS_UART1_STOPBITS_OK(StopBit)
 Macro used by the assert_param function in order to check the different sensitivity values for the UART1_StopBits.
#define IS_UART1_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 UART1_CLOCK_ENABLE|UART1_CLOCK_DISABLE.
#define IS_UART1_WAKEUP_OK(WakeUp)
 Macro used by the assert_param function in order to check the different sensitivity values for the WakeUps.
#define IS_UART1_WORDLENGTH_OK(WordLength)
 Macro used by the assert_param function in order to check the different sensitivity values for the WordLengths.
#define UART1_ADDRESS_MAX   ((uint8_t)16)
 Macro used by the assert_param function in order to check the address of the UART1 or UART node.

Define Documentation

#define IS_UART1_ADDRESS_OK (   node)    ((node) < UART1_ADDRESS_MAX )

Definition at line 333 of file stm8s_uart1.h.

Referenced by UART1_SetAddress().

#define IS_UART1_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 325 of file stm8s_uart1.h.

Referenced by UART1_Init().

#define IS_UART1_CLEAR_FLAG_OK (   Flag)
Value:
(((Flag) == UART1_FLAG_RXNE) || \
   ((Flag) == UART1_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 239 of file stm8s_uart1.h.

Referenced by UART1_ClearFlag().

#define IS_UART1_CLEAR_IT_OK (   ITPendingBit)
Value:
(((ITPendingBit) == UART1_IT_RXNE) || \
   ((ITPendingBit) == UART1_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 275 of file stm8s_uart1.h.

Referenced by UART1_ClearITPendingBit().

#define IS_UART1_CONFIG_IT_OK (   Interrupt)
Value:
(((Interrupt) == UART1_IT_PE) || \
   ((Interrupt) == UART1_IT_TXE) || \
   ((Interrupt) == UART1_IT_TC) || \
   ((Interrupt) == UART1_IT_RXNE_OR ) || \
   ((Interrupt) == UART1_IT_IDLE) || \
   ((Interrupt) == UART1_IT_LBDF))

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

Definition at line 250 of file stm8s_uart1.h.

Referenced by UART1_ITConfig().

#define IS_UART1_FLAG_OK (   Flag)
Value:
(((Flag) == UART1_FLAG_TXE) || \
   ((Flag) == UART1_FLAG_TC)  || \
   ((Flag) == UART1_FLAG_RXNE) || \
   ((Flag) == UART1_FLAG_IDLE) || \
   ((Flag) == UART1_FLAG_OR) || \
   ((Flag) == UART1_FLAG_NF) || \
   ((Flag) == UART1_FLAG_FE) || \
   ((Flag) == UART1_FLAG_PE) || \
   ((Flag) == UART1_FLAG_SBK) || \
   ((Flag) == UART1_FLAG_LBDF))

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

Definition at line 224 of file stm8s_uart1.h.

Referenced by UART1_GetFlagStatus().

#define IS_UART1_GET_IT_OK (   ITPendingBit)
Value:
(((ITPendingBit) == UART1_IT_TXE)  || \
   ((ITPendingBit) == UART1_IT_TC)   || \
   ((ITPendingBit) == UART1_IT_RXNE) || \
   ((ITPendingBit) == UART1_IT_IDLE) || \
   ((ITPendingBit) == UART1_IT_OR)  || \
   ((ITPendingBit) == UART1_IT_LBDF)  || \
   ((ITPendingBit) == UART1_IT_PE))

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

Definition at line 262 of file stm8s_uart1.h.

Referenced by UART1_GetITStatus().

#define IS_UART1_IRDAMODE_OK (   IrDAMode)
Value:
(((IrDAMode) == UART1_IRDAMODE_LOWPOWER) || \
   ((IrDAMode) == UART1_IRDAMODE_NORMAL))

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

Definition at line 284 of file stm8s_uart1.h.

Referenced by UART1_IrDAConfig().

#define IS_UART1_LINBREAKDETECTIONLENGTH_OK (   LINBreakDetectionLength)
Value:
(((LINBreakDetectionLength) == UART1_LINBREAKDETECTIONLENGTH_10BITS) || \
   ((LINBreakDetectionLength) == UART1_LINBREAKDETECTIONLENGTH_11BITS))

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

Definition at line 300 of file stm8s_uart1.h.

Referenced by UART1_LINBreakDetectionConfig().

#define IS_UART1_MODE_OK (   Mode)
Value:
(((Mode) == (uint8_t)UART1_MODE_RX_ENABLE) || \
   ((Mode) == (uint8_t)UART1_MODE_RX_DISABLE) || \
   ((Mode) == (uint8_t)UART1_MODE_TX_ENABLE) || \
   ((Mode) == (uint8_t)UART1_MODE_TX_DISABLE) || \
   ((Mode) == (uint8_t)UART1_MODE_TXRX_ENABLE) || \
   ((Mode) == (uint8_t)((uint8_t)UART1_MODE_TX_ENABLE|(uint8_t)UART1_MODE_RX_ENABLE)) || \
   ((Mode) == (uint8_t)((uint8_t)UART1_MODE_TX_ENABLE|(uint8_t)UART1_MODE_RX_DISABLE)) || \
   ((Mode) == (uint8_t)((uint8_t)UART1_MODE_TX_DISABLE|(uint8_t)UART1_MODE_RX_DISABLE)) || \
   ((Mode) == (uint8_t)((uint8_t)UART1_MODE_TX_DISABLE|(uint8_t)UART1_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 190 of file stm8s_uart1.h.

Referenced by UART1_Init().

#define IS_UART1_PARITY_OK (   Parity)
Value:
(((Parity) == UART1_PARITY_NO) || \
                                    ((Parity) == UART1_PARITY_EVEN) || \
                                    ((Parity) == UART1_PARITY_ODD ))

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

Definition at line 317 of file stm8s_uart1.h.

Referenced by UART1_Init().

#define IS_UART1_STOPBITS_OK (   StopBit)
Value:
(((StopBit) == UART1_STOPBITS_1) || \
                                       ((StopBit) == UART1_STOPBITS_0_5) || \
                                       ((StopBit) == UART1_STOPBITS_2) || \
                                       ((StopBit) == UART1_STOPBITS_1_5 ))

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

Definition at line 308 of file stm8s_uart1.h.

Referenced by UART1_Init().

#define IS_UART1_SYNCMODE_OK (   SyncMode)
Value:
(!((((SyncMode)&(((uint8_t)UART1_SYNCMODE_CLOCK_ENABLE)|((uint8_t)UART1_SYNCMODE_CLOCK_DISABLE))) == (((uint8_t)UART1_SYNCMODE_CLOCK_ENABLE)|((uint8_t)UART1_SYNCMODE_CLOCK_DISABLE))) \
    || (((SyncMode)&(((uint8_t)UART1_SYNCMODE_CPOL_LOW )|((uint8_t)UART1_SYNCMODE_CPOL_HIGH))) == (((uint8_t)UART1_SYNCMODE_CPOL_LOW )|((uint8_t)UART1_SYNCMODE_CPOL_HIGH))) \
    ||(((SyncMode)&(((uint8_t)UART1_SYNCMODE_CPHA_MIDDLE)|((uint8_t)UART1_SYNCMODE_CPHA_BEGINING))) ==  (((uint8_t)UART1_SYNCMODE_CPHA_MIDDLE)|((uint8_t)UART1_SYNCMODE_CPHA_BEGINING))) \
    || (((SyncMode)&(((uint8_t)UART1_SYNCMODE_LASTBIT_DISABLE)|((uint8_t)UART1_SYNCMODE_LASTBIT_ENABLE))) == (((uint8_t)UART1_SYNCMODE_LASTBIT_DISABLE)|((uint8_t)UART1_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 UART1_CLOCK_ENABLE|UART1_CLOCK_DISABLE.

Definition at line 214 of file stm8s_uart1.h.

Referenced by UART1_Init().

#define IS_UART1_WAKEUP_OK (   WakeUp)
Value:
(((WakeUp) == UART1_WAKEUP_IDLELINE) || \
   ((WakeUp) == UART1_WAKEUP_ADDRESSMARK))

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

Definition at line 292 of file stm8s_uart1.h.

Referenced by UART1_WakeUpConfig().

#define IS_UART1_WORDLENGTH_OK (   WordLength)
Value:
(((WordLength) == UART1_WORDLENGTH_8D) || \
   ((WordLength) == UART1_WORDLENGTH_9D))

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

Definition at line 205 of file stm8s_uart1.h.

Referenced by UART1_Init().

#define UART1_ADDRESS_MAX   ((uint8_t)16)

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

Definition at line 332 of file stm8s_uart1.h.

STM8 Standard Peripherals Library: Footer

 

 

 

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