RTEMS 6.1-rc6
Loading...
Searching...
No Matches
Macros

Macros

#define I2S_CHECK_FLAG(__SR__, __FLAG__)
 Check whether the specified SPI flag is set or not.
 
#define I2S_CHECK_IT_SOURCE(__IER__, __INTERRUPT__)
 Check whether the specified SPI Interrupt is set or not.
 
#define IS_I2S_MODE(__MODE__)
 Checks if I2S Mode parameter is in allowed range.
 
#define IS_I2S_MASTER(__MODE__)
 
#define IS_I2S_SLAVE(__MODE__)
 
#define IS_I2S_FULLDUPLEX(__MODE__)
 
#define IS_I2S_STANDARD(__STANDARD__)
 
#define IS_I2S_DATA_FORMAT(__FORMAT__)
 
#define IS_I2S_MCLK_OUTPUT(__OUTPUT__)
 
#define IS_I2S_AUDIO_FREQ(__FREQ__)
 
#define IS_I2S_CPOL(__CPOL__)
 
#define IS_I2S_FIRST_BIT(__BIT__)
 
#define IS_I2S_WS_INVERSION(__WSINV__)
 
#define IS_I2S_DATA_24BIT_ALIGNMENT(__ALIGNMENT__)
 
#define IS_I2S_MASTER_KEEP_IO_STATE(__AFCNTR__)
 

Detailed Description

Macro Definition Documentation

◆ I2S_CHECK_FLAG

#define I2S_CHECK_FLAG (   __SR__,
  __FLAG__ 
)
Value:
((((__SR__)\
& ((__FLAG__) & I2S_FLAG_MASK)) == ((__FLAG__) & I2S_FLAG_MASK))\
? SET : RESET)

Check whether the specified SPI flag is set or not.

Parameters
__SR__copy of I2S SR register.
__FLAG__specifies the flag to check. This parameter can be one of the following values:
  • I2S_FLAG_RXP : Rx-Packet available flag
  • I2S_FLAG_TXP : Tx-Packet space available flag
  • I2S_FLAG_UDR : Underrun flag
  • I2S_FLAG_OVR : Overrun flag
  • I2S_FLAG_FRE : TI mode frame format error flag
Return values
SETor RESET.

◆ I2S_CHECK_IT_SOURCE

#define I2S_CHECK_IT_SOURCE (   __IER__,
  __INTERRUPT__ 
)
Value:
((((__IER__)\
& (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)

Check whether the specified SPI Interrupt is set or not.

Parameters
__IER__copy of I2S IER register.
__INTERRUPT__specifies the SPI interrupt source to check. This parameter can be one of the following values:
  • I2S_IT_RXP : Rx-Packet available interrupt
  • I2S_IT_TXP : Tx-Packet space available interrupt
  • I2S_IT_UDR : Underrun interrupt
  • I2S_IT_OVR : Overrun interrupt
  • I2S_IT_FRE : TI mode frame format error interrupt
  • I2S_IT_ERR : Error interrupt enable
Return values
SETor RESET.

◆ IS_I2S_AUDIO_FREQ

#define IS_I2S_AUDIO_FREQ (   __FREQ__)
Value:
((((__FREQ__) >= I2S_AUDIOFREQ_8K) && \
((__FREQ__) <= I2S_AUDIOFREQ_192K)) || \
((__FREQ__) == I2S_AUDIOFREQ_DEFAULT))

◆ IS_I2S_CPOL

#define IS_I2S_CPOL (   __CPOL__)
Value:
(((__CPOL__) == I2S_CPOL_LOW) || \
((__CPOL__) == I2S_CPOL_HIGH))

◆ IS_I2S_DATA_24BIT_ALIGNMENT

#define IS_I2S_DATA_24BIT_ALIGNMENT (   __ALIGNMENT__)
Value:
(((__ALIGNMENT__) == I2S_DATA_24BIT_ALIGNMENT_RIGHT) || \
((__ALIGNMENT__) == I2S_DATA_24BIT_ALIGNMENT_LEFT))

◆ IS_I2S_DATA_FORMAT

#define IS_I2S_DATA_FORMAT (   __FORMAT__)
Value:
(((__FORMAT__) == I2S_DATAFORMAT_16B) || \
((__FORMAT__) == I2S_DATAFORMAT_16B_EXTENDED) || \
((__FORMAT__) == I2S_DATAFORMAT_24B) || \
((__FORMAT__) == I2S_DATAFORMAT_32B))

◆ IS_I2S_FIRST_BIT

#define IS_I2S_FIRST_BIT (   __BIT__)
Value:
(((__BIT__) == I2S_FIRSTBIT_MSB) || \
((__BIT__) == I2S_FIRSTBIT_LSB))

◆ IS_I2S_FULLDUPLEX

#define IS_I2S_FULLDUPLEX (   __MODE__)
Value:
(((__MODE__) == I2S_MODE_MASTER_FULLDUPLEX) || \
((__MODE__) == I2S_MODE_SLAVE_FULLDUPLEX))

◆ IS_I2S_MASTER

#define IS_I2S_MASTER (   __MODE__)
Value:
(((__MODE__) == I2S_MODE_MASTER_TX) || \
((__MODE__) == I2S_MODE_MASTER_RX) || \
((__MODE__) == I2S_MODE_MASTER_FULLDUPLEX))

◆ IS_I2S_MASTER_KEEP_IO_STATE

#define IS_I2S_MASTER_KEEP_IO_STATE (   __AFCNTR__)
Value:
(((__AFCNTR__) == I2S_MASTER_KEEP_IO_STATE_DISABLE) || \
((__AFCNTR__) == I2S_MASTER_KEEP_IO_STATE_ENABLE))

◆ IS_I2S_MCLK_OUTPUT

#define IS_I2S_MCLK_OUTPUT (   __OUTPUT__)
Value:
(((__OUTPUT__) == I2S_MCLKOUTPUT_ENABLE) || \
((__OUTPUT__) == I2S_MCLKOUTPUT_DISABLE))

◆ IS_I2S_MODE

#define IS_I2S_MODE (   __MODE__)
Value:
(((__MODE__) == I2S_MODE_SLAVE_TX) || \
((__MODE__) == I2S_MODE_SLAVE_RX) || \
((__MODE__) == I2S_MODE_MASTER_TX) || \
((__MODE__) == I2S_MODE_MASTER_RX) || \
((__MODE__) == I2S_MODE_SLAVE_FULLDUPLEX) || \
((__MODE__) == I2S_MODE_MASTER_FULLDUPLEX))

Checks if I2S Mode parameter is in allowed range.

Parameters
__MODE__specifies the I2S Mode. This parameter can be a value of I2S Mode
Return values
None

◆ IS_I2S_SLAVE

#define IS_I2S_SLAVE (   __MODE__)
Value:
(((__MODE__) == I2S_MODE_SLAVE_TX) || \
((__MODE__) == I2S_MODE_SLAVE_RX) || \
((__MODE__) == I2S_MODE_SLAVE_FULLDUPLEX))

◆ IS_I2S_STANDARD

#define IS_I2S_STANDARD (   __STANDARD__)
Value:
(((__STANDARD__) == I2S_STANDARD_PHILIPS) || \
((__STANDARD__) == I2S_STANDARD_MSB) || \
((__STANDARD__) == I2S_STANDARD_LSB) || \
((__STANDARD__) == I2S_STANDARD_PCM_SHORT) || \
((__STANDARD__) == I2S_STANDARD_PCM_LONG))

◆ IS_I2S_WS_INVERSION

#define IS_I2S_WS_INVERSION (   __WSINV__)
Value:
(((__WSINV__) == I2S_WS_INVERSION_DISABLE) || \
((__WSINV__) == I2S_WS_INVERSION_ENABLE))