跳到主要内容

搭配 Luckfox Omni3576 使用

硬件连接​

  1. 使用 22PIN 的 FPC 排线,将显示屏 DSI 接口连接到 Omni3576 主板的 DSI 接口。

  2. 使用 2PIN 电源连接线,将显示屏的电源接口连接到 Omni3576 主板的 40PIN GPIO 接口。如下图所示:

    101M 8001280 IPS CT K Omni3576

软件设置​

  1. 下载并使用 幸狐官网的镜像文件 进行烧录对应系统镜像。
  2. 给 Omni3576 主板接入 5V 电源,待系统启动后屏幕即可亮起

查看屏幕信息​

  • 当前系统中可用的屏幕 ID 可通过以下命令查看:

    sudo cat /sys/kernel/debug/dri/0/summary
  • 正常会得到以下输出:

    Video Port0: DISABLED
    Video Port1: ACTIVE
    Connector:DSI-1 Encoder: DSI-203
    bus_format[100a]: RGB888_1X24
    overlay_mode[0] output_mode[0] SDR[0] color-encoding[BT.709] color-range[Full]
    Display mode: 800x1280p60
    clk[70000] real_clk[69883] type[48] flag[a]
    H: 800 840 860 880
    V: 1280 1300 1304 1324
    Fixed H: 800 840 860 880
    Fixed V: 1280 1300 1304 1324
    Esmart1-win0: ACTIVE
    win_id: 1
    format: XR24 little-endian (0x34325258) pixel_blend_mode[0] glb_alpha[0xff]
    color: SDR[0] color-encoding[BT.601] color-range[Limited]
    rotate: xmirror: 0 ymirror: 0 rotate_90: 0 rotate_270: 0
    csc: y2r[0] r2y[0] csc mode[0]
    zpos: 1
    src: pos[0, 0] rect[800 x 1280]
    dst: pos[0, 0] rect[800 x 1280]
    buf[0]: addr: 0x00000000fe44e000 pitch: 3200 offset: 0
    Video Port2: DISABLED

显示旋转​

  • 旋转指令

    #旋转 90 度
    xrandr -o left

    #旋转 270 度
    xrandr -o right

    #旋转 180 度
    xrandr -o inverted

    #旋转 0 度
    xrandr -o normal
  • 使用 xrandr 旋转的效果是一次性的,系统重启后屏幕显示方向会还原。 如果要开机自动旋转,则需要修改配置文件:

    sudo vim /etc/X11/xorg.conf.d/10-monitor.conf

    添加以下语句:

    ### Valid values for rotation are "normal", "left", "right"
    Section "Monitor"
    # Identifier "Default Monitor"
    Identifier "DSI-1"
    Option "Rotate" "left"
    EndSection

触摸旋转​

  • 系统显示旋转后,触摸方向不一致,需要按下文操作进行触摸旋转:

    sudo vim /etc/udev/rules.d/99-luckfox-touch.rules
  • 根据自己的旋转方向,加入对应的配置,保存后重启开发板。

    90 度:
    ENV{ID_INPUT_TOUCHSCREEN}=="1", ENV{LIBINPUT_CALIBRATION_MATRIX}="0 -1 1 1 0 0"

    180 度:
    ENV{ID_INPUT_TOUCHSCREEN}=="1", ENV{LIBINPUT_CALIBRATION_MATRIX}="-1 0 1 0 -1 1"

    270 度:
    ENV{ID_INPUT_TOUCHSCREEN}=="1", ENV{LIBINPUT_CALIBRATION_MATRIX}="0 1 0 -1 0 1"