|
discoverpixy
|
SAI driver modules. More...
|
Modules | |
| SAI_Exported_Constants | |
| SAI_Private_Functions | |
Classes | |
| struct | SAI_InitTypeDef |
| SAI Block Init structure definition. More... | |
| struct | SAI_FrameInitTypeDef |
| SAI Block Frame Init structure definition. More... | |
| struct | SAI_SlotInitTypeDef |
| SAI Block Slot Init Structure definition. More... | |
Macros | |
| #define | CR1_CLEAR_MASK ((uint32_t)0xFF07C010) |
| #define | FRCR_CLEAR_MASK ((uint32_t)0xFFF88000) |
| #define | SLOTR_CLEAR_MASK ((uint32_t)0x0000F020) |
Functions | |
| void | SAI_DeInit (SAI_TypeDef *SAIx) |
| Deinitialize the SAIx peripheral registers to their default reset values. More... | |
| void | SAI_Init (SAI_Block_TypeDef *SAI_Block_x, SAI_InitTypeDef *SAI_InitStruct) |
| Initializes the SAI Block x peripheral according to the specified parameters in the SAI_InitStruct. More... | |
| void | SAI_FrameInit (SAI_Block_TypeDef *SAI_Block_x, SAI_FrameInitTypeDef *SAI_FrameInitStruct) |
| Initializes the SAI Block Audio frame according to the specified parameters in the SAI_FrameInitStruct. More... | |
| void | SAI_SlotInit (SAI_Block_TypeDef *SAI_Block_x, SAI_SlotInitTypeDef *SAI_SlotInitStruct) |
| Initializes the SAI Block audio Slot according to the specified parameters in the SAI_SlotInitStruct. More... | |
| void | SAI_StructInit (SAI_InitTypeDef *SAI_InitStruct) |
| Fills each SAI_InitStruct member with its default value. More... | |
| void | SAI_FrameStructInit (SAI_FrameInitTypeDef *SAI_FrameInitStruct) |
| Fills each SAI_FrameInitStruct member with its default value. More... | |
| void | SAI_SlotStructInit (SAI_SlotInitTypeDef *SAI_SlotInitStruct) |
| Fills each SAI_SlotInitStruct member with its default value. More... | |
| void | SAI_Cmd (SAI_Block_TypeDef *SAI_Block_x, FunctionalState NewState) |
| Enables or disables the specified SAI Block peripheral. More... | |
| void | SAI_MonoModeConfig (SAI_Block_TypeDef *SAI_Block_x, uint32_t SAI_Mono_StreoMode) |
| Configures the mono mode for the selected SAI block. More... | |
| void | SAI_TRIStateConfig (SAI_Block_TypeDef *SAI_Block_x, uint32_t SAI_TRIState) |
| Configures the TRIState managment on data line for the selected SAI block. More... | |
| void | SAI_CompandingModeConfig (SAI_Block_TypeDef *SAI_Block_x, uint32_t SAI_CompandingMode) |
| Configures the companding mode for the selected SAI block. More... | |
| void | SAI_MuteModeCmd (SAI_Block_TypeDef *SAI_Block_x, FunctionalState NewState) |
| Enables or disables the Mute mode for the selected SAI block. More... | |
| void | SAI_MuteValueConfig (SAI_Block_TypeDef *SAI_Block_x, uint32_t SAI_MuteValue) |
| Configure the mute value for the selected SAI block. More... | |
| void | SAI_MuteFrameCounterConfig (SAI_Block_TypeDef *SAI_Block_x, uint32_t SAI_MuteCounter) |
| Enables or disables the Mute mode for the selected SAI block. More... | |
| void | SAI_FlushFIFO (SAI_Block_TypeDef *SAI_Block_x) |
| Reinitialize the FIFO pointer. More... | |
| void | SAI_SendData (SAI_Block_TypeDef *SAI_Block_x, uint32_t Data) |
| Transmits a Data through the SAI block x peripheral. More... | |
| uint32_t | SAI_ReceiveData (SAI_Block_TypeDef *SAI_Block_x) |
| Returns the most recent received data by the SAI block x peripheral. More... | |
| void | SAI_DMACmd (SAI_Block_TypeDef *SAI_Block_x, FunctionalState NewState) |
| Enables or disables the SAI Block x DMA interface. More... | |
| void | SAI_ITConfig (SAI_Block_TypeDef *SAI_Block_x, uint32_t SAI_IT, FunctionalState NewState) |
| Enables or disables the specified SAI Block interrupts. More... | |
| FlagStatus | SAI_GetFlagStatus (SAI_Block_TypeDef *SAI_Block_x, uint32_t SAI_FLAG) |
| Checks whether the specified SAI block x flag is set or not. More... | |
| void | SAI_ClearFlag (SAI_Block_TypeDef *SAI_Block_x, uint32_t SAI_FLAG) |
| Clears the specified SAI Block x flag. More... | |
| ITStatus | SAI_GetITStatus (SAI_Block_TypeDef *SAI_Block_x, uint32_t SAI_IT) |
| Checks whether the specified SAI Block x interrupt has occurred or not. More... | |
| void | SAI_ClearITPendingBit (SAI_Block_TypeDef *SAI_Block_x, uint32_t SAI_IT) |
| Clears the SAI Block x interrupt pending bit. More... | |
| FunctionalState | SAI_GetCmdStatus (SAI_Block_TypeDef *SAI_Block_x) |
| Returns the status of EN bit for the specified SAI Block x. More... | |
| uint32_t | SAI_GetFIFOStatus (SAI_Block_TypeDef *SAI_Block_x) |
| Returns the current SAI Block x FIFO filled level. More... | |
SAI driver modules.
| void SAI_ClearFlag | ( | SAI_Block_TypeDef * | SAI_Block_x, |
| uint32_t | SAI_FLAG | ||
| ) |
Clears the specified SAI Block x flag.
| SAI_Block_x | where x can be A or B to select the SAI Block peripheral. |
| SAI_FLAG | specifies the SAI block flag to check. This parameter can be one of the following values:
|
| None |
| void SAI_ClearITPendingBit | ( | SAI_Block_TypeDef * | SAI_Block_x, |
| uint32_t | SAI_IT | ||
| ) |
Clears the SAI Block x interrupt pending bit.
| SAI_Block_x | where x can be A or B to select the SAI Block peripheral. |
| SAI_IT | specifies the SAI Block interrupt pending bit to clear. This parameter can be one of the following values:
|
| None |
| void SAI_Cmd | ( | SAI_Block_TypeDef * | SAI_Block_x, |
| FunctionalState | NewState | ||
| ) |
| void SAI_CompandingModeConfig | ( | SAI_Block_TypeDef * | SAI_Block_x, |
| uint32_t | SAI_CompandingMode | ||
| ) |
Configures the companding mode for the selected SAI block.
| SAI_Block_x | where x can be A or B to select the SAI Block peripheral. |
| SAI_CompandingMode | specifies the SAI block companding mode. This parameter can be one of the following values:
|
| None |
| void SAI_DeInit | ( | SAI_TypeDef * | SAIx | ) |
Deinitialize the SAIx peripheral registers to their default reset values.
| SAIx | To select the SAIx peripheral, where x can be the different instances |
| None |

| void SAI_DMACmd | ( | SAI_Block_TypeDef * | SAI_Block_x, |
| FunctionalState | NewState | ||
| ) |
| void SAI_FlushFIFO | ( | SAI_Block_TypeDef * | SAI_Block_x | ) |
Reinitialize the FIFO pointer.
| SAI_Block_x | where x can be A or B to select the SAI Block peripheral. |
| NewState | new state of the selected SAI TI communication mode. This parameter can be: ENABLE or DISABLE. |
| None |
| void SAI_FrameInit | ( | SAI_Block_TypeDef * | SAI_Block_x, |
| SAI_FrameInitTypeDef * | SAI_FrameInitStruct | ||
| ) |
Initializes the SAI Block Audio frame according to the specified parameters in the SAI_FrameInitStruct.
| SAI_Block_x | where x can be A or B to select the SAI Block peripheral. |
| SAI_FrameInitStruct | pointer to an SAI_FrameInitTypeDef structure that contains the configuration of audio frame for a specified SAI Block |
| None |
| void SAI_FrameStructInit | ( | SAI_FrameInitTypeDef * | SAI_FrameInitStruct | ) |
Fills each SAI_FrameInitStruct member with its default value.
| SAI_FrameInitStruct | pointer to a SAI_FrameInitTypeDef structure which will be initialized. |
| None |
| FunctionalState SAI_GetCmdStatus | ( | SAI_Block_TypeDef * | SAI_Block_x | ) |
Returns the status of EN bit for the specified SAI Block x.
| SAI_Block_x | where x can be A or B to select the SAI Block peripheral. |
| Current | state of the DMAy Streamx (ENABLE or DISABLE). |
| uint32_t SAI_GetFIFOStatus | ( | SAI_Block_TypeDef * | SAI_Block_x | ) |
Returns the current SAI Block x FIFO filled level.
| SAI_Block_x | where x can be A or B to select the SAI Block peripheral. |
| The | FIFO filling state.
|
| FlagStatus SAI_GetFlagStatus | ( | SAI_Block_TypeDef * | SAI_Block_x, |
| uint32_t | SAI_FLAG | ||
| ) |
Checks whether the specified SAI block x flag is set or not.
| SAI_Block_x | where x can be A or B to select the SAI Block peripheral. |
| SAI_FLAG | specifies the SAI block flag to check. This parameter can be one of the following values:
|
| The | new state of SAI_FLAG (SET or RESET). |
| ITStatus SAI_GetITStatus | ( | SAI_Block_TypeDef * | SAI_Block_x, |
| uint32_t | SAI_IT | ||
| ) |
Checks whether the specified SAI Block x interrupt has occurred or not.
| SAI_Block_x | where x can be A or B to select the SAI Block peripheral. |
| SAI_IT | specifies the SAI interrupt source to be enabled or disabled. This parameter can be one of the following values:
|
| The | new state of SAI_IT (SET or RESET). |
| void SAI_Init | ( | SAI_Block_TypeDef * | SAI_Block_x, |
| SAI_InitTypeDef * | SAI_InitStruct | ||
| ) |
Initializes the SAI Block x peripheral according to the specified parameters in the SAI_InitStruct.
| SAI_Block_x | where x can be A or B to select the SAI Block peripheral. |
| SAI_InitStruct | pointer to a SAI_InitTypeDef structure that contains the configuration information for the specified SAI Block peripheral. |
| None |
| void SAI_ITConfig | ( | SAI_Block_TypeDef * | SAI_Block_x, |
| uint32_t | SAI_IT, | ||
| FunctionalState | NewState | ||
| ) |
Enables or disables the specified SAI Block interrupts.
| SAI_Block_x | where x can be A or B to select the SAI Block peripheral. |
| SAI_IT | specifies the SAI interrupt source to be enabled or disabled. This parameter can be one of the following values:
|
| NewState | new state of the specified SAI interrupt. This parameter can be: ENABLE or DISABLE. |
| None |
| void SAI_MonoModeConfig | ( | SAI_Block_TypeDef * | SAI_Block_x, |
| uint32_t | SAI_Mono_StreoMode | ||
| ) |
Configures the mono mode for the selected SAI block.
| SAI_Block_x | where x can be A or B to select the SAI Block peripheral. |
| SAI_MonoMode | specifies the SAI block mono mode. This parameter can be one of the following values:
|
| None |
| void SAI_MuteFrameCounterConfig | ( | SAI_Block_TypeDef * | SAI_Block_x, |
| uint32_t | SAI_MuteCounter | ||
| ) |
Enables or disables the Mute mode for the selected SAI block.
| SAI_Block_x | where x can be A or B to select the SAI Block peripheral. |
| SAI_MuteCounter | specifies the SAI block mute value. This parameter can be a number between 0 and 63. |
| None |
| void SAI_MuteModeCmd | ( | SAI_Block_TypeDef * | SAI_Block_x, |
| FunctionalState | NewState | ||
| ) |
Enables or disables the Mute mode for the selected SAI block.
| SAI_Block_x | where x can be A or B to select the SAI Block peripheral. |
| NewState | new state of the SAIx block. This parameter can be: ENABLE or DISABLE. |
| None |
| void SAI_MuteValueConfig | ( | SAI_Block_TypeDef * | SAI_Block_x, |
| uint32_t | SAI_MuteValue | ||
| ) |
Configure the mute value for the selected SAI block.
| SAI_Block_x | where x can be A or B to select the SAI Block peripheral. |
| SAI_MuteValue | specifies the SAI block mute value. This parameter can be one of the following values:
|
| None |
| uint32_t SAI_ReceiveData | ( | SAI_Block_TypeDef * | SAI_Block_x | ) |
Returns the most recent received data by the SAI block x peripheral.
| SAI_Block_x | where x can be A or B to select the SAI Block peripheral. |
| The | value of the received data. |
| void SAI_SendData | ( | SAI_Block_TypeDef * | SAI_Block_x, |
| uint32_t | Data | ||
| ) |
Transmits a Data through the SAI block x peripheral.
| SAI_Block_x | where x can be A or B to select the SAI Block peripheral. |
| Data | Data to be transmitted. |
| None |
| void SAI_SlotInit | ( | SAI_Block_TypeDef * | SAI_Block_x, |
| SAI_SlotInitTypeDef * | SAI_SlotInitStruct | ||
| ) |
Initializes the SAI Block audio Slot according to the specified parameters in the SAI_SlotInitStruct.
| SAI_Block_x | where x can be A or B to select the SAI Block peripheral. |
| SAI_SlotInitStruct | pointer to an SAI_SlotInitTypeDef structure that contains the configuration of audio slot for a specified SAI Block |
| None |
| void SAI_SlotStructInit | ( | SAI_SlotInitTypeDef * | SAI_SlotInitStruct | ) |
Fills each SAI_SlotInitStruct member with its default value.
| SAI_SlotInitStruct | pointer to a SAI_SlotInitTypeDef structure which will be initialized. |
| None |
| void SAI_StructInit | ( | SAI_InitTypeDef * | SAI_InitStruct | ) |
Fills each SAI_InitStruct member with its default value.
| SAI_InitStruct | pointer to a SAI_InitTypeDef structure which will be initialized. |
| None |
| void SAI_TRIStateConfig | ( | SAI_Block_TypeDef * | SAI_Block_x, |
| uint32_t | SAI_TRIState | ||
| ) |
Configures the TRIState managment on data line for the selected SAI block.
| SAI_Block_x | where x can be A or B to select the SAI Block peripheral. |
| SAI_TRIState | specifies the SAI block TRIState management. This parameter can be one of the following values:
|
| None |
1.8.9.1