Macros
SPI Private Macros
Peripheral Driver » HAL Driver » SPI » CS Signal Description » Defines

## Macros
#define | IS_SPI_DIRECTION(__MODE__)
| Check if SPI Direction Mode is valid. More...
#define | IS_SPI_DATASIZE(__DATASIZE__)
| Check if SPI Data Size is valid. More...
#define | IS_SPI_CPOL(__CPOL__)
| Check if SPI Clock Polarity is valid. More...
#define | IS_SPI_CPHA(__CPHA__)
| Check if SPI Clock Phase is valid. More...
#define | IS_SPI_BAUDRATE_PRESCALER(__PRESCALER__) ((__PRESCALER__) <= 0xFFFF)
| Check if SPI BaudRate Prescaler is valid. More...
#define | IS_SPI_TIMODE(__MODE__)
| Check if SPI TI Mode is valid. More...
#define | IS_SPI_SLAVE(__SLAVE__)
| Check if SPI Slave Select is valid. More...
#define | IS_SPI_RX_SAMPLE_DLY(__DLY__) (((__DLY__) >= 0) && ((__DLY__) <= 7))
| Check if SPI RX Sample Delay Value is valid. More...
#define | IS_SPI_FIFO_THRESHOLD(__THR__) (((__THR__) >= 0) && ((__THR__) <= (LL_SPI_M_FIFO_DEPTH - 1)))
| Check if SPI FIFO Threshold is valid. More...

## Detailed Description

## Macro Definition Documentation

## ◆ IS_SPI_BAUDRATE_PRESCALER

#define IS_SPI_BAUDRATE_PRESCALER | ( |  | __PRESCALER__ | ) | ((__PRESCALER__) <= 0xFFFF)

Check if SPI BaudRate Prescaler is valid.

Parameters

  __PRESCALER__ | SPI BaudRate Prescaler.

Return values

  SET | (__PRESCALER__ is valid) or RESET (__PRESCALER__ is invalid)

Definition at line 581 of file hal_spi.h.

## ◆ IS_SPI_CPHA

#define IS_SPI_CPHA | ( |  | __CPHA__ | ) |

Value:
(((__CPHA__) == SPI_PHASE_1EDGE) || \
((__CPHA__) == SPI_PHASE_2EDGE))

Check if SPI Clock Phase is valid.

Parameters

  __CPHA__ | SPI Clock Phase.

Return values

  SET | (__CPHA__ is valid) or RESET (__CPHA__ is invalid)

Definition at line 574 of file hal_spi.h.

## ◆ IS_SPI_CPOL

#define IS_SPI_CPOL | ( |  | __CPOL__ | ) |

Value:
(((__CPOL__) == SPI_POLARITY_LOW) || \
((__CPOL__) == SPI_POLARITY_HIGH))

Check if SPI Clock Polarity is valid.

Parameters

  __CPOL__ | SPI Clock Polarity.

Return values

  SET | (__CPOL__ is valid) or RESET (__CPOL__ is invalid)

Definition at line 567 of file hal_spi.h.

## ◆ IS_SPI_DATASIZE

#define IS_SPI_DATASIZE | ( |  | __DATASIZE__ | ) |

Value:
(((__DATASIZE__) >= SPI_DATASIZE_4BIT) && \
((__DATASIZE__) <= SPI_DATASIZE_32BIT))

Check if SPI Data Size is valid.

Parameters

  __DATASIZE__ | SPI Data Size.

Return values

  SET | (__DATASIZE__ is valid) or RESET (__DATASIZE__ is invalid)

Definition at line 560 of file hal_spi.h.

## ◆ IS_SPI_DIRECTION

#define IS_SPI_DIRECTION | ( |  | __MODE__ | ) |

Value:
(((__MODE__) == SPI_DIRECTION_FULL_DUPLEX) || \
((__MODE__) == SPI_DIRECTION_SIMPLEX_TX) || \
((__MODE__) == SPI_DIRECTION_SIMPLEX_RX) || \
((__MODE__) == SPI_DIRECTION_READ_EEPROM))

Check if SPI Direction Mode is valid.

Parameters

  __MODE__ | SPI Direction Mode.

Return values

  SET | (__MODE__ is valid) or RESET (__MODE__ is invalid)

Definition at line 550 of file hal_spi.h.

## ◆ IS_SPI_FIFO_THRESHOLD

#define IS_SPI_FIFO_THRESHOLD | ( |  | __THR__ | ) | (((__THR__) >= 0) && ((__THR__) <= (LL_SPI_M_FIFO_DEPTH - 1)))

Check if SPI FIFO Threshold is valid.

Parameters

  __THR__ | SPI FIFO Threshold.

Return values

  SET | (__THR__ is valid) or RESET (__THR__ is invalid)

Definition at line 610 of file hal_spi.h.

## ◆ IS_SPI_RX_SAMPLE_DLY

#define IS_SPI_RX_SAMPLE_DLY | ( |  | __DLY__ | ) | (((__DLY__) >= 0) && ((__DLY__) <= 7))

Check if SPI RX Sample Delay Value is valid.

Parameters

  __DLY__ | SPI RX Sample Delay value.

Return values

  SET | (__DLY__ is valid) or RESET (__DLY__ is invalid)

Definition at line 602 of file hal_spi.h.

## ◆ IS_SPI_SLAVE

#define IS_SPI_SLAVE | ( |  | __SLAVE__ | ) |

Value:
(((__SLAVE__) == SPI_SLAVE_SELECT_0) || \
((__SLAVE__) == SPI_SLAVE_SELECT_1) || \
((__SLAVE__) == SPI_SLAVE_SELECT_ALL))

Check if SPI Slave Select is valid.

Parameters

  __SLAVE__ | SPI Slave Select.

Return values

  SET | (__SLAVE__ is valid) or RESET (__SLAVE__ is invalid)

Definition at line 594 of file hal_spi.h.

## ◆ IS_SPI_TIMODE

#define IS_SPI_TIMODE | ( |  | __MODE__ | ) |

Value:
(((__MODE__) == SPI_TIMODE_DISABLE) || \
((__MODE__) == SPI_TIMODE_ENABLE))

Check if SPI TI Mode is valid.

Parameters

  __MODE__ | SPI TI Mode.

Return values

  SET | (__MODE__ is valid) or RESET (__MODE__ is invalid)

Definition at line 587 of file hal_spi.h.

SPI_DIRECTION_SIMPLEX_TX
#define SPI_DIRECTION_SIMPLEX_TX
Definition: hal_spi.h:277
SPI_POLARITY_HIGH
#define SPI_POLARITY_HIGH
Definition: hal_spi.h:334
SPI_SLAVE_SELECT_1
#define SPI_SLAVE_SELECT_1
Definition: hal_spi.h:361
SPI_SLAVE_SELECT_ALL
#define SPI_SLAVE_SELECT_ALL
Definition: hal_spi.h:362
SPI_DIRECTION_FULL_DUPLEX
#define SPI_DIRECTION_FULL_DUPLEX
Definition: hal_spi.h:276
SPI_DATASIZE_32BIT
#define SPI_DATASIZE_32BIT
Definition: hal_spi.h:325
SPI_PHASE_2EDGE
#define SPI_PHASE_2EDGE
Definition: hal_spi.h:343
SPI_PHASE_1EDGE
#define SPI_PHASE_1EDGE
Definition: hal_spi.h:342
SPI_POLARITY_LOW
#define SPI_POLARITY_LOW
Definition: hal_spi.h:333
SPI_DIRECTION_READ_EEPROM
#define SPI_DIRECTION_READ_EEPROM
Definition: hal_spi.h:279
SPI_TIMODE_ENABLE
#define SPI_TIMODE_ENABLE
Definition: hal_spi.h:352
SPI_TIMODE_DISABLE
#define SPI_TIMODE_DISABLE
Definition: hal_spi.h:350
SPI_DATASIZE_4BIT
#define SPI_DATASIZE_4BIT
Definition: hal_spi.h:297
SPI_SLAVE_SELECT_0
#define SPI_SLAVE_SELECT_0
Definition: hal_spi.h:360
SPI_DIRECTION_SIMPLEX_RX
#define SPI_DIRECTION_SIMPLEX_RX
Definition: hal_spi.h:278