Macros
I2S Private Macros
Peripheral Driver » HAL Driver » I2S » Defines

## Macros
#define | IS_I2S_DIRECTION(__MODE__)
| Check if I2S Direction Mode is valid. More...
#define | IS_I2S_DATASIZE(__DATASIZE__)
| Check if I2S Data Size is valid. More...
#define | IS_I2S_CPOL(__CPOL__)
| Check if I2S Clock Polarity is valid. More...
#define | IS_I2S_AUDIO_FREQUENCY(__FREQUENCY__) (((__FREQUENCY__) > 0) && ((__FREQUENCY__) <= 1500000))
| Check if I2S Audio Frequency is valid. More...
#define | IS_I2S_FIFO_THRESHOLD(__THR__) (((__THR__) >= 0) && ((__THR__) <= I2S_TX_FIFO_LEVEL_MAX))
| Check if I2S FIFO Threshold is valid. More...

## Detailed Description

## Macro Definition Documentation

## ◆ IS_I2S_AUDIO_FREQUENCY

#define IS_I2S_AUDIO_FREQUENCY | ( |  | __FREQUENCY__ | ) | (((__FREQUENCY__) > 0) && ((__FREQUENCY__) <= 1500000))

Check if I2S Audio Frequency is valid.

Parameters

  <strong>FREQUENCY</strong> | I2S Audio Frequency.

Return values

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

## ◆ IS_I2S_CPOL

#define IS_I2S_CPOL | ( |  | __CPOL__ | ) |

Value:
(((__CPOL__) == I2S_POLARITY_LOW) || \
((__CPOL__) == I2S_POLARITY_HIGH))

Check if I2S Clock Polarity is valid.

Parameters

  <strong>CPOL</strong> | I2S Clock Polarity.

Return values

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

## ◆ IS_I2S_DATASIZE

#define IS_I2S_DATASIZE | ( |  | __DATASIZE__ | ) |

Value:
(((__DATASIZE__) == I2S_DATASIZE_12BIT) || \
((__DATASIZE__) == I2S_DATASIZE_16BIT) || \
((__DATASIZE__) == I2S_DATASIZE_20BIT) || \
((__DATASIZE__) == I2S_DATASIZE_24BIT) || \
((__DATASIZE__) == I2S_DATASIZE_32BIT))

Check if I2S Data Size is valid.

Parameters

  <strong>DATASIZE</strong> | I2S Data Size.

Return values

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

## ◆ IS_I2S_DIRECTION

#define IS_I2S_DIRECTION | ( |  | __MODE__ | ) |

Value:
(((__MODE__) == I2S_DIRECTION_FULL_DUPLEX) || \
((__MODE__) == I2S_DIRECTION_SIMPLEX_TX) || \
((__MODE__) == I2S_DIRECTION_SIMPLEX_RX))

Check if I2S Direction Mode is valid.

Parameters

  <strong>MODE</strong> | I2S Direction Mode.

Return values

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

## ◆ IS_I2S_FIFO_THRESHOLD

#define IS_I2S_FIFO_THRESHOLD | ( |  | __THR__ | ) | (((__THR__) >= 0) && ((__THR__) <= I2S_TX_FIFO_LEVEL_MAX))

Check if I2S FIFO Threshold is valid.

Parameters

  <strong>THR</strong> | I2S FIFO Threshold.

Return values

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

I2S_DATASIZE_32BIT
#define I2S_DATASIZE_32BIT
Definition: gr55xx_hal_i2s.h:230
I2S_DIRECTION_SIMPLEX_RX
#define I2S_DIRECTION_SIMPLEX_RX
Definition: gr55xx_hal_i2s.h:210
I2S_DATASIZE_16BIT
#define I2S_DATASIZE_16BIT
Definition: gr55xx_hal_i2s.h:227
I2S_DATASIZE_20BIT
#define I2S_DATASIZE_20BIT
Definition: gr55xx_hal_i2s.h:228
I2S_DIRECTION_FULL_DUPLEX
#define I2S_DIRECTION_FULL_DUPLEX
Definition: gr55xx_hal_i2s.h:208
I2S_DIRECTION_SIMPLEX_TX
#define I2S_DIRECTION_SIMPLEX_TX
Definition: gr55xx_hal_i2s.h:209
I2S_DATASIZE_12BIT
#define I2S_DATASIZE_12BIT
Definition: gr55xx_hal_i2s.h:226
I2S_DATASIZE_24BIT
#define I2S_DATASIZE_24BIT
Definition: gr55xx_hal_i2s.h:229