Macros
SPI Private Macros
Peripheral Driver » HAL Driver » SPI » 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 588 of file gr55xx_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 581 of file gr55xx_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 574 of file gr55xx_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 567 of file gr55xx_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 557 of file gr55xx_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 617 of file gr55xx_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 609 of file gr55xx_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 601 of file gr55xx_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 594 of file gr55xx_hal_spi.h.

SPI_DIRECTION_SIMPLEX_TX
#define SPI_DIRECTION_SIMPLEX_TX
Definition: gr55xx_hal_spi.h:284
SPI_POLARITY_HIGH
#define SPI_POLARITY_HIGH
Definition: gr55xx_hal_spi.h:341
SPI_SLAVE_SELECT_1
#define SPI_SLAVE_SELECT_1
Definition: gr55xx_hal_spi.h:368
SPI_SLAVE_SELECT_ALL
#define SPI_SLAVE_SELECT_ALL
Definition: gr55xx_hal_spi.h:369
SPI_DIRECTION_FULL_DUPLEX
#define SPI_DIRECTION_FULL_DUPLEX
Definition: gr55xx_hal_spi.h:283
SPI_DATASIZE_32BIT
#define SPI_DATASIZE_32BIT
Definition: gr55xx_hal_spi.h:332
SPI_PHASE_2EDGE
#define SPI_PHASE_2EDGE
Definition: gr55xx_hal_spi.h:350
SPI_PHASE_1EDGE
#define SPI_PHASE_1EDGE
Definition: gr55xx_hal_spi.h:349
SPI_POLARITY_LOW
#define SPI_POLARITY_LOW
Definition: gr55xx_hal_spi.h:340
SPI_DIRECTION_READ_EEPROM
#define SPI_DIRECTION_READ_EEPROM
Definition: gr55xx_hal_spi.h:286
SPI_TIMODE_ENABLE
#define SPI_TIMODE_ENABLE
Definition: gr55xx_hal_spi.h:359
SPI_TIMODE_DISABLE
#define SPI_TIMODE_DISABLE
Definition: gr55xx_hal_spi.h:357
SPI_DATASIZE_4BIT
#define SPI_DATASIZE_4BIT
Definition: gr55xx_hal_spi.h:304
SPI_SLAVE_SELECT_0
#define SPI_SLAVE_SELECT_0
Definition: gr55xx_hal_spi.h:367
SPI_DIRECTION_SIMPLEX_RX
#define SPI_DIRECTION_SIMPLEX_RX
Definition: gr55xx_hal_spi.h:285