您尚未登录。

楼主 # 2022-06-21 22:03:51

go369
会员
注册时间: 2022-06-07
已发帖子: 24
积分: 60

f1c100s亮了,点亮了,RTT+SPI+ST7789v四线串口屏,分享一下。

进行简单修改测试,竟然点亮了。屏幕分辨率240X320
st7789.rar
两个文件放入 rt-thread\drivers 目录
测试代码:applications\main.c

#include "rtthread.h"
#include "drv_clock.h"
#include "board.h"

#include "st7789.h"

uint8_t data[LCD_RAM_SIZE];
int main(int argc, char **argv)
{
    rt_kprintf("periph_get_pll_clk:%d\n", periph_get_pll_clk());
    rt_kprintf("cpu_get_clk:%d\n", cpu_get_clk());
    rt_kprintf("ahb_get_clk:%d\n", ahb_get_clk());
    rt_kprintf("apb_get_clk:%d\n", apb_get_clk());

    static uint16_t color;
    rt_tick_t t1,t2;

    color=0;
    while(1)
    {
        color +=0x3333;
        for(uint32_t j = 0; j < (uint32_t)Pixel_NUM; j++)
        {
            data[j * 2] = color >> 8;
            data[j * 2 + 1] =  color;
        }
        t1 = rt_tick_get();
        lcd_hw_write(0, 0, LCD_Width-1, LCD_Height-1, data, LCD_RAM_SIZE);
        t2 = rt_tick_get();
        rt_kprintf("tick = %d\r\n", t2-t1);
        rt_thread_delay(500);
    }

    return 0;
}

332.jpg

最近编辑记录 go369 (2022-06-21 22:49:53)

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn