FMAC Exported Functions

Initialization and de-initialization functions

group FMAC_Exported_Functions_Group1

This section provides a set of functions allowing to :

  • Initialize the selected device with the FMAC instance by calling HAL_FMAC_Init() .

  • De-Initialize and restore the default configuration of the selected FMACx peripheral by calling HAL_FMAC_DeInit() .

Functions

hal_status_t HAL_FMAC_Init ( hal_fmac_handle_t * hfmac , hal_fmac_t instance )

Initialize the FMAC according to the associated handle.

Parameters :
Return values :
  • HAL_INVALID_PARAM – HAL FMAC instance is NULL

  • HAL_OK – FMAC instance has been correctly initialized.

void HAL_FMAC_DeInit ( hal_fmac_handle_t * hfmac )

De-initialize the FMAC peripheral and restore the default configuration.

Parameters :

hfmac – Pointer to a hal_fmac_handle_t

FMAC configuration functions

group FMAC_Exported_Functions_Group2

This section provides a set of functions allowing to:

Functions

hal_status_t HAL_FMAC_SetConfig ( hal_fmac_handle_t * hfmac , const hal_fmac_config_t * p_config )

Allocate memory area for X1, X2 and Y in the FMAC internal 16-bit memory. All thresholds are reset.

Parameters :
Return values :
  • HAL_INVALID_PARAM – p_config is NULL

  • HAL_OK – Operation completed successfully

void HAL_FMAC_GetConfig ( const hal_fmac_handle_t * hfmac , hal_fmac_config_t * p_config )

Retrieve the FMAC configuration.

Parameters :
hal_status_t HAL_FMAC_SetX1FullWatermark ( hal_fmac_handle_t * hfmac , hal_fmac_watermark_threshold_t threshold )

Configure the FMAC X1 full watermark threshold. Setting a threshold greater than 1 allows several data to be transferred under one interrupt. In case of DMA, it must be kept to the default value of HAL_FMAC_WATERMARK_THRESHOLD_1 . In case of Polling, a threshold value of HAL_FMAC_WATERMARK_THRESHOLD_2 avoids waiting for a delay of 3 clock cycles before the X1FULL flag goes high.

Parameters :
Return values :

HAL_OK – Operation completed successfully

hal_fmac_watermark_threshold_t HAL_FMAC_GetX1FullWatermark ( const hal_fmac_handle_t * hfmac )

Get the FMAC X1 full watermark threshold.

Parameters :

hfmac – Pointer to a hal_fmac_handle_t

Return values :
  • HAL_FMAC_WATERMARK_THRESHOLD_1

  • HAL_FMAC_WATERMARK_THRESHOLD_2

  • HAL_FMAC_WATERMARK_THRESHOLD_4

  • HAL_FMAC_WATERMARK_THRESHOLD_8

hal_status_t HAL_FMAC_SetYEmptyWatermark ( hal_fmac_handle_t * hfmac , hal_fmac_watermark_threshold_t threshold )

Configure the FMAC Y empty watermark threshold. Setting a threshold greater than 1 allows several data to be transferred under one interrupt. In case of DMA, it must be kept to the default value of HAL_FMAC_WATERMARK_THRESHOLD_1 . In case of Polling, a threshold value of HAL_FMAC_WATERMARK_THRESHOLD_2 avoids waiting for a delay of 3 clock cycles before the YEMPTY flag goes high.

Parameters :
Return values :

HAL_OK – Operation completed successfully

hal_fmac_watermark_threshold_t HAL_FMAC_GetYEmptyWatermark ( const hal_fmac_handle_t * hfmac )

Get the FMAC Y empty watermark threshold.

Parameters :

hfmac – Pointer to a hal_fmac_handle_t

Return values :
  • HAL_FMAC_WATERMARK_THRESHOLD_1

  • HAL_FMAC_WATERMARK_THRESHOLD_2

  • HAL_FMAC_WATERMARK_THRESHOLD_4

  • HAL_FMAC_WATERMARK_THRESHOLD_8

hal_status_t HAL_FMAC_SetX2BaseAddress ( hal_fmac_handle_t * hfmac , uint32_t base_half_word )

Configure the FMAC X2 base address. It can be modified while START=1 for example to change coefficient values.

Parameters :
  • hfmac – Pointer to a hal_fmac_handle_t

  • base_half_word – Base address within the 16-bits internal memory (0x00 to 0xFF)

Return values :

HAL_OK – Operation completed successfully

hal_status_t HAL_FMAC_EnableClip ( hal_fmac_handle_t * hfmac )

Enable Clip. If clipping is enabled, then any value which exceeds the numeric range of the q1.15 output, is set to 1 - 2^-15 or -1, according to the sign.

Parameters :

hfmac – Pointer to a hal_fmac_handle_t

Return values :

HAL_OK – Operation completed successfully

hal_status_t HAL_FMAC_DisableClip ( hal_fmac_handle_t * hfmac )

Disable clip. If clipping is not enabled, the unused accumulator bits after applying the gain is simply truncated.

Parameters :

hfmac – Pointer to a hal_fmac_handle_t

Return values :

HAL_OK – Operation completed successfully

hal_fmac_clip_status_t HAL_FMAC_IsEnabledClip ( const hal_fmac_handle_t * hfmac )

Check the FMAC clip status.

Parameters :

hfmac – Pointer to a hal_fmac_handle_t

Return values :
  • HAL_FMAC_CLIP_ENABLED – Clip is enabled

  • HAL_FMAC_CLIP_DISABLED – Clip is disabled

volatile uint32_t * HAL_FMAC_GetX1Address ( const hal_fmac_handle_t * hfmac )

Get the FMAC X1 write register address. Write data to X1 can be directly driven by a timer or other peripheral such as an ADC.

Parameters :

hfmac – Pointer to a hal_fmac_handle_t

Return values :

FMAC – X1 write register address

volatile uint32_t * HAL_FMAC_GetYAddress ( const hal_fmac_handle_t * hfmac )

Get the FMAC Y read register address. Read data from Y can be directly driven by a timer or other peripheral such as an DAC.

Parameters :

hfmac – Pointer to a hal_fmac_handle_t

Return values :

FMAC – Y read register address

hal_status_t HAL_FMAC_SetWriteX1DMA ( hal_fmac_handle_t * hfmac , hal_dma_handle_t * hdma )

Link the Write X1 DMA handle to the FMAC handle.

Parameters :
Return values :
  • HAL_INVALID_PARAM – Invalid parameter

  • HAL_OK – Operation completed successfully

hal_status_t HAL_FMAC_SetReadYDMA ( hal_fmac_handle_t * hfmac , hal_dma_handle_t * hdma )

Link the Read Y DMA handle to the FMAC handle.

Parameters :
Return values :
  • HAL_INVALID_PARAM – Invalid parameter

  • HAL_OK – Operation completed successfully

Preload functions

group FMAC_Exported_Functions_Group3

This section provides a set of functions allowing to :

Functions

hal_status_t HAL_FMAC_PreloadX1 ( hal_fmac_handle_t * hfmac , const int16_t * p_data , uint32_t size_half_word )

Preload X1 buffer.

Note

This function can be called several times, each call filling partly the buffers. In case of overflow (too much data provided through all these calls), an error is returned.

Parameters :
  • hfmac – Pointer to a hal_fmac_handle_t

  • p_data – Pointer to data to preload to X1

  • size_half_word – Size in half word, it cannot be bigger than the X1 size in half word

Return values :
  • HAL_ERROR – Operation completed with error

  • HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE

  • HAL_INVALID_PARAM – Invalid parameter

  • HAL_OK – Operation completed successfully

hal_status_t HAL_FMAC_PreloadY ( hal_fmac_handle_t * hfmac , const int16_t * p_data , uint32_t size_half_word )

Preload Y buffer.

Note

This function can be called several times, each call filling partly the buffers. In case of overflow (too much data provided through all these calls), an error is returned.

Parameters :
  • hfmac – Pointer to a hal_fmac_handle_t

  • p_data – Pointer to data to preload to Y

  • size_half_word – Size in half word, it cannot be bigger than the Y size in half word

Return values :
  • HAL_ERROR – Operation completed with error

  • HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE

  • HAL_INVALID_PARAM – Invalid parameter

  • HAL_OK – Operation completed successfully

hal_status_t HAL_FMAC_PreloadX2 ( hal_fmac_handle_t * hfmac , const hal_fmac_preload_x2_t * p_data )

Preload X2 buffer with Coeff A and/or B. If no Coeff A, hal_fmac_preload_x2_t::coeff_a_size_half_word must be set to 0. If no Coeff B, hal_fmac_preload_x2_t::coeff_b_size_half_word must be set to 0.

Parameters :
Return values :
  • HAL_ERROR – Operation completed with error

  • HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE

  • HAL_INVALID_PARAM – Invalid parameter

  • HAL_OK – Operation completed successfully

hal_status_t HAL_FMAC_PreloadX1_DMA ( hal_fmac_handle_t * hfmac , const int16_t * p_data , uint32_t size_half_word )

Preload X1 buffer with DMA.

Parameters :
  • hfmac – Pointer to a hal_fmac_handle_t

  • p_data – Pointer to data to preload to X1

  • size_half_word – Size in half word, it cannot be bigger than the X1 size in half word

Return values :
  • HAL_ERROR – Operation completed with error

  • HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE

  • HAL_INVALID_PARAM – Invalid parameter

  • HAL_OK – Operation completed successfully

hal_status_t HAL_FMAC_PreloadY_DMA ( hal_fmac_handle_t * hfmac , const int16_t * p_data , uint32_t size_half_word )

Preload Y buffer with DMA.

Parameters :
  • hfmac – Pointer to a hal_fmac_handle_t

  • p_data – Pointer to data to preload to Y

  • size_half_word – Size in half word, it cannot be bigger than the Y size in half word

Return values :
  • HAL_ERROR – Operation completed with error

  • HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE

  • HAL_INVALID_PARAM – Invalid parameter

  • HAL_OK – Operation completed successfully

Filter functions

group FMAC_Exported_Functions_Group4

This section provides a set of functions allowing to :

Functions

hal_status_t HAL_FMAC_StartFilterFIR ( hal_fmac_handle_t * hfmac , uint32_t coeff_nb , uint32_t gain , uint32_t opt_it )

Start the FIR filtering.

Parameters :
Return values :
  • HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE

  • HAL_OK – Filter started.

hal_status_t HAL_FMAC_StartFilterIIR ( hal_fmac_handle_t * hfmac , uint32_t ff_coeff_nb , uint32_t fb_coeff_nb , uint32_t gain , uint32_t opt_it )

Start the IIR filtering.

Parameters :
Return values :
  • HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE

  • HAL_OK – Filter started.

hal_status_t HAL_FMAC_StopFilter ( hal_fmac_handle_t * hfmac )

Stop the active filter, the X1 process and the Y process. Reset the write and read pointers, the internal control logic, the FMAC_SR register and the FMAC_PARAM register, including the START bit if active. All interruts are disable. X1, Y and Filter are in IDLE state. After the stop, user must preload X1 and Y if needed, start a writeX1 process, start a readY process and start filter.

Parameters :

hfmac – Pointer to a hal_fmac_handle_t

Return values :
  • HAL_ERROR – Operation completed with error

  • HAL_OK – Operation completed successfully

Y buffer read functions and X1 buffer write functions

group FMAC_Exported_Functions_Group5

This section provides a set of functions allowing to :

Functions

hal_status_t HAL_FMAC_WriteX1 ( hal_fmac_handle_t * hfmac , const int16_t * p_data , uint32_t size_half_word , uint32_t timeout_ms )

Write data to X1 in polling mode.

Parameters :
  • hfmac – Pointer to a hal_fmac_handle_t

  • p_data – Pointer to input data

  • size_half_word – Size of the input data

  • timeout_ms – Timeout duration in millisecond

Return values :
  • HAL_ERROR – Operation completed with error

  • HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE

  • HAL_INVALID_PARAM – Invalid parameter

  • HAL_TIMEOUT – Operation exceeds user timeout

  • HAL_OK – Operation completed successfully

hal_status_t HAL_FMAC_ReadY ( hal_fmac_handle_t * hfmac , int16_t * p_data , uint32_t size_half_word , uint32_t timeout_ms )

Read data from Y in polling mode.

Parameters :
  • hfmac – Pointer to a hal_fmac_handle_t

  • p_data – Pointer to output data

  • size_half_word – Size of the output data

  • timeout_ms – Timeout duration in millisecond

Return values :
  • HAL_ERROR – Operation completed with error

  • HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE

  • HAL_INVALID_PARAM – Invalid parameter

  • HAL_TIMEOUT – Operation exceeds user timeout

  • HAL_OK – Operation completed successfully

hal_status_t HAL_FMAC_WriteX1_IT ( hal_fmac_handle_t * hfmac , const int16_t * p_data , uint32_t size_half_word )

Write data to X1 in interrupt mode.

Parameters :
  • hfmac – Pointer to a hal_fmac_handle_t

  • p_data – Pointer to input data

  • size_half_word – Size of the input data

Return values :
  • HAL_ERROR – Operation completed with error

  • HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE

  • HAL_INVALID_PARAM – Invalid parameter

  • HAL_OK – Operation completed successfully

hal_status_t HAL_FMAC_ReadY_IT ( hal_fmac_handle_t * hfmac , int16_t * p_data , uint32_t size_half_word )

Read data from Y in interrupt mode.

Parameters :
  • hfmac – Pointer to a hal_fmac_handle_t

  • p_data – Pointer to output data

  • size_half_word – Size of the output data.

Return values :
  • HAL_ERROR – Operation completed with error

  • HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE

  • HAL_INVALID_PARAM – Invalid parameter

  • HAL_OK – Operation completed successfully

hal_status_t HAL_FMAC_WriteX1_DMA ( hal_fmac_handle_t * hfmac , const int16_t * p_data , uint32_t size_half_word )

Write data to X1 in DMA mode. Global state must be IDLE (START = 0).

Parameters :
  • hfmac – Pointer to a hal_fmac_handle_t

  • p_data – Pointer to input data

  • size_half_word – Size of the input data

Return values :
  • HAL_ERROR – Operation completed with error

  • HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE

  • HAL_INVALID_PARAM – Invalid parameter

  • HAL_OK – Operation completed successfully

hal_status_t HAL_FMAC_WriteX1_DMA_Opt ( hal_fmac_handle_t * hfmac , const int16_t * p_data , uint32_t size_half_word , uint32_t opt_it )

Write data to X1 in DMA mode. Global state must be IDLE (START = 0).

Parameters :
Return values :
  • HAL_ERROR – Operation completed with error

  • HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE

  • HAL_INVALID_PARAM – Invalid parameter

  • HAL_OK – Operation completed successfully

hal_status_t HAL_FMAC_ReadY_DMA ( hal_fmac_handle_t * hfmac , int16_t * p_data , uint32_t size_half_word )

Read data from Y in DMA mode. Global state must be IDLE (START = 0).

Parameters :
  • hfmac – Pointer to a hal_fmac_handle_t

  • p_data – Pointer to output data

  • size_half_word – Size of the output data.

Return values :
  • HAL_ERROR – Operation completed with error

  • HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE

  • HAL_INVALID_PARAM – Invalid parameter

  • HAL_OK – Operation completed successfully

hal_status_t HAL_FMAC_ReadY_DMA_Opt ( hal_fmac_handle_t * hfmac , int16_t * p_data , uint32_t size_half_word , uint32_t opt_it )

Read data from Y in DMA mode. Global state must be IDLE (START = 0).

Parameters :
Return values :
  • HAL_ERROR – Operation completed with error

  • HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE

  • HAL_INVALID_PARAM – Invalid parameter

  • HAL_OK – Operation completed successfully

hal_status_t HAL_FMAC_LockX1WriteAccessForExternPeriph ( hal_fmac_handle_t * hfmac )

Start write data to X1 is directly driven by a timer or other peripheral such as an ADC. Overflow error interruption is activated.

Parameters :

hfmac – Pointer to a hal_fmac_handle_t

Return values :
  • HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE

  • HAL_OK – Operation completed successfully

hal_status_t HAL_FMAC_UnlockX1WriteAccessForExternPeriph ( hal_fmac_handle_t * hfmac )

Stop write data to X1 directly driven by a timer or other peripheral such as an ADC.

Parameters :

hfmac – Pointer to a hal_fmac_handle_t

Return values :

HAL_OK – Operation completed successfully

hal_status_t HAL_FMAC_LockYReadAccessForExternPeriph ( hal_fmac_handle_t * hfmac )

Start read data from Y driven by a timer or other peripheral such as an DAC. Underflow error interruption is activated.

Parameters :

hfmac – Pointer to a hal_fmac_handle_t

Return values :
  • HAL_BUSY – Concurrent process ongoing. Returned by HAL_CHECK_UPDATE_STATE

  • HAL_OK – Operation completed successfully

hal_status_t HAL_FMAC_UnlockYReadAccessForExternPeriph ( hal_fmac_handle_t * hfmac )

Stop read data from Y driven by a timer or other peripheral such as an DAC.

Parameters :

hfmac – Pointer to a hal_fmac_handle_t

Return values :

HAL_OK – Operation completed successfully

Callback functions

group FMAC_Exported_Functions_Group6

This section provides Interruption and DMA callback functions:

Functions

void HAL_FMAC_ErrorCallback ( hal_fmac_handle_t * hfmac )

FMAC error callback : It can be a combination of X1 buffer overflow, Y buffer underflow, Saturation of the accumulator or DMA error.

Note

Use HAL_FMAC_GetLastErrorCodes() to get the error codes.

Parameters :

hfmac – Pointer to a hal_fmac_handle_t

void HAL_FMAC_WriteX1CpltCallback ( hal_fmac_handle_t * hfmac )

Write X1 buffer complete callback.

Parameters :

hfmac – Pointer to a hal_fmac_handle_t

void HAL_FMAC_ReadYCpltCallback ( hal_fmac_handle_t * hfmac )

Read Y buffer complete callback.

Parameters :

hfmac – Pointer to a hal_fmac_handle_t

void HAL_FMAC_WriteX1HalfCpltCallback ( hal_fmac_handle_t * hfmac )

Write X1 buffer half complete callback.

Parameters :

hfmac – Pointer to a hal_fmac_handle_t

void HAL_FMAC_ReadYHalfCpltCallback ( hal_fmac_handle_t * hfmac )

Read Y buffer half complete callback.

Parameters :

hfmac – Pointer to a hal_fmac_handle_t

void HAL_FMAC_PreloadCpltCallback ( hal_fmac_handle_t * hfmac )

FMAC preload buffer complete callback.

Parameters :

hfmac – Pointer to a hal_fmac_handle_t

hal_status_t HAL_FMAC_RegisterWriteX1CpltCallback ( hal_fmac_handle_t * hfmac , hal_fmac_cb_t p_callback )

Register the FMAC Write X1 complete callback.

Parameters :
Return values :
  • HAL_INVALID_PARAM – Invalid parameter

  • HAL_OK – Operation completed successfully

hal_status_t HAL_FMAC_RegisterReadYCpltCallback ( hal_fmac_handle_t * hfmac , hal_fmac_cb_t p_callback )

Register the FMAC Read Y complete callback.

Parameters :
Return values :
  • HAL_INVALID_PARAM – Invalid parameter

  • HAL_OK – Operation completed successfully

hal_status_t HAL_FMAC_RegisterWriteX1HalfCpltCallback ( hal_fmac_handle_t * hfmac , hal_fmac_cb_t p_callback )

Register the FMAC Write X1 Half complete callback callback.

Parameters :
Return values :
  • HAL_INVALID_PARAM – Invalid parameter

  • HAL_OK – Operation completed successfully

hal_status_t HAL_FMAC_RegisterReadYHalfCpltCallback ( hal_fmac_handle_t * hfmac , hal_fmac_cb_t p_callback )

Register the FMAC Read Y Half complete callback.

Parameters :
Return values :
  • HAL_INVALID_PARAM – Invalid parameter

  • HAL_OK – Operation completed successfully

hal_status_t HAL_FMAC_RegisterPreloadCpltCallback ( hal_fmac_handle_t * hfmac , hal_fmac_cb_t p_callback )

Register the FMAC Preload complete callback.

Parameters :
Return values :
  • HAL_INVALID_PARAM – Invalid parameter

  • HAL_OK – Operation completed successfully

hal_status_t HAL_FMAC_RegisterErrorCallback ( hal_fmac_handle_t * hfmac , hal_fmac_cb_t p_callback )

Register the FMAC error callback.

Parameters :
Return values :
  • HAL_INVALID_PARAM – Invalid parameter

  • HAL_OK – Operation completed successfully

IRQ handler management

group FMAC_Exported_Functions_Group7

This section provides:

Depending on the process function one’s use, different callback might be triggered:

Process API

\

Callbacks

HAL_FMAC_WriteX1_IT

HAL_FMAC_ReadY_IT

HAL_FMAC_WriteX1CpltCallback

x

HAL_FMAC_ReadYCpltCallback

x

HAL_FMAC_ErrorCallback

x

x

Process API

\

Callbacks

HAL_FMAC_WriteX1_DMA

HAL_FMAC_ReadY_DMA

HAL_FMAC_WriteX1CpltCallback

x

HAL_FMAC_ReadYCpltCallback

x

HAL_FMAC_WriteX1HalfCpltCallback*

x

HAL_FMAC_ReadYHalfCpltCallback*

x

HAL_FMAC_ErrorCallback**

x

x

Process API

\

Callbacks

HAL_FMAC_PreloadX1_DMA

HAL_FMAC_PreloadY_DMA

HAL_FMAC_ErrorCallback**

x

x

HAL_FMAC_PreloadCpltCallback**

x

x

Process API

\

Callbacks

HAL_FMAC_WriteX1_DMA_Opt

HAL_FMAC_ReadY_DMA_Opt

HAL_FMAC_WriteX1CpltCallback

x

HAL_FMAC_ReadYCpltCallback

x

HAL_FMAC_WriteX1HalfCpltCallback*

x

HAL_FMAC_ReadYHalfCpltCallback*

x

HAL_FMAC_ErrorCallback**

x

x

Note

* these callbacks might be called following DMA IRQ management, not FMAC IRQ management.

Note

** these callbacks might be called following DMA IRQ management, or FMAC IRQ management.

Note

* these callbacks might be called following DMA IRQ management, not FMAC IRQ management.

Note

** these callbacks might be called following DMA IRQ management, or FMAC IRQ management.

Functions

void HAL_FMAC_IRQHandler ( hal_fmac_handle_t * hfmac )

FMAC interrupt request HANDLER. All FMAC interrupts are managed.

Parameters :

hfmac – Pointer to a hal_fmac_handle_t

void HAL_FMAC_ERROR_IRQHandler ( hal_fmac_handle_t * hfmac )

FMAC interrupt request HANDLER limited to error management. Errors FMAC interrupts only are managed. It is applicable instead of HAL_FMAC_IRQHandler when neither HAL_FMAC_WriteX1_IT nor HAL_FMAC_ReadY_IT processes are used.

Parameters :

hfmac – Pointer to a hal_fmac_handle_t

Peripheral State and Error functions

group FMAC_Exported_Functions_Group8

This section provides a set of functions allowing to :

Functions

hal_fmac_state_t HAL_FMAC_GetState ( const hal_fmac_handle_t * hfmac )

Return the FMAC filter process state.

Parameters :

hfmac – Pointer to a hal_fmac_handle_t

Return values :

hal_fmac_state_t – FMAC filter state

hal_fmac_x1_state_t HAL_FMAC_GetX1State ( const hal_fmac_handle_t * hfmac )

Return the HAL FMAC X1 process state.

Parameters :

hfmac – Pointer to a hal_fmac_handle_t

Return values :

hal_fmac_x1_state_t – FMAC X1 process state

hal_fmac_y_state_t HAL_FMAC_GetYState ( const hal_fmac_handle_t * hfmac )

Return the HAL FMAC Y process state.

Parameters :

hfmac – Pointer to a hal_fmac_handle_t

Return values :

hal_fmac_y_state_t – FMAC Y process state

uint32_t HAL_FMAC_GetLastErrorCodes ( const hal_fmac_handle_t * hfmac )

Return the errors limited to the last process.

Parameters :

hfmac – Pointer to a hal_fmac_handle_t

Return values :

uint32_t – last error code. It can be HAL_FMAC_ERROR_NONE or a combination of FMAC Error code

Set/Get user data

group FMAC_Exported_Functions_Group9

This section provides a set of functions allowing to manage a user data pointer stored to the FMAC handle:

Functions

void HAL_FMAC_SetUserData ( hal_fmac_handle_t * hfmac , const void * p_user_data )

Set the user data pointer into the handle.

Parameters :
const void * HAL_FMAC_GetUserData ( const hal_fmac_handle_t * hfmac )

Get the user data pointer from the handle.

Parameters :

hfmac – Pointer to a hal_fmac_handle_t

Return values :

void* – Pointer to the user data