| 
 
初级会员 
 
	积分88金钱88 注册时间2016-11-22在线时间60 小时 | 
 
50金钱 
| 本帖最后由 592924270 于 2024-8-30 11:07 编辑 
 难道是真的就只能跑这么点吗,还是有什么其他配置错误的地方,了解的朋友指点下
 
 
 设备配置&ecspi1{
 fsl,spi-num-chipselects = <2>;
 cs-gpios = <&gpio4 26 0
 &gpio4 23 0>;
 pinctrl-names = "default";
 pinctrl-0 = <&pinctrl_ecspi1>;
 status = "okay";
 ili9341@0{
 compatible =  "ilitek,ili9341";
 reg = <0>;
 dc-gpios = <&gpio4 22 GPIO_ACTIVE_HIGH>;
 reset-gpios = <&gpio4 21 GPIO_ACTIVE_HIGH>;
 spi-max-frequency = <50000000>;
 rotation = <270>;
 bgr;
 fps = <100>;
 buswidth= <8>;
 debug = <0>;
 };
 xpt2046@1{
 compatible =  "ti,tsc2046";
 reg = <1>;
 pinctrl-0 = <&pinctrl_tsc>;
 interrupt-parent = <&gpio1>;
 interrupts = <9 0>;
 interrupt-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
 spi-max-frequency = <1000000>;
 pendown-gpio = <&gpio1 9 0>;
 vcc-supply = <®_can_3v3>;
 ti,x-min = /bits/ 16 <0>;
 ti,x-max = /bits/ 16 <320>;
 ti,y-min = /bits/ 16 <0>;
 ti,y-max = /bits/ 16 <240>;
 //ti,x-plate-ohms = /bits/ 16 <0>;
 //ti,pressure-max = /bits/ 16 <255>;
 linux,wakeup;
 };
 };
 lvgl 配置,屏蔽了触摸输入
 #define DISP_BUF_SIZE (240 * 320)
 
 int main(void)
 {
 /*LittlevGL init*/
 lv_init();
 
 /*Linux frame buffer device init*/
 fbdev_init();
 
 /*A small buffer for LittlevGL to draw the screen's content*/
 static lv_color_t buf[DISP_BUF_SIZE];
 
 /*Initialize a descriptor for the buffer*/
 static lv_disp_draw_buf_t disp_buf;
 lv_disp_draw_buf_init(&disp_buf, buf, NULL, DISP_BUF_SIZE);
 
 /*Initialize and register a display driver*/
 static lv_disp_drv_t disp_drv;
 lv_disp_drv_init(&disp_drv);
 disp_drv.draw_buf   = &disp_buf;
 disp_drv.flush_cb   = fbdev_flush;
 disp_drv.hor_res    = 240;
 disp_drv.ver_res    = 320;
 lv_disp_drv_register(&disp_drv);
 
 /*evdev_init();
 static lv_indev_drv_t indev_drv_1;
 lv_indev_drv_init(&indev_drv_1); /*Basic initialization*/
 //indev_drv_1.type = LV_INDEV_TYPE_POINTER;
 
 /*This function will be called periodically (by the library) to get the mouse position and state*/
 // indev_drv_1.read_cb = evdev_read;
 //lv_indev_t *mouse_indev = lv_indev_drv_register(&indev_drv_1);
 
 
 /*Set a cursor for the mouse*/
 //LV_IMG_DECLARE(mouse_cursor_icon)
 //lv_obj_t * cursor_obj = lv_img_create(lv_scr_act()); /*Create an image object for the cursor */
 //lv_img_set_src(cursor_obj, &mouse_cursor_icon);           /*Set the image source*/
 //lv_indev_set_cursor(mouse_indev, cursor_obj);             /*Connect the image  object to the driver*/
 
 
 /*Create a Demo*/
 lv_demo_benchmark();
 
 /*Handle LitlevGL tasks (tickless mode)*/
 while(1) {
 lv_timer_handler();
 usleep(2000);
 }
 
 return 0;
 }
 
 显示刷新配置
 /*Default display refresh period. LVG will redraw changed areas with this period time*/
 #define LV_DISP_DEF_REFR_PERIOD 10      /*[ms]*/
 
 /*Input device read period in milliseconds*/
 #define LV_INDEV_DEF_READ_PERIOD 1000     /*[ms]*/
 
 
 
 
 | 
 
 
  
最佳答案
查看完整内容[请看2#楼] 50M频率/(X方向分辨率320*Y轴方向分辨率240*色彩位数24)=27FPS,SPI通信还会存在命令发送的一些数据,实际更低。所以17也差不多 |