- 博客(80)
- 资源 (8)
- 收藏
- 关注
原创 the trait bound `UnlockedFlash<‘_>: embedded_storage::nor_flash::NorFlash` is not satisfied
使用stm32f4xx-hal操作flash编译报错未实现trait embedded_storage::nor_flash::NorFlash
2022-08-24 17:53:08 504
原创 rust中lifetime的理解
官方The Book里面有一段很好的概括:Ultimately, lifetime syntax is about connecting the lifetimes of various parameters and return values of functions. Once they’re connected, Rust has enough information to allow memory-safe operations and disallow operations that woul
2022-01-24 20:33:43 206
原创 WIN10出现“PL2303HXA自2012已停产,请联系供货商“解决办法
根本原因:新的驱动不维护老的芯片了,所以搞个这个提示信息。解决办法回退驱动到老版本。目前已知能在WIN10上用的,并且大家都在转载的是3.3.2的版本,可以直接百度这个版本驱动下载重新安装即可。我自己在用的也上传到了CSDN:PL2303 WIN 64位驱动v3.3.2...
2021-05-14 15:07:07 3106
原创 pure-ftpd移植到android
默认的pure-ftpd是针对linux,安卓没有密码文件,直接编译会提示密码相关函数找不到。需要修改的地方:src/Makefile中去掉pure-pw、pure-pwconvert,无密码相关操作函数,无法编译src/log_unix.c中crypt函数安卓没有,将这部分代码改为其他用户名、密码验证方式。如直接将账号密码写死在此处。...
2021-03-16 16:45:57 175
原创 jflash命令行下自动加载配置、烧录、退出
JFlash -openprj'stm32.jflash' -open'Z:\stm32.bin,0x08000000' -auto -exit-exit是烧完自动关闭程序,可以不加看log信息。注意:option和文件路径之间不能有空格,否则提示找不到文件
2021-02-25 15:54:41 1844
原创 飞科FS871做个简单的充电线
回家忘带充电线,第一天剃须刀就没电了!用USB线做了个简单的充电线,反正充一次也能用好久,过年这几天应该是没有问题了。全图:注意下正负极,不确定里面电路有没有做防反接红为正,黑为负...
2021-02-10 13:50:26 1924
原创 Qt适配高DPI显示
见官方文档描述:QT_AUTO_SCREEN_SCALE_FACTORMigrate Existing ApplicationsTo get an application designed for low DPI values running on high resolution monitors quickly, consider one of the following:let the application run as DPI Unaware on Windows set the Q
2021-01-04 11:06:25 797
原创 linux内核会产生coredump的信号
#define SIG_KERNEL_COREDUMP_MASK (\ rt_sigmask(SIGQUIT) | rt_sigmask(SIGILL) | \> rt_sigmask(SIGTRAP) | rt_sigmask(SIGABRT) | \ rt_sigmask(SIGFPE) | rt_sigmask(SIGSEGV) | \> rt_sigmask(SIGBUS) | rt_sigmask(.
2020-11-13 10:21:59 997
原创 linux用户态信号处理函数调用流程
如上图,ret_to_user是系统调用、中断、异常触发处理完成后都会调用的函数,调用路径(arm64):ret_to_user -> work_pending -> do_notify_resume(arch/arm64/kernel/signal.c) -> do_signal -> handle_signal -> setup_rt_frame。setup_rt_frame里面会将注册处理函数压入到用户线程栈上,待返回到用户态,注册函数即被调用执行。...
2020-11-11 15:04:10 763
原创 使用ffmpeg提取mp4内部日期重命名文件(需lua)
这里写自定义目录标题使用ffmpeg提取mp4内部媒体创建日期重命名文件使用ffmpeg提取mp4内部媒体创建日期重命名文件mkdir -p new; for fn in *.mp4; do cdate=`ffprobe.exe -hide_banner $fn 2>&1 | grep creation_time | head -1 | lua -e 'local ctime=io.read(); local year,month,day,hour,minute,second = stri
2020-08-31 11:47:18 1051
原创 putty实现openssh的jump host功能
openssh命令行下jump host功能用起来很方便,直接-J指定host和端口就可以作为跳板连接其他内网主机。putty其实也具备这种功能,只是不叫jump host,百度搜putty jump怎么也找不到结果,其实putty是把jump合并到proxy里面了。putty版本:0.73配置方法:session里面设置好最终要连接的主机(如内网主机)的IP和端口, connection->data设置好最终主机的登录用户名 connection->proxy: pro.
2020-07-19 12:07:03 1805
原创 linux下从MP4文件中提取日期批量添加到文件名前缀
从MP4文件中提取creationTime用作文件名前缀: for fn in *.mp4; do t1=`mp4file --dump $fn | /bin/grep creationTime | head -1 | awk '{print $4}'`; let t2=t1-2082844800; t_str=`date -d @$t2 +"%Y%m%d-%H%M%S"`; fn2=${t_str}_$fn; echo $fn -> $fn2; sudo mv $fn $fn2; done
2020-07-07 10:52:32 401
原创 linux下texmaker启动coredump
启动texmaker直接额coredump了:Reading symbols from /usr/bin/texmaker...Reading symbols from /usr/bin/texmaker...(no debugging symbols found)...done.(no debugging symbols found)...done.[New LWP 18311][New LWP...
2018-03-22 10:22:38 373
原创 libxfce4ui编译过程
配置./autogen.sh --prefix=/apps,然后就make。没有想象的顺利,虽然所有要装的开发库都安装了。基本还是因为对这一套基础环境的不了解。第一个错误:../libxfce4ui/libxfce4ui-aliasdef.c:177:39: warning: this use of "defined" may not be portable [-Wexpansion-to-d
2018-01-09 15:18:34 892
原创 编译jffs2报struct addrinfo storage size isn't known错误
make[2]: Entering directory `/hisdk/Hi3536_SDK_V2.0.6.0/osdrv/tools/pc/jffs2_tool/tmp/mtd-utils-1.5.0' CHK include/version.h CC serve_image.oserve_image.c: In function ‘main’:serve_imag
2017-03-15 10:25:43 4131 1
原创 查看arm linux是硬浮点还是软浮点的方法
查看elf文件header字段,找到e_flags,如下:软浮点:Flags: 0x5000202, has entry point, Version5 EABI, soft-float ABI硬浮点:Flags: 0x5000402, has entry point
2015-08-22 11:03:49 7744
原创 linux find命令多个条件与或关系
2.11 Combining Primaries With Operators=======================================Operators build a complex expression from tests and actions. Theoperators are, in order of decreasing precedence:
2014-12-04 14:46:34 25854
原创 vbox修改硬盘uuid方法
Oracle VM VirtualBox Command Line Management Interface Version 4.2.12(C) 2005-2013 Oracle CorporationAll rights reserved.Usage: VBoxManage internalcommands [command arguments]Commands: sethd
2014-08-10 21:15:25 3153
原创 error: ‘struct dentry’ has no member named ‘d_count’
error: ‘struct dentry’ has no member named ‘d_count’新版内核中去掉了dentry结构体中的d_count成员,而是采用了
2014-04-28 10:14:21 3461 1
原创 android彻底结束进程方法
使用forceStopPackage方法,该方法位于ActivityManager中,但作为系统内部使用,并未对sdk开放。做一个应用,需要强制关闭进程。可以使用ActivityManager的killBackgroundProcesses方法,需要权限android.permission.KILL_BACKGROUND_PROCESSES。但使用此方法杀死进程后,进程会重启。源码中解
2014-03-30 12:37:40 1052
原创 I can't find file `pzdr'
kpathsea: Running mktexmf pzdr! I can't find file `pzdr'. \mode:=ljfour; mag:=1; nonstopmode; input pzdr Please type another input file name! Emer
2013-12-09 14:47:38 10096
原创 android输入设备配置文件加载过程分析
frameworks/base/libs/ui/Keyboard.cpp:String8 KeyMap::getPath(const InputDeviceIdentifier& deviceIdentifier, const String8& name, InputDeviceConfigurationFileType type) { return name.isEm
2013-12-07 14:33:18 1938
原创 android输入设备配置文件命名规则
frameworks/base/libs/ui/Input.cpp:String8 getInputDeviceConfigurationFilePathByDeviceIdentifier( const InputDeviceIdentifier& deviceIdentifier, InputDeviceConfigurationFileType type)
2013-12-07 14:00:11 970
原创 android输入设备配置文件搜索路径
frameworks/base/libs/ui/Input.cpp:String8 getInputDeviceConfigurationFilePathByName( const String8& name, InputDeviceConfigurationFileType type) { // Search system repository. String
2013-12-07 13:52:12 1278
原创 android 4.x 显示、隐藏导航条
在源码frameworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java:1033 if (!mHasSystemNavBar) {1034 mHasNavigationBar = mContext.getResources().getBoolean(
2013-12-02 20:27:53 1180
原创 sqlite sql语句实现记录存在则修改、不存在则添加
sql语句中insert只是单一插入,update只是单一更新,而replace语句则是两者的功能合二为一,实现有则改、无则加。用法和insert相同:replace into tablename values(v1,v2);
2013-11-29 11:43:41 11132
原创 android systemimage默认大小以及如何修改
使用ext4格式生成system.img有时候会报错,原因可能是因为文件分配的大小不够,默认情况下系统使用128M大小,对于4.0以上系统不做裁剪其实是不够用的。build/core/Makefile: 823 $(INSTALLED_SYSTEMIMAGE): $(BUILT_SYSTEMIMAGE) $(RECOVERY_FROM_BOOT_PATCH) | $(AC
2013-11-26 17:20:08 6058
原创 android system.img文件生成过程分析
当前目录build./core/Makefile:802:INSTALLED_SYSTEMIMAGE := $(PRODUCT_OUT)/system.img生成文件位置./core/Makefile:828:systemimage: $(INSTALLED_SYSTEMIMAGE)systemimage就是该镜像文件生成的目标项。使用make systemimage可
2013-11-25 21:03:39 6005 1
原创 android ramdisk.img生成过程分析
当前目录为build./core/Makefile:379:BUILT_RAMDISK_TARGET := $(PRODUCT_OUT)/ramdisk.img定义了ramdisk.img文件位置,即是最终生成的ramdisk.img文件位置。./core/Makefile:382:INSTALLED_RAMDISK_TARGET := $(BUILT_RAMDISK_TARGET
2013-11-25 20:58:53 1454
原创 android userimage镜像文件格式定义分析
编译安卓源码后,会在输出目录输出rootdir和system的镜像文件,那么文件格式是如何定义的呢?build/core/Makefile:# ################################################################## Targets for user images# ##############################
2013-11-25 15:42:37 1963
原创 x210v3 lcd驱动参数
static struct fb_videomode smdkv210_lcd_timing = { .left_margin = 44, .right_margin = 50, .upper_margin = 10, .lower_margin = 5, .hsync_len = 16, .vsync_len = 3, .xres = 800, .yres = 480,};
2013-11-24 18:10:35 986
原创 linux mmc驱动cd_type定义
enum cd_types { S3C_SDHCI_CD_INTERNAL, /* use mmc internal CD line */ S3C_SDHCI_CD_EXTERNAL, /* use external callback */ S3C_SDHCI_CD_GPIO, /* use external gpio pin for CD line */ S3C_SDHCI_CD_NON
2013-11-24 17:01:58 1097
原创 再一次成功编译运行android-4.3.2.1模拟器版本
由于之前的过错,硬盘上的所有资料全部丢失,惨痛的教训让我又花了一周多的时间用来下载安卓最新源码,编译、运行。在此,记录下第二次编译的过程。由于是第二次编译,所以详细记录了整个过程,从下源码到成功运行模拟器版本。1.源码下载到source.android.com看下载教程,里面讲解的很详细。不过在第一步下载repo工具的时候可能会有问题。官方给出的连接貌似不能用。所以,你得在网上找个新的
2013-11-24 14:02:20 1243
PL2303_3.3.2.102_64.zip
2021-05-14
m4a实时转aac库
2018-11-04
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人