ILI9806G 4.3吋触摸屏 LVGL9 描点函数

static void disp_flush(lv_display_t * disp_drv, const lv_area_t * area, uint16_t * px_map)
{
    if(disp_flush_enabled)
    {
        /*The most simple case (but also the slowest) to put all pixels to the screen one-by-one*/

        int32_t x;
        int32_t y;
			  int32_t i;
        unsigned int w ;
        unsigned int h ;
        unsigned int pixel_count ;

        w = (area->x2 - area->x1 + 1);
        h = (area->y2 - area->y1 + 1);
        pixel_count = w * h;



#if 1
        * ( __IO uint16_t * ) ( ( ( uint32_t ) 0x68000000 ) ) = (0x2A);

        * ( __IO uint16_t * ) ( ( uint32_t ) 0x68000002 ) = ( area->x1 >> 8  );
        * ( __IO uint16_t * ) ( ( uint32_t ) 0x68000002 ) =( area->x1 & 0xff  );
        * ( __IO uint16_t * ) ( ( uint32_t ) 0x68000002 ) =( ( area->x1 + w - 1 ) >> 8  );
        * ( __IO uint16_t * ) ( ( uint32_t ) 0x68000002 ) = ( ( area->x1 + w - 1 ) & 0xff  );

        * ( __IO uint16_t * ) ( ( ( uint32_t ) 0x68000000 ) ) = ( 0x2B );
        * ( __IO uint16_t * ) ( ( uint32_t ) 0x68000002 ) = ( area->y1 >> 8  );
        * ( __IO uint16_t * ) ( ( uint32_t ) 0x68000002 ) =( area->y1 & 0xff  );
        * ( __IO uint16_t * ) ( ( uint32_t ) 0x68000002 ) = ( ( area->y1 + h - 1 ) >> 8 );
        * ( __IO uint16_t * ) ( ( uint32_t ) 0x68000002 ) = ( ( area->y1 + h - 1) & 0xff );

        * ( __IO uint16_t * ) ( ( ( uint32_t ) 0x68000000 ) ) = ( 0x2C );

        for ( i = 0; i < pixel_count; i ++ )
				{
            * ( __IO uint16_t * ) ( ( uint32_t ) 0x68000002 ) = ( *px_map );
							px_map++;
				}
#endif






        /*IMPORTANT!!!
         *Inform the graphics library that you are ready with the flushing*/
        lv_disp_flush_ready(disp_drv);

    }

    /*IMPORTANT!!!
     *Inform the graphics library that you are ready with the flushing*/
    lv_display_flush_ready(disp_drv);
}

环境: 野火 霸天虎V2,4.3吋触摸屏(lcd/ILI9806G, touch/GT911), ucos3, lvgl9,

显示+触摸无问题,但全屏刷帧率不行。

无法开启 例子3,听说是sram不够。

#if 0
    /* Example 3
     * Two buffers screen sized buffer for double buffering.
     * Both LV_DISPLAY_RENDER_MODE_DIRECT and LV_DISPLAY_RENDER_MODE_FULL works, see their comments*/
    static lv_color_t buf_3_1[MY_DISP_HOR_RES * MY_DISP_VER_RES];
    static lv_color_t buf_3_2[MY_DISP_HOR_RES * MY_DISP_VER_RES];
    lv_display_set_buffers(disp, buf_3_1, buf_3_2, sizeof(buf_3_1), LV_DISPLAY_RENDER_MODE_DIRECT);
#endif

有好的办法解决 帧率的问题吗?

你可能感兴趣的:(lvgl9,stm32f407,ucos3)