页次: 1
请教tabview的标题文字能修改中文吗
git clone https://github.com/lvgl/lv_sim_visual_studio_sdl/ --recursive
.gitsubmodule
[submodule "visual_studio_2017_sdl/lvgl"] path = visual_studio_2017_sdl/lvgl url = https://github.com/lvgl/lvgl.git branch = release/v7 [submodule "visual_studio_2017_sdl/lv_examples"] path = visual_studio_2017_sdl/lv_examples url = https://github.com/lvgl/lv_examples.git branch = release/v7 [submodule "visual_studio_2017_sdl/lv_drivers"] path = visual_studio_2017_sdl/lv_drivers url = https://github.com/lvgl/lv_drivers.git branch = dev-7.0
git submodule update --remote
STM32F103VCT6 驱动 430x320 一卡一卡的,正常吗
感谢提供的资料
再发一个: https://www.geeks3d.com/20091230/vga-hack-how-to-make-a-vga-dummy-plug/
一个VGA虚设插头是一个简单的黑客愚弄通过让他们想有一个插入卡上的监视器中的GPU和Windows。在某些情况下,当您拥有两个或更多图形卡并且需要将它们激活时,此技巧很有用:
在1张以上的卡上运行F @ H:Folding @ Home GPU客户端要求该卡处于活动状态(具有其自己的桌面),然后才能在图形核心上启动折叠(请参阅此处)。
在第一个卡(Radeon)用于3D渲染时,为PhysX启用NVIDIA卡(请参阅此处)。
VGA虚拟原理很简单:使用3个电阻器模拟显示器的RGB通道负载。50至150欧姆之间的任何电阻都可以。https://whycan.cn/files/members/2003/vga_dummy_electronic_01.jpg
https://whycan.cn/files/members/2003/vga_dummy_electronic_02.jpg
VGA虚拟插头电子方案
https://whycan.cn/files/members/2003/vga_dummy_electronic_schema.jpg
这是DVI连接器的电子方案:
https://whycan.cn/files/members/2003/vga_dummy_electronic_dvi.jpg
据说龙眼上的 CPU 有 GD32VF103CBT6 和 GD32VF103C8T6 两种。如果官网程序不工作,那看看 CPU 的型号;如果是 C8T6 的,那么试试附件这个 json。
解开后放在 platformio 的 .platformio\platforms\gd32v\boards 目录下,然后在工程的 platform.ini 里写 board = sipeed-longan-nano-c8 就行了。
我是用 DFU 下载的,没有问题。串口没试过。
附件: https://whycan.cn/files/members/2387/sipeed-longan-nano-c8.7z
可以了,非常感谢,dfu可以,串口不行
超级萌新 说:先用 evtest 测试,这个可以手动选设备。
ts_test 不行估计是因为环境变量设置的是按键设备,你要改下环境变量才行对, 试一试这样:
###根据实际情况填写###
export TSLIB_CALIBFILE='/etc/pointercal'
export TSLIB_CONFFILE='/etc/ts.conf'
export TSLIB_FBDEVICE='/dev/fb0'
export TSLIB_PLUGINDIR='/usr/lib/ts'
export TSLIB_TSDEVICE='/dev/input/event0'ts_calibrate
ts_test
环境变量 TSLIB_TSDEVICE 设置就好了,感谢晕哥!!!
ft6336电容触摸 使用的是edt-ft5x06驱动,地址(7bit地址)都是0x38
ts_test 出现:
tslib: Selected device is not a touchscreen (must support ABS and KEY event types)
我的dts配置:
&i2c0 {
status = "okay";
ft6336g: edt-ft5x06@38 {
compatible = "edt,edt-ft5406", "edt,edt-ft5x06";
reg = <0x38>;
interrupt-parent = <&pio>;
interrupts = <1 2 IRQ_TYPE_EDGE_FALLING>;/*(PB02)*/
pinctrl-names = "default";
pinctrl-0 = <&ts_reset_pin>;
irq-gpios = <&pio 1 2 GPIO_ACTIVE_HIGH>; /* (PB02) */
reset-gpios = <&pio 4 0 GPIO_ACTIVE_LOW>; /* (PE00) */
/*wake-gpios = <&pio 4 9 GPIO_ACTIVE_HIGH>;*/
/*touchscreen-swapped-x-y*/
};
};
驱动记载波形:https://whycan.cn/files/members/1808/none_20190809-2134.zip
发现rst出现类似毛刺的波形:
昨天调试st7789v驱动ok,遂用mplayer播放mp4,发现有图像,没声音。于是指定alsa驱动:
mplayer -ao alsa /mnt/sda1/aoa.mp4
提示: No such audio driver 'alsa'
于是 mplayer -ao help :
# mplayer -ao help
MPlayer 1.3.0-6.3.1 (C) 2000-2016 MPlayer Team
Available audio output drivers:
oss OSS/ioctl audio output
mpegpes DVB audio output
v4l2 V4L2 MPEG Audio Decoder output
null Null audio output
pcm RAW PCM/WAVE file writer audio output
于是播放mp3试试:madplay -o wave:- 1.MP3 | aplay & 竟然有声音!!!
我再看看buildroot 发现加了alsa驱动了
可能是在别的文件实现了:
$ grep reset-gpios -r drivers/staging/
drivers/staging/fbtft/fbtft-core.c: ret = fbtft_request_one_gpio(par, "reset-gpios", 0, &par->gpio.reset);
drivers/staging/greybus/arche-apb-ctrl.c: apb->resetn_gpio = of_get_named_gpio(np, "reset-gpios", 0);
这个复位Io应该不是屏幕的复位,而是系统的复位
等你好消息 ^_^
https://github.com/Lichee-Pi/linux/blob/zero-4.13.y/drivers/staging/fbtft/fb_st7789v.c
源代码里面没看到 复位的操作呢,为什么 Documentation\devicetree\bindings\display\panel\sitronix,st7789v.txt 文件里面有复位引脚!!
而且我发现ili9341里面有复位的相关操作:
https://github.com/Lichee-Pi/linux/blob/zero-4.13.y/drivers/staging/fbtft/fb_ili9341.c
par->fbtftops.reset(par);
晕哥 说:spi-max-frequency = <50000000>;
/*spi-cpol;*/
/*spi-cpha;*/频率降低到 6M, 开启 cpol, cpha:
spi-max-frequency = <6000000>;
spi-cpol;
spi-cpha;这样试一试.
还是不行呢 https://whycan.cn/files/members/1808/none_20190806-1615.zip
好像有点正常了,晚上试试,感谢晕哥
spi-max-frequency = <50000000>;
/*spi-cpol;*/
/*spi-cpha;*/频率降低到 6M, 开启 cpol, cpha:
spi-max-frequency = <6000000>;
spi-cpol;
spi-cpha;这样试一试.
还是不行呢 https://whycan.cn/files/members/1808/none_20190806-1615.zip
请教ST7789V,不显示,发现波形完全不对!仔细防照
http://zero.lichee.pro/%E8%B4%A1%E7%8C%AE/article%203.html?highlight=fbtft
LicheePizero_SPI_LCD_st7789.pdf
操作,还是没有效果!!!
dts文件: https://whycan.cn/files/members/1808/dts.zip
sun8i-v3s-licheepi-zero-dock.dts 文件:
/*
* Copyright (C) 2016 Icenowy Zheng <icenowy@aosc.xyz>
*
* This file is dual-licensed: you can use it either under the terms
* of the GPL or the X11 license, at your option. Note that this dual
* licensing only applies to this file, and not this project as a
* whole.
*
* a) This file is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* Or, alternatively,
*
* b) Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
#include "sun8i-v3s-licheepi-zero.dts"
#include <dt-bindings/input/input.h>
/ {
model = "Lichee Pi Zero with Dock";
compatible = "licheepi,licheepi-zero-dock", "licheepi,licheepi-zero",
"allwinner,sun8i-v3s";
aliases {
ethernet0 = &emac;
};
leds {
/* The LEDs use PG0~2 pins, which conflict with MMC1 */
status = "disbaled";
};
chosen {
/delete-node/ framebuffer@0;
};
};
&spi0 {
status = "okay";
st7789v@0 {
compatible = "sitronix,st7789v";
reg = <0>;
reset-gpios = <&pio 4 20 GPIO_ACTIVE_LOW>;
dc-gpios = <&pio 4 1 GPIO_ACTIVE_LOW>;
/*backlight = <&pwm_bl>;*/
spi-max-frequency = <15000000>;
spi-cpol;
spi-cpha;
bgr;
buswidth = <8>;
rotate = <270>;
fps = <10>;
};
};
&codec {
allwinner,audio-routing =
"Headphone", "HP",
"Headphone", "HPCOM",
"MIC1", "Mic",
"Mic", "HBIAS";
status = "okay";
};
&emac {
status = "okay";
};
&mmc1 {
broken-cd;
bus-width = <4>;
vmmc-supply = <®_vcc3v3>;
status = "okay";
};
&lradc {
vref-supply = <®_vcc3v0>;
status = "okay";
button@200 {
label = "Volume Up";
linux,code = <KEY_VOLUMEUP>;
channel = <0>;
voltage = <200000>;
};
button@400 {
label = "Volume Down";
linux,code = <KEY_VOLUMEDOWN>;
channel = <0>;
voltage = <400000>;
};
button@600 {
label = "Select";
linux,code = <KEY_SELECT>;
channel = <0>;
voltage = <600000>;
};
button@800 {
label = "Start";
linux,code = <KEY_OK>;
channel = <0>;
voltage = <800000>;
};
};
加载驱动时候的波形如下:
文件:saleae 1.1.18版本以上可以打开 https://whycan.cn/files/members/1808/none.zip
加载驱动时候的波形如下:
文件:saleae 1.1.18版本以上可以打开 https://whycan.cn/files/members/1808/fb.zip
0x01.硬件链接
-------------------------------------------------------------------------------
[st7789] [licheepi zero]
CK <--------------> SPI0_CLK
SI <--------------> SPI0_SI
SO <--------------> SPI0_SO
CS <--------------> SPI0_CS
DC <--------------> PE1
RST <--------------> PE20
0x02.增加驱动ST7789驱动
-------------------------------------------------------------------------------
make ARCH=arm menuconfig
CONFIG_FB_TFT=y
CONFIG_FB_TFT_ST7789V=y
0x03.删除sun8i-v3s.dtsi中的
chosen {
#address-cells = <1>;
#size-cells = <1>;
ranges;
simplefb_lcd: framebuffer@0 {
compatible = "allwinner,simple-framebuffer",
"simple-framebuffer";
allwinner,pipeline = "de0-lcd0";
clocks = <&ccu CLK_BUS_TCON0>, <&display_clocks 0>,
<&display_clocks 6>, <&ccu CLK_TCON0>;
status = "disabled";
};
};
0x04.修改sun8i-v3s-licheepi-zero-dock.dts文件
-------------------------------------------------------------------------------
#include "sun8i-v3s-licheepi-zero.dts"
#include <dt-bindings/input/input.h>
/ {
model = "Lichee Pi Zero with Dock";
compatible = "licheepi,licheepi-zero-dock", "licheepi,licheepi-zero",
"allwinner,sun8i-v3s";
aliases {
ethernet0 = &emac;
};
leds {
/* The LEDs use PG0~2 pins, which conflict with MMC1 */
status = "disbaled";
};
chosen {
/delete-node/ framebuffer@0;
};
};
&spi0 {
status = "okay";
panel@0 {
compatible = "sitronix,st7789v";
reg = <0>;
reset-gpios = <&pio 4 20 GPIO_ACTIVE_LOW>;
dc-gpios = <&pio 4 1 GPIO_ACTIVE_LOW>;
/*backlight = <&pwm_bl>;*/
spi-max-frequency = <50000000>;
/*spi-cpol;*/
/*spi-cpha;*/
buswidth = <8>;
rotate = <270>;
bgr;
fps = <30>;
/*
port {
panel_input: endpoint {
remote-endpoint = <&tcon0_out_panel>;
};
};
*/
};
};
TPA3116D2
页次: 1