HAL GPU2D Functions ¶
Initialization and de-initialization functions ¶
- group GPU2D_Exported_Functions_Group1
-
A set of functions allowing to initialize and deinitialize the GPU2D peripheral :
-
HAL_GPU2D_Init() : Initialize the HAL GPU2D handle and associate it to a given GPU2D peripheral instance.
-
HAL_GPU2D_DeInit() : De-initialize the HAL GPU2D.
Functions
-
hal_status_t
HAL_GPU2D_Init
(
hal_gpu2d_handle_t
*
hgpu2d
,
hal_gpu2d_t
instance
)
¶
-
Initialize the HAL GPU2D handle and associate it to a given GPU2D peripheral instance.
- Parameters :
-
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
-
instance – Value from hal_gpu2d_t enumeration
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter when hgpu2d pointer is NULL
-
HAL_OK – GPU2D is successfully initialized
-
-
void
HAL_GPU2D_DeInit
(
hal_gpu2d_handle_t
*
hgpu2d
)
¶
-
De-initialize the HAL GPU2D.
- Parameters :
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
-
- group GPU2D_Exported_Functions_Group1
-
A set of functions allowing to initialize and deinitialize the GPU2D peripheral :
-
HAL_GPU2D_Init() : Initialize the HAL GPU2D handle and associate it to a given GPU2D peripheral instance.
-
HAL_GPU2D_DeInit() : De-initialize the HAL GPU2D.
Functions
-
hal_status_t
HAL_GPU2D_Init
(
hal_gpu2d_handle_t
*
hgpu2d
,
hal_gpu2d_t
instance
)
-
Initialize the HAL GPU2D handle and associate it to a given GPU2D peripheral instance.
- Parameters :
-
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
-
instance – Value from hal_gpu2d_t enumeration
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter when hgpu2d pointer is NULL
-
HAL_OK – GPU2D is successfully initialized
-
-
void
HAL_GPU2D_DeInit
(
hal_gpu2d_handle_t
*
hgpu2d
)
-
De-initialize the HAL GPU2D.
- Parameters :
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
-
IO operation functions ¶
- group GPU2D_Exported_Functions_Group2
-
A set of functions allowing to manage the GPU2D data transfers:
-
HAL_GPU2D_ReadRegister() : Read GPU2D register, in order to ensure higher-level library functionality.
-
HAL_GPU2D_WriteRegister() : Write to GPU2D register.
Functions
-
uint32_t
HAL_GPU2D_ReadRegister
(
const
hal_gpu2d_handle_t
*
hgpu2d
,
uint32_t
offset
)
¶
-
Read GPU2D register, in order to ensure higher-level library functionality.
- Parameters :
-
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
-
offset – The register offset from GPU2D base address to read. This parameter can be a value of GPU2D Register Offset group
-
- Return values :
-
Register – value
-
hal_status_t
HAL_GPU2D_WriteRegister
(
hal_gpu2d_handle_t
*
hgpu2d
,
uint32_t
offset
,
uint32_t
value
)
¶
-
Write to GPU2D register.
- Parameters :
-
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
-
offset – The register offset from GPU2D base address to read. This parameter can be a value of GPU2D Register Offset group
-
value – The value to be written to provided register.
-
- Return values :
-
HAL_OK – Value is successfully written to provided register
-
- group GPU2D_Exported_Functions_Group2
-
A set of functions allowing to manage the GPU2D data transfers:
-
HAL_GPU2D_ReadRegister() : Read GPU2D register, in order to ensure higher-level library functionality.
-
HAL_GPU2D_WriteRegister() : Write to GPU2D register.
Functions
-
uint32_t
HAL_GPU2D_ReadRegister
(
const
hal_gpu2d_handle_t
*
hgpu2d
,
uint32_t
offset
)
-
Read GPU2D register, in order to ensure higher-level library functionality.
- Parameters :
-
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
-
offset – The register offset from GPU2D base address to read. This parameter can be a value of GPU2D Register Offset group
-
- Return values :
-
Register – value
-
hal_status_t
HAL_GPU2D_WriteRegister
(
hal_gpu2d_handle_t
*
hgpu2d
,
uint32_t
offset
,
uint32_t
value
)
-
Write to GPU2D register.
- Parameters :
-
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
-
offset – The register offset from GPU2D base address to read. This parameter can be a value of GPU2D Register Offset group
-
value – The value to be written to provided register.
-
- Return values :
-
HAL_OK – Value is successfully written to provided register
-
IRQHandler and Register callbacks functions ¶
- group GPU2D_Exported_Functions_Group3
-
A set of function to handle the GPU2D interruptions :
-
HAL_GPU2D_IRQHandler() : Handle GPU2D interrupt request.
-
HAL_GPU2D_ERR_IRQHandler() : Handle GPU2D Error interrupt request.
Functions
-
void
HAL_GPU2D_IRQHandler
(
hal_gpu2d_handle_t
*
hgpu2d
)
¶
-
Handles GPU2D interrupt request.
- Parameters :
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
-
void
HAL_GPU2D_ERR_IRQHandler
(
hal_gpu2d_handle_t
*
hgpu2d
)
¶
-
Handle GPU2D Error interrupt request.
- Parameters :
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
-
hal_status_t
HAL_GPU2D_RegisterCommandListCpltCallback
(
hal_gpu2d_handle_t
*
hgpu2d
,
hal_gpu2d_clc_cb_t
p_callback
)
¶
-
Register the GPU2D command list complete callback to be used instead of the weak HAL_GPU2D_CommandListCpltCallback() predefined callback.
- Parameters :
-
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
-
p_callback – Pointer to the hal_gpu2d_clc_cb_t Callback function
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter return when callback pointer is NULL
-
HAL_OK – GPU2D command list complete callback is successfully stored
-
-
hal_status_t
HAL_GPU2D_RegisterErrorCallback
(
hal_gpu2d_handle_t
*
hgpu2d
,
hal_gpu2d_cb_t
p_callback
)
¶
-
Register the GPU2D Error callback to be used instead of the weak HAL_GPU2D_ErrorCallback() predefined callback.
- Parameters :
-
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
-
p_callback – Pointer to the hal_gpu2d_cb_t Callback function
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter return when callback pointer is NULL
-
HAL_OK – GPU2D error callback is successfully stored
-
-
- group GPU2D_Exported_Functions_Group3
-
A set of function to handle the GPU2D interruptions :
-
HAL_GPU2D_IRQHandler() : Handle GPU2D interrupt request.
-
HAL_GPU2D_ERR_IRQHandler() : Handle GPU2D Error interrupt request.
Functions
-
void
HAL_GPU2D_IRQHandler
(
hal_gpu2d_handle_t
*
hgpu2d
)
-
Handles GPU2D interrupt request.
- Parameters :
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
-
void
HAL_GPU2D_ERR_IRQHandler
(
hal_gpu2d_handle_t
*
hgpu2d
)
-
Handle GPU2D Error interrupt request.
- Parameters :
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
-
hal_status_t
HAL_GPU2D_RegisterCommandListCpltCallback
(
hal_gpu2d_handle_t
*
hgpu2d
,
hal_gpu2d_clc_cb_t
p_callback
)
-
Register the GPU2D command list complete callback to be used instead of the weak HAL_GPU2D_CommandListCpltCallback() predefined callback.
- Parameters :
-
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
-
p_callback – Pointer to the hal_gpu2d_clc_cb_t Callback function
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter return when callback pointer is NULL
-
HAL_OK – GPU2D command list complete callback is successfully stored
-
-
hal_status_t
HAL_GPU2D_RegisterErrorCallback
(
hal_gpu2d_handle_t
*
hgpu2d
,
hal_gpu2d_cb_t
p_callback
)
-
Register the GPU2D Error callback to be used instead of the weak HAL_GPU2D_ErrorCallback() predefined callback.
- Parameters :
-
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
-
p_callback – Pointer to the hal_gpu2d_cb_t Callback function
-
- Return values :
-
-
HAL_INVALID_PARAM – Invalid parameter return when callback pointer is NULL
-
HAL_OK – GPU2D error callback is successfully stored
-
-
Callbacks functions ¶
- group GPU2D_Exported_Functions_Group4
-
A set of Weak functions (or default Callbacks functions if USE_HAL_GPU2D_REGISTER_CALLBACKS is set to 0 or no defined) which are used to asynchronously inform the application. The HAL GPU2D driver provides these callbacks as weak empty functions. When needed these functions are to be implemented in the user file:
-
HAL_GPU2D_ErrorCallback() : GPU2D Error handler callback.
-
HAL_GPU2D_CommandListCpltCallback() : GPU2D Command List Complete callback.
Functions
-
void
HAL_GPU2D_CommandListCpltCallback
(
hal_gpu2d_handle_t
*
hgpu2d
,
uint32_t
cmd_list_id
)
¶
-
GPU2D Command List Complete callback.
- Parameters :
-
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
-
cmd_list_id – Command list ID that got completed
-
-
void
HAL_GPU2D_ErrorCallback
(
hal_gpu2d_handle_t
*
hgpu2d
)
¶
-
GPU2D Error handler callback.
- Parameters :
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
-
- group GPU2D_Exported_Functions_Group4
-
A set of Weak functions (or default Callbacks functions if USE_HAL_GPU2D_REGISTER_CALLBACKS is set to 0 or no defined) which are used to asynchronously inform the application. The HAL GPU2D driver provides these callbacks as weak empty functions. When needed these functions are to be implemented in the user file:
-
HAL_GPU2D_ErrorCallback() : GPU2D Error handler callback.
-
HAL_GPU2D_CommandListCpltCallback() : GPU2D Command List Complete callback.
Functions
-
void
HAL_GPU2D_CommandListCpltCallback
(
hal_gpu2d_handle_t
*
hgpu2d
,
uint32_t
cmd_list_id
)
-
GPU2D Command List Complete callback.
- Parameters :
-
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
-
cmd_list_id – Command list ID that got completed
-
-
void
HAL_GPU2D_ErrorCallback
(
hal_gpu2d_handle_t
*
hgpu2d
)
-
GPU2D Error handler callback.
- Parameters :
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
-
Peripheral Get State function ¶
- group GPU2D_Exported_Functions_Group5
-
This subsection provides function allowing to
-
HAL_GPU2D_GetState() : Check the GPU2D global state.
Functions
-
hal_gpu2d_state_t
HAL_GPU2D_GetState
(
const
hal_gpu2d_handle_t
*
hgpu2d
)
¶
-
Return the GPU2D global state.
- Parameters :
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
- Return values :
-
hal_gpu2d_state_t – GPU2D global state
-
- group GPU2D_Exported_Functions_Group5
-
This subsection provides function allowing to
-
HAL_GPU2D_GetState() : Check the GPU2D global state.
Functions
-
hal_gpu2d_state_t
HAL_GPU2D_GetState
(
const
hal_gpu2d_handle_t
*
hgpu2d
)
-
Return the GPU2D global state.
- Parameters :
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
- Return values :
-
hal_gpu2d_state_t – GPU2D global state
-
Set/Get user data ¶
- group GPU2D_Exported_Functions_Group6
-
A set of functions allowing to manage a user data pointer stored to the GPU2D handle:
-
HAL_GPU2D_SetUserData() Set the user data into the handle
-
HAL_GPU2D_GetUserData() Get the user data from the handle
Functions
-
void
HAL_GPU2D_SetUserData
(
hal_gpu2d_handle_t
*
hgpu2d
,
const
void
*
p_user_data
)
¶
-
Set the user data pointer into the handle.
- Parameters :
-
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
-
p_user_data – Pointer to the user data
-
-
const
void
*
HAL_GPU2D_GetUserData
(
const
hal_gpu2d_handle_t
*
hgpu2d
)
¶
-
Get the user data pointer from the handle.
- Parameters :
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
- Return values :
-
Pointer – to the user data.
-
- group GPU2D_Exported_Functions_Group6
-
A set of functions allowing to manage a user data pointer stored to the GPU2D handle:
-
HAL_GPU2D_SetUserData() Set the user data into the handle
-
HAL_GPU2D_GetUserData() Get the user data from the handle
Functions
-
void
HAL_GPU2D_SetUserData
(
hal_gpu2d_handle_t
*
hgpu2d
,
const
void
*
p_user_data
)
-
Set the user data pointer into the handle.
- Parameters :
-
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
-
p_user_data – Pointer to the user data
-
-
const
void
*
HAL_GPU2D_GetUserData
(
const
hal_gpu2d_handle_t
*
hgpu2d
)
-
Get the user data pointer from the handle.
- Parameters :
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
- Return values :
-
Pointer – to the user data.
-
Interrupt and Flag management ¶
- group GPU2D_Exported_Functions_Group7
-
-
HAL_GPU2D_IsActiveFlag() : Get the GPU2D pending flags.
-
HAL_GPU2D_ClearFlag() : Clear the GPU2D pending flags.
-
HAL_GPU2D_EnableIT() : Enable the specified GPU2D interrupts.
-
HAL_GPU2D_DisableIT() : Disable the specified GPU2D interrupts.
-
HAL_GPU2D_IsEnabledIT() : Check whether the specified GPU2D interrupt source is enabled or not.
Functions
-
uint32_t
HAL_GPU2D_IsActiveFlag
(
const
hal_gpu2d_handle_t
*
hgpu2d
,
uint32_t
flag
)
¶
-
Get the GPU2D pending flags.
- Parameters :
-
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
-
flag – Specify the GPU2D flag to check This parameter can be only one of the following values:
-
HAL_GPU2D_FLAG_CLC : Command List Complete flag
-
-
- Return values :
-
The – state of GPU2D flag (0 or 1)
-
void
HAL_GPU2D_ClearFlag
(
hal_gpu2d_handle_t
*
hgpu2d
,
uint32_t
flag
)
¶
-
Clear the GPU2D pending flags.
- Parameters :
-
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
-
flag – Specify the GPU2D flag to clear This parameter can be any combination of the following value:
-
HAL_GPU2D_FLAG_CLC : Command List Complete flag
-
-
-
void
HAL_GPU2D_EnableIT
(
hal_gpu2d_handle_t
*
hgpu2d
,
uint32_t
interrupt
)
¶
-
Enable the specified GPU2D interrupt.
- Parameters :
-
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
-
interrupt – Specify the GPU2D interrupt to enable This parameter can be any combination of the following value:
-
HAL_GPU2D_IT_CLC : Command List Complete interrupt
-
-
-
void
HAL_GPU2D_DisableIT
(
hal_gpu2d_handle_t
*
hgpu2d
,
uint32_t
interrupt
)
¶
-
Disable the specified GPU2D interrupts.
- Parameters :
-
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
-
interrupt – Specify the GPU2D interrupt to disable This parameter can be any combination of the following value:
-
HAL_GPU2D_IT_CLC : Command List Complete interrupt
-
-
-
uint32_t
HAL_GPU2D_IsEnabledIT
(
const
hal_gpu2d_handle_t
*
hgpu2d
,
uint32_t
interrupt
)
¶
-
Check whether the specified GPU2D interrupt source is enabled or not.
- Parameters :
-
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
-
interrupt – Specify the GPU2D interrupt to check their status This parameter can be only one of the following value:
-
HAL_GPU2D_IT_CLC : Command List Complete interrupt
-
-
- Return values :
-
The – state of GPU2D interrupt (0 or 1)
-
- group GPU2D_Exported_Functions_Group7
-
-
HAL_GPU2D_IsActiveFlag() : Get the GPU2D pending flags.
-
HAL_GPU2D_ClearFlag() : Clear the GPU2D pending flags.
-
HAL_GPU2D_EnableIT() : Enable the specified GPU2D interrupts.
-
HAL_GPU2D_DisableIT() : Disable the specified GPU2D interrupts.
-
HAL_GPU2D_IsEnabledIT() : Check whether the specified GPU2D interrupt source is enabled or not.
Functions
-
uint32_t
HAL_GPU2D_IsActiveFlag
(
const
hal_gpu2d_handle_t
*
hgpu2d
,
uint32_t
flag
)
-
Get the GPU2D pending flags.
- Parameters :
-
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
-
flag – Specify the GPU2D flag to check This parameter can be only one of the following values:
-
HAL_GPU2D_FLAG_CLC : Command List Complete flag
-
-
- Return values :
-
The – state of GPU2D flag (0 or 1)
-
void
HAL_GPU2D_ClearFlag
(
hal_gpu2d_handle_t
*
hgpu2d
,
uint32_t
flag
)
-
Clear the GPU2D pending flags.
- Parameters :
-
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
-
flag – Specify the GPU2D flag to clear This parameter can be any combination of the following value:
-
HAL_GPU2D_FLAG_CLC : Command List Complete flag
-
-
-
void
HAL_GPU2D_EnableIT
(
hal_gpu2d_handle_t
*
hgpu2d
,
uint32_t
interrupt
)
-
Enable the specified GPU2D interrupt.
- Parameters :
-
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
-
interrupt – Specify the GPU2D interrupt to enable This parameter can be any combination of the following value:
-
HAL_GPU2D_IT_CLC : Command List Complete interrupt
-
-
-
void
HAL_GPU2D_DisableIT
(
hal_gpu2d_handle_t
*
hgpu2d
,
uint32_t
interrupt
)
-
Disable the specified GPU2D interrupts.
- Parameters :
-
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
-
interrupt – Specify the GPU2D interrupt to disable This parameter can be any combination of the following value:
-
HAL_GPU2D_IT_CLC : Command List Complete interrupt
-
-
-
uint32_t
HAL_GPU2D_IsEnabledIT
(
const
hal_gpu2d_handle_t
*
hgpu2d
,
uint32_t
interrupt
)
-
Check whether the specified GPU2D interrupt source is enabled or not.
- Parameters :
-
-
hgpu2d – Pointer to a hal_gpu2d_handle_t structure
-
interrupt – Specify the GPU2D interrupt to check their status This parameter can be only one of the following value:
-
HAL_GPU2D_IT_CLC : Command List Complete interrupt
-
-
- Return values :
-
The – state of GPU2D interrupt (0 or 1)
-