Initialization and Configuration functions. More...
Functions | |
hal_status_t | hal_pdm_init (pdm_handle_t *p_pdm) |
Initialize the PDM according to the specified parameters in the pdm_init_t and initialize the associated handle. More... | |
hal_status_t | hal_pdm_deinit (pdm_handle_t *p_pdm) |
De-initialize the PDM peripheral. More... | |
void | hal_pdm_msp_init (pdm_handle_t *p_pdm) |
Initialize the PDM MSP. More... | |
void | hal_pdm_msp_deinit (pdm_handle_t *p_pdm) |
De-initialize the PDM MSP. More... | |
hal_status_t | hal_pdm_left_start_dma (pdm_handle_t *p_pdm, uint16_t *p_data, uint32_t length) |
Start the pdm left channel transfer with dma. More... | |
hal_status_t | hal_pdm_left_start_dma_sg_llp (pdm_handle_t *p_pdm, uint16_t *p_data, uint32_t length, dma_sg_llp_config_t *sg_llp_config) |
Start the pdm right channel transfer with dma's sg and llp. More... | |
hal_status_t | hal_pdm_right_start_dma (pdm_handle_t *p_pdm, uint16_t *p_data, uint32_t length) |
Start the pdm right channel transfer with dma. More... | |
hal_status_t | hal_pdm_right_start_dma_sg_llp (pdm_handle_t *p_pdm, uint16_t *p_data, uint32_t length, dma_sg_llp_config_t *sg_llp_config) |
Start the pdm right channel transfer with dma's sg and llp. More... | |
hal_status_t | hal_pdm_stereo_start_dma (pdm_handle_t *p_pdm, uint32_t *p_data, uint32_t length) |
Start the pdm dual channel transfer with dma. More... | |
hal_status_t | hal_pdm_stereo_start_dma_sg_llp (pdm_handle_t *p_pdm, uint32_t *p_data, uint32_t length, dma_sg_llp_config_t *sg_llp_config) |
Start the pdm dual channel transfer with dma's sg and llp. More... | |
hal_status_t | hal_pdm_abort (pdm_handle_t *p_pdm) |
Abort ongoing conversion (blocking mode). More... | |
void | hal_pdm_irq_handler (pdm_handle_t *p_pdm) |
Handle PDM interrupt request. More... | |
void | hal_pdm_left_overflow_callback (pdm_handle_t *p_pdm) |
Left channel data overflow callback. More... | |
void | hal_pdm_right_overflow_callback (pdm_handle_t *p_pdm) |
Right channel data overflow callback. More... | |
void | hal_pdm_dma_cplt_callback (pdm_handle_t *p_pdm) |
Dma transfer completed callback.. More... | |
void | hal_pdm_dma_blk_callback (pdm_handle_t *p_pdm) |
Block transfer completed callback.. More... | |
void | hal_pdm_dma_error_callback (pdm_handle_t *p_pdm) |
DMA transfer error callback.. More... | |
Initialization and Configuration functions.
hal_status_t hal_pdm_abort | ( | pdm_handle_t * | p_pdm | ) |
Abort ongoing conversion (blocking mode).
[in] | p_pdm | PDM handle. |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |
hal_status_t hal_pdm_deinit | ( | pdm_handle_t * | p_pdm | ) |
De-initialize the PDM peripheral.
[in] | p_pdm | Pointer to an PDM handle which contains the configuration information for the specified PDM module. |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |
void hal_pdm_dma_blk_callback | ( | pdm_handle_t * | p_pdm | ) |
Block transfer completed callback..
[in] | p_pdm | Pointer to an PDM handle which contains the configuration information for the specified PDM module. |
void hal_pdm_dma_cplt_callback | ( | pdm_handle_t * | p_pdm | ) |
Dma transfer completed callback..
[in] | p_pdm | Pointer to an PDM handle which contains the configuration information for the specified PDM module. |
void hal_pdm_dma_error_callback | ( | pdm_handle_t * | p_pdm | ) |
DMA transfer error callback..
[in] | p_pdm | Pointer to an PDM handle which contains the configuration information for the specified PDM module. |
hal_status_t hal_pdm_init | ( | pdm_handle_t * | p_pdm | ) |
Initialize the PDM according to the specified parameters in the pdm_init_t and initialize the associated handle.
[in] | p_pdm | Pointer to an PDM handle which contains the configuration information for the specified PDM module. |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |
void hal_pdm_irq_handler | ( | pdm_handle_t * | p_pdm | ) |
Handle PDM interrupt request.
[in] | p_pdm | Pointer to a PDM handle which contains the configuration information for the specified PDM. |
void hal_pdm_left_overflow_callback | ( | pdm_handle_t * | p_pdm | ) |
Left channel data overflow callback.
[in] | p_pdm | Pointer to an PDM handle which contains the configuration information for the specified PDM module. |
hal_status_t hal_pdm_left_start_dma | ( | pdm_handle_t * | p_pdm, |
uint16_t * | p_data, | ||
uint32_t | length | ||
) |
Start the pdm left channel transfer with dma.
[in] | p_pdm | Pointer to an PDM handle. |
[in] | p_data | Point to the buffer that stores the data collected by PDM. |
[in] | length | Length of data buffer, ranging between 0 and 4095. |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |
hal_status_t hal_pdm_left_start_dma_sg_llp | ( | pdm_handle_t * | p_pdm, |
uint16_t * | p_data, | ||
uint32_t | length, | ||
dma_sg_llp_config_t * | sg_llp_config | ||
) |
Start the pdm right channel transfer with dma's sg and llp.
[in] | p_pdm | Pointer to an PDM handle. |
[in] | p_data | Point to the buffer that stores the data collected by PDM. |
[in] | length | Length of data buffer, ranging between 0 and 4095. |
[in] | sg_llp_config | Config for dma llp and sg fuction. |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |
void hal_pdm_msp_deinit | ( | pdm_handle_t * | p_pdm | ) |
De-initialize the PDM MSP.
[in] | p_pdm | Pointer to an PDM handle which contains the configuration information for the specified PDM module. |
void hal_pdm_msp_init | ( | pdm_handle_t * | p_pdm | ) |
Initialize the PDM MSP.
[in] | p_pdm | Pointer to an PDM handle which contains the configuration information for the specified PDM module. |
void hal_pdm_right_overflow_callback | ( | pdm_handle_t * | p_pdm | ) |
Right channel data overflow callback.
[in] | p_pdm | Pointer to an PDM handle which contains the configuration information for the specified PDM module. |
hal_status_t hal_pdm_right_start_dma | ( | pdm_handle_t * | p_pdm, |
uint16_t * | p_data, | ||
uint32_t | length | ||
) |
Start the pdm right channel transfer with dma.
[in] | p_pdm | Pointer to an PDM handle. |
[in] | p_data | Point to the buffer that stores the data collected by PDM. |
[in] | length | Length of data buffer, ranging between 0 and 4095. |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |
hal_status_t hal_pdm_right_start_dma_sg_llp | ( | pdm_handle_t * | p_pdm, |
uint16_t * | p_data, | ||
uint32_t | length, | ||
dma_sg_llp_config_t * | sg_llp_config | ||
) |
Start the pdm right channel transfer with dma's sg and llp.
[in] | p_pdm | Pointer to an PDM handle. |
[in] | p_data | Point to the buffer that stores the data collected by PDM. |
[in] | length | Length of data buffer, ranging between 0 and 4095. |
[in] | sg_llp_config | config for dma llp and sg fuction. |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |
hal_status_t hal_pdm_stereo_start_dma | ( | pdm_handle_t * | p_pdm, |
uint32_t * | p_data, | ||
uint32_t | length | ||
) |
Start the pdm dual channel transfer with dma.
[in] | p_pdm | Pointer to an PDM handle. |
[in] | p_data | Point to the buffer that stores the data collected by PDM. |
[in] | length | Length of data buffer, ranging between 0 and 4095. |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |
hal_status_t hal_pdm_stereo_start_dma_sg_llp | ( | pdm_handle_t * | p_pdm, |
uint32_t * | p_data, | ||
uint32_t | length, | ||
dma_sg_llp_config_t * | sg_llp_config | ||
) |
Start the pdm dual channel transfer with dma's sg and llp.
[in] | p_pdm | Pointer to an PDM handle. |
[in] | p_data | Point to the buffer that stores the data collected by PDM. |
[in] | length | Length of data buffer, ranging between 0 and 4095. |
[in] | sg_llp_config | config for dma llp and sg fuction. |
HAL_OK | Operation is OK. |
HAL_ERROR | Parameter error or operation not supported. |
HAL_BUSY | Driver is busy. |
HAL_TIMEOUT | Timeout occurred. |