我使用的是GPADC0
这是我配置&gpadc {
channel_num = <1>;
channel_select = <0x01>;
channel_data_select = <0>;
wakeup-source;
status = "okay";
}; 因为不要按键检测的 我只要通过ADC检测电压 所以其他的按键和比较都没有设置
下面启动时候打印的信息 在设备里面有event1
[ 1.227429] sunxi_gpadc_init,2151, success
[ 1.235486] sunxi_key_init: get key count failed
[ 1.235495] sunxi_gpadc_setup: get channel compare select failed
[ 1.247434] sunxi_gpadc_setup: get channel compare low data select failed
[ 1.255059] sunxi_gpadc_setup: get channel compare hig data select failed
[ 1.262689] sunxi_gpadc_setup: get channel scan data failed
[ 1.268964] sunxi_gpadc_setup:get channel0_compare_lowdata err!
[ 1.275617] sunxi_gpadc_setup:get channel0_compare_higdata err!
[ 1.282507] input: sunxi-gpadc0 as /devices/virtual/input/input1
是在应用程序里面操作吗?
我就在应用程序里面 主要是下面这代码 而且我是放在while里面都没有加延时
if(ioctl(PrintfFd,HELL3_READ,&s_stdata) < 0)
{
close(PrintfFd);
PrintfFd = -1;
printf(" PrintfFd ioctl error\n");
}
//printf("s_stdata.buff[0]:%d\n",s_stdata.buff[0]);
s_stdata1.buff[0] = s_stdata.buff[0];
s_stdata1.buff[1] = 0;
if(ioctl(PRINTFIO_FD,HELLO_WRITE,&s_stdata1)< 0)
{
close(PRINTFIO_FD);
PRINTFIO_FD = -1;
printf(" PRINTFIO_FD ioctl error\n");
};
全志T113芯片 ts_calibrate 提示ts_setup没有找到
ts_
ts_calibrate ts_harvest ts_print_mt ts_test ts_uinput
ts_finddev ts_print ts_print_raw ts_test_mt ts_verify
root@TinaLinux:/# ts_
ts_calibrate ts_harvest ts_print_mt ts_test ts_uinput
ts_finddev ts_print ts_print_raw ts_test_mt ts_verify
root@TinaLinux:/# ts_calibrate
ts_setup: No such file or directory
root@TinaLinux:/# ts_test
ts_open: No such file or directory
这是还需要设置什么吗
我在这个目录/target/allwinner/t113-bingpi_m2/busybox-init-base-files/etc/init.d/rc.modules 的脚本中添加了自启动执行程序会启动失败 报错如下 ,但是 系统启动 我单独进这个目录执行程序 又可以执行成功 这是哪里有问题吗啊
Error loading shared library libQt5Widgets.so.5: No such file or directory (needed by /ysc/Printf_Machine)
Error loading shared library libQt5Gui.so.5: No such file or directory (needed by /ysc/Printf_Machine)
Error loading shared library libQt5Core.so.5: No such file or directory (needed by /ysc/Printf_Machine)
Trying to connect to SWUpdate...
Error relocating /ysc/Printf_Machine: _ZNK7QWidget6metricEN12QPaintDevice17PaintDeviceMetricE: symbol not found
Error relocating /ysc/Printf_Machine: _ZN7QWidget10leaveEventEP6QEvent: symbol not found
Error relocating /ysc/Printf_Machine: _ZN15QAbstractButton7setTextERK7QString: symbol not found
Error relocating /ysc/Printf_Machine: _ZN7QWidget13keyPressEventEP9QKeyEvent: symbol not found
Error relocating /ysc/Printf_Machine: _ZN7QWidget11tabletEventEP12QTabletEvent: symbol not found
Error relocating /ysc/Printf_Machine: _ZThn8_NK7QWidget7devTypeEv: symbol not found
Error relocating /ysc/Prin[ 5.921800] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
tf_Machine: _ZN7QWidget10closeEventEP11QCloseEvent: symbol not found
Error relocating /ysc/Printf_Machine: _ZThn8_NK7QWidget6me[ 5.926053] file system registered
tricEN12QPaintDevice17PaintDeviceMetricE: symbol not found
Error relocating /ysc/Printf_Machine: _ZN7QObject10timerEventEP11QTimerEvent: symbol not found
Error relocating /ysc/Printf_Machine: _ZThn8_NK7QWidget11paintEngineEv: symbol not found
Error relo[ 5.962073] configfs-gadget 4100000.udc-controller: failed to start g1: -19
cating /ysc/Printf_Machine: _ZN7QObject16disconnectNotifyERK11QMetaMethod: symbol not found
Error relocating /ysc/Printf_Machine: _ZThn8_NK7QWidget11initPainterEP8QPainter: symbol not found
Error relocating /ysc/Printf_Machine: _ZNK7QObject10objectNameEv: symbol not found
Error relocating /ysc/Printf_Machine: _ZN7QObject10childEventEP11QChildEvent: symbol not found
Error relocating /ysc/Printf_Machine: _ZN7QWidget14setWindowTitleERK7QString: symbol not found
Error relocating /ysc/Printf_Machine: _ZN7QWidget13focusOutEventEP11QFocusEvent: symbol not found
Error relocating /ysc/Printf_Machine: _ZNK7QWidget17hasHeightForWidthEv: symbol not found
Error relocating /ysc/Printf_Machine: _ZN11QPushButtonC1EP7QWidget: symbol not found
Error relocating /ysc/Printf_Machine: _ZN7QWidget14dragLeaveEventEP15QDragLeaveEvent: symbol not found
Error relocating /ysc/Printf_Machine: _ZN11QMainWindowC2EP7QWidget6QFlagsIN2Qt10WindowTypeEE: symbol not found
Error relocating /ysc/Printf_Machine: _ZN7QWidget18focusNextPrevChildEb: symbol not found
Error relocating /ysc/Printf_Machine: _ZN6QLabel7setTextERK7QString: symbol not found
报错内容如下
root@ysc-virtual-machine:/home/D211/d211# m
Source is not built yet : /home/D211/d211/source/uboot-2021.10
>>> uboot 2021.10 kconfig-package-merge-config
GEN Makefile
***
*** Can't find default configuration "arch/../configs/d211_per1_defconfig"!
***
make[3]: *** [/home/D211/d211/source/uboot-2021.10/scripts/kconfig/Makefile:96: d211_per1_defconfig] Error 1
make[2]: *** [/home/D211/d211/source/uboot-2021.10/Makefile:569: d211_per1_defconfig] Error 2
make[1]: *** [Makefile:177: sub-make] Error 2
make: *** [package/uboot/uboot.mk:295: /home/D211/d211/output/d211_ota_emmc/build/uboot-2021.10/.stamp_dotconfig] Error 2
各位大佬看下哦哦,
1:编译最后感觉是有什么配置对
Starting logging: OK
Starting mdev...
modprobe: can't change directory to '/lib/modules': No such file or directory
Initializing random number generator... [ 5.415389] ------------[ cut here ]------------
[ 5.420169] WARNING: CPU: 0 PID: 88 at drivers/mtd/spi-nor/spi-nor.c:1182 spi_nor_write+0x138/0x1b4
[ 5.429257] Writing at offset 164 into a NOR page. Writing partial pages may decrease reliability and increase wear of NOR flash.
[ 5.429263] Modules linked in:
[ 5.443975] CPU: 0 PID: 88 Comm: rm Not tainted 4.10.15-licheepi-zero+ #1
[ 5.450750] Hardware name: Allwinner sun8i Family
[ 5.455479] [<c010e3bc>] (unwind_backtrace) from [<c010b158>] (show_stack+0x10/0x14)
[ 5.463222] [<c010b158>] (show_stack) from [<c0346ce4>] (dump_stack+0x84/0x98)
[ 5.470445] [<c0346ce4>] (dump_stack) from [<c011b7f4>] (__warn+0xe8/0x100)
[ 5.477402] [<c011b7f4>] (__warn) from [<c011b844>] (warn_slowpath_fmt+0x38/0x48)
[ 5.484880] [<c011b844>] (warn_slowpath_fmt) from [<c04538e4>] (spi_nor_write+0x138/0x1b4)
[ 5.493145] [<c04538e4>] (spi_nor_write) from [<c02fc224>] (jffs2_flash_write+0x70/0x78)
[ 5.501234] [<c02fc224>] (jffs2_flash_write) from [<c02f246c>] (jffs2_mark_node_obsolete+0x478/0x5bc)
[ 5.510446] [<c02f246c>] (jffs2_mark_node_obsolete) from [<c02f5c90>] (jffs2_do_unlink+0x240/0x2f4)
[ 5.519482] [<c02f5c90>] (jffs2_do_unlink) from [<c02ef9b0>] (jffs2_unlink+0x44/0x8c)
[ 5.527307] [<c02ef9b0>] (jffs2_unlink) from [<c01fce14>] (vfs_unlink+0xb8/0x19c)
[ 5.534785] [<c01fce14>] (vfs_unlink) from [<c02008a8>] (do_unlinkat+0x218/0x280)
[ 5.542264] [<c02008a8>] (do_unlinkat) from [<c0107640>] (ret_fast_syscall+0x0/0x3c)
[ 5.550061] ---[ end trace 542b7352f6becd42 ]---
done.
Starting network: OK
2 我低uboot里面配置
#define CONFIG_BOOTCOMMAND "sf probe 0; " \
"sf read 0x41800000 0x100000 0x10000; " \
"sf read 0x41000000 0x110000 0x400000; " \
"bootz 0x41000000 - 0x41800000"
#define CONFIG_BOOTARGS "console=ttyS0,115200 earlyprintk panic=5 rootwait " \
"mtdparts=spi32766.0:1M(uboot)ro,64k(dtb)ro,4M(kernel)ro,-(rootfs) root=31:03 rw rootfstype=jffs2 vt.global_cursor_default=0"
#include <configs/sunxi-common.h>
/////////////
使能 Enable graphical uboot console on HDMI, LCD or VGA │ │
│ │ [ ] VGA via LCD controller support │ │
│ │ (x:800,y:480,depth:18,pclk_khz:33000,le:86,ri:160,up:30,lo:24,hs:1,vs:1,sync:3,vmode:0) LCD pan│ │
│ │ (1) LCD panel display clock phase │ │
│ │
同时在Linux里面dtsi里面的chosen加了下面的
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";
};
在pio里面加了如下
lcd_rgb666_pins_a: lcd-rgb666-pe {
pins = "PE0", "PE1", "PE2", "PE3", "PE4", "PE5",
"PE6", "PE7", "PE8", "PE9", "PE10", "PE11",
"PE12", "PE13", "PE14", "PE15", "PE16", "PE17",
"PE18", "PE19", "PE23", "PE24";
function = "lcd0";
};
但是目前来设备树里面没有看到有fb0类似的设备的
对比一下硬解和软解的命令
gst-launch-1.0 filesrc location=bad_apple.mp4 ! qtdemux ! h264parse ! omxh264dec ! autovideoconvert ! fbdevsink
gst-launch-1.0 filesrc location=bad_apple.mp4 ! qtdemux ! avdec_h264 ! autovideoconvert ! fbdevsink
硬解比软件多用了个gstreamer元件 h264parse
这是因为avdec_h264的sink(输入)视频流格式可以是avc和byte-stream 而omxh264dec的sink只能是byte-stream
而qtdemux的src(输出)的视频流格式是avc 所以 要用元件 h264parse 将avc转化为byte-stream 给omxh264dec 不然是无法解码的
我这里使用软解提示我没有avdec_h264现在没有播放成功是
无情一刀 说:https://whycan.com/files/members/1116/_20200924151151.png
就这样的 不知道在那里修改那个编译的版本
这个貌似就是C99支持不全,官方都用VS2017了,你何必折腾自己?
好吧 看来要装个装2017 还是2019 可以兼容波 和2013
用VS2013怎样移植littvGL,我现在用下载版本的是7.0 我现在都移植工程里面,
提示我还要安装一个编译工具 有点不懂 这个7.0版本的LVGL 必须要使用2017的VS吗
错误 1 error MSB8020: The build tools for v141 (Platform Toolset = 'v141') cannot be found. To build using the v141 build tools, please install v141 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Upgrade Solution...". C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets 64 5 lv_sim_visual_studio_sdl
shell脚本里面弄个计数器,满了就退出。
我在这里面加了这个country 不起作用,在脚本里面写没有连接成功的 不是很懂 ,麻烦你说的详细点哦哦
# cat /etc/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
update_config=1
country=10
network={
ssid="iPhone7p"
psk="wo1003676315"
key_mgmt=WPA-PSK WPA-EAP IEEE8021X NONE
priority=5
}
使用wifi如果是当前里面设置了密码错误,下一次启动的时候 就会是一直在连接导致程序不能执行和触摸
udhcpc: sending discover
[ 173.980781] RTL8723BS: nolinked power save leave
udhcpc: sending discover
[ 175.639335] RTL8723BS: nolinked power save enter
[ 180.860817] RTL8723BS: nolinked power save leave
[ 182.519460] RTL8723BS: nolinked power save enter
[ 187.740708] RTL8723BS: nolinked power save leave
[ 189.399334] RTL8723BS: nolinked power save enter
[ 194.620788] RTL8723BS: nolinked power save leave
[ 196.279352] RTL8723BS: nolinked power save enter
udhcpc: sending discover
udhcpc: sending discover
[ 201.500849] RTL8723BS: nolinked power save leave
[ 203.159462] RTL8723BS: nolinked power save enter
udhcpc: sending discover
[ 208.380802] RTL8723BS: nolinked power save leave
[ 210.039339] RTL8723BS: nolinked power save enter
#insmod r8723bs.ko
[ 2.343619] r8723bs: module is from the staging directory, the quality is unknown, you have been warned.
[ 2.355911] RTL8723BS: module init start
[ 2.355948] RTL8723BS: rtl8723bs v4.3.5.5_12290.20140916_BTCOEX20140507-4E40
[ 2.355958] RTL8723BS: rtl8723bs BT-Coex version = BTCOEX20140507-4E40
[ 2.356111] RTL8723BS: module init ret =0# wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wpa_supplicant.conf -B
wlan0: Unsupported driver 'nl80211'
# wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -B
Could not read interface wlan0 flags: No such device
WEXT: Could not set interface 'wlan0' UP
wlan0: Failed to initialize driver interface啊,我的怎么会出现这种问题,没有生成 wlan0
你好问下 你当时这个问题是怎么解决的啊
多点信息啊,加载驱动是什么情况。
[ 14.695000] r8723bs: module is from the staging directory, the quality is unknown, you have been warned.
[ 14.712216] RTL8723BS: module init start
[ 14.716157] RTL8723BS: rtl8723bs v4.3.5.5_12290.20140916_BTCOEX20140507-4E40
[ 14.723295] RTL8723BS: rtl8723bs BT-Coex version = BTCOEX20140507-4E40
[ 14.743011] pnetdev = c30f7000
[ 17.062401] RTL8723BS: rtw_ndev_init(wlan0)
[ 17.138082] RTL8723BS: module init ret =0
和这个帖子是一样的情况 但是不知道 我要弄什么文件进去
https://whycan.cn/t_604_27.html
但是用ifconfig -a 下面又有wlan0
# ifconfig -a
eth0 Link encap:Ethernet HWaddr 02:01:46:EC:EC:AA
inet addr:192.168.0.10 Bcast:192.168.255.255 Mask:255.255.0.0
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:38
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:352 (352.0 B) TX bytes:352 (352.0 B)
usb0 Link encap:Ethernet HWaddr 82:9E:1C:3B:22:52
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wlan0 Link encap:Ethernet HWaddr 00:E0:4C:B7:23:00
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
#
我看了路由器 里面没有用完IP地址 但是我去ifconfig wlan0 up的时候就是报错出现
ifconfig: SIOCSIFFLAGS: Operation not permitted这样的
Could not set interface wlan0 flags (UP): Operation not permitted
Could not set interface wlan0 flags (UP): Operation not permitted
nl80211: Could not set interface 'wlan0' UP
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
nl80211: Remove monitor interface: refcount=0
netlink: Operstate: ifindex=4 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
nl80211: Set mode ifindex 4 iftype 2 (STATION)
nl80211: Unsubscribe mgmt frames handle 0x889105e1 (mode change)
wlan0: Failed to initialize driver interface
Failed to add interface wlan0
wlan0: Cancelling scan request
wlan0: Cancelling authentication timeout
Off-channel: Clear pending Action frame TX (pending_action_tx=(nil)
udhcpc: started, v1.29.2
ifconfig: SIOCSIFFLAGS: Operation not permitted
ifconfig: SIOCSIFFLAGS: Operation not permitted
udhcpc: sending discover
udhcpc: sendto: Network is down
来研究下
# insmod /usr/lib/r8723bs.ko
[ 952.243349] r8723bs: module is from the staging directory, the quality is unknown, you have been warned.
[ 952.260150] RTL8723BS: module init start
[ 952.264092] RTL8723BS: rtl8723bs v4.3.5.5_12290.20140916_BTCOEX20140507-4E40
[ 952.271227] RTL8723BS: rtl8723bs BT-Coex version = BTCOEX20140507-4E40
[ 952.290744] pnetdev = c1317800
[ 954.610905] RTL8723BS: rtw_ndev_init(wlan0)
[ 954.715967] RTL8723BS: module init ret =0
加载库出现这样的 没有问题
完成了 我用的是这个
QString WifiList::GetCurrwlan0IpAddr(QString str)
{
QString filename = "/V3S/wifi_file/Wifi_Addr";
QFile file(filename);
if(!file.open(QIODevice::ReadOnly))
{
qDebug()<<"!file.open(FileName) error";
return NULL;
}
QTextStream stream(&file);
QString ReadLineStr = stream.readLine();
if(ReadLineStr == NULL)
{
return NULL;
}
QStringList str3= ReadLineStr.split("/",QString::SkipEmptyParts);
QStringList str= str3[0].split("/",QString::SkipEmptyParts);
QStringList str1 = str[0].split(" ",QString::SkipEmptyParts);
return str1[1];*/
QString str1;
QList<QNetworkAddressEntry> list;
QHostAddress addr1;
QNetworkInterface addr = QNetworkInterface::interfaceFromName(str);
list = addr.addressEntries();
if(!list.isEmpty())
{
addr1 = list.at(0).ip();
str1 = addr1.toString();
CurrConnectWifiIP = str1;
//IPAddres = CurrConnectWifiIP;
}
qDebug()<<str1;
return str1;
}
但是有一个问题就是 如何设置有线网络逇优先级是最高啊 用route是设置不管用
GPIO KEY 按键驱动(轮询): https://whycan.cn/t_2393.html#p18258
GPIO KEY 按键驱动(中断): https://whycan.cn/t_2393.html#p18270
根本不需要自己动手, Linux自带光环
是啊 就想把这个按键驱动通过代码形式,可以运行起来,晕哥你能帮我看看那个代码吗
PB3 有没有被其他功能占用?
没有被其他的占用 但是我按下去的时候有进到中断里面 ,就是在QT层去读取的时候有错误
[ 224.167890] Mapped int 44
[ 224.170614] genirq: Flags mismatch irq 44. 00000002 (PB3_int) vs. 00000002 (PB3_int)
[ 224.178386] Irq Request failure
open event0 error
[ 226.711062] interrupt received (irq: 44)
[ 226.715010] gpio pin is low
[ 227.053878] interrupt received (irq: 44)
[ 227.057826] gpio pin is low
和这个对比测试一下: https://whycan.cn/t_1261.html
就是按着你那个去写的 只是加了一个字符设备 通过读取字符设备获取状态
主要是在
int led_open(struct inode *inode, struct file *filp)
{
int ret;
int err;
if (gpio_request(PB3_GPIO, GPIO_INT_NAME ))
{
printk("PB3_GPIO request failure: %s\n", GPIO_INT_NAME );
return -1;
}
if ( (irq_any_gpio = gpio_to_irq(PB3_GPIO)) < 0 ) {
printk("PB3_GPIO to IRQ mapping failure %s\n",GPIO_INT_NAME );
return -1;
}
printk(KERN_NOTICE "Mapped int %d\n", irq_any_gpio);
if (request_irq(irq_any_gpio,(irq_handler_t ) r_irq_handler, IRQF_TRIGGER_FALLING , GPIO_INT_NAME, NULL))
{
printk("Irq Request failure\n");
return -1;
}
printk("led_open == ok\n");
return 0;
}
我在Qt上面去Open设备的时候一到这里就就就进去了 if (gpio_request(PB3_GPIO, GPIO_INT_NAME )) 就返回负一了
这个代码是通过晕哥那个中断驱动的帖子该了
#include <linux/major.h>
#include <linux/slab.h>
#include <asm/fb.h>
#include <linux/uaccess.h>
#define DEVICE "myKey"
#define PB3_GPIO 35 //PB3 35=32*1+3
#define GPIO_INT_NAME "PB3_int"
#define GPIO_HIGH gpio_get_value(PB3_GPIO)
#define GPIO_LOW (gpio_get_value(PB3_GPIO) == 0)
short int irq_any_gpio = 0;
int count =0;
struct class *key_dev_class = NULL;
struct class_device *key_dev_class_dev = NULL;
enum { falling, rising } type;
static irqreturn_t r_irq_handler(int irq, void *dev_id)
{
count++;
printk(KERN_DEBUG "interrupt received (irq: %d)\n", irq);
if (irq == gpio_to_irq(PB3_GPIO))
{
type = GPIO_LOW ? falling : rising;
if(type == falling)
{
printk("gpio pin is low\n");
}
else
printk("gpio pin is high\n");
}
return IRQ_HANDLED;
}
int led_open(struct inode *inode, struct file *filp)
{
int ret;
int err;
if (gpio_request(PB3_GPIO, GPIO_INT_NAME ))
{
printk("PB3_GPIO request failure: %s\n", GPIO_INT_NAME );
return -1;
}
if ( (irq_any_gpio = gpio_to_irq(PB3_GPIO)) < 0 ) {
printk("PB3_GPIO to IRQ mapping failure %s\n",GPIO_INT_NAME );
return -1;
}
printk(KERN_NOTICE "Mapped int %d\n", irq_any_gpio);
if (request_irq(irq_any_gpio,(irq_handler_t ) r_irq_handler, IRQF_TRIGGER_FALLING , GPIO_INT_NAME, NULL))
{
printk("Irq Request failure\n");
return -1;
}
printk("led_open == ok\n");
return 0;
}
static int key_dev_read(struct file *filp, char __user *buff, size_t count, loff_t *offp)
{
unsigned long err ;
printk("Enter key_dev_read == %d\n",type);
buff[0] = type;
//err = copy_to_user(buff,&type,1,1);
printk("copy_to_user == %d\n",buff[0]);
//return err ? -EFAULT : 0;
return 0;
}
int r_int_release(struct inode *inode, struct
free_irq(gpio_to_irq(PB3_GPIO), NULL);
gpio_free(PB3_GPIO);
return 0;
}
struct file_operations led_fops ={
.owner = THIS_MODULE,
.open = led_open,
.release = r_int_release,
.read = key_dev_read
};
struct miscdevice led_dev ={
.minor = MISC_DYNAMIC_MINOR,//minor是这个混杂设备的次设备号,由系统自动配置,
.name = DEVICE, //.name 设备名
.fops = &led_fops
};
void r_int_config(void)
{
int ret;
ret = misc_register(&led_dev);//注册驱动程序时采用misc_register函数注册,此函数中会自动创建设备节点,即设备文件
if(ret)
{
printk("error: cannot register misc.\n");
return ret;
}
return 0;
}
static void __exit Key_exit(void)
{
misc_deregister(&led_dev);//杂项设备的注销过程,其实就是注册过程的逆向过程
printk("mise-deregister %s\n", DEVICE);
}
int init_module(void)
{
printk("<1>Hello World\n");
r_int_config();
return 0;
}
module_init(init_module); // Do some better naming
module_exit(Key_exit);
MODULE_AUTHOR("ysc201995"); // 驱动程序的作者
MODULE_DESCRIPTION("Key")
https://github.com/torvalds/linux/blob/master/drivers/input/touchscreen/ads7846.c
input_register_device()
注册成为 event 设备
主要注册设备是还好解决 不知道怎么和寄存器的状态值关联上
http://www.levetop.cn/data/LT7381_BFDS_V10_CH.pdf
是这个吗?
GPIO 与矩阵键盘
提供可程序化的 GPIO 或 5*5 矩阵键盘接口。
支持长按键及重复键功能。
提供按键唤醒。
就是这个文档 我现在的按键是接在LT7381的GPIOA0的
上面这个菜单怎么进入?
上面那个菜单是 https://whycan.cn/t_583.html 从这里下载过来的文档 里面的介绍文档,
看了驱动就是这个文件 然后在我新修改 添加的 我里面也都有
https://stackoverflow.com/questions/18053330/qt-for-embedded-linux-hide-cursor-on-startup
Qt4 用这个方法试一试 :
QWSServer *server = QWSServer::instance(); if(server) { server->setCursorVisible(false); }
我的是Qt5的版本 关键是我用ft5x06的触摸不会出现 就是用hy46的就会有鼠标箭头 所以我觉得跟QT没有关心 应该是内核里面的鼠标箭头
主要是下面这个中断 他们是先读取完了后
另外一个函数/hy46xx_report_value(hy46xx_ts)去上报坐标点,所以我吧这个函数屏蔽了
static irqreturn_t hy46xx_ts_interrupt(int irq, void *dev_id)
{
struct hy46xx_ts_data *hy46xx_ts = dev_id;
disable_irq_nosync(hy46xx_ts->irq);
hy46xx_read_Touchdata(hy46xx_ts);
//hy46xx_report_value(hy46xx_ts);
enable_irq(hy46xx_ts->irq);
return IRQ_HANDLED;
}
在hy46xx_read_Touchdata里面直接读取到了一个坐标点我就上报如下图
出现的可能性 一直点着不动的时候 不断数据上报不及时 ,
现在虽然可以跑起来了 但是不不知道为什么左上角总有一个鼠标箭头标志
晕哥 说:https://whycan.cn/t_2758.html#p22291
这个链接没看吗?
###根据实际情况填写###
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看了啊 我现在是要只要校正和ts_test所以我就添加了 这两个,
export TSLIB_CALIBFILE='/etc/pointercal'
export TSLIB_TSDEVICE='/dev/input/event0'
改了fb1了
https://whycan.cn/t_2758.html#p22291
这个链接没看吗?
###根据实际情况填写###
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
看了啊 我现在是要只要校正和ts_test所以我就添加了 这两个,
export TSLIB_CALIBFILE='/etc/pointercal'
export TSLIB_TSDEVICE='/dev/input/event0'
是有两个屏幕 因为以前是用的ft5x06触摸芯片运行QT没有问题 另外一个屏幕就是上次用的SPIlt7381的 现在要用hy46触摸芯片
当我使用ts_test event0 这个的时候比如打印出来出 842 87 255 和我在内核里面打印读取到的坐标不一样
ts_calibrate event0 这个校正 只要执行了就可以了吗啊 要不要在屏幕上点击 主要是没有看到需要校正的地方
ts_calibrate event0
xres = 1024, yres = 600
^Csignal 2 caught
# ts_calibrate event0^C
# ts_test event0
[ 72.746494] id=0 event=0 x=86 y=46
[ 72.749945] event->touch_point == 1
[ 72.753434] x ==86 y = 46,pressure = 5
19123.588199: 842 87 255
[ 72.776197] id=0 event=2 x=86 y=46
[ 72.779670] event->touch_point == 1
[ 72.783159] x ==86 y = 46,pressure = 5
19123.617915: 842 87 0
[ 72.790433] id=0 event=2 x=86 y=46
[ 72.793843] event->touch_point == 1
[ 72.797329] x ==86 y = 46,pressure = 5
[ 72.805772] id=0 event=1 x=86 y=46
[ 72.809258] event->touch_point == 1
[ 72.812745] uppoint ==0
[ 76.760685] id=0 event=0 x=277 y=64
[ 76.764188] event->touch_point == 1
[ 76.767716] x ==277 y = 64,pressure = 5
19127.602569: 791 200 255
[ 76.790343] id=0 event=2 x=277 y=64
[ 76.793850] event->touch_point == 1
[ 76.797339] x ==277 y = 64,pressure = 5
19127.632232: 791 200 0[ 76.804705] id=0 event=2 x=277 y=64
[ 76.808370] event->touch_point == 1
[ 76.811988] x ==277 y = 64,pressure = 5
出现这样的 但是我看了下 QT这一块还是没有跳转
evtest event0
Input driver version is 1.0.1
Input device ID: bus 0x0 vendor 0x0 product 0x0 version 0x0
Input device name: "hy46xx_ts"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 325 (BTN_TOOL_FINGER)
Event code 328 (BTN_TOOL_QUINTTAP)
Event code 330 (BTN_TOUCH)
Event code 333 (BTN_TOOL_DOUBLETAP)
Event code 334 (BTN_TOOL_TRIPLETAP)
Event code 335 (BTN_TOOL_QUADTAP)
Event type 3 (EV_ABS)
Event code 47 (ABS_MT_SLOT)
Value 0
Min 0
Max 4
Event code 48 (ABS_MT_TOUCH_MAJOR)
Value 0
Min 0
Max 255
Event code 53 (ABS_MT_POSITION_X)
Value 0
Min 0
Max 799
Event code 54 (ABS_MT_POSITION_Y)
Value 0
Min 0
Max 1279
Event code 57 (ABS_MT_TRACKING_ID)
Value 0
Min 0
Max 65535
Properties:
Property type 0 (INPUT_PROP_POINTER)
Property type 3 (INPUT_PROP_SEMI_MT)
Testing ... (interrupt to exit)
[ 198.325866] id=0 event=0 x=448 y=258
[ 198.329494] event->touch_point == 1
[ 198.332986] x ==448 y = 258,pressure = 5
Event: time 5464.167411, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 10
Event: time 5464.167411, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 448
Event: time 5464.167411, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 258
Event: tim[ 198.355623] id=0 event=2 x=448 y=258
e 5464.167411, ++++++++++++++ SYN_MT_REPORT ++++++++++++
Event:[ 198.362928] event->touch_point == 1
time 5464.167411, type 1 (EV_KEY), code 330 (BTN_TOUCH), value [ 198.371959] x ==448 y = 258,pressure = 5
1
Event: time 5464.167411, -------------- SYN_REPORT ----------[ 198.384905] id=0 event=2 x=448 y=258
--
Event: time 5464.211917, ++++++++++++++ SYN_MT_REPORT ++++++[ 198.390644] event->touch_point == 1
++++++
Event: time 5464.211917, -------------- SYN_REPORT -----[ 198.399665] x ==448 y = 258,pressure = 5
-------
Event: time 5464.239598, ++++++++++++++ SYN_MT_REPORT ++++++++++[ 198.412649] id=0 event=1 x=448 y=258
++
Event: time 5464.239598, -------------- SYN_REPORT ---------[ 198.419058] event->touch_point == 1
---
[ 198.428209] uppoint ==0
Event: time 5464.261470, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1
Event: time 5464.261470, ++++++++++++++ SYN_MT_REPORT ++++++++++++
Event: time 5464.261470, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 5464.261470, -------------- SYN_REPORT ------------
hy46系列的触摸 能读取到了坐标 也执行到上报坐标函数 我在触摸的屏幕的时候 在内核驱动能打印出触摸的坐标,但是就是好像没有上报成功样
下面是打印的坐标数据
[ 518.357043] event->touch_point == 1
[ 518.360605] x ==358 y = 255,pressure = 5
[ 518.368459] id=0 event=2 x=358 y=255
[ 518.372045] event->touch_point == 1
[ 518.375532] x ==358 y = 255,pressure = 5
[ 518.383471] id=0 event=2 x=354 y=259
[ 518.387064] event->touch_point == 1
[ 518.390631] x ==354 y = 259,pressure = 5
[ 518.398486] id=0 event=2 x=354 y=259
[ 518.402073] event->touch_point == 1
[ 518.405560] x ==354 y = 259,pressure = 5
[ 518.413428] id=0 event=2 x=352 y=262
[ 518.417021] event->touch_point == 1
[ 518.420581] x ==352 y = 262,pressure = 5
[ 518.428386] id=0 event=2 x=352 y=262
[ 518.431970] event->touch_point == 1
[ 518.435465] x ==352 y = 262,pressure = 5
[ 518.443339] id=0 event=2 x=350 y=265
[ 518.446934] event->touch_point == 1
[ 518.450518] x ==350 y = 265,pressure
先执行下面的操作试一试:
ifconfig wlan0 down
ifconfig wlan0 up
我刚才测试了 我先关掉down然后再去up
再去wpa_supplicant -B -d -i wlan0 -c /etc/wpa_supplicant.conf
但是最后提示 rtw_cfg80211_indicate_connect(wlan0) BSS not found !!
nl80211: Set wlan0 operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=4 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT)
Daemonize..
# [ 1430.786314] RTL8723BS: rtw_set_802_11_connect(wlan0) fw_state = 0x00000008
[ 1430.839610] RTL8723BS: start auth
[ 1430.856589] RTL8723BS: auth success, start assoc
[ 1430.875720] RTL8723BS: rtw_cfg80211_indicate_connect(wlan0) BSS not found !!!!!!!!!!!!!!!!!!!!!!!!!=================
[ 1430.882866] RTL8723BS: assoc success
[ 1431.075391] RTL8723BS: send eapol packet
[ 1431.104322] RTL8723BS: send eapol packet
[ 1431.109102] RTL8723BS: set pairwise key camid:4, addr:24:05:0f:15:a4:3d, kid:0, type:AES
[ 1431.120049] RTL8723BS: set group key camid:5, addr:24:05:0f:15:a4:3d, kid:1, type:AES
^C
# ^C
原来那个断开了吗?
我断开了 我添加的网络已经在配置文件里面了
# cat /etc/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
update_config=1
network={
ssid="ysc666"
scan_ssid=1
psk="123456789"
key_mgmt=WPA-PSK WPA-EAP IEEE8021X NONE
priority=5
disabled=1
}
network={
ssid="ysc6666"
psk="123456789"
key_mgmt=NONE
}
这是我当时的操作方式
使能添加的网络 就是会一直在在寻找中
[ 113.908728] RTL8723BS: nolinked power save enter
[ 119.130118] RTL8723BS: nolinked power save leave
[ 120.788636] RTL8723BS: nolinked power save enter
[ 126.010061] RTL8723BS: nolinked power save leave
[ 127.668764] RTL8723BS: nolinked power save enter
[ 132.890154] RTL8723BS: nolinked power save leave
[ 134.548622] RTL8723BS: nolinked power save enter
我记得wpa_supplilcant是放到后台运行的,如果重新连接,要将程序kill,然后重新运行
因为我在wpa_supplicant.conf这个里面已经写了一个固定的wifi了 每次一运行就是里面这个
我现在就是list_networks里面有一个wifi的名称
然后我在添加了一个 步骤如下
wpa_cli -iwlan0 add_network
wpa_cli -iwlan0 set_network 1 ssid '"ysc6666"'
wpa_cli -iwlan0 set_network 1 key_mgmt NONE
wpa_cli -iwlan0 set_network 1 psk '"123456789"'
wpa_cli -iwlan0 select_network 1
wpa_cli -iwlan0 enable_network 1
发现还是连接不上
就是就是在连接状态中
[53299.588530] RTL8723BS: nolinked power save enter
[53304.809933] RTL8723BS: nolinked power save leave
[53306.468435] RTL8723BS: nolinked power save enter
我这里增加了了一个网络 设置都提示ok了
当时使能该网络时候 还是上一个网络 没有变过来
# wpa_cli -iwlan0 enable_network 1
OK
# wpa_cli -iwlan0 status
bssid=24:05:0f:15:a4:3d
freq=2437
ssid=ysc666
id=0
mode=station
pairwise_cipher=CCMP
group_cipher=CCMP
key_mgmt=WPA2-PSK
wpa_state=COMPLETED
ip_address=172.27.207.4
address=34:c3:d2:72:5f:9d
uuid=428074a1-f7e2-5b02-ab7a-4587c5e08f87
# wpa_cli -iwlan0 list_networks
network id / ssid / bssid / flags
0 ysc666 any [CURRENT]
1 mate20 any
# driver_atheros_event_wireless: scan result event - SIOCGIWSCAN
-/bin/sh: driver_atheros_event_wireless:: not found
#
我在wpa_supplicant.conf 这里面写的是连接ysc666
当这个ysc666连接上了的时候,我用iw wlan0 disconnect去断开 然后连接其他的连接不上
再去连接iw wlan0 connect ysc666 也是连接不上 ,是不是操作有问题哦
# iw wlan0 disconnect
# [ 219.368912] RTL8723BS: nolinked power save enter
#
# iw dev wlan0 link
Connected to 24:05:0f:15:a4:3d (on wlan0)
SSID: ysc666
freq: 2437
command failed: No such file or directory (-2)
# iw wlan0 connect ysc666
command failed: Operation already in progress (-114)
呵呵,我来说一下吧,V3s用无线有坑,折磨了我两天,暂时没有完全解决
驱动无线网卡,要要将rf switch选项打开,不打开用不了,主线内核的网络选项里面无线的坑是什么呢?
V3s使用2.4G网络,估计有干扰,不传输数据,用着还行,我有个传输mp3数据流的程序,持续传输128kbps的mp3流,用V3s无线接收,几秒中 后就中断,播放的音乐流断了
试了8723bs,ralink3070,ralink5572,2.4都有问题,用ralink5572的5G频段,就完全正常,无线路由器距离接收器才2~3米,即使有干扰也不应该这样的,而且5572的2.4G有问题,5G就正常,明显是V3s自身的干扰。
刚才将rf switch 配置了后是可以了 如果我不想在wpa里面写死要连接的wifi名称 就是通过手动输入名称和密码,
这里我按照配置
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
ap_scan=1
network={
ssid="yscysc"
scan_ssid=1
key_mgmt=WPA-EAP WPA-PSK IEEE8021X NONE
pairwise=TKIP CCMP
group=CCMP TKIP WEP104 WEP40
psk="wo123456"
priority=5
我也是按着下面去执行的
insmod /usr/lib/r8723bs.ko #加入驱动
ifconfig wlan0 up #开启wifi
wpa_supplicant -B -d -i wlan0 -c /etc/wpa_supplicant.conf #搜索wifi
udhcpc -i wlan0 #连接wifi
全部执行完后 一直重复下面的
udhcpc: started, v1.29.2
udhcpc: sending discover
[ 1408.600053] RTL8723BS: nolinked power save leave
udhcpc: sending discover
[ 1410.258634] RTL8723BS: nolinked power save enter
udhcpc: sending discover
[ 1415.480081] RTL8723BS: nolinked power save leave
[ 1417.148671] RTL8723BS: nolinked power save enter
[ 1422.370061] RTL8723BS: nolinked power save leave
[ 1424.028762] RTL8723BS: nolinked power save enter
[ 1429.250045] RTL8723BS: nolinked power save leave
[ 1430.908619] RTL8723BS: nolinked power save enter
udhcpc: sending discover
[ 1436.130098] RTL8723BS: nolinked power save leave
[ 1437.788625] RTL8723BS: nolinked power save enter
udhcpc: sending discover
udhcpc: sending discover
[ 1443.010061] RTL8723BS:
现在打印出来的数据是一直这样 但是我打开手机也没有看到设置的名称
random: Trying to read entropy from /dev/random
Successfully initialized wpa_supplicant
Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
ctrl_interface='/var/run/wpa_supplicant'
ctrl_interface_group='0'
ap_scan=1
Priority group 5
id=0 ssid='yscysc'
nl80211: Supported cipher 00-0f-ac:1
nl80211: Supported cipher 00-0f-ac:5
nl80211: Supported cipher 00-0f-ac:2
nl80211: Supported cipher 00-0f-ac:4
nl80211: Supported cipher 00-0f-ac:6
nl80211: Using driver-based off-channel TX
nl80211: interface wlan0 in phy phy0
nl80211: Set mode ifindex 4 iftype 2 (STATION)
nl80211: Subscribe to mgmt frames with non-AP handle 0x197120
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=0104
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=040a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=040b
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=040c
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=040d
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=090a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=090b
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=090c
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=090d
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=0409506f9a09
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=7f506f9a09
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=0801
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=06
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=0a07
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=0a11
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=0a1a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=1101
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=1102
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=0505
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x197120 match=0500
rfkill: Cannot open RFKILL control device
nl80211: RFKILL status not available
netlink: Operstate: ifindex=4 linkmode=1 (userspace-control), operstate=5 (IF_OPER_DORMANT)
Add interface wlan0 to a new radio phy0
nl80211: Regulatory information - country=00
nl80211: 2402-2472 @ 40 MHz 20 mBm
nl80211: 2457-2482 @ 20 MHz 20 mBm (no IR)
nl80211: 2474-2494 @ 20 MHz 20 mBm (no OFDM) (no IR)
nl80211: 5170-5250 @ 80 MHz 20 mBm (no IR)
nl80211: 5250-5330 @ 80 MHz 20 mBm (DFS) (no IR)
nl80211: 5490-5730 @ 160 MHz 20 mBm (DFS) (no IR)
nl80211: 5735-5835 @ 80 MHz 20 mBm (no IR)
nl80211: 57240-63720 @ 2160 MHz 0 mBm
nl80211: Added 802.11b mode based on 802.11g information
wlan0: Own MAC address: 34:c3:d2:72:5f:9d
wpa_driver_nl80211_set_key: ifindex=4 (wlan0) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=4 (wlan0) alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=4 (wlan0) alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=4 (wlan0) alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=4 (wlan0) alg=0 addr=(nil) key_idx=4 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=4 (wlan0) alg=0 addr=(nil) key_idx=5 set_tx=0 seq_len=0 key_len=0
wlan0: RSN: flushing PMKID list in the driver
nl80211: Flush PMKIDs
wlan0: Setting scan request: 0.100000 sec
wlan0: WPS: UUID based on MAC address: 428074a1-f7e2-5b02-ab7a-4587c5e08f87
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
nl80211: Skip set_supp_port(unauthorized) while not associated
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
ctrl_interface_group=0
wlan0: Added interface wlan0
wlan0: State: DISCONNECTED -> DISCONNECTED
nl80211: Set wlan0 operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=4 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT)
Daemonize..
# [ 190.698618] RTL8723BS: nolinked power save enter
[ 195.930008] RTL8723BS: nolinked power save leave
[ 197.588765] RTL8723BS: nolinked power save enter
^C
# ^C
# ^C
# udhcpc -i wlan0
udhcpc: started, v1.29.2
udhcpc: sending discover
[ 202.810082] RTL8723BS: nolinked power save leave
[ 204.468618] RTL8723BS: nolinked power save enter
udhcpc: sending discover
udhcpc: sending discover
[ 209.690083] RTL8723BS: nolinked power save leave
[ 211.348617] RTL8723BS: nolinked power save enter
[ 216.569874] RTL8723BS: nolinked power save leave
[ 218.228921] RTL8723BS: nolinked power save enter
[ 223.450070] RTL8723BS: nolinked power save leave
[ 225.108620] RTL8723BS: nolinked power save enter
[ 230.330032] RTL8723BS: nolinked power save leave
udhcpc: sending discover
[ 231.988593] RTL8723BS: nolinked power save enter
udhcpc: sending discover
[ 237.210008] RTL8723BS: nolinked power save leave
udhcpc: sending discover
[ 238.868745] RTL8723BS: nolinked power save enter
主要是加载了驱动文件,去配置网络的时候报错
# insmod /ysc/r8723bs.ko
[14702.449054] r8723bs: module is from the staging directory, the quality is unknown, you have been warned.
[14702.465661] RTL8723BS: module init start
[14702.469711] RTL8723BS: rtl8723bs v4.3.5.5_12290.20140916_BTCOEX20140507-4E40
[14702.476753] RTL8723BS: rtl8723bs BT-Coex version = BTCOEX20140507-4E40
[14702.488273] pnetdev = c32de800
[14702.548722] RTL8723BS: rtw_ndev_init(wlan0)
[14702.659718] RTL8723BS: module init ret =0
# ifconfig wlan0 up
[14722.227935] rtl8723bs: acquire FW from file:rtlwifi/rtl8723bs_nic.bin
[14722.235809] rtl8723bs mmc1:0001:1: Direct firmware load for rtlwifi/rtl8723bs_nic.bin failed with error -2
[14722.245574] Request firmware failed with error 0xfffffffe
ifconfig: SIOCSIFFLAGS: Operation not permitted
#
/dev下面有event1 我在驱动里面将那个读取中断按钮的给去掉了
error = sun4i_lradc_load_dt_keymap(dev, lradc);
if (error)
return error;
驱动能起来了 在/dev/input/event1 有这个文件。
就是读取的数据还是不对,不知道哪里还有问题
还有一个问题就是不知道为什么这里的code会不一致了 (这里是我引用层打印出来)
2222ev.type= 3 ev.code= 47 ev.value= 2
2222ev.type= 3 ev.code= 53 ev.value= 53
2222ev.type= 3 ev.code= 54 ev.value= 6
2222ev.type= 3 ev.code= 47 ev.value= 3
evtest 可以测试那四个按键:
# evtest No device specified, trying to scan all of /dev/input/event* Available devices: /dev/input/event0: 1c22800.lradc Select the device event number [0-0]: 0 Input driver version is 1.0.1 Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100 Input device name: "1c22800.lradc" Supported events: Event type 0 (EV_SYN) Event type 1 (EV_KEY) Event code 114 (KEY_VOLUMEDOWN) Event code 115 (KEY_VOLUMEUP) Event code 352 (KEY_OK) Event code 353 (KEY_SELECT) Properties: Testing ... (interrupt to exit) Event: time 2663.260991, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 1 Event: time 2663.260991, -------------- SYN_REPORT ------------ Event: time 2663.471909, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 0 Event: time 2663.471909, -------------- SYN_REPORT ------------ Event: time 2666.354566, type 1 (EV_KEY), code 353 (KEY_SELECT), value 1 Event: time 2666.354566, -------------- SYN_REPORT ------------ Event: time 2666.565488, type 1 (EV_KEY), code 353 (KEY_SELECT), value 0 Event: time 2666.565488, -------------- SYN_REPORT ------------ Event: time 2667.424816, type 1 (EV_KEY), code 352 (KEY_OK), value 1 Event: time 2667.424816, -------------- SYN_REPORT ------------ Event: time 2667.620117, type 1 (EV_KEY), code 352 (KEY_OK), value 0 Event: time 2667.620117, -------------- SYN_REPORT ------------ Event: time 2668.139619, type 1 (EV_KEY), code 352 (KEY_OK), value 1 Event: time 2668.139619, -------------- SYN_REPORT ------------ Event: time 2668.311484, type 1 (EV_KEY), code 352 (KEY_OK), value 0 Event: time 2668.311484, -------------- SYN_REPORT ------------
你这个evtest测试代码是内核里面吗
https://github.com/torvalds/linux/blob/master/arch/arm/boot/dts/sun8i-v3s.dtsi
lradc: lradc@1c22800 {
compatible = "allwinner,sun4i-a10-lradc-keys";
reg = <0x01c22800 0x400>;
interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
status = "disabled";
};请问你有什么疑问?
dts和.config 里面不要去配置吗 只要配置这个dtsi 就可以了是吧
我刚才在dts里面设置了状态为ok了
我是参考这个去 http://blog.itpub.net/31529886/viewspace-2169066/
分配Swap虚拟内存 分配了free -m 还是为0
然后在 cat /proc/meminfo 里面的swap也是为了
在运行QT的过程了 我定义了一个QLabel 然后我拖动这个QLabel 就会出现下面这个问题 我拖动的过程中只是改变QLabel的位置
aule1=== 0 vaule2 5
MoveCon[ 83.303626] input_mt_report_slot_state
trol X== 0 Y === 5
[ 83.313179] touchscreen_report_pos
[ 83.318503] i2c i2c-0: mv64xxx_i2c_fsm: Ctlr Error -- state: 0x2, status: 0x0, addr: 0x38, flags: 0x0
[ 83.327746] edt_ft5x06 0-0038: Unable to fetch data, error: -5
[ 83.337297] x=== 154 y===72 id === 0 down == 1
[ 83.341776] input_mt_report_slot_state
[ 83.345705] touchscreen_report_pos
[ 83.349597] edt_ft5x06 0-0038: Unable to fetch data, error: -6
今天来试试 里面的都按照该了
出来的还是
Setting up a 1024x600 lcd console (overscan 0x0)
dotclock: 46000kHz = 46000kHz: (1 * 3MHz * 92) / 6
In: serial@01c28000
Out: serial@01c28000
Err: serial@01c28000
Net: phy interface0
eth0: ethernet@1c30000
starting USB...
No controllers found
Hit any key to stop autoboot: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
device 0 offset 0x100000, size 0x10000
SF: 65536 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK
## Flattened Device Tree blob at 41800000
Booting using the fdt blob at 0x41800000
Loading Device Tree to 42dfa000, end 42dfff36 ... OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
就一直是这样的了
那跑起来显示什么
-Boot 2017.01-rc2-00073-gdd6e874-dirty (Jul 04 2019 - 19:01:27 -0700) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment
Setting up a 1024x600 lcd console (overscan 0x0)
dotclock: 46000kHz = 46000kHz: (1 * 3MHz * 92) / 6
In: serial@01c28000
Out: serial@01c28000
Err: serial@01c28000
Net: phy interface0
eth0: ethernet@1c30000
starting USB...
No controllers found
Hit any key to stop autoboot: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
device 0 offset 0x100000, size 0x10000
SF: 65536 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK
## Flattened Device Tree blob at 41800000
Booting using the fdt blob at 0x41800000
Loading Device Tree to 42dfa000, end 42dfff36 ... OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
就这样啥也不显示了
晕哥 说:去把 earlyprink 开起来: https://whycan.cn/t_2402.html
看log才知道什么问题.
跟你里面的问题是一样的 还是一样的
Uncompressing Linux... done, booting the kernel.
我以前可以跑起来的就是这个0x01c28000地址
CONFIG_DEBUG_UART_PHYS=0x01c28000
CONFIG_DEBUG_UART_VIRT=0xf1c28000
去把 earlyprink 开起来: https://whycan.cn/t_2402.html
看log才知道什么问题.
跟你里面的问题是一样的
我以前可以跑起来的就是这个0x01c28000地址
CONFIG_DEBUG_UART_PHYS=0x01c28000
CONFIG_DEBUG_UART_VIRT=0xf1c28000
当然需要, menuconfig 然后进入 filesystem,然后杂项,勾选 jffs2
加上了 出现启动不了 就是一直在Starting kernel ...
U-Boot 2017.01-rc2-00073-gdd6e874-dirty (Jul 04 2019 - 19:01:27 -0700) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment
Setting up a 1024x600 lcd console (overscan 0x0)
dotclock: 46000kHz = 46000kHz: (1 * 3MHz * 92) / 6
In: serial@01c28000
Out: serial@01c28000
Err: serial@01c28000
Net: phy interface0
eth0: ethernet@1c30000
starting USB...
No controllers found
Hit any key to stop autoboot: 0
SF: Detected mx25l12805 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
device 0 offset 0x100000, size 0x10000
SF: 65536 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK
## Flattened Device Tree blob at 41800000
Booting using the fdt blob at 0x41800000
Loading Device Tree to 42dfa000, end 42dfff36 ... OK
Starting kernel ...
看 JFFS2 有没有编译进去.
[ 0.053635] NET: Registered protocol family 1
[ 0.520722] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 0.529909] jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
[ 0.532383] random: fast init done
[ 0.536428] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
没有编译进去 需要在设置下吗
[ 0.024304] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.024324] PTP clock support registered
[ 0.024558] Advanced Linux Sound Architecture Driver Initialized.
[ 0.026438] clocksource: Switched to clocksource arch_sys_counter
[ 0.037419] NET: Registered protocol family 2
[ 0.038003] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.038036] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.038060] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.038196] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.038244] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.038465] NET: Registered protocol family 1
[ 0.039062] RPC: Registered named UNIX socket transport module.
[ 0.039079] RPC: Registered udp transport module.
[ 0.039085] RPC: Registered tcp transport module.
[ 0.039091] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.041262] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 0.050195] NFS: Registering the id_resolver key type
[ 0.050250] Key type id_resolver registered
[ 0.050258] Key type id_legacy registered
[ 0.051297] random: fast init done
[ 0.054232] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[ 0.054254] io scheduler noop registered
[ 0.054262] io scheduler deadline registered
[ 0.054522] io scheduler cfq registered (default)
[ 0.054534] io scheduler mq-deadline registered
[ 0.054541] io scheduler kyber registered