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 582 of file gr533x_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 575 of file gr533x_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 568 of file gr533x_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 561 of file gr533x_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 551 of file gr533x_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 611 of file gr533x_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 603 of file gr533x_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 595 of file gr533x_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 588 of file gr533x_hal_spi.h.

SPI_DIRECTION_SIMPLEX_TX
#define SPI_DIRECTION_SIMPLEX_TX
Definition: gr533x_hal_spi.h:278
SPI_POLARITY_HIGH
#define SPI_POLARITY_HIGH
Definition: gr533x_hal_spi.h:335
SPI_SLAVE_SELECT_1
#define SPI_SLAVE_SELECT_1
Definition: gr533x_hal_spi.h:362
SPI_SLAVE_SELECT_ALL
#define SPI_SLAVE_SELECT_ALL
Definition: gr533x_hal_spi.h:363
SPI_DIRECTION_FULL_DUPLEX
#define SPI_DIRECTION_FULL_DUPLEX
Definition: gr533x_hal_spi.h:277
SPI_DATASIZE_32BIT
#define SPI_DATASIZE_32BIT
Definition: gr533x_hal_spi.h:326
SPI_PHASE_2EDGE
#define SPI_PHASE_2EDGE
Definition: gr533x_hal_spi.h:344
SPI_PHASE_1EDGE
#define SPI_PHASE_1EDGE
Definition: gr533x_hal_spi.h:343
SPI_POLARITY_LOW
#define SPI_POLARITY_LOW
Definition: gr533x_hal_spi.h:334
SPI_DIRECTION_READ_EEPROM
#define SPI_DIRECTION_READ_EEPROM
Definition: gr533x_hal_spi.h:280
SPI_TIMODE_ENABLE
#define SPI_TIMODE_ENABLE
Definition: gr533x_hal_spi.h:353
SPI_TIMODE_DISABLE
#define SPI_TIMODE_DISABLE
Definition: gr533x_hal_spi.h:351
SPI_DATASIZE_4BIT
#define SPI_DATASIZE_4BIT
Definition: gr533x_hal_spi.h:298
SPI_SLAVE_SELECT_0
#define SPI_SLAVE_SELECT_0
Definition: gr533x_hal_spi.h:361
SPI_DIRECTION_SIMPLEX_RX
#define SPI_DIRECTION_SIMPLEX_RX
Definition: gr533x_hal_spi.h:279