隐藏左上角光标
目前暂时不知道怎么从内核层面去修改,现在修改方式是如此
echo -e “\033[?25l” > /dev/tty1
只要在init的时候进行设置,基本上没有什么问题
自带电阻屏驱动出现问题的fix
看了一下原理图,他的i2c脚位都没有上拉…………拉胯,加上上拉电阻即可
直接在 suniv.dtsi 内进行修改)
// 添加在soc节点下
// 此处添加的属性与配置,来自于查找用户手册以及兼容设备
i2c0: i2c@1C27000 {
compatible = "allwinner,sun6i-a31-i2c";
reg = <0x01C27000 0x400>;
interrupts = <7>;
clocks = <&ccu CLK_BUS_I2C0>;
resets = <&ccu RST_BUS_I2C0>;
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
// 在pio节点下,添加i2c引脚定义
i2c0_pins: i2c0 {
pins = "PE11", "PE12";
function = "i2c0";
};
因为荔枝派nano的ns2009没有接中断引脚, 所以把下面的轮询驱动:
https://github.com/Lichee-Pi/linux/blob/zero-4.13.y/drivers/input/touchscreen/ns2009.c
https://github.com/Lichee-Pi/linux/blob/zero-4.13.y/drivers/input/touchscreen/Makefile
https://github.com/Lichee-Pi/linux/blob/zero-4.13.y/drivers/input/touchscreen/Kconfig
添加到:
https://github.com/Lichee-Pi/linux/tree/nano-5.2-tf/drivers/input/touchscreen
设备树添加 ns2009:
https://github.com/Lichee-Pi/linux/blob/zero-4.13.y/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts
&i2c0 {
status = "okay";
ns2009: ns2009@48 {
compatible = "nsiway,ns2009";
reg = <0x48>;
};
};
如此,即可看到/dev/input 里面有个event0
完成,感谢
哇酷开发社区关于电阻屏的讲解
https://whycan.com/t_5897.html
csdn关于光标消除的讲解
https://blog.csdn.net/weixin_36156325/article/details/116850659