Development process

Adaptation of third-party development board

When using the development board provided by Smart Panlee, you can directly initialize the peripherals of the development board by loading the configuration files. When using a third-party development board, you need to self initialize and interface with the UI library according to the function pointer definition of typedef void (*qmsd_board_init_cus)(qmsd_screen_rotation_t dir); Then use void qmsd_set_board_init_cus(qmsd_board_init_cus init_cus); to specify the initialization method using the third-party development board.

Add UI code generated on 8ms

1.Compile the UI project on the 8ms platform

2.Confirm that the project is compiled successfully

3.Download 8ms source code

4.Delete the {sdk_dir}/components/qmsd_ui directory and extract the downloaded source code to the corresponding directory 5.Compile and flash it with reference to the above section

Add custom logic code

You can add UI code to the callback functions of widgets in {sdk_dir}/components/qmsd_ui/ui/qmsd_internal_ui_cb.c, or you can use the custom callback on 8ms to pass the time parameter to qmsd_ui_cb in {sdk_dir}/main/control/qmsd_ui_cb.c. It is worth noting that these functions normally only run in the GUI thread. Adding time-consuming or blocking tasks to these functions will lead to UI performance degradation or jamming.

Scheduling across UI thread

When you need to modify the internal resources across UI threads, you need to use a mutex to ensure thread safety. You can use the following APIs to acquire and release the mutex.

int qmsd_gui_lock(uint32_t timeout)
void qmsd_gui_unlock(void)

Or use the text protocol embedded in the UI library, see http://doc.8ms.xyz/docs/gui/gui-1dgqjgc2de1lk