STM8S/A Standard Peripherals Drivers: SPI_Private_Macros

STM8S/A

STM8S/A Standard Peripherals Drivers
SPI_Private_Macros

Macros used by the assert_param function to check the different functions parameters. More...

Defines

#define IS_SPI_BAUDRATE_PRESCALER_OK(PRESCALER)
 Macro used by the assert_param function in order to check the baudrate values.
#define IS_SPI_CLEAR_FLAGS_OK(FLAG)
 Macro used by the assert_param function in order to check the different sensitivity values for the flag that can be cleared by writing 0.
#define IS_SPI_CLEAR_IT_OK(ITPendingBit)
 Macro used by the assert_param function in order to check the different sensitivity values for the pending bit that can be cleared by writing 0.
#define IS_SPI_CONFIG_IT_OK(Interrupt)
 Macro used by the assert_param function in order to check the different sensitivity values for the Interrupts.
#define IS_SPI_CRC_OK(CRC)
 Macro used by the assert_param function in order to check the CRC Transmit/Receive.
#define IS_SPI_CRC_POLYNOMIAL_OK(POLYNOMIAL)   ((POLYNOMIAL) > (uint8_t)0x00)
 Macro used by the assert_param function in order to check the different sensitivity values for the CRC polynomial.
#define IS_SPI_DATA_DIRECTION_OK(MODE)
 Macro used by the assert_param function in order to check the data direction mode values.
#define IS_SPI_DIRECTION_OK(DIRECTION)
 Macro used by the assert_param function in order to check the mode half duplex data direction values.
#define IS_SPI_FIRSTBIT_OK(BIT)
 Macro used by the assert_param function in order to check the first bit to be transmited values.
#define IS_SPI_FLAGS_OK(FLAG)
 Macro used by the assert_param function in order to check the different flags values.
#define IS_SPI_GET_IT_OK(ITPendingBit)
 Macro used by the assert_param function in order to check the different sensitivity values for the pending bit.
#define IS_SPI_MODE_OK(MODE)
 Macro used by the assert_param function in order to check the SPI Mode values.
#define IS_SPI_PHASE_OK(CLKPHA)
 Macro used by the assert_param function in order to check the phase values.
#define IS_SPI_POLARITY_OK(CLKPOL)
 Macro used by the assert_param function in order to check the polarity values.
#define IS_SPI_SLAVEMANAGEMENT_OK(NSS)
 Macro used by the assert_param function in order to check the NSS management values.

Detailed Description

Macros used by the assert_param function to check the different functions parameters.


Define Documentation

#define IS_SPI_BAUDRATE_PRESCALER_OK (   PRESCALER)
Value:
(((PRESCALER) == SPI_BAUDRATEPRESCALER_2) || \
    ((PRESCALER) == SPI_BAUDRATEPRESCALER_4) || \
    ((PRESCALER) == SPI_BAUDRATEPRESCALER_8) || \
    ((PRESCALER) == SPI_BAUDRATEPRESCALER_16) || \
    ((PRESCALER) == SPI_BAUDRATEPRESCALER_32) || \
    ((PRESCALER) == SPI_BAUDRATEPRESCALER_64) || \
    ((PRESCALER) == SPI_BAUDRATEPRESCALER_128) || \
    ((PRESCALER) == SPI_BAUDRATEPRESCALER_256))

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

Definition at line 212 of file stm8s_spi.h.

Referenced by SPI_Init().

#define IS_SPI_CLEAR_FLAGS_OK (   FLAG)
Value:
(((FLAG) == SPI_FLAG_CRCERR) || \
                                     ((FLAG) == SPI_FLAG_WKUP))

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

Definition at line 264 of file stm8s_spi.h.

Referenced by SPI_ClearFlag().

#define IS_SPI_CLEAR_IT_OK (   ITPendingBit)
Value:
(((ITPendingBit) == SPI_IT_CRCERR) || \
    ((ITPendingBit) == SPI_IT_WKUP))

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

Definition at line 292 of file stm8s_spi.h.

Referenced by SPI_ClearITPendingBit().

#define IS_SPI_CONFIG_IT_OK (   Interrupt)
Value:
(((Interrupt) == SPI_IT_TXE)  || \
                                        ((Interrupt) == SPI_IT_RXNE)  || \
                                        ((Interrupt) == SPI_IT_ERR) || \
                                        ((Interrupt) == SPI_IT_WKUP))

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

Definition at line 271 of file stm8s_spi.h.

Referenced by SPI_ITConfig().

#define IS_SPI_CRC_OK (   CRC)
Value:
(((CRC) == SPI_CRC_TX) || \
                            ((CRC) == SPI_CRC_RX))

Macro used by the assert_param function in order to check the CRC Transmit/Receive.

Definition at line 244 of file stm8s_spi.h.

Referenced by SPI_GetCRC().

#define IS_SPI_CRC_POLYNOMIAL_OK (   POLYNOMIAL)    ((POLYNOMIAL) > (uint8_t)0x00)

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

Definition at line 201 of file stm8s_spi.h.

Referenced by SPI_Init().

#define IS_SPI_DATA_DIRECTION_OK (   MODE)
Value:

Macro used by the assert_param function in order to check the data direction mode values.

Definition at line 177 of file stm8s_spi.h.

Referenced by SPI_Init().

#define IS_SPI_DIRECTION_OK (   DIRECTION)
Value:
(((DIRECTION) == SPI_DIRECTION_RX) || \
                                        ((DIRECTION) == SPI_DIRECTION_TX))

Macro used by the assert_param function in order to check the mode half duplex data direction values.

Definition at line 186 of file stm8s_spi.h.

Referenced by SPI_BiDirectionalLineConfig().

#define IS_SPI_FIRSTBIT_OK (   BIT)
Value:
(((BIT) == SPI_FIRSTBIT_MSB) || \
                                 ((BIT) == SPI_FIRSTBIT_LSB))

Macro used by the assert_param function in order to check the first bit to be transmited values.

Definition at line 237 of file stm8s_spi.h.

Referenced by SPI_Init().

#define IS_SPI_FLAGS_OK (   FLAG)
Value:
(((FLAG) == SPI_FLAG_OVR) || \
                               ((FLAG) == SPI_FLAG_MODF) || \
                               ((FLAG) == SPI_FLAG_CRCERR) || \
                               ((FLAG) == SPI_FLAG_WKUP) || \
                               ((FLAG) == SPI_FLAG_TXE) || \
                               ((FLAG) == SPI_FLAG_RXNE) || \
                               ((FLAG) == SPI_FLAG_BSY))

Macro used by the assert_param function in order to check the different flags values.

Definition at line 251 of file stm8s_spi.h.

Referenced by SPI_GetFlagStatus().

#define IS_SPI_GET_IT_OK (   ITPendingBit)
Value:
(((ITPendingBit) == SPI_IT_OVR)  || \
                                        ((ITPendingBit) == SPI_IT_MODF) || \
                                        ((ITPendingBit) == SPI_IT_CRCERR) || \
                                        ((ITPendingBit) == SPI_IT_WKUP) || \
                                        ((ITPendingBit) == SPI_IT_TXE)  || \
                                        ((ITPendingBit) == SPI_IT_RXNE))

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

Definition at line 280 of file stm8s_spi.h.

Referenced by SPI_GetITStatus().

#define IS_SPI_MODE_OK (   MODE)
Value:
(((MODE) == SPI_MODE_MASTER) || \
                              ((MODE) == SPI_MODE_SLAVE))

Macro used by the assert_param function in order to check the SPI Mode values.

Definition at line 206 of file stm8s_spi.h.

Referenced by SPI_Init().

#define IS_SPI_PHASE_OK (   CLKPHA)
Value:
(((CLKPHA) == SPI_CLOCKPHASE_1EDGE) || \
                                 ((CLKPHA) == SPI_CLOCKPHASE_2EDGE))

Macro used by the assert_param function in order to check the phase values.

Definition at line 230 of file stm8s_spi.h.

Referenced by SPI_Init().

#define IS_SPI_POLARITY_OK (   CLKPOL)
Value:
(((CLKPOL) == SPI_CLOCKPOLARITY_LOW) || \
                                    ((CLKPOL) == SPI_CLOCKPOLARITY_HIGH))

Macro used by the assert_param function in order to check the polarity values.

Definition at line 224 of file stm8s_spi.h.

Referenced by SPI_Init().

#define IS_SPI_SLAVEMANAGEMENT_OK (   NSS)
Value:
(((NSS) == SPI_NSS_SOFT) || \
                                        ((NSS) == SPI_NSS_HARD))

Macro used by the assert_param function in order to check the NSS management values.

Definition at line 193 of file stm8s_spi.h.

Referenced by SPI_Init().

STM8 Standard Peripherals Library: Footer

 

 

 

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