自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(181)
  • 收藏
  • 关注

转载 rc.local 注意事項,call python script, file position

如果要在 rc.local 呼叫 python scriptpython script 的位置需使用絕對路徑其 python script 裡的有關 file 的位置也需使用 絕對路徑如果要在 rc.local 呼叫建立 filefile 的位置需使用絕對路徑rc.local 位在 /etc 下rc.localtouch test #--- 沒有生效t...

2019-07-17 17:17:00 240

转载 insmod mknod

insmod module會在 /proc/devices/ 下產生 major number 及 device name----------------------------mknod 會使用 /proc/devices/ 下的 major number 在 /dev 建立 節點----------------------------reference:https://w...

2019-07-16 17:13:00 379

转载 shell 變數

echo $?上个命令的退出状态,或函数的返回值。ref:http://c.biancheng.net/cpp/view/2739.html转载于:https://www.cnblogs.com/youchihwang/p/11052780.html

2019-06-26 15:46:00 245

转载 gcc 簡單操作

gcc -c test.c產出 test.o object filegcc -c test.c -o XXX產出 XXX object filegcc test.c -o aaa產出 aaa executable file转载于:https://www.cnblogs.com/youchihwang/p/10692040.html

2019-04-11 20:00:00 191

转载 c 語言 控制碼

source code#include <stdio.h>int main(){ char *test = "ABC\x41\n"; printf("string : %s", test); return 0;}output$ ABCAsource code 中的 "\x41",代表 ascii 碼 0x41,也就是 "A"也可寫...

2019-03-27 18:56:00 147

转载 Makefile 的 prequisite 執行順序 single multi thread

Makefile 代碼如下:B 需要 A 的 產出,all: A BA B 是 target,case 1:single-threadmake -j1則執行的順序為 A -> BA 先產出,B 再消化。case 2:multi-threadmake -j16則執行的順序為平行 A->B->A 尚未產出 B 所需要的東西,B 就向去拿,會發生...

2019-03-26 11:41:00 185

转载 Make recursive

folder structure:Makefilet1/Makefilet1/t1.ct2/Makefilet2/t2.cMakefileSUBDIRS = t1 t2all: for dir in $(SUBDIRS); do \ $(MAKE) -C $$dir; \ donet1/Makefileall: t1clean: ...

2019-03-22 18:13:00 255

转载 Makefile target dependency

Makefile.....all: T1 T2T1: @echo "<===" $@T2: @echo "<===" $@.....make執行順序為 T1 -> T2=====================Makefile.....all: T2 T1T1: @echo "<===" $@T2: ...

2019-03-22 10:28:00 331

转载 Makefile 變數替換

MakefileSUBDIRS = xxx aaaBUILDSUBDIRS = $(SUBDIRS:%=build-%)CLEANSUBDIRS = $(SUBDIRS:%=clean-%).PHONY: all cleanall: $(BUILDSUBDIRS)$(BUILDSUBDIRS): @echo "<===" $@ make -C $...

2019-03-21 19:11:00 124

转载 Makefile PHONY

case 1:Makefileclean: rm aenvironment_1 :There is only file a$ make cleanclean aenvironment_2 :There are two file a and clean$ make cleanmake: 'clean' is up to date.can't clean ac...

2019-03-21 15:58:00 225

转载 pipe

利用 pipe 做接收資料case 1Terminal_1$ mkfifo foo$ echo "1" > foo 此時會程式會 hold 住,直到 data 被取走Terminal_2$ cat < foo // 取走資料$ 1case 2Terminal_1$ mkfifo foo$ echo "1" > foo 此時會程式會 h...

2019-03-20 14:12:00 156

转载 isatty

isatty - test whether a file descriptor refers to a terminal#include <stdio.h>#include <unistd.h>int isatty(int fd);int main(int argc, char *argv[]) { printf("isatty : %d \n",...

2019-03-20 10:33:00 350

转载 measure time program

#include <time.h>int delay(int time){ int i,j; for(i =0;i<time;i++) for(j=0;j<10000;j++) ;}int main(){ struct timespec start_1, end_1;...

2019-03-08 20:11:00 153

转载 Visual Studio Code 好用的 source code editor

short cuthttps://code.visualstudio.com/shortcuts/keyboard-shortcuts-linux.pdfgo to definition :F12go back :ctrl alt -go forward :ctrl shift -Find All References (need extension C++ Intell...

2019-01-17 14:19:00 467

转载 tmux

https://larrylu.blog/tmux-33a24e595fbc转载于:https://www.cnblogs.com/youchihwang/p/10268737.html

2019-01-14 19:56:00 146

转载 source insight setting

adjust source code font sizeOptions -> File Type Options -> Screen Font -> Sizeadjust distance between line and lineOptions -> Preferences -> Display -> Style -> left side...

2018-12-18 11:47:00 256

转载 screenshoter 連續截圖工具

https://pcrookie.com/?p=993顯示 mouse 設定Settings -> Saving -> Display mouse cursor转载于:https://www.cnblogs.com/youchihwang/p/9787590.html

2018-10-14 19:48:00 122

转载 grep and regular expression --- ^ . *

"^" : Start of Line anchor"." : Matches any single character except the newline character."*" : Matches the preceding character 0 or more times.Application_1test fileif_0 // no white ...

2018-10-04 10:47:00 156

转载 trickle charging current is 0A ?

Recently, I test trickle charging current of the smart phone.It's 0A.??????????????????????yes, it's 0A.Scared me.I read some releated pmic spec.The trickle charging mode is fully controlle...

2018-09-15 17:24:00 303

转载 off charging mode flow

/system/core/init/init.cpp...............int main(int argc, char** argv) {............... // Don't mount filesystems or start core system services in charger mode. std::string boot...

2018-09-14 14:42:00 311

转载 create a large size empty file to measure transfer speed

OS :Windowsopen cmdfsutil file createnew file_name 1073741824 // 1GBfsutil file createnew file_name 1048576 // 1MBfsutil file createnew file_name 1024 // 1KBfsutil file...

2018-09-05 13:42:00 232

转载 objdump

objdump -h test (show section headers)test.c#include <stdio.h>int main(){ static int xxxxxxxxxxxxxxxxxxxxxxxxxx; static int aaaaaaaaaaaaaaaaaaaaaaaaaa; printf...

2018-08-25 21:13:00 136

转载 ERROR: do not initialise statics to false

Question about git commit ruleI git commit a patch,The patch has a "static int xxxxxxxxxxxxxxxxxxxxxxxxxx = 0;"It show error messge "ERROR: do not initialise statics to false"Why can't initia...

2018-08-25 20:50:00 2730

转载 device tree source file position

android/kernel/msm-4.9/arch/arm64/boot/dts/qcom/转载于:https://www.cnblogs.com/youchihwang/p/9446029.html

2018-08-08 22:14:00 140

转载 kernel defconfig

Some defconfig files are placed on below path.Only one *_defconfig can be selected.android/kernel/msm-4.9/arch/arm64/configs/*_defconfigBelow is final defconfig content to be selected.android...

2018-07-30 21:37:00 312

转载 python --- comment

single line comment :multiple line comment :转载于:https://www.cnblogs.com/youchihwang/p/9377355.html

2018-07-27 14:22:00 352

转载 python --- for

Ex1for i in range(0, 5):print 'adsfad' # no sapce File "1.py", line 2 print 'adsfad' ^IndentationError: expected an indented blockEx2for i in range(0, 5): print 'adsf...

2018-07-25 21:53:00 122

转载 如何得知 kernel 或 android 已開機多久時間

adb shell cat /proc/uptime 中的第一個數字,adb shell cat "/proc/uptime"210.79 312.76或者是kernelstruct timespec uptime;get_monotonic_boottime(&uptime);((unsigned long) uptime.tv_sec转载于:https:/...

2018-06-25 19:51:00 302

转载 android 開發常用網站

https://source.android.com/https://source.android.com/devices/转载于:https://www.cnblogs.com/youchihwang/p/9210446.html

2018-06-21 18:22:00 82

转载 epoll

epoll is a Linux kernel system call for a scalable I/O event notification mechanism, first introduced in version 2.5.44 of the Linux kernel mainline.[1] Its function is to monitor multiple fil...

2018-06-18 16:10:00 108

转载 Qualcomm platform, the commonly used parameters of charger and battery in device tree file

PlatformMSM8917PM8937PMI8940Parameters1battery charging voltage :qcom,float-voltage-mv = <0x10fe>;2battery recharge threshold :qcom,resume-delta-mv = <0xc8>;3the max curre...

2018-05-31 17:47:00 132

转载 why not ovp protection ?

HWMSM8917PM8937PMI8940Question :Recently, I connect usb cable with 10V to the phone.Why does the phone still charging ? Why it not stop charging ?Solution :Because pmi8940 support up to 9...

2018-05-30 16:12:00 131

转载 Performance tuning

http://trac.3du.me/grid/wiki/jazz/Performance_Tuning转载于:https://www.cnblogs.com/youchihwang/p/9096293.html

2018-05-27 15:48:00 150

转载 Using adb over wifi

Step1 :phone & pc connect the same wifi.Step2 :phone use usb cable to connect pc.Step 3 :$ adb devicesList of devices attached0123456789ABCDEF deviceStep 4 :$ adb usbrestarting i...

2018-05-25 17:42:00 178

转载 The C programming language [book]

1A12.3 Macro Definition and ExpansionA control line of the form#define identifier token-sequencecauses the preprocessor to replace subsequent instances of the identifier with the givensequen...

2018-05-23 17:45:00 164

转载 "Flags mismatch irq" register interrupt handler error

Question :When you see the log "Flags mismatch irq ............", maybe you use the same irq number to register different interrupt handler .irq number ---> handler_1||--> handler_2||...

2018-05-17 22:06:00 1457

转载 formal parameter

formal parameter :[3.16] object declared as part of a function declaration or definition that acquires a value onentry to the function,Example :int x (int y, int z);int b (int zz, int cc) {...

2018-05-14 17:30:00 404

转载 macro expand error

cat test_macro.c#define TEST_MACRO(b) chip->##bint main(void){ TEST_MACRO(yyy) return 0;}gcc -E test_macro.c# 1 "test_macro.c"# 1 "<built-in>"# 1 "<command...

2018-05-12 18:21:00 607

转载 token in c and cpp (C preprocessor)

C tokens are of six types, They are,keywordidentifierconstantstring-literalpunctuatorpreprocessing-token:head-nameidentiferpp-numbercharacter-constantstring-literalpunctuatoreach ...

2018-05-12 18:04:00 133

转载 check source code after macro expand

Some time I'd like check source code after macro expand.We can use -E option to stop after the preprocessing stage, do not run the compiler.-----------------------------------------------------...

2018-05-11 18:53:00 127

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除