HAL GPU2D How to Use

group GPU2D_How_To_Use

How to use the GPU2D HAL module driver

The sequence below describes how to use this driver to covers only the low layer services allowing to access to the HW registers read/write , to intercept and manage the interrupts and to signal errors or events to the upper MW layer.

A set of functions allowing to initialize the HAL GPU2D driver and link it to a physical GPU2D peripheral instance and to deinitialize the GPU2D peripheral by resetting the HAL GPU2D handle state:

HAL_GPU2D_ReadRegister() : Read GPU2D register, in order to ensure higher-level library functionality.

HAL_GPU2D_WriteRegister() : Write to GPU2D register.

Callback registration

  • When the compilation flag USE_HAL_GPU2D_REGISTER_CALLBACKS is set to 1, it allows the user to configure dynamically the driver callbacks instead of weak functions:

  • When the compilation flag USE_HAL_GPU2D_REGISTER_CALLBACKS is set to 0 or not defined, the callback registration feature is not available and all callbacks are set to the corresponding weak functions, in this case user can provide his own implementation of these weak functions at user application side.