STM8L15x Standard Peripherals Drivers: SPI_Exported_Macros

STM8L15x/16x Standard Peripherals Drivers

STM8L15x Standard Peripherals Drivers

SPI_Exported_Macros

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

Defines

#define IS_SPI_BAUDRATE_PRESCALER(Prescaler)
 Macro used by the assert_param function in order to check the baudrate values.
#define IS_SPI_CLEAR_FLAG(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(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(Interrupt)
 Macro used by the assert_param function in order to check the different sensitivity values for the Interrupts.
#define IS_SPI_CRC(CRC)
 Macro used by the assert_param function in order to check the CRC Transmit/Receive.
#define IS_SPI_CRC_POLYNOMIAL(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(Mode)
 Macro used by the assert_param function in order to check the data direction mode values.
#define IS_SPI_DIRECTION(Direction)
 Macro used by the assert_param function in order to check the mode half duplex data direction values.
#define IS_SPI_DMAREQ(DMAREQ)   ((((DMAREQ) & (uint16_t)0xFC) == 0x00) && ((DMAREQ) != 0x00))
 Macro used by the assert_param function in order to check the DMA transfer requests.
#define IS_SPI_FIRSTBIT(Bit)
 Macro used by the assert_param function in order to check the first bit to be transmitted values.
#define IS_SPI_FLAG(Flag)
 Macro used by the assert_param function in order to check the different flags values.
#define IS_SPI_GET_IT(ITPendingBit)
 Macro used by the assert_param function in order to check the different sensitivity values for the pending bit.
#define IS_SPI_MODE(Mode)
 Macro used by the assert_param function in order to check the SPI Mode values.
#define IS_SPI_PHASE(ClkPha)
 Macro used by the assert_param function in order to check the phase values.
#define IS_SPI_POLARITY(ClkPol)
 Macro used by the assert_param function in order to check the polarity values.
#define IS_SPI_SLAVEMANAGEMENT(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 (   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 266 of file stm8l15x_spi.h.

Referenced by SPI_Init().

#define IS_SPI_CLEAR_FLAG (   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 320 of file stm8l15x_spi.h.

Referenced by SPI_ClearFlag().

#define IS_SPI_CLEAR_IT (   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 347 of file stm8l15x_spi.h.

Referenced by SPI_ClearITPendingBit().

#define IS_SPI_CONFIG_IT (   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 327 of file stm8l15x_spi.h.

Referenced by SPI_ITConfig().

#define IS_SPI_CRC (   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 297 of file stm8l15x_spi.h.

Referenced by SPI_GetCRC().

#define IS_SPI_CRC_POLYNOMIAL (   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 255 of file stm8l15x_spi.h.

Referenced by SPI_Init().

#define IS_SPI_DATA_DIRECTION (   Mode)
Value:
(((Mode) == SPI_Direction_2Lines_FullDuplex) || \
                                     ((Mode) == SPI_Direction_2Lines_RxOnly) || \
                                     ((Mode) == SPI_Direction_1Line_Rx) || \
                                     ((Mode) == SPI_Direction_1Line_Tx))

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

Definition at line 233 of file stm8l15x_spi.h.

Referenced by SPI_Init().

#define IS_SPI_DIRECTION (   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 241 of file stm8l15x_spi.h.

Referenced by SPI_BiDirectionalLineConfig().

#define IS_SPI_DMAREQ (   DMAREQ)    ((((DMAREQ) & (uint16_t)0xFC) == 0x00) && ((DMAREQ) != 0x00))

Macro used by the assert_param function in order to check the DMA transfer requests.

Definition at line 303 of file stm8l15x_spi.h.

Referenced by SPI_DMACmd().

#define IS_SPI_FIRSTBIT (   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 transmitted values.

Definition at line 291 of file stm8l15x_spi.h.

Referenced by SPI_Init().

#define IS_SPI_FLAG (   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 308 of file stm8l15x_spi.h.

Referenced by SPI_GetFlagStatus().

#define IS_SPI_GET_IT (   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 336 of file stm8l15x_spi.h.

Referenced by SPI_GetITStatus().

#define IS_SPI_MODE (   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 260 of file stm8l15x_spi.h.

Referenced by SPI_Init().

#define IS_SPI_PHASE (   ClkPha)
Value:
(((ClkPha) == SPI_CPHA_1Edge) || \
                              ((ClkPha) == SPI_CPHA_2Edge))

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

Definition at line 284 of file stm8l15x_spi.h.

Referenced by SPI_Init().

#define IS_SPI_POLARITY (   ClkPol)
Value:
(((ClkPol) == SPI_CPOL_Low) || \
                                 ((ClkPol) == SPI_CPOL_High))

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

Definition at line 278 of file stm8l15x_spi.h.

Referenced by SPI_Init().

#define IS_SPI_SLAVEMANAGEMENT (   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 247 of file stm8l15x_spi.h.

Referenced by SPI_Init().

STM8S Firmware Library: Overview

 

 

 

For complete documentation on STM8L15x 8-bit microcontrollers platform visit www.st.com