/* Register an initialized display driver. Automatically set the first display as active.  */
lv_disp_t* lv_disp_drv_register(lv_disp_drv_t *driver)
/* Register an initialized display driver. Automatically set the first display as active.  */
lv_disp_t* lv_disp_drv_register(lv_disp_drv_t *driver)
{
    lv_disp_t * node;
    node = lv_mem_alloc(sizeof(lv_disp_t));
    lv_mem_assert(node);
    if(node == NULL) return NULL;
    memcpy(&node->driver, driver, sizeof(lv_disp_drv_t));
    node->next = NULL;
    if(disp_list == NULL) {
        disp_list = node;
        active = node;
        lv_obj_invalidate(lv_scr_act());
    } else {
        disp_list->next = node;
    }
    return node;
}