注册 登录
电子工程世界-论坛 返回首页 EEWORLD首页 频道 EE大学堂 下载中心 Datasheet 专题
LitchiCheng的个人空间 https://home.eeworld.com.cn/space-uid-1003127.html [收藏] [复制] [分享] [RSS]
日志

RV1106手把手教你:使用ffmpeg、framebuffer在ST7735屏幕上60 fps播放bad apple

已有 289 次阅读2024-2-25 19:39 |个人分类:rv1106

硬件接线

LED- ------- PICO-GND

LED+ ------- PICO-3.3V

RESX ------- PICO-PIN27

DCX ------- PICO-PIN26

SCL ------- PICO-PIN14

SDA ------- PICO-PIN15

VDDI ------- PICO-3.3V

VDD ------- PICO-3.3V

CSX ------- PICO-PIN12

 

未被复用的GPIO2_A2和A3用来做DCX和RESX,一个切换,一个是重置

 

内核、设备树配置

make ARCH=arm menuconfig

   

设备树增加spi节点的配置,同时设备树的位置luckfox-pico/sysdrv/source/kernel/arch/arm/boot/dts/rv1106g-luckfox-pico-pro-max.dts,

如下为改动的地方:

/ {
    model = "Luckfox Pico Max";
    compatible = "rockchip,rv1103g-38x38-ipc-v10", "rockchip,rv1106";

    /*LCD DC*/
    gpio2pa2:gpio2pa2 {
        compatible = "regulator-fixed";
        pinctrl-names = "default";
        pinctrl-0 = <&gpio2_pa2>;
        regulator-name = "gpio2_pa2";
        regulator-always-on;
    };

    /*LCD RESET*/
    gpio2pa3:gpio2pa3 {
        compatible = "regulator-fixed";
        pinctrl-names = "default";
        pinctrl-0 = <&gpio2_pa3>;
        regulator-name = "gpio2_pa3";
        regulator-always-on;
    };
};

&pinctrl {
    /*LCD DC*/
    gpio2-pa2 {
        gpio2_pa2:gpio2-pa2 {
            rockchip,pins = <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
        };
    };

    /*LCD RESET*/
    gpio2-pa3 {
        gpio2_pa3:gpio2-pa3 {
            rockchip,pins =    <2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
        };
    };
};

// /**********SPI**********/
&spi0 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&spi0m0_pins &spi0m0_cs0>;
    //cs-gpios = <&gpio1 RK_PC0 1>;
    // cs-gpios = <&gpio1 26 1>;
    #address-cells = <1>;
    #size-cells = <0>;
    //spidev@0 {
    //    compatible = "rockchip,spidev";
    //    spi-max-frequency = <50000000>;
    //    reg = <0>;
    //};

    st7735r@0{
        compatible = "sitronix,st7735r";
        reg = <0>;
        status = "okay";
        spi-max-frequency = <48000000>;
        dc = <&gpio2 RK_PA2 1>;
        reset = <&gpio2 RK_PA3 1>;
        rotation = <90>;
        spi-cpol;
        spi-cpha;
        fps = <30>;
        buswidth = <8>;
        rgb;
    };

};

更新boot.img,使用dmesg进行查看framebuffer设备是否启用

 

测试

使用ffmpeg输出bad apple到屏幕上

sudo ffmpeg -v 60 -i rotate-video-4.mp4 -pix_fmt rgb565le -f fbdev /dev/fb0

 
javascript:;,"width":523,"height":294},"nodes":[],"state":{"renderSource":"javascript:;,"initialSize":{"width":523,"height":382},"loading":false}}]">

 

  视频讲解

 

 

本文来自论坛,点击查看完整帖子内容。

评论 (0 个评论)

facelist doodle 涂鸦板

您需要登录后才可以评论 登录 | 注册

热门文章