Running Sparklet Bare Metal

In case a bare metal system is used, the same can be split into two sections – one for initialization that is called only once and another for continuous processing.

 1void sparklet_init(void)
 2{
 3  //Initialize memory regions and heaps
 4  sgui_rh850_mem_init( (uint32_t)loc_LocalHeap, LOCAL_NUM_BLOCKS, LOCAL_BLOCK_SIZE, \
 5  VRAM_BASE, VRAM_NUM_BLOCKS, VRAM_BLOCK_SIZE, \
 6  SDRAM_BASE, SDRAM_NUM_BLOCKS, SDRAM_BLOCK_SIZE, \
 7  CAMERA_BASE, CAMERA_BLOCK_SIZE, CAPTURE_BUF));
 8  shal_init_signal();
 9  sgui_init ();
10  sgui_event_manager_init ();
11  rs_exec_init ();
12  sgui_screens_init ();
13  sgui_sparklet_enable (1);
14}

The below calls can be called on continuous basis.

1void sparklet_process
2{
3  sgui_process ();
4  rs_exec_process();
5}