Pulse Density Modulation. More...
Modules | |
| PDM Error Code | |
Data Structures | |
| struct | PDM_InitTypeDef |
| struct | PDM_HandleTypeDef |
Enumerations | |
| enum | PDM_StateTypeDef { PDM_STATE_RESET = 0x00U, PDM_STATE_READY = 0x01U, PDM_STATE_BUSY = 0x02U, PDM_STATE_TIMEOUT = 0x03U, PDM_STATE_ERROR = 0x04U, PDM_STATE_SUSPEND = 0x05U, PDM_STATE_BUSY_RX = 0X06U } |
| HAL PDM State structures definition. More... | |
| enum | PDM_ModeTypeDef { PDM_MODE_ONCE, PDM_MODE_LOOP } |
| enum | PDM_ChannelTypeDef { PDM_CHANNEL_LEFT_ONLY, PDM_CHANNEL_RIGHT_ONLY, PDM_CHANNEL_STEREO, PDM_CHANNEL_STEREO_SWAP } |
| enum | PDM_SampleRateTypeDef { PDM_SAMPLE_8KHZ = 8000, PDM_SAMPLE_12KHZ = 12000, PDM_SAMPLE_16KHZ = 16000, PDM_SAMPLE_24KHZ = 24000, PDM_SAMPLE_32KHZ = 32000, PDM_SAMPLE_48KHZ = 48000 } |
| enum | PDM_ChannelDepthTypeDef { PDM_CHANNEL_DEPTH_8BIT = 8, PDM_CHANNEL_DEPTH_16BIT = 16, PDM_CHANNEL_DEPTH_24BIT = 24, PDM_CHANNEL_DEPTH_32BIT = 32 } |
| enum | PDM_ConfigureTypeDef { PDM_CFG_CHANNEL = 1, PDM_CFG_SAMPLERATE = 2, PDM_CFG_DEPTH = 4 } |
Pulse Density Modulation.
| enum PDM_ChannelTypeDef |
| enum PDM_ConfigureTypeDef |
| enum PDM_ModeTypeDef |
| enum PDM_StateTypeDef |
HAL PDM State structures definition.
| void HAL_PDM_AbortCpltCallback | ( | PDM_HandleTypeDef * | hpdm | ) |
PDM Abort Complete callback.
| hpdm | pointer to a PDM_HandleTypeDef structure that contains the configuration information for the specified PDM module. |
| None |
| HAL_StatusTypeDef HAL_PDM_Config | ( | PDM_HandleTypeDef * | hpdm, |
| PDM_ConfigureTypeDef | type | ||
| ) |
Configure PDM parameters.
| hpdm | Pointer to a PDM_HandleTypeDef structure that contains the configuration information for the specified PDM module. |
| type | Configure mode |
| HAL | status |
| HAL_StatusTypeDef HAL_PDM_DeInit | ( | PDM_HandleTypeDef * | hpdm | ) |
DeInitialize the PDM peripheral.
| hpdm | Pointer to a PDM_HandleTypeDef structure that contains the configuration information for the specified PDM module. |
| HAL | status |
| HAL_StatusTypeDef HAL_PDM_DMAStop | ( | PDM_HandleTypeDef * | hpdm | ) |
Stop the DMA Transfer.
| hpdm | pointer to a PDM_HandleTypeDef structure that contains the configuration information for the specified PDM module. |
| HAL | status |
| void HAL_PDM_ErrorCallback | ( | PDM_HandleTypeDef * | hpdm | ) |
PDM error callback.
| hpdm | pointer to a PDM_HandleTypeDef structure that contains the configuration information for the specified PDM module. |
| None |
| HAL_StatusTypeDef HAL_PDM_Init | ( | PDM_HandleTypeDef * | hpdm | ) |
Initialize the PDM according to the specified parameters in the PDM_InitTypeDef and initialize the associated handle.
| hpdm | Pointer to a PDM_HandleTypeDef structure that contains the configuration information for the specified PDM module. |
| HAL | status |
| void HAL_PDM_IRQHandler | ( | PDM_HandleTypeDef * | hpdm | ) |
General PDM interrupt handler.
| hpdm | pointer to a PDM_HandleTypeDef structure that contains the configuration information for the specified PDM module. |
| None. |
| void HAL_PDM_MspDeInit | ( | PDM_HandleTypeDef * | hpdm | ) |
De-Initialize the PDM MSP.
| hpdm | Pointer to a PDM_HandleTypeDef structure that contains the configuration information for the specified PDM module. |
| None |
| void HAL_PDM_MspInit | ( | PDM_HandleTypeDef * | hpdm | ) |
Initialize the PDM MSP.
| hpdm | Pointer to a PDM_HandleTypeDef structure that contains the configuration information for the specified PDM module. |
| None |
| HAL_StatusTypeDef HAL_PDM_Receive_DMA | ( | PDM_HandleTypeDef * | hpdm, |
| uint8_t * | pData, | ||
| uint32_t | Size | ||
| ) |
Read PCM data from PDM module by DMA.
| hpdm | - Pointer to a PDM_HandleTypeDef structure that contains the configuration information for the specified PDM module. |
| pData | - Buffer to save PCM data (Should be aligned to 4 bytes) |
| Size | - Buffer size in bytes (Should be aligned to 4 bytes) |
| void HAL_PDM_RxCpltCallback | ( | PDM_HandleTypeDef * | hpdm | ) |
Rx Transfer completed callback.
| hpdm | pointer to a PDM_HandleTypeDef structure that contains the configuration information for the specified PDM module. |
| None |
| void HAL_PDM_RxHalfCpltCallback | ( | PDM_HandleTypeDef * | hpdm | ) |
Rx Half Transfer completed callback.
| hpdm | pointer to a PDM_HandleTypeDef structure that contains the configuration information for the specified PDM module. |
| None |
| HAL_StatusTypeDef HAL_PDM_Set_Gain | ( | PDM_HandleTypeDef * | hpdm, |
| PDM_ChannelTypeDef | channel, | ||
| uint8_t | value | ||
| ) |
Set recieve gain.
| hpdm | - Pointer to a PDM_HandleTypeDef structure that contains the configuration information for the specified PDM module. |
| channel | - PDM_CHANNEL_STEREO or PDM_CHANNEL_STEREO_SWAP will set both left and right channel |
| value | - [0 ~ 255] gain value. 255 is maximum while 0 is minimum |