HAL ADF functions ¶
Initialization and de-initialization functions ¶
- group ADF_Exported_Functions_Group1
-
This section provides a set of functions allowing to initialize and deinitialize the ADF peripheral:
-
Call the function HAL_ADF_Init() to initialize the selected ADF handle.
-
Call the function HAL_ADF_DeInit() to deinitialize the ADF.
Functions
-
hal_status_t
HAL_ADF_Init
(
hal_adf_handle_t
*
hadf
,
hal_adf_t
instance
)
¶
-
Initialize the ADF according to the associated handle.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
instance – HAL ADF instance.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_INVALID_PARAM – Pointer to HAL ADF handle is NULL.
-
-
void
HAL_ADF_DeInit
(
hal_adf_handle_t
*
hadf
)
¶
-
De-initialize the ADF.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
-
- group ADF_Exported_Functions_Group1
-
This section provides a set of functions allowing to initialize and deinitialize the ADF peripheral:
-
Call the function HAL_ADF_Init() to initialize the selected ADF handle.
-
Call the function HAL_ADF_DeInit() to deinitialize the ADF.
Functions
-
hal_status_t
HAL_ADF_Init
(
hal_adf_handle_t
*
hadf
,
hal_adf_t
instance
)
-
Initialize the ADF according to the associated handle.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
instance – HAL ADF instance.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_INVALID_PARAM – Pointer to HAL ADF handle is NULL.
-
-
void
HAL_ADF_DeInit
(
hal_adf_handle_t
*
hadf
)
-
De-initialize the ADF.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
-
- group ADF_Exported_Functions_Group1
-
This section provides a set of functions allowing to initialize and deinitialize the ADF peripheral:
-
Call the function HAL_ADF_Init() to initialize the selected ADF handle.
-
Call the function HAL_ADF_DeInit() to deinitialize the ADF.
Functions
-
hal_status_t
HAL_ADF_Init
(
hal_adf_handle_t
*
hadf
,
hal_adf_t
instance
)
-
Initialize the ADF according to the associated handle.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
instance – HAL ADF instance.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_INVALID_PARAM – Pointer to HAL ADF handle is NULL.
-
-
void
HAL_ADF_DeInit
(
hal_adf_handle_t
*
hadf
)
-
De-initialize the ADF.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
-
Common clock generator and features functions ¶
- group ADF_Exported_Functions_Group2
-
This section provides a set of functions allowing to configure common clock generator and features:
-
Call the function HAL_ADF_SetConfig() to configure processing clock divider.
-
Call the function HAL_ADF_GetConfig() to get the current processing clock divider.
-
Call the function HAL_ADF_SetConfigOutputClock() to configure output clock pins and divider.
-
Call the function HAL_ADF_GetConfigOutputClock() to get the current output clock pins and divider.
-
Call the function HAL_ADF_SetConfigOutputClockTrigger() to configure output clock trigger and edge.
-
Call the function HAL_ADF_GetConfigOutputClockTrigger() to get the current output clock trigger and edge.
-
Call the function HAL_ADF_SetDMA() to link DMA handle for a specified block to the ADF handle.
-
Call the function HAL_ADF_GetClockFreq() to get the current ADF kernel clock frequency.
-
Call the function HAL_ADF_SetUserData() to set user data in ADF handle.
-
Call the function HAL_ADF_GetUserData() to get user data from ADF handle.
-
Call the function HAL_ADF_GetLastErrorCodes() to get last error codes on a specified block.
This section provides also a set of functions allowing to control common features:
-
Call the function HAL_ADF_EnableOutputClock() to enable output clock pins.
-
Call the function HAL_ADF_DisableOutputClock() to disable output clock pins.
-
Call the function HAL_ADF_IsEnabledOutputClock() to check output clock pins status.
-
Call the function HAL_ADF_EnableOutputClockTrigger() to enable output clock trigger.
-
Call the function HAL_ADF_DisableOutputClockTrigger() to disable output clock trigger.
-
Call the function HAL_ADF_IsEnabledOutputClockTrigger() to check output clock trigger status.
-
Call the function HAL_ADF_EnableTriggerOutput() to enable trigger output.
-
Call the function HAL_ADF_IsEnabledTriggerOutput() to check trigger output status.
This section provides also a set of functions allowing to process common clock generator:
-
Call the function HAL_ADF_Start() to activate clock generator.
-
Call the function HAL_ADF_Stop() to deactivate clock generator.
Functions
-
hal_status_t
HAL_ADF_SetConfig
(
hal_adf_handle_t
*
hadf
,
uint32_t
proc_clock_divider
)
¶
-
Configure processing clock divider.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
proc_clock_divider – Processing clock divider. This parameter must be a number between Min_Data = 1 and Max_Data = 128.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
void
HAL_ADF_GetConfig
(
const
hal_adf_handle_t
*
hadf
,
uint32_t
*
p_proc_clock_divider
)
¶
-
Get the current processing clock divider.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
p_proc_clock_divider – Pointer to processing clock divider.
-
-
hal_status_t
HAL_ADF_SetConfigOutputClock
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_output_clock_pins_t
pins
,
uint32_t
output_clock_divider
)
¶
-
Configure output clock pins and divider.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
pins – Output clock pins.
-
output_clock_divider – Output clock divider. This parameter must be a number between Min_Data = 1 and Max_Data = 16.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
void
HAL_ADF_GetConfigOutputClock
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_output_clock_pins_t
*
p_pins
,
uint32_t
*
p_output_clock_divider
)
¶
-
Get the current output clock pins and divider.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
p_pins – Pointer to output clock pins.
-
p_output_clock_divider – Pointer to output clock divider.
-
-
hal_status_t
HAL_ADF_SetConfigOutputClockTrigger
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_output_clock_trigger_source_t
source
,
hal_adf_output_clock_trigger_edge_t
edge
)
¶
-
Configure output clock trigger and edge.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
source – Output clock trigger source.
-
edge – Output clock trigger edge.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
void
HAL_ADF_GetConfigOutputClockTrigger
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_output_clock_trigger_source_t
*
p_source
,
hal_adf_output_clock_trigger_edge_t
*
p_edge
)
¶
-
Get the current output clock trigger and edge.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
p_source – Pointer to output clock trigger source.
-
p_edge – Pointer to output clock trigger edge.
-
-
hal_status_t
HAL_ADF_SetDMA
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
block_index
,
hal_dma_handle_t
*
hdma
)
¶
-
Link DMA handle for a specified block to the ADF handle.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
block_index – Block index.
-
hdma – Pointer to DMA handle.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_INVALID_PARAM – Pointer to DMA handle is NULL.
-
-
uint32_t
HAL_ADF_GetClockFreq
(
const
hal_adf_handle_t
*
hadf
)
¶
-
Get the current ADF kernel clock frequency.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
- Return values :
-
-
uint32_t – ADF kernel clock frequency in Hz.
-
0 – ADF source clock not configured or not ready.
-
-
void
HAL_ADF_SetUserData
(
hal_adf_handle_t
*
hadf
,
const
void
*
p_user_data
)
¶
-
Set user data in ADF handle.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
p_user_data – Pointer to user data structure.
-
-
const
void
*
HAL_ADF_GetUserData
(
const
hal_adf_handle_t
*
hadf
)
¶
-
Get user data from ADF handle.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
- Return values :
-
void – Pointer to user data structure.
-
uint32_t
HAL_ADF_GetLastErrorCodes
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
block_index
)
¶
-
Get last error codes on a specified block.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
block_index – Block index.
-
- Return values :
-
uint32_t – Last error codes on the specified block. This return value can be a combination of the following values:
-
hal_status_t
HAL_ADF_EnableOutputClock
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_output_clock_pins_t
pins
)
¶
-
Enable output clock pins.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
pins – Output clock pins.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_status_t
HAL_ADF_DisableOutputClock
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_output_clock_pins_t
pins
)
¶
-
Disable output clock pins.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
pins – Output clock pins.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_output_clock_status_t
HAL_ADF_IsEnabledOutputClock
(
const
hal_adf_handle_t
*
hadf
)
¶
-
Check output clock pins status.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
- Return values :
-
hal_adf_output_clock_status_t – Output clock pins status.
-
hal_status_t
HAL_ADF_EnableOutputClockTrigger
(
const
hal_adf_handle_t
*
hadf
)
¶
-
Enable output clock trigger.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_status_t
HAL_ADF_DisableOutputClockTrigger
(
const
hal_adf_handle_t
*
hadf
)
¶
-
Disable output clock trigger.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_output_clock_trigger_status_t
HAL_ADF_IsEnabledOutputClockTrigger
(
const
hal_adf_handle_t
*
hadf
)
¶
-
Check output clock trigger status.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
- Return values :
-
hal_adf_output_clock_trigger_status_t – Output clock trigger status.
-
hal_status_t
HAL_ADF_EnableTriggerOutput
(
const
hal_adf_handle_t
*
hadf
)
¶
-
Enable trigger output.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_trigger_output_status_t
HAL_ADF_IsEnabledTriggerOutput
(
const
hal_adf_handle_t
*
hadf
)
¶
-
Check trigger output status.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
- Return values :
-
hal_adf_trigger_output_status_t – Trigger output status.
-
hal_status_t
HAL_ADF_Start
(
hal_adf_handle_t
*
hadf
)
¶
-
Activate clock generator.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_BUSY – The global state is not HAL_ADF_STATE_IDLE (USE_HAL_CHECK_PROCESS_STATE is set to 1).
-
-
hal_status_t
HAL_ADF_Stop
(
hal_adf_handle_t
*
hadf
)
¶
-
Deactivate clock generator.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
- Return values :
-
HAL_OK – Operation completed successfully.
-
- group ADF_Exported_Functions_Group2
-
This section provides a set of functions allowing to configure common clock generator and features:
-
Call the function HAL_ADF_SetConfig() to configure processing clock divider.
-
Call the function HAL_ADF_GetConfig() to get the current processing clock divider.
-
Call the function HAL_ADF_SetConfigOutputClock() to configure output clock pins and divider.
-
Call the function HAL_ADF_GetConfigOutputClock() to get the current output clock pins and divider.
-
Call the function HAL_ADF_SetConfigOutputClockTrigger() to configure output clock trigger and edge.
-
Call the function HAL_ADF_GetConfigOutputClockTrigger() to get the current output clock trigger and edge.
-
Call the function HAL_ADF_SetDMA() to link DMA handle for a specified block to the ADF handle.
-
Call the function HAL_ADF_GetClockFreq() to get the current ADF kernel clock frequency.
-
Call the function HAL_ADF_SetUserData() to set user data in ADF handle.
-
Call the function HAL_ADF_GetUserData() to get user data from ADF handle.
-
Call the function HAL_ADF_GetLastErrorCodes() to get last error codes on a specified block.
This section provides also a set of functions allowing to control common features:
-
Call the function HAL_ADF_EnableOutputClock() to enable output clock pins.
-
Call the function HAL_ADF_DisableOutputClock() to disable output clock pins.
-
Call the function HAL_ADF_IsEnabledOutputClock() to check output clock pins status.
-
Call the function HAL_ADF_EnableOutputClockTrigger() to enable output clock trigger.
-
Call the function HAL_ADF_DisableOutputClockTrigger() to disable output clock trigger.
-
Call the function HAL_ADF_IsEnabledOutputClockTrigger() to check output clock trigger status.
-
Call the function HAL_ADF_EnableTriggerOutput() to enable trigger output.
-
Call the function HAL_ADF_IsEnabledTriggerOutput() to check trigger output status.
This section provides also a set of functions allowing to process common clock generator:
-
Call the function HAL_ADF_Start() to activate clock generator.
-
Call the function HAL_ADF_Stop() to deactivate clock generator.
Functions
-
hal_status_t
HAL_ADF_SetConfig
(
hal_adf_handle_t
*
hadf
,
uint32_t
proc_clock_divider
)
-
Configure processing clock divider.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
proc_clock_divider – Processing clock divider. This parameter must be a number between Min_Data = 1 and Max_Data = 128.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
void
HAL_ADF_GetConfig
(
const
hal_adf_handle_t
*
hadf
,
uint32_t
*
p_proc_clock_divider
)
-
Get the current processing clock divider.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
p_proc_clock_divider – Pointer to processing clock divider.
-
-
hal_status_t
HAL_ADF_SetConfigOutputClock
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_output_clock_pins_t
pins
,
uint32_t
output_clock_divider
)
-
Configure output clock pins and divider.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
pins – Output clock pins.
-
output_clock_divider – Output clock divider. This parameter must be a number between Min_Data = 1 and Max_Data = 16.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
void
HAL_ADF_GetConfigOutputClock
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_output_clock_pins_t
*
p_pins
,
uint32_t
*
p_output_clock_divider
)
-
Get the current output clock pins and divider.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
p_pins – Pointer to output clock pins.
-
p_output_clock_divider – Pointer to output clock divider.
-
-
hal_status_t
HAL_ADF_SetConfigOutputClockTrigger
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_output_clock_trigger_source_t
source
,
hal_adf_output_clock_trigger_edge_t
edge
)
-
Configure output clock trigger and edge.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
source – Output clock trigger source.
-
edge – Output clock trigger edge.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
void
HAL_ADF_GetConfigOutputClockTrigger
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_output_clock_trigger_source_t
*
p_source
,
hal_adf_output_clock_trigger_edge_t
*
p_edge
)
-
Get the current output clock trigger and edge.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
p_source – Pointer to output clock trigger source.
-
p_edge – Pointer to output clock trigger edge.
-
-
hal_status_t
HAL_ADF_SetDMA
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
block_index
,
hal_dma_handle_t
*
hdma
)
-
Link DMA handle for a specified block to the ADF handle.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
block_index – Block index.
-
hdma – Pointer to DMA handle.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_INVALID_PARAM – Pointer to DMA handle is NULL.
-
-
uint32_t
HAL_ADF_GetClockFreq
(
const
hal_adf_handle_t
*
hadf
)
-
Get the current ADF kernel clock frequency.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
- Return values :
-
-
uint32_t – ADF kernel clock frequency in Hz.
-
0 – ADF source clock not configured or not ready.
-
-
void
HAL_ADF_SetUserData
(
hal_adf_handle_t
*
hadf
,
const
void
*
p_user_data
)
-
Set user data in ADF handle.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
p_user_data – Pointer to user data structure.
-
-
const
void
*
HAL_ADF_GetUserData
(
const
hal_adf_handle_t
*
hadf
)
-
Get user data from ADF handle.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
- Return values :
-
void – Pointer to user data structure.
-
uint32_t
HAL_ADF_GetLastErrorCodes
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
block_index
)
-
Get last error codes on a specified block.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
block_index – Block index.
-
- Return values :
-
uint32_t – Last error codes on the specified block. This return value can be a combination of the following values:
-
hal_status_t
HAL_ADF_EnableOutputClock
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_output_clock_pins_t
pins
)
-
Enable output clock pins.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
pins – Output clock pins.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_status_t
HAL_ADF_DisableOutputClock
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_output_clock_pins_t
pins
)
-
Disable output clock pins.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
pins – Output clock pins.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_output_clock_status_t
HAL_ADF_IsEnabledOutputClock
(
const
hal_adf_handle_t
*
hadf
)
-
Check output clock pins status.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
- Return values :
-
hal_adf_output_clock_status_t – Output clock pins status.
-
hal_status_t
HAL_ADF_EnableOutputClockTrigger
(
const
hal_adf_handle_t
*
hadf
)
-
Enable output clock trigger.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_status_t
HAL_ADF_DisableOutputClockTrigger
(
const
hal_adf_handle_t
*
hadf
)
-
Disable output clock trigger.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_output_clock_trigger_status_t
HAL_ADF_IsEnabledOutputClockTrigger
(
const
hal_adf_handle_t
*
hadf
)
-
Check output clock trigger status.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
- Return values :
-
hal_adf_output_clock_trigger_status_t – Output clock trigger status.
-
hal_status_t
HAL_ADF_EnableTriggerOutput
(
const
hal_adf_handle_t
*
hadf
)
-
Enable trigger output.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_trigger_output_status_t
HAL_ADF_IsEnabledTriggerOutput
(
const
hal_adf_handle_t
*
hadf
)
-
Check trigger output status.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
- Return values :
-
hal_adf_trigger_output_status_t – Trigger output status.
-
hal_status_t
HAL_ADF_Start
(
hal_adf_handle_t
*
hadf
)
-
Activate clock generator.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_BUSY – The global state is not HAL_ADF_STATE_IDLE (USE_HAL_CHECK_PROCESS_STATE is set to 1).
-
-
hal_status_t
HAL_ADF_Stop
(
hal_adf_handle_t
*
hadf
)
-
Deactivate clock generator.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
- Return values :
-
HAL_OK – Operation completed successfully.
-
- group ADF_Exported_Functions_Group2
-
This section provides a set of functions allowing to configure common clock generator and features:
-
Call the function HAL_ADF_SetConfig() to configure processing clock divider.
-
Call the function HAL_ADF_GetConfig() to get the current processing clock divider.
-
Call the function HAL_ADF_SetConfigOutputClock() to configure output clock pins and divider.
-
Call the function HAL_ADF_GetConfigOutputClock() to get the current output clock pins and divider.
-
Call the function HAL_ADF_SetConfigOutputClockTrigger() to configure output clock trigger and edge.
-
Call the function HAL_ADF_GetConfigOutputClockTrigger() to get the current output clock trigger and edge.
-
Call the function HAL_ADF_SetDMA() to link DMA handle for a specified block to the ADF handle.
-
Call the function HAL_ADF_GetClockFreq() to get the current ADF kernel clock frequency.
-
Call the function HAL_ADF_SetUserData() to set user data in ADF handle.
-
Call the function HAL_ADF_GetUserData() to get user data from ADF handle.
-
Call the function HAL_ADF_GetLastErrorCodes() to get last error codes on a specified block.
This section provides also a set of functions allowing to control common features:
-
Call the function HAL_ADF_EnableOutputClock() to enable output clock pins.
-
Call the function HAL_ADF_DisableOutputClock() to disable output clock pins.
-
Call the function HAL_ADF_IsEnabledOutputClock() to check output clock pins status.
-
Call the function HAL_ADF_EnableOutputClockTrigger() to enable output clock trigger.
-
Call the function HAL_ADF_DisableOutputClockTrigger() to disable output clock trigger.
-
Call the function HAL_ADF_IsEnabledOutputClockTrigger() to check output clock trigger status.
-
Call the function HAL_ADF_EnableTriggerOutput() to enable trigger output.
-
Call the function HAL_ADF_IsEnabledTriggerOutput() to check trigger output status.
This section provides also a set of functions allowing to process common clock generator:
-
Call the function HAL_ADF_Start() to activate clock generator.
-
Call the function HAL_ADF_Stop() to deactivate clock generator.
Functions
-
hal_status_t
HAL_ADF_SetConfig
(
hal_adf_handle_t
*
hadf
,
uint32_t
proc_clock_divider
)
-
Configure processing clock divider.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
proc_clock_divider – Processing clock divider. This parameter must be a number between Min_Data = 1 and Max_Data = 128.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
void
HAL_ADF_GetConfig
(
const
hal_adf_handle_t
*
hadf
,
uint32_t
*
p_proc_clock_divider
)
-
Get the current processing clock divider.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
p_proc_clock_divider – Pointer to processing clock divider.
-
-
hal_status_t
HAL_ADF_SetConfigOutputClock
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_output_clock_pins_t
pins
,
uint32_t
output_clock_divider
)
-
Configure output clock pins and divider.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
pins – Output clock pins.
-
output_clock_divider – Output clock divider. This parameter must be a number between Min_Data = 1 and Max_Data = 16.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
void
HAL_ADF_GetConfigOutputClock
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_output_clock_pins_t
*
p_pins
,
uint32_t
*
p_output_clock_divider
)
-
Get the current output clock pins and divider.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
p_pins – Pointer to output clock pins.
-
p_output_clock_divider – Pointer to output clock divider.
-
-
hal_status_t
HAL_ADF_SetConfigOutputClockTrigger
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_output_clock_trigger_source_t
source
,
hal_adf_output_clock_trigger_edge_t
edge
)
-
Configure output clock trigger and edge.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
source – Output clock trigger source.
-
edge – Output clock trigger edge.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
void
HAL_ADF_GetConfigOutputClockTrigger
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_output_clock_trigger_source_t
*
p_source
,
hal_adf_output_clock_trigger_edge_t
*
p_edge
)
-
Get the current output clock trigger and edge.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
p_source – Pointer to output clock trigger source.
-
p_edge – Pointer to output clock trigger edge.
-
-
hal_status_t
HAL_ADF_SetDMA
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
block_index
,
hal_dma_handle_t
*
hdma
)
-
Link DMA handle for a specified block to the ADF handle.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
block_index – Block index.
-
hdma – Pointer to DMA handle.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_INVALID_PARAM – Pointer to DMA handle is NULL.
-
-
uint32_t
HAL_ADF_GetClockFreq
(
const
hal_adf_handle_t
*
hadf
)
-
Get the current ADF kernel clock frequency.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
- Return values :
-
-
uint32_t – ADF kernel clock frequency in Hz.
-
0 – ADF source clock not configured or not ready.
-
-
void
HAL_ADF_SetUserData
(
hal_adf_handle_t
*
hadf
,
const
void
*
p_user_data
)
-
Set user data in ADF handle.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
p_user_data – Pointer to user data structure.
-
-
const
void
*
HAL_ADF_GetUserData
(
const
hal_adf_handle_t
*
hadf
)
-
Get user data from ADF handle.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
- Return values :
-
void – Pointer to user data structure.
-
uint32_t
HAL_ADF_GetLastErrorCodes
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
block_index
)
-
Get last error codes on a specified block.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
block_index – Block index.
-
- Return values :
-
uint32_t – Last error codes on the specified block. This return value can be a combination of the following values:
-
hal_status_t
HAL_ADF_EnableOutputClock
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_output_clock_pins_t
pins
)
-
Enable output clock pins.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
pins – Output clock pins.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_status_t
HAL_ADF_DisableOutputClock
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_output_clock_pins_t
pins
)
-
Disable output clock pins.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
pins – Output clock pins.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_output_clock_status_t
HAL_ADF_IsEnabledOutputClock
(
const
hal_adf_handle_t
*
hadf
)
-
Check output clock pins status.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
- Return values :
-
hal_adf_output_clock_status_t – Output clock pins status.
-
hal_status_t
HAL_ADF_EnableOutputClockTrigger
(
const
hal_adf_handle_t
*
hadf
)
-
Enable output clock trigger.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_status_t
HAL_ADF_DisableOutputClockTrigger
(
const
hal_adf_handle_t
*
hadf
)
-
Disable output clock trigger.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_output_clock_trigger_status_t
HAL_ADF_IsEnabledOutputClockTrigger
(
const
hal_adf_handle_t
*
hadf
)
-
Check output clock trigger status.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
- Return values :
-
hal_adf_output_clock_trigger_status_t – Output clock trigger status.
-
hal_status_t
HAL_ADF_EnableTriggerOutput
(
const
hal_adf_handle_t
*
hadf
)
-
Enable trigger output.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_trigger_output_status_t
HAL_ADF_IsEnabledTriggerOutput
(
const
hal_adf_handle_t
*
hadf
)
-
Check trigger output status.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
- Return values :
-
hal_adf_trigger_output_status_t – Trigger output status.
-
hal_status_t
HAL_ADF_Start
(
hal_adf_handle_t
*
hadf
)
-
Activate clock generator.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_BUSY – The global state is not HAL_ADF_STATE_IDLE (USE_HAL_CHECK_PROCESS_STATE is set to 1).
-
-
hal_status_t
HAL_ADF_Stop
(
hal_adf_handle_t
*
hadf
)
-
Deactivate clock generator.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
- Return values :
-
HAL_OK – Operation completed successfully.
-
Serial interface functions ¶
- group ADF_Exported_Functions_Group3
-
This section provides a set of functions allowing to configure and process serial interface:
-
Call the function HAL_ADF_SITF_SetConfig() to configure a specified serial interface.
-
Call the function HAL_ADF_SITF_GetConfig() to get the current configuration of a specified serial interface.
-
Call the function HAL_ADF_SITF_Start() to activate a specified serial interface.
-
Call the function HAL_ADF_SITF_Stop() to deactivate a specified serial interface.
This section provides also a set of functions for clock absence detection feature:
-
Call the function HAL_ADF_SITF_IsClockAbsenceDetected() to check clock absence detection status on a specified serial interface.
-
Call the function HAL_ADF_SITF_StartClockAbsenceDetect_IT() to start clock absence detection in interrupt mode on a specified serial interface.
-
Call the function HAL_ADF_SITF_StopClockAbsenceDetect_IT() to stop clock absence detection in interrupt mode on a specified serial interface.
Functions
-
hal_status_t
HAL_ADF_SITF_SetConfig
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
serial_interface_index
,
const
hal_adf_serial_interface_config_t
*
p_config
)
¶
-
Configure a specified serial interface.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
serial_interface_index – Serial interface index.
-
p_config – Pointer to serial interface configuration structure.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_INVALID_PARAM – Pointer to serial interface configuration structure is NULL.
-
-
void
HAL_ADF_SITF_GetConfig
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
serial_interface_index
,
hal_adf_serial_interface_config_t
*
p_config
)
¶
-
Get the current configuration of a specified serial interface.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
serial_interface_index – Serial interface index.
-
p_config – Pointer to serial interface configuration structure.
-
-
hal_status_t
HAL_ADF_SITF_Start
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
serial_interface_index
)
¶
-
Activate a specified serial interface.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
serial_interface_index – Serial interface index.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_BUSY – The serial interface state is not HAL_ADF_SITF_STATE_IDLE (USE_HAL_CHECK_PROCESS_STATE is set to 1).
-
-
hal_status_t
HAL_ADF_SITF_Stop
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
serial_interface_index
)
¶
-
Deactivate a specified serial interface.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
serial_interface_index – Serial interface index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_sitf_ckab_status_t
HAL_ADF_SITF_IsClockAbsenceDetected
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
serial_interface_index
)
¶
-
Check clock absence detection status on a specified serial interface.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
serial_interface_index – Serial interface index.
-
- Return values :
-
hal_adf_sitf_ckab_status_t – Clock absence detection status.
-
hal_status_t
HAL_ADF_SITF_StartClockAbsenceDetect_IT
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
serial_interface_index
)
¶
-
Start clock absence detection in interrupt mode on a specified serial interface.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
serial_interface_index – Serial interface index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_status_t
HAL_ADF_SITF_StopClockAbsenceDetect_IT
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
serial_interface_index
)
¶
-
Stop clock absence detection in interrupt mode on a specified serial interface.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
serial_interface_index – Serial interface index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
- group ADF_Exported_Functions_Group3
-
This section provides a set of functions allowing to configure and process serial interface:
-
Call the function HAL_ADF_SITF_SetConfig() to configure a specified serial interface.
-
Call the function HAL_ADF_SITF_GetConfig() to get the current configuration of a specified serial interface.
-
Call the function HAL_ADF_SITF_Start() to activate a specified serial interface.
-
Call the function HAL_ADF_SITF_Stop() to deactivate a specified serial interface.
This section provides also a set of functions for clock absence detection feature:
-
Call the function HAL_ADF_SITF_IsClockAbsenceDetected() to check clock absence detection status on a specified serial interface.
-
Call the function HAL_ADF_SITF_StartClockAbsenceDetect_IT() to start clock absence detection in interrupt mode on a specified serial interface.
-
Call the function HAL_ADF_SITF_StopClockAbsenceDetect_IT() to stop clock absence detection in interrupt mode on a specified serial interface.
Functions
-
hal_status_t
HAL_ADF_SITF_SetConfig
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
serial_interface_index
,
const
hal_adf_serial_interface_config_t
*
p_config
)
-
Configure a specified serial interface.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
serial_interface_index – Serial interface index.
-
p_config – Pointer to serial interface configuration structure.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_INVALID_PARAM – Pointer to serial interface configuration structure is NULL.
-
-
void
HAL_ADF_SITF_GetConfig
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
serial_interface_index
,
hal_adf_serial_interface_config_t
*
p_config
)
-
Get the current configuration of a specified serial interface.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
serial_interface_index – Serial interface index.
-
p_config – Pointer to serial interface configuration structure.
-
-
hal_status_t
HAL_ADF_SITF_Start
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
serial_interface_index
)
-
Activate a specified serial interface.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
serial_interface_index – Serial interface index.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_BUSY – The serial interface state is not HAL_ADF_SITF_STATE_IDLE (USE_HAL_CHECK_PROCESS_STATE is set to 1).
-
-
hal_status_t
HAL_ADF_SITF_Stop
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
serial_interface_index
)
-
Deactivate a specified serial interface.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
serial_interface_index – Serial interface index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_sitf_ckab_status_t
HAL_ADF_SITF_IsClockAbsenceDetected
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
serial_interface_index
)
-
Check clock absence detection status on a specified serial interface.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
serial_interface_index – Serial interface index.
-
- Return values :
-
hal_adf_sitf_ckab_status_t – Clock absence detection status.
-
hal_status_t
HAL_ADF_SITF_StartClockAbsenceDetect_IT
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
serial_interface_index
)
-
Start clock absence detection in interrupt mode on a specified serial interface.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
serial_interface_index – Serial interface index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_status_t
HAL_ADF_SITF_StopClockAbsenceDetect_IT
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
serial_interface_index
)
-
Stop clock absence detection in interrupt mode on a specified serial interface.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
serial_interface_index – Serial interface index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
- group ADF_Exported_Functions_Group3
-
This section provides a set of functions allowing to configure and process serial interface:
-
Call the function HAL_ADF_SITF_SetConfig() to configure a specified serial interface.
-
Call the function HAL_ADF_SITF_GetConfig() to get the current configuration of a specified serial interface.
-
Call the function HAL_ADF_SITF_Start() to activate a specified serial interface.
-
Call the function HAL_ADF_SITF_Stop() to deactivate a specified serial interface.
This section provides also a set of functions for clock absence detection feature:
-
Call the function HAL_ADF_SITF_IsClockAbsenceDetected() to check clock absence detection status on a specified serial interface.
-
Call the function HAL_ADF_SITF_StartClockAbsenceDetect_IT() to start clock absence detection in interrupt mode on a specified serial interface.
-
Call the function HAL_ADF_SITF_StopClockAbsenceDetect_IT() to stop clock absence detection in interrupt mode on a specified serial interface.
Functions
-
hal_status_t
HAL_ADF_SITF_SetConfig
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
serial_interface_index
,
const
hal_adf_serial_interface_config_t
*
p_config
)
-
Configure a specified serial interface.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
serial_interface_index – Serial interface index.
-
p_config – Pointer to serial interface configuration structure.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_INVALID_PARAM – Pointer to serial interface configuration structure is NULL.
-
-
void
HAL_ADF_SITF_GetConfig
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
serial_interface_index
,
hal_adf_serial_interface_config_t
*
p_config
)
-
Get the current configuration of a specified serial interface.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
serial_interface_index – Serial interface index.
-
p_config – Pointer to serial interface configuration structure.
-
-
hal_status_t
HAL_ADF_SITF_Start
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
serial_interface_index
)
-
Activate a specified serial interface.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
serial_interface_index – Serial interface index.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_BUSY – The serial interface state is not HAL_ADF_SITF_STATE_IDLE (USE_HAL_CHECK_PROCESS_STATE is set to 1).
-
-
hal_status_t
HAL_ADF_SITF_Stop
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
serial_interface_index
)
-
Deactivate a specified serial interface.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
serial_interface_index – Serial interface index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_sitf_ckab_status_t
HAL_ADF_SITF_IsClockAbsenceDetected
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
serial_interface_index
)
-
Check clock absence detection status on a specified serial interface.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
serial_interface_index – Serial interface index.
-
- Return values :
-
hal_adf_sitf_ckab_status_t – Clock absence detection status.
-
hal_status_t
HAL_ADF_SITF_StartClockAbsenceDetect_IT
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
serial_interface_index
)
-
Start clock absence detection in interrupt mode on a specified serial interface.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
serial_interface_index – Serial interface index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_status_t
HAL_ADF_SITF_StopClockAbsenceDetect_IT
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
serial_interface_index
)
-
Stop clock absence detection in interrupt mode on a specified serial interface.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
serial_interface_index – Serial interface index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
Bitstream matrix functions ¶
- group ADF_Exported_Functions_Group4
-
This section provides a set of functions allowing to configure bitstream matrix:
-
Call the function HAL_ADF_BSMX_SetConfig() to configure a specified bitstream matrix.
-
Call the function HAL_ADF_BSMX_GetConfig() to get the current configuration of a specified bitstream matrix.
Functions
-
hal_status_t
HAL_ADF_BSMX_SetConfig
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
bitstream_matrix_index
,
hal_adf_block_index_t
serial_interface_index
,
hal_adf_bitstream_input_edge_t
edge
)
¶
-
Connect a specified bitstream matrix to a specified serial interface and configure input edge.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
bitstream_matrix_index – Bitstream matrix index.
-
serial_interface_index – Serial interface index.
-
edge – Input edge.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
void
HAL_ADF_BSMX_GetConfig
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
bitstream_matrix_index
,
hal_adf_block_index_t
*
p_serial_interface_index
,
hal_adf_bitstream_input_edge_t
*
p_edge
)
¶
-
Get the current serial interface connected to a specified bitstream matrix and current input edge.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
bitstream_matrix_index – Bitstream matrix index.
-
p_serial_interface_index – Pointer to serial interface index.
-
p_edge – Pointer to input edge.
-
-
- group ADF_Exported_Functions_Group4
-
This section provides a set of functions allowing to configure bitstream matrix:
-
Call the function HAL_ADF_BSMX_SetConfig() to configure a specified bitstream matrix.
-
Call the function HAL_ADF_BSMX_GetConfig() to get the current configuration of a specified bitstream matrix.
Functions
-
hal_status_t
HAL_ADF_BSMX_SetConfig
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
bitstream_matrix_index
,
hal_adf_block_index_t
serial_interface_index
,
hal_adf_bitstream_input_edge_t
edge
)
-
Connect a specified bitstream matrix to a specified serial interface and configure input edge.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
bitstream_matrix_index – Bitstream matrix index.
-
serial_interface_index – Serial interface index.
-
edge – Input edge.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
void
HAL_ADF_BSMX_GetConfig
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
bitstream_matrix_index
,
hal_adf_block_index_t
*
p_serial_interface_index
,
hal_adf_bitstream_input_edge_t
*
p_edge
)
-
Get the current serial interface connected to a specified bitstream matrix and current input edge.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
bitstream_matrix_index – Bitstream matrix index.
-
p_serial_interface_index – Pointer to serial interface index.
-
p_edge – Pointer to input edge.
-
-
- group ADF_Exported_Functions_Group4
-
This section provides a set of functions allowing to configure bitstream matrix:
-
Call the function HAL_ADF_BSMX_SetConfig() to configure a specified bitstream matrix.
-
Call the function HAL_ADF_BSMX_GetConfig() to get the current configuration of a specified bitstream matrix.
Functions
-
hal_status_t
HAL_ADF_BSMX_SetConfig
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
bitstream_matrix_index
,
hal_adf_block_index_t
serial_interface_index
,
hal_adf_bitstream_input_edge_t
edge
)
-
Connect a specified bitstream matrix to a specified serial interface and configure input edge.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
bitstream_matrix_index – Bitstream matrix index.
-
serial_interface_index – Serial interface index.
-
edge – Input edge.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
void
HAL_ADF_BSMX_GetConfig
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
bitstream_matrix_index
,
hal_adf_block_index_t
*
p_serial_interface_index
,
hal_adf_bitstream_input_edge_t
*
p_edge
)
-
Get the current serial interface connected to a specified bitstream matrix and current input edge.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
bitstream_matrix_index – Bitstream matrix index.
-
p_serial_interface_index – Pointer to serial interface index.
-
p_edge – Pointer to input edge.
-
-
Digital filter functions ¶
- group ADF_Exported_Functions_Group5
-
This section provides a set of functions allowing to configure digital filter:
-
Call the function HAL_ADF_DFLT_SetConfig() to configure a specified digital filter.
-
Call the function HAL_ADF_DFLT_GetConfig() to get current configuration of a specified digital filter.
-
Call the function HAL_ADF_DFLT_SetSamplesDelay() to set samples delay on a specified digital filter.
-
Call the function HAL_ADF_DFLT_GetSamplesDelay() to get current samples delay on a specified digital filter.
-
Call the function HAL_ADF_DFLT_SetGain() to set gain on a specified digital filter.
-
Call the function HAL_ADF_DFLT_GetGain() to get current gain on a specified digital filter.
-
Call the function HAL_ADF_DFLT_SetFifoThreshold() to set FIFO threshold on a specified digital filter.
-
Call the function HAL_ADF_DFLT_GetFifoThreshold() to get current FIFO threshold on a specified digital filter.
-
Call the function HAL_ADF_DFLT_SetDiscardSamples() to set discard samples on a specified digital filter.
-
Call the function HAL_ADF_DFLT_GetDiscardSamples() to get current discard samples on a specified digital filter.
This section provides also a set of functions allowing to control digital filter:
-
Call the function HAL_ADF_DFLT_EnableReshapeFilter() to enable reshape filter on a specified digital filter.
-
Call the function HAL_ADF_DFLT_DisableReshapeFilter() to disable reshape filter on a specified digital filter.
-
Call the function HAL_ADF_DFLT_IsEnabledReshapeFilter() to check reshape filter status on a specified digital filter.
-
Call the function HAL_ADF_DFLT_GetReshapeFilterDecimationRatio() to get current reshape filter decimation ratio on a specified digital filter.
-
Call the function HAL_ADF_DFLT_EnableHighPassFilter() to enable high-pass filter on a specified digital filter.
-
Call the function HAL_ADF_DFLT_DisableHighPassFilter() to disable high-pass filter on a specified digital filter.
-
Call the function HAL_ADF_DFLT_IsEnabledHighPassFilter() to check high-pass filter status on a specified digital filter.
-
Call the function HAL_ADF_DFLT_GetHighPassFilterCutOffFrequency() to get current high-pass filter cut-off frequency on a specified digital filter.
This section provides also a set of functions allowing to process digital filter:
-
Call the function HAL_ADF_DFLT_StartAcq() to start acquisition on a specified digital filter in polling mode.
-
Call the function HAL_ADF_DFLT_StopAcq() to stop acquisition on a specified digital filter in polling mode.
-
Call the function HAL_ADF_DFLT_PollForAcq() to wait available acquisition on a specified digital filter in polling mode.
-
Call the function HAL_ADF_DFLT_GetAcqValue() to get acquisition value on a specified digital filter.
-
Call the function HAL_ADF_DFLT_StartAcq_IT() to start acquisition on a specified digital filter in interrupt mode.
-
Call the function HAL_ADF_DFLT_StopAcq_IT() to stop acquisition on a specified digital filter in interrupt mode.
-
Call the function HAL_ADF_DFLT_StartAcq_IT_Opt() to start acquisition on a specified digital filter in interrupt mode with optional interruptions.
-
Call the function HAL_ADF_DFLT_StartAcq_DMA() to start acquisition on a specified digital filter in DMA mode.
-
Call the function HAL_ADF_DFLT_StopAcq_DMA() to stop acquisition on a specified digital filter in DMA mode.
-
Call the function HAL_ADF_DFLT_StartAcq_DMA_Opt() to start acquisition on a specified digital filter in DMA mode with optional interruptions.
Functions
-
hal_status_t
HAL_ADF_DFLT_SetConfig
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
const
hal_adf_digital_filter_config_t
*
p_config
)
¶
-
Configure a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
p_config – Pointer to digital filter configuration structure.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_INVALID_PARAM – Pointer to digital filter configuration structure is NULL.
-
-
void
HAL_ADF_DFLT_GetConfig
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
hal_adf_digital_filter_config_t
*
p_config
)
¶
-
Get current configuration of a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
p_config – Pointer to digital filter configuration structure.
-
-
hal_status_t
HAL_ADF_DFLT_SetSamplesDelay
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
uint32_t
samples_delay
)
¶
-
Set samples delay on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
samples_delay – Samples delay. This parameter must be a number between Min_Data = 0 and Max_Data = 127.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
uint32_t
HAL_ADF_DFLT_GetSamplesDelay
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
¶
-
Get current samples delay on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
uint32_t – Samples delay.
-
hal_status_t
HAL_ADF_DFLT_SetGain
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
int32_t
gain
)
¶
-
Set gain on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
gain – Gain in step of around 3db (from -48db to 72dB). This parameter must be a number between Min_Data = -16 and Max_Data = 24.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
int32_t
HAL_ADF_DFLT_GetGain
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
¶
-
Get current gain on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
int32_t – Gain in step of around 3db (from -48db to 72dB). This parameter is a number between Min_Data = -16 and Max_Data = 24.
-
hal_status_t
HAL_ADF_DFLT_SetFifoThreshold
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
hal_adf_dflt_fifo_threshold_t
fifo_threshold
)
¶
-
Set FIFO threshold on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
fifo_threshold – FIFO threshold.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_dflt_fifo_threshold_t
HAL_ADF_DFLT_GetFifoThreshold
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
¶
-
Get current FIFO threshold on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
hal_adf_dflt_fifo_threshold_t – FIFO threshold.
-
hal_status_t
HAL_ADF_DFLT_SetDiscardSamples
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
uint32_t
discard_samples
)
¶
-
Set discard samples on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
discard_samples – Discard samples. This parameter must be a number between Min_Data = 0 and Max_Data = 255.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
uint32_t
HAL_ADF_DFLT_GetDiscardSamples
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
¶
-
Get current discard samples on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
uint32_t – Discard samples.
-
hal_status_t
HAL_ADF_DFLT_EnableReshapeFilter
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
hal_adf_dflt_rsf_decimation_ratio_t
decimation_ratio
)
¶
-
Enable reshape filter on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
decimation_ratio – Reshape filter decimation ratio.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_status_t
HAL_ADF_DFLT_DisableReshapeFilter
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
¶
-
Disable reshape filter on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_dflt_rsf_status_t
HAL_ADF_DFLT_IsEnabledReshapeFilter
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
¶
-
Check reshape filter status on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
hal_adf_dflt_rsf_status_t – Reshape filter status.
-
hal_adf_dflt_rsf_decimation_ratio_t
HAL_ADF_DFLT_GetReshapeFilterDecimationRatio
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
¶
-
Get current reshape filter decimation ratio on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
hal_adf_dflt_rsf_decimation_ratio_t – Reshape filter decimation ratio.
-
hal_status_t
HAL_ADF_DFLT_EnableHighPassFilter
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
hal_adf_dflt_hpf_cut_off_frequency_t
cut_off_frequency
)
¶
-
Enable high-pass filter on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
cut_off_frequency – High-pass filter cut-off frequency.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_status_t
HAL_ADF_DFLT_DisableHighPassFilter
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
¶
-
Disable high-pass filter on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_dflt_hpf_status_t
HAL_ADF_DFLT_IsEnabledHighPassFilter
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
¶
-
Check high-pass filter status on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
hal_adf_dflt_hpf_status_t – High-pass filter status.
-
hal_adf_dflt_hpf_cut_off_frequency_t
HAL_ADF_DFLT_GetHighPassFilterCutOffFrequency
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
¶
-
Get current high-pass filter cut-off frequency on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
hal_adf_dflt_hpf_cut_off_frequency_t – High-pass filter cut-off frequency.
-
hal_status_t
HAL_ADF_DFLT_StartAcq
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
¶
-
Start acquisition on a specified digital filter in polling mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_BUSY – The digital filter state is not HAL_ADF_DFLT_STATE_IDLE (USE_HAL_CHECK_PROCESS_STATE is set to 1).
-
-
hal_status_t
HAL_ADF_DFLT_StopAcq
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
¶
-
Stop acquisition on a specified digital filter in polling mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_status_t
HAL_ADF_DFLT_PollForAcq
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
uint32_t
timeout_ms
)
¶
-
Wait available acquisition on a specified digital filter in polling mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
timeout_ms – Acquisition timeout value.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_TIMEOUT – Operation exceeds user timeout.
-
-
int32_t
HAL_ADF_DFLT_GetAcqValue
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
¶
-
Get acquisition value on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
int32_t – Acquisition value.
-
hal_status_t
HAL_ADF_DFLT_StartAcq_IT
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
¶
-
Start acquisition on a specified digital filter in interrupt mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_BUSY – The digital filter state is not HAL_ADF_DFLT_STATE_IDLE (USE_HAL_CHECK_PROCESS_STATE is set to 1).
-
-
hal_status_t
HAL_ADF_DFLT_StopAcq_IT
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
¶
-
Stop acquisition on a specified digital filter in interrupt mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_status_t
HAL_ADF_DFLT_StartAcq_IT_Opt
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
uint32_t
interruptions
)
¶
-
Start acquisition on a specified digital filter in interrupt mode with optional interruptions.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
interruptions – Optional interruptions. This parameter must be a combination of the following values:
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_BUSY – The digital filter state is not HAL_ADF_DFLT_STATE_IDLE (USE_HAL_CHECK_PROCESS_STATE is set to 1).
-
-
hal_status_t
HAL_ADF_DFLT_StartAcq_DMA
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
const
hal_adf_dma_config_t
*
p_dma_config
)
¶
-
Start acquisition on a specified digital filter in DMA mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
p_dma_config – Pointer to DMA configuration structure.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_ERROR – Operation error.
-
HAL_INVALID_PARAM – Pointer to DMA configuration structure is NULL.
-
HAL_BUSY – The digital filter state is not HAL_ADF_DFLT_STATE_IDLE (USE_HAL_CHECK_PROCESS_STATE is set to 1).
-
-
hal_status_t
HAL_ADF_DFLT_StopAcq_DMA
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
¶
-
Stop acquisition on a specified digital filter in DMA mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_status_t
HAL_ADF_DFLT_StartAcq_DMA_Opt
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
const
hal_adf_dma_config_t
*
p_dma_config
,
uint32_t
interruptions
)
¶
-
Start acquisition on a specified digital filter in DMA mode with optional interruptions.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
p_dma_config – Pointer to DMA configuration structure.
-
interruptions – Optional interruptions. This parameter must be a combination of the following values:
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_ERROR – Operation error.
-
HAL_INVALID_PARAM – Pointer to DMA configuration structure is NULL.
-
HAL_BUSY – The digital filter state is not HAL_ADF_DFLT_STATE_IDLE (USE_HAL_CHECK_PROCESS_STATE is set to 1).
-
-
- group ADF_Exported_Functions_Group5
-
This section provides a set of functions allowing to configure digital filter:
-
Call the function HAL_ADF_DFLT_SetConfig() to configure a specified digital filter.
-
Call the function HAL_ADF_DFLT_GetConfig() to get current configuration of a specified digital filter.
-
Call the function HAL_ADF_DFLT_SetSamplesDelay() to set samples delay on a specified digital filter.
-
Call the function HAL_ADF_DFLT_GetSamplesDelay() to get current samples delay on a specified digital filter.
-
Call the function HAL_ADF_DFLT_SetGain() to set gain on a specified digital filter.
-
Call the function HAL_ADF_DFLT_GetGain() to get current gain on a specified digital filter.
-
Call the function HAL_ADF_DFLT_SetFifoThreshold() to set FIFO threshold on a specified digital filter.
-
Call the function HAL_ADF_DFLT_GetFifoThreshold() to get current FIFO threshold on a specified digital filter.
-
Call the function HAL_ADF_DFLT_SetDiscardSamples() to set discard samples on a specified digital filter.
-
Call the function HAL_ADF_DFLT_GetDiscardSamples() to get current discard samples on a specified digital filter.
This section provides also a set of functions allowing to control digital filter:
-
Call the function HAL_ADF_DFLT_EnableReshapeFilter() to enable reshape filter on a specified digital filter.
-
Call the function HAL_ADF_DFLT_DisableReshapeFilter() to disable reshape filter on a specified digital filter.
-
Call the function HAL_ADF_DFLT_IsEnabledReshapeFilter() to check reshape filter status on a specified digital filter.
-
Call the function HAL_ADF_DFLT_GetReshapeFilterDecimationRatio() to get current reshape filter decimation ratio on a specified digital filter.
-
Call the function HAL_ADF_DFLT_EnableHighPassFilter() to enable high-pass filter on a specified digital filter.
-
Call the function HAL_ADF_DFLT_DisableHighPassFilter() to disable high-pass filter on a specified digital filter.
-
Call the function HAL_ADF_DFLT_IsEnabledHighPassFilter() to check high-pass filter status on a specified digital filter.
-
Call the function HAL_ADF_DFLT_GetHighPassFilterCutOffFrequency() to get current high-pass filter cut-off frequency on a specified digital filter.
This section provides also a set of functions allowing to process digital filter:
-
Call the function HAL_ADF_DFLT_StartAcq() to start acquisition on a specified digital filter in polling mode.
-
Call the function HAL_ADF_DFLT_StopAcq() to stop acquisition on a specified digital filter in polling mode.
-
Call the function HAL_ADF_DFLT_PollForAcq() to wait available acquisition on a specified digital filter in polling mode.
-
Call the function HAL_ADF_DFLT_GetAcqValue() to get acquisition value on a specified digital filter.
-
Call the function HAL_ADF_DFLT_StartAcq_IT() to start acquisition on a specified digital filter in interrupt mode.
-
Call the function HAL_ADF_DFLT_StopAcq_IT() to stop acquisition on a specified digital filter in interrupt mode.
-
Call the function HAL_ADF_DFLT_StartAcq_IT_Opt() to start acquisition on a specified digital filter in interrupt mode with optional interruptions.
-
Call the function HAL_ADF_DFLT_StartAcq_DMA() to start acquisition on a specified digital filter in DMA mode.
-
Call the function HAL_ADF_DFLT_StopAcq_DMA() to stop acquisition on a specified digital filter in DMA mode.
-
Call the function HAL_ADF_DFLT_StartAcq_DMA_Opt() to start acquisition on a specified digital filter in DMA mode with optional interruptions.
Functions
-
hal_status_t
HAL_ADF_DFLT_SetConfig
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
const
hal_adf_digital_filter_config_t
*
p_config
)
-
Configure a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
p_config – Pointer to digital filter configuration structure.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_INVALID_PARAM – Pointer to digital filter configuration structure is NULL.
-
-
void
HAL_ADF_DFLT_GetConfig
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
hal_adf_digital_filter_config_t
*
p_config
)
-
Get current configuration of a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
p_config – Pointer to digital filter configuration structure.
-
-
hal_status_t
HAL_ADF_DFLT_SetSamplesDelay
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
uint32_t
samples_delay
)
-
Set samples delay on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
samples_delay – Samples delay. This parameter must be a number between Min_Data = 0 and Max_Data = 127.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
uint32_t
HAL_ADF_DFLT_GetSamplesDelay
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Get current samples delay on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
uint32_t – Samples delay.
-
hal_status_t
HAL_ADF_DFLT_SetGain
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
int32_t
gain
)
-
Set gain on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
gain – Gain in step of around 3db (from -48db to 72dB). This parameter must be a number between Min_Data = -16 and Max_Data = 24.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
int32_t
HAL_ADF_DFLT_GetGain
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Get current gain on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
int32_t – Gain in step of around 3db (from -48db to 72dB). This parameter is a number between Min_Data = -16 and Max_Data = 24.
-
hal_status_t
HAL_ADF_DFLT_SetFifoThreshold
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
hal_adf_dflt_fifo_threshold_t
fifo_threshold
)
-
Set FIFO threshold on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
fifo_threshold – FIFO threshold.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_dflt_fifo_threshold_t
HAL_ADF_DFLT_GetFifoThreshold
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Get current FIFO threshold on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
hal_adf_dflt_fifo_threshold_t – FIFO threshold.
-
hal_status_t
HAL_ADF_DFLT_SetDiscardSamples
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
uint32_t
discard_samples
)
-
Set discard samples on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
discard_samples – Discard samples. This parameter must be a number between Min_Data = 0 and Max_Data = 255.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
uint32_t
HAL_ADF_DFLT_GetDiscardSamples
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Get current discard samples on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
uint32_t – Discard samples.
-
hal_status_t
HAL_ADF_DFLT_EnableReshapeFilter
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
hal_adf_dflt_rsf_decimation_ratio_t
decimation_ratio
)
-
Enable reshape filter on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
decimation_ratio – Reshape filter decimation ratio.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_status_t
HAL_ADF_DFLT_DisableReshapeFilter
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Disable reshape filter on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_dflt_rsf_status_t
HAL_ADF_DFLT_IsEnabledReshapeFilter
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Check reshape filter status on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
hal_adf_dflt_rsf_status_t – Reshape filter status.
-
hal_adf_dflt_rsf_decimation_ratio_t
HAL_ADF_DFLT_GetReshapeFilterDecimationRatio
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Get current reshape filter decimation ratio on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
hal_adf_dflt_rsf_decimation_ratio_t – Reshape filter decimation ratio.
-
hal_status_t
HAL_ADF_DFLT_EnableHighPassFilter
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
hal_adf_dflt_hpf_cut_off_frequency_t
cut_off_frequency
)
-
Enable high-pass filter on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
cut_off_frequency – High-pass filter cut-off frequency.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_status_t
HAL_ADF_DFLT_DisableHighPassFilter
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Disable high-pass filter on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_dflt_hpf_status_t
HAL_ADF_DFLT_IsEnabledHighPassFilter
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Check high-pass filter status on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
hal_adf_dflt_hpf_status_t – High-pass filter status.
-
hal_adf_dflt_hpf_cut_off_frequency_t
HAL_ADF_DFLT_GetHighPassFilterCutOffFrequency
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Get current high-pass filter cut-off frequency on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
hal_adf_dflt_hpf_cut_off_frequency_t – High-pass filter cut-off frequency.
-
hal_status_t
HAL_ADF_DFLT_StartAcq
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Start acquisition on a specified digital filter in polling mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_BUSY – The digital filter state is not HAL_ADF_DFLT_STATE_IDLE (USE_HAL_CHECK_PROCESS_STATE is set to 1).
-
-
hal_status_t
HAL_ADF_DFLT_StopAcq
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Stop acquisition on a specified digital filter in polling mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_status_t
HAL_ADF_DFLT_PollForAcq
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
uint32_t
timeout_ms
)
-
Wait available acquisition on a specified digital filter in polling mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
timeout_ms – Acquisition timeout value.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_TIMEOUT – Operation exceeds user timeout.
-
-
int32_t
HAL_ADF_DFLT_GetAcqValue
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Get acquisition value on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
int32_t – Acquisition value.
-
hal_status_t
HAL_ADF_DFLT_StartAcq_IT
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Start acquisition on a specified digital filter in interrupt mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_BUSY – The digital filter state is not HAL_ADF_DFLT_STATE_IDLE (USE_HAL_CHECK_PROCESS_STATE is set to 1).
-
-
hal_status_t
HAL_ADF_DFLT_StopAcq_IT
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Stop acquisition on a specified digital filter in interrupt mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_status_t
HAL_ADF_DFLT_StartAcq_IT_Opt
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
uint32_t
interruptions
)
-
Start acquisition on a specified digital filter in interrupt mode with optional interruptions.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
interruptions – Optional interruptions. This parameter must be a combination of the following values:
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_BUSY – The digital filter state is not HAL_ADF_DFLT_STATE_IDLE (USE_HAL_CHECK_PROCESS_STATE is set to 1).
-
-
hal_status_t
HAL_ADF_DFLT_StartAcq_DMA
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
const
hal_adf_dma_config_t
*
p_dma_config
)
-
Start acquisition on a specified digital filter in DMA mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
p_dma_config – Pointer to DMA configuration structure.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_ERROR – Operation error.
-
HAL_INVALID_PARAM – Pointer to DMA configuration structure is NULL.
-
HAL_BUSY – The digital filter state is not HAL_ADF_DFLT_STATE_IDLE (USE_HAL_CHECK_PROCESS_STATE is set to 1).
-
-
hal_status_t
HAL_ADF_DFLT_StopAcq_DMA
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Stop acquisition on a specified digital filter in DMA mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_status_t
HAL_ADF_DFLT_StartAcq_DMA_Opt
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
const
hal_adf_dma_config_t
*
p_dma_config
,
uint32_t
interruptions
)
-
Start acquisition on a specified digital filter in DMA mode with optional interruptions.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
p_dma_config – Pointer to DMA configuration structure.
-
interruptions – Optional interruptions. This parameter must be a combination of the following values:
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_ERROR – Operation error.
-
HAL_INVALID_PARAM – Pointer to DMA configuration structure is NULL.
-
HAL_BUSY – The digital filter state is not HAL_ADF_DFLT_STATE_IDLE (USE_HAL_CHECK_PROCESS_STATE is set to 1).
-
-
- group ADF_Exported_Functions_Group5
-
This section provides a set of functions allowing to configure digital filter:
-
Call the function HAL_ADF_DFLT_SetConfig() to configure a specified digital filter.
-
Call the function HAL_ADF_DFLT_GetConfig() to get current configuration of a specified digital filter.
-
Call the function HAL_ADF_DFLT_SetSamplesDelay() to set samples delay on a specified digital filter.
-
Call the function HAL_ADF_DFLT_GetSamplesDelay() to get current samples delay on a specified digital filter.
-
Call the function HAL_ADF_DFLT_SetGain() to set gain on a specified digital filter.
-
Call the function HAL_ADF_DFLT_GetGain() to get current gain on a specified digital filter.
-
Call the function HAL_ADF_DFLT_SetFifoThreshold() to set FIFO threshold on a specified digital filter.
-
Call the function HAL_ADF_DFLT_GetFifoThreshold() to get current FIFO threshold on a specified digital filter.
-
Call the function HAL_ADF_DFLT_SetDiscardSamples() to set discard samples on a specified digital filter.
-
Call the function HAL_ADF_DFLT_GetDiscardSamples() to get current discard samples on a specified digital filter.
This section provides also a set of functions allowing to control digital filter:
-
Call the function HAL_ADF_DFLT_EnableReshapeFilter() to enable reshape filter on a specified digital filter.
-
Call the function HAL_ADF_DFLT_DisableReshapeFilter() to disable reshape filter on a specified digital filter.
-
Call the function HAL_ADF_DFLT_IsEnabledReshapeFilter() to check reshape filter status on a specified digital filter.
-
Call the function HAL_ADF_DFLT_GetReshapeFilterDecimationRatio() to get current reshape filter decimation ratio on a specified digital filter.
-
Call the function HAL_ADF_DFLT_EnableHighPassFilter() to enable high-pass filter on a specified digital filter.
-
Call the function HAL_ADF_DFLT_DisableHighPassFilter() to disable high-pass filter on a specified digital filter.
-
Call the function HAL_ADF_DFLT_IsEnabledHighPassFilter() to check high-pass filter status on a specified digital filter.
-
Call the function HAL_ADF_DFLT_GetHighPassFilterCutOffFrequency() to get current high-pass filter cut-off frequency on a specified digital filter.
This section provides also a set of functions allowing to process digital filter:
-
Call the function HAL_ADF_DFLT_StartAcq() to start acquisition on a specified digital filter in polling mode.
-
Call the function HAL_ADF_DFLT_StopAcq() to stop acquisition on a specified digital filter in polling mode.
-
Call the function HAL_ADF_DFLT_PollForAcq() to wait available acquisition on a specified digital filter in polling mode.
-
Call the function HAL_ADF_DFLT_GetAcqValue() to get acquisition value on a specified digital filter.
-
Call the function HAL_ADF_DFLT_StartAcq_IT() to start acquisition on a specified digital filter in interrupt mode.
-
Call the function HAL_ADF_DFLT_StopAcq_IT() to stop acquisition on a specified digital filter in interrupt mode.
-
Call the function HAL_ADF_DFLT_StartAcq_IT_Opt() to start acquisition on a specified digital filter in interrupt mode with optional interruptions.
-
Call the function HAL_ADF_DFLT_StartAcq_DMA() to start acquisition on a specified digital filter in DMA mode.
-
Call the function HAL_ADF_DFLT_StopAcq_DMA() to stop acquisition on a specified digital filter in DMA mode.
-
Call the function HAL_ADF_DFLT_StartAcq_DMA_Opt() to start acquisition on a specified digital filter in DMA mode with optional interruptions.
Functions
-
hal_status_t
HAL_ADF_DFLT_SetConfig
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
const
hal_adf_digital_filter_config_t
*
p_config
)
-
Configure a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
p_config – Pointer to digital filter configuration structure.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_INVALID_PARAM – Pointer to digital filter configuration structure is NULL.
-
-
void
HAL_ADF_DFLT_GetConfig
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
hal_adf_digital_filter_config_t
*
p_config
)
-
Get current configuration of a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
p_config – Pointer to digital filter configuration structure.
-
-
hal_status_t
HAL_ADF_DFLT_SetSamplesDelay
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
uint32_t
samples_delay
)
-
Set samples delay on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
samples_delay – Samples delay. This parameter must be a number between Min_Data = 0 and Max_Data = 127.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
uint32_t
HAL_ADF_DFLT_GetSamplesDelay
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Get current samples delay on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
uint32_t – Samples delay.
-
hal_status_t
HAL_ADF_DFLT_SetGain
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
int32_t
gain
)
-
Set gain on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
gain – Gain in step of around 3db (from -48db to 72dB). This parameter must be a number between Min_Data = -16 and Max_Data = 24.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
int32_t
HAL_ADF_DFLT_GetGain
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Get current gain on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
int32_t – Gain in step of around 3db (from -48db to 72dB). This parameter is a number between Min_Data = -16 and Max_Data = 24.
-
hal_status_t
HAL_ADF_DFLT_SetFifoThreshold
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
hal_adf_dflt_fifo_threshold_t
fifo_threshold
)
-
Set FIFO threshold on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
fifo_threshold – FIFO threshold.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_dflt_fifo_threshold_t
HAL_ADF_DFLT_GetFifoThreshold
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Get current FIFO threshold on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
hal_adf_dflt_fifo_threshold_t – FIFO threshold.
-
hal_status_t
HAL_ADF_DFLT_SetDiscardSamples
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
uint32_t
discard_samples
)
-
Set discard samples on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
discard_samples – Discard samples. This parameter must be a number between Min_Data = 0 and Max_Data = 255.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
uint32_t
HAL_ADF_DFLT_GetDiscardSamples
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Get current discard samples on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
uint32_t – Discard samples.
-
hal_status_t
HAL_ADF_DFLT_EnableReshapeFilter
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
hal_adf_dflt_rsf_decimation_ratio_t
decimation_ratio
)
-
Enable reshape filter on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
decimation_ratio – Reshape filter decimation ratio.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_status_t
HAL_ADF_DFLT_DisableReshapeFilter
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Disable reshape filter on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_dflt_rsf_status_t
HAL_ADF_DFLT_IsEnabledReshapeFilter
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Check reshape filter status on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
hal_adf_dflt_rsf_status_t – Reshape filter status.
-
hal_adf_dflt_rsf_decimation_ratio_t
HAL_ADF_DFLT_GetReshapeFilterDecimationRatio
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Get current reshape filter decimation ratio on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
hal_adf_dflt_rsf_decimation_ratio_t – Reshape filter decimation ratio.
-
hal_status_t
HAL_ADF_DFLT_EnableHighPassFilter
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
hal_adf_dflt_hpf_cut_off_frequency_t
cut_off_frequency
)
-
Enable high-pass filter on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
cut_off_frequency – High-pass filter cut-off frequency.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_status_t
HAL_ADF_DFLT_DisableHighPassFilter
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Disable high-pass filter on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_dflt_hpf_status_t
HAL_ADF_DFLT_IsEnabledHighPassFilter
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Check high-pass filter status on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
hal_adf_dflt_hpf_status_t – High-pass filter status.
-
hal_adf_dflt_hpf_cut_off_frequency_t
HAL_ADF_DFLT_GetHighPassFilterCutOffFrequency
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Get current high-pass filter cut-off frequency on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
hal_adf_dflt_hpf_cut_off_frequency_t – High-pass filter cut-off frequency.
-
hal_status_t
HAL_ADF_DFLT_StartAcq
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Start acquisition on a specified digital filter in polling mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_BUSY – The digital filter state is not HAL_ADF_DFLT_STATE_IDLE (USE_HAL_CHECK_PROCESS_STATE is set to 1).
-
-
hal_status_t
HAL_ADF_DFLT_StopAcq
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Stop acquisition on a specified digital filter in polling mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_status_t
HAL_ADF_DFLT_PollForAcq
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
uint32_t
timeout_ms
)
-
Wait available acquisition on a specified digital filter in polling mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
timeout_ms – Acquisition timeout value.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_TIMEOUT – Operation exceeds user timeout.
-
-
int32_t
HAL_ADF_DFLT_GetAcqValue
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Get acquisition value on a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
int32_t – Acquisition value.
-
hal_status_t
HAL_ADF_DFLT_StartAcq_IT
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Start acquisition on a specified digital filter in interrupt mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_BUSY – The digital filter state is not HAL_ADF_DFLT_STATE_IDLE (USE_HAL_CHECK_PROCESS_STATE is set to 1).
-
-
hal_status_t
HAL_ADF_DFLT_StopAcq_IT
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Stop acquisition on a specified digital filter in interrupt mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_status_t
HAL_ADF_DFLT_StartAcq_IT_Opt
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
uint32_t
interruptions
)
-
Start acquisition on a specified digital filter in interrupt mode with optional interruptions.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
interruptions – Optional interruptions. This parameter must be a combination of the following values:
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_BUSY – The digital filter state is not HAL_ADF_DFLT_STATE_IDLE (USE_HAL_CHECK_PROCESS_STATE is set to 1).
-
-
hal_status_t
HAL_ADF_DFLT_StartAcq_DMA
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
const
hal_adf_dma_config_t
*
p_dma_config
)
-
Start acquisition on a specified digital filter in DMA mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
p_dma_config – Pointer to DMA configuration structure.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_ERROR – Operation error.
-
HAL_INVALID_PARAM – Pointer to DMA configuration structure is NULL.
-
HAL_BUSY – The digital filter state is not HAL_ADF_DFLT_STATE_IDLE (USE_HAL_CHECK_PROCESS_STATE is set to 1).
-
-
hal_status_t
HAL_ADF_DFLT_StopAcq_DMA
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Stop acquisition on a specified digital filter in DMA mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_status_t
HAL_ADF_DFLT_StartAcq_DMA_Opt
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
,
const
hal_adf_dma_config_t
*
p_dma_config
,
uint32_t
interruptions
)
-
Start acquisition on a specified digital filter in DMA mode with optional interruptions.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
p_dma_config – Pointer to DMA configuration structure.
-
interruptions – Optional interruptions. This parameter must be a combination of the following values:
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_ERROR – Operation error.
-
HAL_INVALID_PARAM – Pointer to DMA configuration structure is NULL.
-
HAL_BUSY – The digital filter state is not HAL_ADF_DFLT_STATE_IDLE (USE_HAL_CHECK_PROCESS_STATE is set to 1).
-
-
Sound activity detector functions ¶
- group ADF_Exported_Functions_Group6
-
This section provides a set of functions allowing to configure sound activity detector:
-
Call the function HAL_ADF_SAD_SetConfig() to configure a specified sound activity detector.
-
Call the function HAL_ADF_SAD_GetConfig() to get the current configuration of a specified sound activity detector.
-
Call the function HAL_ADF_SAD_SetFrameSize() to set frame size on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_GetFrameSize() to get current frame size on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_SetLearningFrames() to set learning frames on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_GetLearningFrames() to get current learning frames on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_SetSignalToNoiseThreshold() to set signal to noise threshold on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_GetSignalToNoiseThreshold() to get current signal to noise threshold on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_SetAmbientNoiseSlope() to set ambient noise slope on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_GetAmbientNoiseSlope() to get current ambient noise slope on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_SetHangoverTimeWindow() to set hangover time window on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_GetHangoverTimeWindow() to get current hangover time window on a specified sound activity detector.
This section provides also a set of functions allowing to control sound activity detector:
-
Call the function HAL_ADF_SAD_EnableHysteresis() to enable hysteresis on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_DisableHysteresis() to disable hysteresis on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_IsEnabledHysteresis() to check hysteresis status on a specified sound activity detector.
This section provides also a set of functions allowing to process sound activity detector:
-
Call the function HAL_ADF_SAD_Start() to activate a specified sound activity detector in polling mode.
-
Call the function HAL_ADF_SAD_Stop() to deactivate a specified sound activity detector in polling mode.
-
Call the function HAL_ADF_SAD_IsDetected() to check detection status on a specified sound activity detector in polling mode.
-
Call the function HAL_ADF_SAD_PollForSoundLevel() to wait available sound level on a specified sound activity detector in polling mode.
-
Call the function HAL_ADF_SAD_GetSoundAndAmbientNoiseLevels() to get current sound level and ambient noise level on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_Start_IT() to activate a specified sound activity detector in interrupt mode.
-
Call the function HAL_ADF_SAD_Stop_IT() to deactivate a specified sound activity detector in interrupt mode.
-
Call the function HAL_ADF_SAD_Start_IT_Opt() to activate a specified sound activity detector in interrupt mode with optional interruptions.
Functions
-
hal_status_t
HAL_ADF_SAD_SetConfig
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
,
const
hal_adf_sad_config_t
*
p_config
)
¶
-
Configure a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
p_config – Pointer to sound activity detector configuration structure.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_INVALID_PARAM – Pointer to sound activity detector configuration structure is NULL.
-
-
void
HAL_ADF_SAD_GetConfig
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
,
hal_adf_sad_config_t
*
p_config
)
¶
-
Get the current configuration of a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
p_config – Pointer to sound activity detector configuration structure.
-
-
hal_status_t
HAL_ADF_SAD_SetFrameSize
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
,
hal_adf_sad_frame_size_t
frame_size
)
¶
-
Set frame size on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
frame_size – Frame size.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_sad_frame_size_t
HAL_ADF_SAD_GetFrameSize
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
¶
-
Get current frame size on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
hal_adf_sad_frame_size_t – Frame size.
-
hal_status_t
HAL_ADF_SAD_SetLearningFrames
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
,
hal_adf_sad_learning_frames_t
learning_frames
)
¶
-
Set learning frames on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
learning_frames – Learning frames.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_sad_learning_frames_t
HAL_ADF_SAD_GetLearningFrames
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
¶
-
Get learning frames on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
hal_adf_sad_learning_frames_t – Learning frames.
-
hal_status_t
HAL_ADF_SAD_SetSignalToNoiseThreshold
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
,
hal_adf_sad_signal_to_noise_threshold_t
threshold
)
¶
-
Set signal to noise threshold on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
threshold – Signal to noise threshold.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_sad_signal_to_noise_threshold_t
HAL_ADF_SAD_GetSignalToNoiseThreshold
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
¶
-
Get signal to noise threshold on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
hal_adf_sad_signal_to_noise_threshold_t – Signal to noise threshold.
-
hal_status_t
HAL_ADF_SAD_SetAmbientNoiseSlope
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
,
uint32_t
ambient_noise_slope
)
¶
-
Set ambient noise slope on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
ambient_noise_slope – Ambient noise slope. This parameter must be a number between Min_Data = 0 and Max_Data = 7.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
uint32_t
HAL_ADF_SAD_GetAmbientNoiseSlope
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
¶
-
Get ambient noise slope on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
uint32_t – Ambient noise slope.
-
hal_status_t
HAL_ADF_SAD_SetHangoverTimeWindow
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
,
hal_adf_sad_hangover_time_window_t
hangover_time_window
)
¶
-
Set hangover time window on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
hangover_time_window – Hangover time window.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_sad_hangover_time_window_t
HAL_ADF_SAD_GetHangoverTimeWindow
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
¶
-
Get hangover time window on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
hal_adf_sad_hangover_time_window_t – Hangover time window.
-
hal_status_t
HAL_ADF_SAD_EnableHysteresis
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
¶
-
Enable hysteresis on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_status_t
HAL_ADF_SAD_DisableHysteresis
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
¶
-
Disable hysteresis on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_sad_hysteresis_status_t
HAL_ADF_SAD_IsEnabledHysteresis
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
¶
-
Check hysteresis status on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
hal_adf_sad_hysteresis_status_t – Hysteresis status.
-
hal_status_t
HAL_ADF_SAD_Start
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
¶
-
Activate a specified sound activity detector in polling mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_BUSY – The sound activity detector state is not HAL_ADF_SAD_STATE_IDLE (USE_HAL_CHECK_PROCESS_STATE is set to 1).
-
-
hal_status_t
HAL_ADF_SAD_Stop
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
¶
-
Deactivate a specified sound activity detector in polling mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_sad_status_t
HAL_ADF_SAD_IsDetected
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
¶
-
Check detection status on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
hal_adf_sad_status_t – Sound activity detection status.
-
hal_status_t
HAL_ADF_SAD_PollForSoundLevel
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
,
uint32_t
timeout_ms
)
¶
-
Wait available sound level on a specified sound activity detector in polling mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
timeout_ms – Timeout value.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_TIMEOUT – Operation exceeds user timeout.
-
-
void
HAL_ADF_SAD_GetSoundAndAmbientNoiseLevels
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
,
uint32_t
*
p_sound_level
,
uint32_t
*
p_ambient_noise_level
)
¶
-
Get sound level and ambient noise level on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
p_sound_level – Pointer on sound level value.
-
p_ambient_noise_level – Pointer on ambient noise level value.
-
-
hal_status_t
HAL_ADF_SAD_Start_IT
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
¶
-
Activate a specified sound activity detector in interrupt mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_BUSY – The sound activity detector state is not HAL_ADF_SAD_STATE_IDLE (USE_HAL_CHECK_PROCESS_STATE is set to 1).
-
-
hal_status_t
HAL_ADF_SAD_Stop_IT
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
¶
-
Deactivate a specified sound activity detector in interrupt mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_status_t
HAL_ADF_SAD_Start_IT_Opt
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
,
uint32_t
interruptions
)
¶
-
Activate a specified sound activity detector in interrupt mode with optional interruptions.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
interruptions – Optional interruptions. This parameter must be one of the following values:
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_BUSY – The sound activity detector state is not HAL_ADF_SAD_STATE_IDLE (USE_HAL_CHECK_PROCESS_STATE is set to 1).
-
-
- group ADF_Exported_Functions_Group6
-
This section provides a set of functions allowing to configure sound activity detector:
-
Call the function HAL_ADF_SAD_SetConfig() to configure a specified sound activity detector.
-
Call the function HAL_ADF_SAD_GetConfig() to get the current configuration of a specified sound activity detector.
-
Call the function HAL_ADF_SAD_SetFrameSize() to set frame size on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_GetFrameSize() to get current frame size on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_SetLearningFrames() to set learning frames on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_GetLearningFrames() to get current learning frames on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_SetSignalToNoiseThreshold() to set signal to noise threshold on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_GetSignalToNoiseThreshold() to get current signal to noise threshold on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_SetAmbientNoiseSlope() to set ambient noise slope on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_GetAmbientNoiseSlope() to get current ambient noise slope on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_SetHangoverTimeWindow() to set hangover time window on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_GetHangoverTimeWindow() to get current hangover time window on a specified sound activity detector.
This section provides also a set of functions allowing to control sound activity detector:
-
Call the function HAL_ADF_SAD_EnableHysteresis() to enable hysteresis on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_DisableHysteresis() to disable hysteresis on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_IsEnabledHysteresis() to check hysteresis status on a specified sound activity detector.
This section provides also a set of functions allowing to process sound activity detector:
-
Call the function HAL_ADF_SAD_Start() to activate a specified sound activity detector in polling mode.
-
Call the function HAL_ADF_SAD_Stop() to deactivate a specified sound activity detector in polling mode.
-
Call the function HAL_ADF_SAD_IsDetected() to check detection status on a specified sound activity detector in polling mode.
-
Call the function HAL_ADF_SAD_PollForSoundLevel() to wait available sound level on a specified sound activity detector in polling mode.
-
Call the function HAL_ADF_SAD_GetSoundAndAmbientNoiseLevels() to get current sound level and ambient noise level on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_Start_IT() to activate a specified sound activity detector in interrupt mode.
-
Call the function HAL_ADF_SAD_Stop_IT() to deactivate a specified sound activity detector in interrupt mode.
-
Call the function HAL_ADF_SAD_Start_IT_Opt() to activate a specified sound activity detector in interrupt mode with optional interruptions.
Functions
-
hal_status_t
HAL_ADF_SAD_SetConfig
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
,
const
hal_adf_sad_config_t
*
p_config
)
-
Configure a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
p_config – Pointer to sound activity detector configuration structure.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_INVALID_PARAM – Pointer to sound activity detector configuration structure is NULL.
-
-
void
HAL_ADF_SAD_GetConfig
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
,
hal_adf_sad_config_t
*
p_config
)
-
Get the current configuration of a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
p_config – Pointer to sound activity detector configuration structure.
-
-
hal_status_t
HAL_ADF_SAD_SetFrameSize
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
,
hal_adf_sad_frame_size_t
frame_size
)
-
Set frame size on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
frame_size – Frame size.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_sad_frame_size_t
HAL_ADF_SAD_GetFrameSize
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
-
Get current frame size on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
hal_adf_sad_frame_size_t – Frame size.
-
hal_status_t
HAL_ADF_SAD_SetLearningFrames
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
,
hal_adf_sad_learning_frames_t
learning_frames
)
-
Set learning frames on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
learning_frames – Learning frames.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_sad_learning_frames_t
HAL_ADF_SAD_GetLearningFrames
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
-
Get learning frames on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
hal_adf_sad_learning_frames_t – Learning frames.
-
hal_status_t
HAL_ADF_SAD_SetSignalToNoiseThreshold
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
,
hal_adf_sad_signal_to_noise_threshold_t
threshold
)
-
Set signal to noise threshold on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
threshold – Signal to noise threshold.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_sad_signal_to_noise_threshold_t
HAL_ADF_SAD_GetSignalToNoiseThreshold
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
-
Get signal to noise threshold on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
hal_adf_sad_signal_to_noise_threshold_t – Signal to noise threshold.
-
hal_status_t
HAL_ADF_SAD_SetAmbientNoiseSlope
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
,
uint32_t
ambient_noise_slope
)
-
Set ambient noise slope on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
ambient_noise_slope – Ambient noise slope. This parameter must be a number between Min_Data = 0 and Max_Data = 7.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
uint32_t
HAL_ADF_SAD_GetAmbientNoiseSlope
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
-
Get ambient noise slope on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
uint32_t – Ambient noise slope.
-
hal_status_t
HAL_ADF_SAD_SetHangoverTimeWindow
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
,
hal_adf_sad_hangover_time_window_t
hangover_time_window
)
-
Set hangover time window on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
hangover_time_window – Hangover time window.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_sad_hangover_time_window_t
HAL_ADF_SAD_GetHangoverTimeWindow
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
-
Get hangover time window on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
hal_adf_sad_hangover_time_window_t – Hangover time window.
-
hal_status_t
HAL_ADF_SAD_EnableHysteresis
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
-
Enable hysteresis on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_status_t
HAL_ADF_SAD_DisableHysteresis
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
-
Disable hysteresis on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_sad_hysteresis_status_t
HAL_ADF_SAD_IsEnabledHysteresis
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
-
Check hysteresis status on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
hal_adf_sad_hysteresis_status_t – Hysteresis status.
-
hal_status_t
HAL_ADF_SAD_Start
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
-
Activate a specified sound activity detector in polling mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_BUSY – The sound activity detector state is not HAL_ADF_SAD_STATE_IDLE (USE_HAL_CHECK_PROCESS_STATE is set to 1).
-
-
hal_status_t
HAL_ADF_SAD_Stop
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
-
Deactivate a specified sound activity detector in polling mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_sad_status_t
HAL_ADF_SAD_IsDetected
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
-
Check detection status on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
hal_adf_sad_status_t – Sound activity detection status.
-
hal_status_t
HAL_ADF_SAD_PollForSoundLevel
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
,
uint32_t
timeout_ms
)
-
Wait available sound level on a specified sound activity detector in polling mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
timeout_ms – Timeout value.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_TIMEOUT – Operation exceeds user timeout.
-
-
void
HAL_ADF_SAD_GetSoundAndAmbientNoiseLevels
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
,
uint32_t
*
p_sound_level
,
uint32_t
*
p_ambient_noise_level
)
-
Get sound level and ambient noise level on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
p_sound_level – Pointer on sound level value.
-
p_ambient_noise_level – Pointer on ambient noise level value.
-
-
hal_status_t
HAL_ADF_SAD_Start_IT
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
-
Activate a specified sound activity detector in interrupt mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_BUSY – The sound activity detector state is not HAL_ADF_SAD_STATE_IDLE (USE_HAL_CHECK_PROCESS_STATE is set to 1).
-
-
hal_status_t
HAL_ADF_SAD_Stop_IT
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
-
Deactivate a specified sound activity detector in interrupt mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_status_t
HAL_ADF_SAD_Start_IT_Opt
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
,
uint32_t
interruptions
)
-
Activate a specified sound activity detector in interrupt mode with optional interruptions.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
interruptions – Optional interruptions. This parameter must be one of the following values:
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_BUSY – The sound activity detector state is not HAL_ADF_SAD_STATE_IDLE (USE_HAL_CHECK_PROCESS_STATE is set to 1).
-
-
- group ADF_Exported_Functions_Group6
-
This section provides a set of functions allowing to configure sound activity detector:
-
Call the function HAL_ADF_SAD_SetConfig() to configure a specified sound activity detector.
-
Call the function HAL_ADF_SAD_GetConfig() to get the current configuration of a specified sound activity detector.
-
Call the function HAL_ADF_SAD_SetFrameSize() to set frame size on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_GetFrameSize() to get current frame size on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_SetLearningFrames() to set learning frames on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_GetLearningFrames() to get current learning frames on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_SetSignalToNoiseThreshold() to set signal to noise threshold on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_GetSignalToNoiseThreshold() to get current signal to noise threshold on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_SetAmbientNoiseSlope() to set ambient noise slope on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_GetAmbientNoiseSlope() to get current ambient noise slope on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_SetHangoverTimeWindow() to set hangover time window on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_GetHangoverTimeWindow() to get current hangover time window on a specified sound activity detector.
This section provides also a set of functions allowing to control sound activity detector:
-
Call the function HAL_ADF_SAD_EnableHysteresis() to enable hysteresis on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_DisableHysteresis() to disable hysteresis on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_IsEnabledHysteresis() to check hysteresis status on a specified sound activity detector.
This section provides also a set of functions allowing to process sound activity detector:
-
Call the function HAL_ADF_SAD_Start() to activate a specified sound activity detector in polling mode.
-
Call the function HAL_ADF_SAD_Stop() to deactivate a specified sound activity detector in polling mode.
-
Call the function HAL_ADF_SAD_IsDetected() to check detection status on a specified sound activity detector in polling mode.
-
Call the function HAL_ADF_SAD_PollForSoundLevel() to wait available sound level on a specified sound activity detector in polling mode.
-
Call the function HAL_ADF_SAD_GetSoundAndAmbientNoiseLevels() to get current sound level and ambient noise level on a specified sound activity detector.
-
Call the function HAL_ADF_SAD_Start_IT() to activate a specified sound activity detector in interrupt mode.
-
Call the function HAL_ADF_SAD_Stop_IT() to deactivate a specified sound activity detector in interrupt mode.
-
Call the function HAL_ADF_SAD_Start_IT_Opt() to activate a specified sound activity detector in interrupt mode with optional interruptions.
Functions
-
hal_status_t
HAL_ADF_SAD_SetConfig
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
,
const
hal_adf_sad_config_t
*
p_config
)
-
Configure a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
p_config – Pointer to sound activity detector configuration structure.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_INVALID_PARAM – Pointer to sound activity detector configuration structure is NULL.
-
-
void
HAL_ADF_SAD_GetConfig
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
,
hal_adf_sad_config_t
*
p_config
)
-
Get the current configuration of a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
p_config – Pointer to sound activity detector configuration structure.
-
-
hal_status_t
HAL_ADF_SAD_SetFrameSize
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
,
hal_adf_sad_frame_size_t
frame_size
)
-
Set frame size on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
frame_size – Frame size.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_sad_frame_size_t
HAL_ADF_SAD_GetFrameSize
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
-
Get current frame size on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
hal_adf_sad_frame_size_t – Frame size.
-
hal_status_t
HAL_ADF_SAD_SetLearningFrames
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
,
hal_adf_sad_learning_frames_t
learning_frames
)
-
Set learning frames on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
learning_frames – Learning frames.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_sad_learning_frames_t
HAL_ADF_SAD_GetLearningFrames
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
-
Get learning frames on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
hal_adf_sad_learning_frames_t – Learning frames.
-
hal_status_t
HAL_ADF_SAD_SetSignalToNoiseThreshold
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
,
hal_adf_sad_signal_to_noise_threshold_t
threshold
)
-
Set signal to noise threshold on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
threshold – Signal to noise threshold.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_sad_signal_to_noise_threshold_t
HAL_ADF_SAD_GetSignalToNoiseThreshold
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
-
Get signal to noise threshold on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
hal_adf_sad_signal_to_noise_threshold_t – Signal to noise threshold.
-
hal_status_t
HAL_ADF_SAD_SetAmbientNoiseSlope
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
,
uint32_t
ambient_noise_slope
)
-
Set ambient noise slope on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
ambient_noise_slope – Ambient noise slope. This parameter must be a number between Min_Data = 0 and Max_Data = 7.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
uint32_t
HAL_ADF_SAD_GetAmbientNoiseSlope
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
-
Get ambient noise slope on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
uint32_t – Ambient noise slope.
-
hal_status_t
HAL_ADF_SAD_SetHangoverTimeWindow
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
,
hal_adf_sad_hangover_time_window_t
hangover_time_window
)
-
Set hangover time window on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
hangover_time_window – Hangover time window.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_sad_hangover_time_window_t
HAL_ADF_SAD_GetHangoverTimeWindow
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
-
Get hangover time window on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
hal_adf_sad_hangover_time_window_t – Hangover time window.
-
hal_status_t
HAL_ADF_SAD_EnableHysteresis
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
-
Enable hysteresis on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_status_t
HAL_ADF_SAD_DisableHysteresis
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
-
Disable hysteresis on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_sad_hysteresis_status_t
HAL_ADF_SAD_IsEnabledHysteresis
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
-
Check hysteresis status on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
hal_adf_sad_hysteresis_status_t – Hysteresis status.
-
hal_status_t
HAL_ADF_SAD_Start
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
-
Activate a specified sound activity detector in polling mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_BUSY – The sound activity detector state is not HAL_ADF_SAD_STATE_IDLE (USE_HAL_CHECK_PROCESS_STATE is set to 1).
-
-
hal_status_t
HAL_ADF_SAD_Stop
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
-
Deactivate a specified sound activity detector in polling mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_adf_sad_status_t
HAL_ADF_SAD_IsDetected
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
-
Check detection status on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
hal_adf_sad_status_t – Sound activity detection status.
-
hal_status_t
HAL_ADF_SAD_PollForSoundLevel
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
,
uint32_t
timeout_ms
)
-
Wait available sound level on a specified sound activity detector in polling mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
timeout_ms – Timeout value.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_TIMEOUT – Operation exceeds user timeout.
-
-
void
HAL_ADF_SAD_GetSoundAndAmbientNoiseLevels
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
,
uint32_t
*
p_sound_level
,
uint32_t
*
p_ambient_noise_level
)
-
Get sound level and ambient noise level on a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
p_sound_level – Pointer on sound level value.
-
p_ambient_noise_level – Pointer on ambient noise level value.
-
-
hal_status_t
HAL_ADF_SAD_Start_IT
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
-
Activate a specified sound activity detector in interrupt mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_BUSY – The sound activity detector state is not HAL_ADF_SAD_STATE_IDLE (USE_HAL_CHECK_PROCESS_STATE is set to 1).
-
-
hal_status_t
HAL_ADF_SAD_Stop_IT
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
-
Deactivate a specified sound activity detector in interrupt mode.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
HAL_OK – Operation completed successfully.
-
hal_status_t
HAL_ADF_SAD_Start_IT_Opt
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
,
uint32_t
interruptions
)
-
Activate a specified sound activity detector in interrupt mode with optional interruptions.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
interruptions – Optional interruptions. This parameter must be one of the following values:
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_BUSY – The sound activity detector state is not HAL_ADF_SAD_STATE_IDLE (USE_HAL_CHECK_PROCESS_STATE is set to 1).
-
-
IRQ handler and callback functions ¶
- group ADF_Exported_Functions_Group7
-
This section provides function allowing to handle the ADF interrupt request on blocks, HAL_ADF_IRQHandler() .
This section provides also a set of functions allowing to handle callbacks:
-
HAL_ADF_DFLT_AcqCpltCallback() is called when acquisition complete occurs on a specified digital filter.
-
HAL_ADF_DFLT_AcqHalfCpltCallback() is called when acquisition half complete occurs on a specified digital filter.
-
HAL_ADF_DFLT_AcqStopCpltCallback() is called when acquisition stop complete occurs on a specified digital filter.
-
HAL_ADF_SAD_SoundLevelCallback() is called when sound level ready occurs on a specified sound activity detector.
-
HAL_ADF_SAD_SoundActivityCallback() is called when sound detection occurs on a specified sound activity detector.
-
HAL_ADF_ErrorCallback() is called when an error occurs on a specified block.
This section provides also a set of functions allowing to register callbacks:
-
Call the function HAL_ADF_DFLT_RegisterAcqCpltCallback() to register acquisition complete callback.
-
Call the function HAL_ADF_DFLT_RegisterAcqHalfCpltCallback() to register acquisition half complete callback.
-
Call the function HAL_ADF_DFLT_RegisterAcqStopCpltCallback() to register acquisition stop complete callback.
-
Call the function HAL_ADF_SAD_RegisterSoundLevelCallback() to register sound level callback.
-
Call the function HAL_ADF_SAD_RegisterSoundActivityCallback() to register sound activity callback.
-
Call the function HAL_ADF_RegisterErrorCallback() to register error callback.
Functions
-
void
HAL_ADF_IRQHandler
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
block_index
)
¶
-
Handle the ADF interrupt request on a specified block.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
block_index – Block index.
-
-
void
HAL_ADF_DFLT_AcqCpltCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
¶
-
Acquisition complete callback.
Warning
This weak function must not be modified. When the callback is needed, it is overridden in the user file.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
-
void
HAL_ADF_DFLT_AcqHalfCpltCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
¶
-
Acquisition half complete callback.
Warning
This weak function must not be modified. When the callback is needed, it is overridden in the user file.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
-
void
HAL_ADF_DFLT_AcqStopCpltCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
¶
-
Acquisition stop callback.
Warning
This weak function must not be modified. When the callback is needed, it is overridden in the user file.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
-
void
HAL_ADF_SAD_SoundLevelCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
¶
-
Sound level callback.
Warning
This weak function must not be modified. When the callback is needed, it is overridden in the user file.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
-
void
HAL_ADF_SAD_SoundActivityCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
¶
-
Sound activity callback.
Warning
This weak function must not be modified. When the callback is needed, it is overridden in the user file.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
-
void
HAL_ADF_ErrorCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
block_index
)
¶
-
Error callback.
Warning
This weak function must not be modified. When the callback is needed, it is overridden in the user file.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
block_index – Block index.
-
-
hal_status_t
HAL_ADF_DFLT_RegisterAcqCpltCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_cb_t
p_callback
)
¶
-
Register a user acquisition complete callback.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
p_callback – Pointer to the callback function.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_INVALID_PARAM – Pointer to the callback function is NULL.
-
-
hal_status_t
HAL_ADF_DFLT_RegisterAcqHalfCpltCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_cb_t
p_callback
)
¶
-
Register a user acquisition half complete callback.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
p_callback – Pointer to the callback function.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_INVALID_PARAM – Pointer to the callback function is NULL.
-
-
hal_status_t
HAL_ADF_DFLT_RegisterAcqStopCpltCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_cb_t
p_callback
)
¶
-
Register a user acquisition stop callback.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
p_callback – Pointer to the callback function.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_INVALID_PARAM – Pointer to the callback function is NULL.
-
-
hal_status_t
HAL_ADF_SAD_RegisterSoundLevelCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_cb_t
p_callback
)
¶
-
Register a user sound level callback.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
p_callback – Pointer to the callback function.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_INVALID_PARAM – Pointer to the callback function is NULL.
-
-
hal_status_t
HAL_ADF_SAD_RegisterSoundActivityCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_cb_t
p_callback
)
¶
-
Register a user sound activity callback.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
p_callback – Pointer to the callback function.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_INVALID_PARAM – Pointer to the callback function is NULL.
-
-
hal_status_t
HAL_ADF_RegisterErrorCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_cb_t
p_callback
)
¶
-
Register a user error callback.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
p_callback – Pointer to the callback function.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_INVALID_PARAM – Pointer to the callback function is NULL.
-
-
- group ADF_Exported_Functions_Group7
-
This section provides function allowing to handle the ADF interrupt request on blocks, HAL_ADF_IRQHandler() .
This section provides also a set of functions allowing to handle callbacks:
-
HAL_ADF_DFLT_AcqCpltCallback() is called when acquisition complete occurs on a specified digital filter.
-
HAL_ADF_DFLT_AcqHalfCpltCallback() is called when acquisition half complete occurs on a specified digital filter.
-
HAL_ADF_DFLT_AcqStopCpltCallback() is called when acquisition stop complete occurs on a specified digital filter.
-
HAL_ADF_SAD_SoundLevelCallback() is called when sound level ready occurs on a specified sound activity detector.
-
HAL_ADF_SAD_SoundActivityCallback() is called when sound detection occurs on a specified sound activity detector.
-
HAL_ADF_ErrorCallback() is called when an error occurs on a specified block.
This section provides also a set of functions allowing to register callbacks:
-
Call the function HAL_ADF_DFLT_RegisterAcqCpltCallback() to register acquisition complete callback.
-
Call the function HAL_ADF_DFLT_RegisterAcqHalfCpltCallback() to register acquisition half complete callback.
-
Call the function HAL_ADF_DFLT_RegisterAcqStopCpltCallback() to register acquisition stop complete callback.
-
Call the function HAL_ADF_SAD_RegisterSoundLevelCallback() to register sound level callback.
-
Call the function HAL_ADF_SAD_RegisterSoundActivityCallback() to register sound activity callback.
-
Call the function HAL_ADF_RegisterErrorCallback() to register error callback.
Functions
-
void
HAL_ADF_IRQHandler
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
block_index
)
-
Handle the ADF interrupt request on a specified block.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
block_index – Block index.
-
-
void
HAL_ADF_DFLT_AcqCpltCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Acquisition complete callback.
Warning
This weak function must not be modified. When the callback is needed, it is overridden in the user file.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
-
void
HAL_ADF_DFLT_AcqHalfCpltCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Acquisition half complete callback.
Warning
This weak function must not be modified. When the callback is needed, it is overridden in the user file.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
-
void
HAL_ADF_DFLT_AcqStopCpltCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Acquisition stop callback.
Warning
This weak function must not be modified. When the callback is needed, it is overridden in the user file.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
-
void
HAL_ADF_SAD_SoundLevelCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
-
Sound level callback.
Warning
This weak function must not be modified. When the callback is needed, it is overridden in the user file.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
-
void
HAL_ADF_SAD_SoundActivityCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
-
Sound activity callback.
Warning
This weak function must not be modified. When the callback is needed, it is overridden in the user file.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
-
void
HAL_ADF_ErrorCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
block_index
)
-
Error callback.
Warning
This weak function must not be modified. When the callback is needed, it is overridden in the user file.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
block_index – Block index.
-
-
hal_status_t
HAL_ADF_DFLT_RegisterAcqCpltCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_cb_t
p_callback
)
-
Register a user acquisition complete callback.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
p_callback – Pointer to the callback function.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_INVALID_PARAM – Pointer to the callback function is NULL.
-
-
hal_status_t
HAL_ADF_DFLT_RegisterAcqHalfCpltCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_cb_t
p_callback
)
-
Register a user acquisition half complete callback.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
p_callback – Pointer to the callback function.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_INVALID_PARAM – Pointer to the callback function is NULL.
-
-
hal_status_t
HAL_ADF_DFLT_RegisterAcqStopCpltCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_cb_t
p_callback
)
-
Register a user acquisition stop callback.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
p_callback – Pointer to the callback function.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_INVALID_PARAM – Pointer to the callback function is NULL.
-
-
hal_status_t
HAL_ADF_SAD_RegisterSoundLevelCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_cb_t
p_callback
)
-
Register a user sound level callback.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
p_callback – Pointer to the callback function.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_INVALID_PARAM – Pointer to the callback function is NULL.
-
-
hal_status_t
HAL_ADF_SAD_RegisterSoundActivityCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_cb_t
p_callback
)
-
Register a user sound activity callback.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
p_callback – Pointer to the callback function.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_INVALID_PARAM – Pointer to the callback function is NULL.
-
-
hal_status_t
HAL_ADF_RegisterErrorCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_cb_t
p_callback
)
-
Register a user error callback.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
p_callback – Pointer to the callback function.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_INVALID_PARAM – Pointer to the callback function is NULL.
-
-
- group ADF_Exported_Functions_Group7
-
This section provides function allowing to handle the ADF interrupt request on blocks, HAL_ADF_IRQHandler() .
This section provides also a set of functions allowing to handle callbacks:
-
HAL_ADF_DFLT_AcqCpltCallback() is called when acquisition complete occurs on a specified digital filter.
-
HAL_ADF_DFLT_AcqHalfCpltCallback() is called when acquisition half complete occurs on a specified digital filter.
-
HAL_ADF_DFLT_AcqStopCpltCallback() is called when acquisition stop complete occurs on a specified digital filter.
-
HAL_ADF_SAD_SoundLevelCallback() is called when sound level ready occurs on a specified sound activity detector.
-
HAL_ADF_SAD_SoundActivityCallback() is called when sound detection occurs on a specified sound activity detector.
-
HAL_ADF_ErrorCallback() is called when an error occurs on a specified block.
This section provides also a set of functions allowing to register callbacks:
-
Call the function HAL_ADF_DFLT_RegisterAcqCpltCallback() to register acquisition complete callback.
-
Call the function HAL_ADF_DFLT_RegisterAcqHalfCpltCallback() to register acquisition half complete callback.
-
Call the function HAL_ADF_DFLT_RegisterAcqStopCpltCallback() to register acquisition stop complete callback.
-
Call the function HAL_ADF_SAD_RegisterSoundLevelCallback() to register sound level callback.
-
Call the function HAL_ADF_SAD_RegisterSoundActivityCallback() to register sound activity callback.
-
Call the function HAL_ADF_RegisterErrorCallback() to register error callback.
Functions
-
void
HAL_ADF_IRQHandler
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
block_index
)
-
Handle the ADF interrupt request on a specified block.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
block_index – Block index.
-
-
void
HAL_ADF_DFLT_AcqCpltCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Acquisition complete callback.
Warning
This weak function must not be modified. When the callback is needed, it is overridden in the user file.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
-
void
HAL_ADF_DFLT_AcqHalfCpltCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Acquisition half complete callback.
Warning
This weak function must not be modified. When the callback is needed, it is overridden in the user file.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
-
void
HAL_ADF_DFLT_AcqStopCpltCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Acquisition stop callback.
Warning
This weak function must not be modified. When the callback is needed, it is overridden in the user file.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
-
void
HAL_ADF_SAD_SoundLevelCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
-
Sound level callback.
Warning
This weak function must not be modified. When the callback is needed, it is overridden in the user file.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
-
void
HAL_ADF_SAD_SoundActivityCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
-
Sound activity callback.
Warning
This weak function must not be modified. When the callback is needed, it is overridden in the user file.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
-
void
HAL_ADF_ErrorCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
block_index
)
-
Error callback.
Warning
This weak function must not be modified. When the callback is needed, it is overridden in the user file.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
block_index – Block index.
-
-
hal_status_t
HAL_ADF_DFLT_RegisterAcqCpltCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_cb_t
p_callback
)
-
Register a user acquisition complete callback.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
p_callback – Pointer to the callback function.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_INVALID_PARAM – Pointer to the callback function is NULL.
-
-
hal_status_t
HAL_ADF_DFLT_RegisterAcqHalfCpltCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_cb_t
p_callback
)
-
Register a user acquisition half complete callback.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
p_callback – Pointer to the callback function.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_INVALID_PARAM – Pointer to the callback function is NULL.
-
-
hal_status_t
HAL_ADF_DFLT_RegisterAcqStopCpltCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_cb_t
p_callback
)
-
Register a user acquisition stop callback.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
p_callback – Pointer to the callback function.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_INVALID_PARAM – Pointer to the callback function is NULL.
-
-
hal_status_t
HAL_ADF_SAD_RegisterSoundLevelCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_cb_t
p_callback
)
-
Register a user sound level callback.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
p_callback – Pointer to the callback function.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_INVALID_PARAM – Pointer to the callback function is NULL.
-
-
hal_status_t
HAL_ADF_SAD_RegisterSoundActivityCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_cb_t
p_callback
)
-
Register a user sound activity callback.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
p_callback – Pointer to the callback function.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_INVALID_PARAM – Pointer to the callback function is NULL.
-
-
hal_status_t
HAL_ADF_RegisterErrorCallback
(
hal_adf_handle_t
*
hadf
,
hal_adf_cb_t
p_callback
)
-
Register a user error callback.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
p_callback – Pointer to the callback function.
-
- Return values :
-
-
HAL_OK – Operation completed successfully.
-
HAL_INVALID_PARAM – Pointer to the callback function is NULL.
-
-
State functions ¶
- group ADF_Exported_Functions_Group8
-
This section provides a set of functions allowing to get all current states:
-
Call the function HAL_ADF_GetState() to get the current global state.
-
Call the function HAL_ADF_SITF_GetState() to get the current state of a specified serial interface.
-
Call the function HAL_ADF_DFLT_GetState() to get the current state of a specified digital filter.
-
Call the function HAL_ADF_SAD_GetState() to get the current state of a specified sound activity detector.
Functions
-
hal_adf_state_t
HAL_ADF_GetState
(
const
hal_adf_handle_t
*
hadf
)
¶
-
Get the current global state.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
- Return values :
-
hal_adf_state_t – Global state.
-
hal_adf_serial_interface_state_t
HAL_ADF_SITF_GetState
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
serial_interface_index
)
¶
-
Get the current state of a specified serial interface.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
serial_interface_index – Serial interface index.
-
- Return values :
-
hal_adf_serial_interface_state_t – Serial interface state.
-
hal_adf_digital_filter_state_t
HAL_ADF_DFLT_GetState
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
¶
-
Get the current state of a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
hal_adf_digital_filter_state_t – Digital filter state.
-
hal_adf_sad_state_t
HAL_ADF_SAD_GetState
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
¶
-
Get the current state of a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
hal_adf_sad_state_t – Sound activity detector state.
-
- group ADF_Exported_Functions_Group8
-
This section provides a set of functions allowing to get all current states:
-
Call the function HAL_ADF_GetState() to get the current global state.
-
Call the function HAL_ADF_SITF_GetState() to get the current state of a specified serial interface.
-
Call the function HAL_ADF_DFLT_GetState() to get the current state of a specified digital filter.
-
Call the function HAL_ADF_SAD_GetState() to get the current state of a specified sound activity detector.
Functions
-
hal_adf_state_t
HAL_ADF_GetState
(
const
hal_adf_handle_t
*
hadf
)
-
Get the current global state.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
- Return values :
-
hal_adf_state_t – Global state.
-
hal_adf_serial_interface_state_t
HAL_ADF_SITF_GetState
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
serial_interface_index
)
-
Get the current state of a specified serial interface.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
serial_interface_index – Serial interface index.
-
- Return values :
-
hal_adf_serial_interface_state_t – Serial interface state.
-
hal_adf_digital_filter_state_t
HAL_ADF_DFLT_GetState
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Get the current state of a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
hal_adf_digital_filter_state_t – Digital filter state.
-
hal_adf_sad_state_t
HAL_ADF_SAD_GetState
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
-
Get the current state of a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
hal_adf_sad_state_t – Sound activity detector state.
-
- group ADF_Exported_Functions_Group8
-
This section provides a set of functions allowing to get all current states:
-
Call the function HAL_ADF_GetState() to get the current global state.
-
Call the function HAL_ADF_SITF_GetState() to get the current state of a specified serial interface.
-
Call the function HAL_ADF_DFLT_GetState() to get the current state of a specified digital filter.
-
Call the function HAL_ADF_SAD_GetState() to get the current state of a specified sound activity detector.
Functions
-
hal_adf_state_t
HAL_ADF_GetState
(
const
hal_adf_handle_t
*
hadf
)
-
Get the current global state.
- Parameters :
-
hadf – Pointer to a hal_adf_handle_t .
- Return values :
-
hal_adf_state_t – Global state.
-
hal_adf_serial_interface_state_t
HAL_ADF_SITF_GetState
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
serial_interface_index
)
-
Get the current state of a specified serial interface.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
serial_interface_index – Serial interface index.
-
- Return values :
-
hal_adf_serial_interface_state_t – Serial interface state.
-
hal_adf_digital_filter_state_t
HAL_ADF_DFLT_GetState
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
digital_filter_index
)
-
Get the current state of a specified digital filter.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
digital_filter_index – Digital filter index.
-
- Return values :
-
hal_adf_digital_filter_state_t – Digital filter state.
-
hal_adf_sad_state_t
HAL_ADF_SAD_GetState
(
const
hal_adf_handle_t
*
hadf
,
hal_adf_block_index_t
sound_activity_detector_index
)
-
Get the current state of a specified sound activity detector.
- Parameters :
-
-
hadf – Pointer to a hal_adf_handle_t .
-
sound_activity_detector_index – Sound activity detector index.
-
- Return values :
-
hal_adf_sad_state_t – Sound activity detector state.
-