HAL GFXTIM Functions

Initialization and de-initialization functions

group GFXTIM_Exported_Functions_Group1

This subsection provides a set of functions allowing to initialize and de-initialize the GFXTIM peripheral:

Functions

hal_status_t HAL_GFXTIM_Init ( hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_t instance )

Initialize the GFXTIM handle and associate a physical GFXTIM instance.

Parameters :
Return values :
  • HAL_INVALID_PARAM – Invalid parameter when hgfxtim pointer is NULL.

  • HAL_OK – GFXTIM is successfully initialized.

void HAL_GFXTIM_DeInit ( hal_gfxtim_handle_t * hgfxtim )

De-initialize the GFXTIM handle.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

Clock Generator functions

group GFXTIM_Exported_Functions_Group2

This subsection provides a set of functions allowing to manage the clock generator:

Functions

hal_status_t HAL_GFXTIM_CLKGEN_SetConfigLineFrameClock ( hal_gfxtim_handle_t * hgfxtim , const hal_gfxtim_clkgen_frame_config_t * p_frame_clk_config , const hal_gfxtim_clkgen_line_config_t * p_line_clk_config )

Configure the line and frame clock generator.

Parameters :
Return values :
  • HAL_INVALID_PARAM – Invalid parameter when p_line_clk_config and/or p_frame_clk_config pointer are NULL.

  • HAL_OK – The Clock generator is successfully configured.

void HAL_GFXTIM_CLKGEN_GetConfigLineClock ( const hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_clkgen_line_config_t * p_config )

Get the line clock generator configuration.

Parameters :
hal_status_t HAL_GFXTIM_CLKGEN_SetConfigFrameClock ( hal_gfxtim_handle_t * hgfxtim , const hal_gfxtim_clkgen_frame_config_t * p_clk_config )

Configure the frame clock generator.

Parameters :
Return values :
  • HAL_INVALID_PARAM – Invalid parameter when p_clk_config pointer is NULL.

  • HAL_OK – The frame clock generator is successfully configured.

void HAL_GFXTIM_CLKGEN_GetConfigFrameClock ( const hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_clkgen_frame_config_t * p_config )

Get the frame clock generator configuration.

Parameters :
hal_status_t HAL_GFXTIM_CLKGEN_ForceReloadCounter ( hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_clkgen_counter_t counter )

Force reload the clock generator counter(s).

Parameters :
Return values :

HAL_OK – The clcok generator counter is successfully force reloaded.

hal_status_t HAL_GFXTIM_CLKGEN_EnableLineClkCalibOutput ( hal_gfxtim_handle_t * hgfxtim )

Enable the line clock calibration output.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

Return values :

HAL_OK – The line clock generator calibration output is successfully enabled.

hal_status_t HAL_GFXTIM_CLKGEN_DisableLineClkCalibOutput ( hal_gfxtim_handle_t * hgfxtim )

Disable the line clock calibration output.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

Return values :

HAL_OK – The line clock generator calibration output is successfully disabled.

hal_gfxtim_clkgen_line_clk_calib_status_t HAL_GFXTIM_CLKGEN_IsEnabledLineClkCalibOutput ( hal_gfxtim_handle_t * hgfxtim )

Check that clock generator line clock calibration output is enabled or disabled.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

Return values :

hal_gfxtim_clkgen_line_clk_calib_status_t – Line clock calibration output activation.

hal_status_t HAL_GFXTIM_CLKGEN_EnableFrameClkCalibOutput ( hal_gfxtim_handle_t * hgfxtim )

Enable the frame clock calibration output.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

Return values :

HAL_OK – The frame clock generator calibration output is successfully enabled.

hal_status_t HAL_GFXTIM_CLKGEN_DisableFrameClkCalibOutput ( hal_gfxtim_handle_t * hgfxtim )

Disable the frame clock calibration output.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

Return values :

HAL_OK – The frame clock generator calibration output is successfully disabled.

hal_gfxtim_clkgen_frame_clk_calib_status_t HAL_GFXTIM_CLKGEN_IsEnabledFrameClkCalibOutput ( hal_gfxtim_handle_t * hgfxtim )

Check that clock generator frame clock calibration output is enabled or disabled.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

Return values :

hal_gfxtim_clkgen_frame_clk_calib_status_t – Frame clock calibration output activation.

Tearing-effect configuration functions

group GFXTIM_Exported_Functions_Group3

This subsection provides a set of functions allowing to manage the tearing-effect detection:

Functions

hal_status_t HAL_GFXTIM_SetConfigTearingEffect ( hal_gfxtim_handle_t * hgfxtim , const hal_gfxtim_tearing_effect_config_t * p_config )

Configure the tearing-effect detection.

Parameters :
Return values :
  • HAL_INVALID_PARAM – Invalid parameter when p_config pointer is NULL.

  • HAL_OK – The Tearing-effect is successfully configured.

void HAL_GFXTIM_GetConfigTearingEffect ( const hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_tearing_effect_config_t * p_config )

Get the tearing-effect detection configuration.

Parameters :
hal_status_t HAL_GFXTIM_EnableTearingEffectIT ( hal_gfxtim_handle_t * hgfxtim )

Enable the tearing-effect detection interruption.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

Return values :

HAL_OK – The tearing-effect interruption is successfully enabled.

hal_status_t HAL_GFXTIM_DisableTearingEffectIT ( hal_gfxtim_handle_t * hgfxtim )

Disable the tearing-effect detection interruption.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

Return values :

HAL_OK – The tearing-effect interruption is successfully disabled.

hal_gfxtim_tearing_effect_it_status_t HAL_GFXTIM_IsEnabledTearingEffectIT ( hal_gfxtim_handle_t * hgfxtim )

Check that tearing-effect detection interruption is enabled or disabled.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

Return values :

hal_gfxtim_tearing_effect_it_status_t – Tearing-effect detection interruption activation.

Absolute Timer functions

group GFXTIM_Exported_Functions_Group4

This subsection provides a set of functions allowing to manage the absolute timers:

Functions

hal_status_t HAL_GFXTIM_ABSTIM_SetLineCompareValue ( hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_abstim_line_comp_t line_comp , uint32_t val )

Set the absolute line compare value.

Parameters :
Return values :

HAL_OK – Absolute line compare value is successfully configured.

uint32_t HAL_GFXTIM_ABSTIM_GetLineCompareValue ( hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_abstim_line_comp_t line_comp )

Get the absolute line compare value.

Parameters :
Return values :

uint32_t – Value of the absolute line compare.

hal_status_t HAL_GFXTIM_ABSTIM_SetLineCounter ( const hal_gfxtim_handle_t * hgfxtim , uint32_t val )

Set the absolute line counter value.

Note

The value of the absolute line counter can only be set when the absolute line counter is disabled.

Parameters :
  • hgfxtim – Pointer to hal_gfxtim_handle_t structure.

  • val – This parameter can be a number between 0x000 and 0xFFF.

Return values :
  • HAL_ERROR – The absolute line counter is already enabled.

  • HAL_OK – Absolute line counter value is successfully set.

uint32_t HAL_GFXTIM_ABSTIM_GetLineCounter ( hal_gfxtim_handle_t * hgfxtim )

Get the absolute line counter value.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

Return values :

uint32_t – Value of the absolute line counter value.

hal_status_t HAL_GFXTIM_ABSTIM_SetFrameCompareValue ( hal_gfxtim_handle_t * hgfxtim , uint32_t val )

Set the absolute frame compare value.

Parameters :
  • hgfxtim – Pointer to hal_gfxtim_handle_t structure.

  • val – This parameter can be a number between 0x00000 and 0xFFFFF.

Return values :

HAL_OK – Absolute frame compare is successfully set.

uint32_t HAL_GFXTIM_ABSTIM_GetFrameCompareValue ( hal_gfxtim_handle_t * hgfxtim )

Get the absolute frame compare value.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

Return values :

uint32_t – Value of the absolute frame compare value.

hal_status_t HAL_GFXTIM_ABSTIM_SetFrameCounter ( const hal_gfxtim_handle_t * hgfxtim , uint32_t val )

Start the absolute frame counter value.

Note

The value of the absolute frame counter can only be set when the absolute frame counter is disabled.

Parameters :
  • hgfxtim – Pointer to hal_gfxtim_handle_t structure.

  • val – This parameter can be a number between 0x000 and 0xFFF.

Return values :
  • HAL_ERROR – The absolute frame counter is already enabled.

  • HAL_OK – The Absolute frame counter is successfully set.

uint32_t HAL_GFXTIM_ABSTIM_GetFrameCounter ( hal_gfxtim_handle_t * hgfxtim )

Get the absolute frame counter value.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

Return values :

uint32_t – Value of the absolute line counter value.

hal_status_t HAL_GFXTIM_ABSTIM_Start ( hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_abstim_counter_t counter , uint32_t interrupts )

Start the absolute timer(s).

Note

The interruptions are activated according to the chosen counter.

Parameters :
  • hgfxtim – Pointer to hal_gfxtim_handle_t structure.

  • counter – This parameter is an element of hal_gfxtim_abstim_counter_t enumeration.

  • interrupts – This parameter can be one or a combination of the following values:

    • HAL_GFXTIM_NONE_IT : No interruption.

    • HAL_GFXTIM_ABSTIM_LINE_COMP1_IT : Absolute line counter compare 1 interruption.

    • HAL_GFXTIM_ABSTIM_LINE_COMP2_IT : Absolute line counter compare 2 interruption.

    • HAL_GFXTIM_ABSTIM_LINE_COUNT_OVERFLOW_IT : Absolute line counter overflow interruption.

    • HAL_GFXTIM_ABSTIM_LINE_ALL_IT : All absolute line counter interruptions.

    • HAL_GFXTIM_ABSTIM_FRAME_COMP_IT : Absolute frame counter compare 1 interruption.

    • HAL_GFXTIM_ABSTIM_FRAME_COUNT_OVERFLOW_IT: Absolute frame counter overflow interruption.

    • HAL_GFXTIM_ABSTIM_FRAME_ALL_IT : All absolute frame counter interruptions.

Return values :

HAL_OK – Absolute timer counter is successfully started.

hal_status_t HAL_GFXTIM_ABSTIM_Stop ( hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_abstim_counter_t counter )

Stop the absolute timer(s).

Parameters :
Return values :

HAL_OK – Absolute line counter is successfully stopped.

hal_status_t HAL_GFXTIM_ABSTIM_Pause ( hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_abstim_counter_t counter )

Pause the absolute timer(s).

Parameters :
Return values :

HAL_OK – Absolute line counter is successfully paused.

hal_status_t HAL_GFXTIM_ABSTIM_Resume ( hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_abstim_counter_t counter )

Resume the absolute timer(s).

Parameters :
Return values :

HAL_OK – Absolute line counter is successfully resumed.

hal_status_t HAL_GFXTIM_ABSTIM_Reset ( hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_abstim_counter_t counter )

Force reset the absolute counter(s).

Parameters :
Return values :

HAL_OK – Absolute line counter is successfully resumed.

void HAL_GFXTIM_ABSTIM_GetCounter ( hal_gfxtim_handle_t * hgfxtim , uint32_t * p_frame , uint32_t * p_line )

Get the absolute line and frame counters value simultaneously.

Parameters :
  • hgfxtim – Pointer to hal_gfxtim_handle_t structure.

  • p_frame – Pointer to the absolute frame counter.

  • p_line – Pointer to the absolute line counter.

Relative Timer functions

group GFXTIM_Exported_Functions_Group5

This subsection provides a set of functions allowing to manage the relative timers:

Functions

hal_status_t HAL_GFXTIM_RELTIM_StartContinuous ( hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_reltim_counter_t counter , uint32_t autoreload_val , uint32_t interrupt )

Start the relative frame counter in continuous mode.

Parameters :
  • hgfxtim – Pointer to hal_gfxtim_handle_t structure.

  • counter – This parameter is an element of hal_gfxtim_reltim_counter_t enumeration.

  • autoreload_val – Value between 0x0 and 0xFFF.

  • interrupt – This parameter can be one of the following values:

    • HAL_GFXTIM_NONE_IT: No interruption.

    • HAL_GFXTIM_RELTIM_COUNT_IT: Relative frame counter interrupt enabled.

Return values :

HAL_OK – Relative frame counter is successfully started in continuous mode.

hal_status_t HAL_GFXTIM_RELTIM_StopContinuous ( hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_reltim_counter_t counter )

Stop the relative frame counter in continuous mode.

Parameters :
Return values :

HAL_OK – Relative frame counter is successfully stopped.

hal_status_t HAL_GFXTIM_RELTIM_ForceReload ( hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_reltim_counter_t counter )

Force reload the relative frame counter.

Parameters :
Return values :

HAL_OK – Relative frame counter is successfully reload forced.

hal_status_t HAL_GFXTIM_RELTIM_SetReloadValue ( hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_reltim_counter_t counter , uint32_t autoreload_val )

Set the relative frame counter reload value.

Parameters :
Return values :

HAL_OK – Relative frame counter is successfully reloaded.

uint32_t HAL_GFXTIM_RELTIM_GetCounter ( const hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_reltim_counter_t counter )

Get the relative frame counter value.

Parameters :
Return values :

uint32_t – Value of the relative frame counter.

hal_status_t HAL_GFXTIM_RELTIM_StartOneShot ( hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_reltim_counter_t counter , uint32_t autoreload_val , uint32_t interrupt )

Start the relative frame counter in one shot mode.

Note

The interruptions are activated according to the chosen relative frame counter.

Parameters :
  • hgfxtim – Pointer to hal_gfxtim_handle_t structure.

  • counter – This parameter is an element of hal_gfxtim_reltim_counter_t enumeration.

  • autoreload_val – This parameter can be a number between 0x000 and 0xFFF.

  • interrupt – This parameter can be one of the following values:

    • HAL_GFXTIM_NONE_IT: No interruption.

    • HAL_GFXTIM_RELTIM_COUNT_IT: Relative frame counter interruption.

Return values :

HAL_OK – Relative frame counter is successfully started in one shot mode.

hal_status_t HAL_GFXTIM_RELTIM_PollForOneShot ( hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_reltim_counter_t counter , uint32_t timeout_ms )

Polling the relative frame counter for one shot mode.

Parameters :
Return values :
  • HAL_TIMEOUT – User timeout.

  • HAL_OK – Polling for one shot mode is successfully.

Event Generator functions

group GFXTIM_Exported_Functions_Group6

This subsection provides a set of functions allowing to manage the event generator:

Functions

hal_status_t HAL_GFXTIM_EVENTGEN_SetConfig ( hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_eventgen_event_t event_gen , const hal_gfxtim_eventgen_config_t * p_config )

Configure the event generator.

Parameters :
Return values :

HAL_OK – Event generator is successfully configured.

void HAL_GFXTIM_EVENTGEN_GetConfig ( const hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_eventgen_event_t event_gen , hal_gfxtim_eventgen_config_t * p_config )

Get the event generator configuration.

Parameters :
hal_status_t HAL_GFXTIM_EVENTGEN_Start ( const hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_eventgen_event_t event_gen , uint32_t interrupt )

Start the event generator.

Parameters :
  • hgfxtim – Pointer to hal_gfxtim_handle_t structure.

  • event_gen – This parameter is an element of hal_gfxtim_eventgen_event_t enumeration.

  • interrupt – This parameter can be one of the following values:

    • HAL_GFXTIM_NONE_IT: No interruption.

    • HAL_GFXTIM_EVENTGEN_EVENT_IT: Event Generator interruption.

Return values :

HAL_OK – Event generator is successfully started.

hal_status_t HAL_GFXTIM_EVENTGEN_Stop ( const hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_eventgen_event_t event_gen )

Stop the event generator.

Parameters :
Return values :

HAL_OK – Event generator is successfully stopped.

Watchdog counter functions

group GFXTIM_Exported_Functions_Group7

This subsection provides a set of functions allowing to manage the watchdog counter:

Functions

hal_status_t HAL_GFXTIM_WDG_SetConfig ( hal_gfxtim_handle_t * hgfxtim , const hal_gfxtim_wdg_config_t * p_config )

Configure the GFXTIM watchdog counter.

Parameters :
Return values :

HAL_OK – Watchdog counter is successfully configured.

void HAL_GFXTIM_WDG_GetConfig ( const hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_wdg_config_t * p_config )

Get the watchdog counter configuration.

Parameters :
hal_status_t HAL_GFXTIM_WDG_Start ( hal_gfxtim_handle_t * hgfxtim , uint32_t reload_val , uint32_t prealarm_val , uint32_t interrupts )

Start the GFXTIM watchdog counter.

Parameters :
  • hgfxtim – Pointer to hal_gfxtim_handle_t structure.

  • reload_val – Value between 0x0 and 0xFFFF.

  • prealarm_val – Value between 0x0 and 0xFFFF.

  • interrupts – This parameter can be one or a combination of the following values:

    • HAL_GFXTIM_NONE_IT: No interruption.

    • HAL_GFXTIM_WDG_ALARM_IT: Watchdog alarm interruption.

    • HAL_GFXTIM_WDG_PREALARM_IT: Watchdog pre-alarm interruption.

    • HAL_GFXTIM_WDG_ALL_IT: All watchdog interruption.

Return values :

HAL_OK – Watchdog counter is successfully started.

hal_status_t HAL_GFXTIM_WDG_Stop ( hal_gfxtim_handle_t * hgfxtim )

Stop the watchdog counter.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

Return values :

HAL_OK – Watchdog counter is successfully stopped.

hal_status_t HAL_GFXTIM_WDG_Refresh ( hal_gfxtim_handle_t * hgfxtim )

Refresh the GFXTIM watchdog counter.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

Return values :

HAL_OK – The GFXTIM Watchdog counter is successfully refreshed.

Peripheral State functions

group GFXTIM_Exported_Functions_Group8

This subsection provides a set of functions allowing to retrieve peripheral state:

Functions

hal_gfxtim_state_t HAL_GFXTIM_GetState ( const hal_gfxtim_handle_t * hgfxtim )

Get the GFXTIM current global state.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

Return values :

hal_gfxtim_state_t – Global state.

hal_gfxtim_clkgen_state_t HAL_GFXTIM_CLKGEN_GetState ( const hal_gfxtim_handle_t * hgfxtim )

Get the GFXTIM clock generator state.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

Return values :

hal_gfxtim_clkgen_state_t – Clock generator state.

hal_gfxtim_abstim_line_state_t HAL_GFXTIM_ABSTIM_GetLineState ( const hal_gfxtim_handle_t * hgfxtim )

Get the GFXTIM absolute line state.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

Return values :

hal_gfxtim_abstim_line_state_t – Absolute line state.

hal_gfxtim_abstim_frame_state_t HAL_GFXTIM_ABSTIM_GetFrameState ( const hal_gfxtim_handle_t * hgfxtim )

Get the GFXTIM absolute frame state.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

Return values :

hal_gfxtim_abstim_frame_state_t – Absolute frame state.

hal_gfxtim_reltim_state_t HAL_GFXTIM_RELTIM_GetState ( const hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_reltim_counter_t counter )

Get the GFXTIM relative frame state.

Parameters :
Return values :

hal_gfxtim_reltim_state_t – Relative frame x (1 or 2) state.

hal_gfxtim_wdg_state_t HAL_GFXTIM_WDG_GetState ( const hal_gfxtim_handle_t * hgfxtim )

Get the GFXTIM watchdog counter state.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

Return values :

hal_gfxtim_wdg_state_t – Watchdog counter state.

IRQHandler and Callbacks functions

group GFXTIM_Exported_Functions_Group9

This subsection provides the IRQ handler APIs allowing to handle GFXTIM interruptions and register user Callbacks APIs:

Functions

void HAL_GFXTIM_IRQHandler ( hal_gfxtim_handle_t * hgfxtim )

Handle the GFXTIM interrupt request.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

void HAL_GFXTIM_TearingEffectIRQHandler ( hal_gfxtim_handle_t * hgfxtim )

Handle the GFXTIM tearing-effect interrupt request.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

void HAL_GFXTIM_ABSTIM_FrameIRQHandler ( hal_gfxtim_handle_t * hgfxtim )

Handle the GFXTIM absolute frame interrupts request.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

void HAL_GFXTIM_ABSTIM_LineIRQHandler ( hal_gfxtim_handle_t * hgfxtim )

Handle the GFXTIM absolute line interrupts request.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

void HAL_GFXTIM_RELTIM_IRQHandler ( hal_gfxtim_handle_t * hgfxtim )

Handle the GFXTIM relative frame interrupts request.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

void HAL_GFXTIM_EVENTGEN_IRQHandler ( hal_gfxtim_handle_t * hgfxtim )

Handle the GFXTIM event generator interrupts request.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

void HAL_GFXTIM_WDG_IRQHandler ( hal_gfxtim_handle_t * hgfxtim )

Handle the GFXTIM watchdog timer interrupts request.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

void HAL_GFXTIM_TearingEffectCallback ( hal_gfxtim_handle_t * hgfxtim )

GFXTIM Tearing-effect callback.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

void HAL_GFXTIM_ABSTIM_FCmpCallback ( hal_gfxtim_handle_t * hgfxtim )

GFXTIM Absolute frame counter compare callback.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

void HAL_GFXTIM_ABSTIM_FCntOverFlowCallback ( hal_gfxtim_handle_t * hgfxtim )

GFXTIM Absolute frame counter overflow callback.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

void HAL_GFXTIM_ABSTIM_LCmpCallback ( hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_abstim_line_comp_t line_comp )

GFXTIM Absolute line counter compares callback.

Parameters :
void HAL_GFXTIM_ABSTIM_LCntOverFlowCallback ( hal_gfxtim_handle_t * hgfxtim )

GFXTIM Absolute line counter overflow callback.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

void HAL_GFXTIM_RELTIM_FCntReloadCallback ( hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_reltim_counter_t counter )

GFXTIM Relative frame counters reload callback.

Parameters :
void HAL_GFXTIM_EVENTGEN_EventCallback ( hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_eventgen_event_t event_gen )

GFXTIM Event generator callback.

Parameters :
void HAL_GFXTIM_WDG_AlarmCallback ( hal_gfxtim_handle_t * hgfxtim )

GFXTIM Watchdog alarm callback.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

void HAL_GFXTIM_WDG_PreAlarmCallback ( hal_gfxtim_handle_t * hgfxtim )

GFXTIM Watchdog pre-alarm callback.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

hal_status_t HAL_GFXTIM_RegisterTearingEffectCallback ( hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_cb_t p_callback )

Register the tearing-effect callback.

Parameters :
  • hgfxtim – Pointer to hal_gfxtim_handle_t structure.

  • p_callback – Specifies the tearing effect callback.

Return values :
  • HAL_INVALID_PARAM – Invalid parameter when p_callback pointer is NULL.

  • HAL_OK – GFXTIM tearing-effect callback is successfully registered.

hal_status_t HAL_GFXTIM_ABSTIM_RegisterFCmpCallback ( hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_cb_t p_callback )

Register the absolute frame counter compare callback.

Parameters :
  • hgfxtim – Pointer to hal_gfxtim_handle_t structure.

  • p_callback – Specifies the absolute frame counter compare callback.

Return values :
  • HAL_INVALID_PARAM – Invalid parameter when p_callback pointer is NULL.

  • HAL_OK – GFXTIM absolute frame counter compare callback is successfully registered.

hal_status_t HAL_GFXTIM_ABSTIM_RegisterFCntOverFlowCallback ( hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_cb_t p_callback )

Register the absolute frame counter overflow callback.

Parameters :
  • hgfxtim – Pointer to hal_gfxtim_handle_t structure.

  • p_callback – Specifies the absolute frame counter overflow callback.

Return values :
  • HAL_INVALID_PARAM – Invalid parameter when p_callback pointer is NULL.

  • HAL_OK – GFXTIM absolute frame counter overflow callback is successfully registered.

hal_status_t HAL_GFXTIM_ABSTIM_RegisterLCmpCallback ( hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_line_cb_t p_callback )

Register the absolute line counter compares callback.

Parameters :
  • hgfxtim – Pointer to hal_gfxtim_handle_t structure.

  • p_callback – Specifies the absolute line counter compare callback.

Return values :
  • HAL_INVALID_PARAM – Invalid parameter when p_callback pointer is NULL.

  • HAL_OK – GFXTIM absolute line counter compares callback is successfully registered.

hal_status_t HAL_GFXTIM_ABSTIM_RegisterLCntOverFlowCallback ( hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_cb_t p_callback )

Register the absolute line counter overflow callback.

Parameters :
  • hgfxtim – Pointer to hal_gfxtim_handle_t structure.

  • p_callback – Specifies the absolute line counter overflow callback.

Return values :
  • HAL_INVALID_PARAM – Invalid parameter when p_callback pointer is NULL.

  • HAL_OK – GFXTIM absolute line counter overflow callback is successfully registered.

hal_status_t HAL_GFXTIM_RELTIM_RegisterFCntReloadCallback ( hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_frame_cb_t p_callback )

Register the relative frame counter reload callback.

Parameters :
  • hgfxtim – Pointer to hal_gfxtim_handle_t structure.

  • p_callback – Specifies the relative frame counter reload callback.

Return values :
  • HAL_INVALID_PARAM – Invalid parameter when p_callback pointer is NULL.

  • HAL_OK – GFXTIM relative frame counter reload callback is successfully registered.

hal_status_t HAL_GFXTIM_EVENTGEN_RegisterEventCallback ( hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_eventgen_cb_t p_callback )

Register the event generator callback.

Parameters :
  • hgfxtim – Pointer to hal_gfxtim_handle_t structure.

  • p_callback – Specifies the event generator callback.

Return values :
  • HAL_INVALID_PARAM – Invalid parameter when p_callback pointer is NULL.

  • HAL_OK – GFXTIM event generator callback is successfully registered.

hal_status_t HAL_GFXTIM_WDG_RegisterAlarmCallback ( hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_cb_t p_callback )

Register the watchdog alarm callback.

Parameters :
  • hgfxtim – Pointer to hal_gfxtim_handle_t structure.

  • p_callback – Specifies the watchdog alarm callback.

Return values :
  • HAL_INVALID_PARAM – Invalid parameter when p_callback pointer is NULL.

  • HAL_OK – GFXTIM watchdog alarm callback is successfully registered.

hal_status_t HAL_GFXTIM_WDG_RegisterPreAlarmCallback ( hal_gfxtim_handle_t * hgfxtim , hal_gfxtim_cb_t p_callback )

Register the watchdog pre-alarm callback.

Parameters :
  • hgfxtim – Pointer to hal_gfxtim_handle_t structure.

  • p_callback – Specifies the watchdog pre-alarm callback.

Return values :
  • HAL_INVALID_PARAM – Invalid parameter when p_callback pointer is NULL.

  • HAL_OK – GFXTIM watchdog pre-alarm callback is successfully registered.

Set/Get user data functions

group GFXTIM_Exported_Functions_Group10

This subsection provides a set of functions allowing to manage the user data pointer:

Functions

void HAL_GFXTIM_SetUserData ( hal_gfxtim_handle_t * hgfxtim , const void * p_user_data )

Store the user data into the GFXTIM handle.

Parameters :
const void * HAL_GFXTIM_GetUserData ( const hal_gfxtim_handle_t * hgfxtim )

Retrieve the user data from the GFXTIM handle.

Parameters :

hgfxtim – Pointer to hal_gfxtim_handle_t structure.

Return values :

Pointer – to the user data.