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

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值