Support for debugging
Sparklet provides APIs to enable debug information that can be used to understand the internal working of the Sparklet incase of unexpected behaviour. The ‘int sgui_debug_enable (INT32U u32_type);’ can be used to enable the specific debug feature as captured in the below table.
S .No . |
Debug Support |
Bit |
Description |
---|---|---|---|
1 |
SGUI_DEBUG_EVENT_ALLOC |
0 |
Debug Event Allocation |
2 |
SGUI_DEBUG_DRAW_REQUESTS |
1 |
Debug Draw requests |
3 |
SGUI_DEBUG_RENDER_REGIONS |
2 |
Debug Draw Region allocation |
4 |
SGUI_DEBUG_VALIDATE_EVENT_CONTEXT |
3 |
Debug Validate Event context |
5 |
SGUI_DEBUG_CONTROLS_ADDITION_REMOVAL |
4 |
Debug Control Addition and Removal from parents |
6 |
SGUI_DEBUG_PIXEL_VALIDATION |
5 |
Debug Pixel validation if it is in limits or not |
7 |
SGUI_DEBUG_POOL_ALLOCATION |
6 |
Debug Memory Pool allocation |
8 |
SGUI_HAL_DISPLAY_SETUP |
7 |
Debug HAL Related Display setup |
9 |
SGUI_HAL_MEMORY_SETUP |
8 |
Debug HAL Related Memory setup |
10 |
SGUI_GPU_OPS |
9 |
Debug Pixel validation if it is in limits or not |
By default, all the fields are disabled and has to be manually enabled. Sparklet calls the ‘void scb_debug_out (char *ptr_dbg_text);’ callback function with the debug text that can be conveyed to the user in application specific way.
Debug Support APIs
1int sgui_debug_enable (INT32U u32_type);
2void scb_debug_out (char *ptr_dbg_text);