- 博客(60)
- 资源 (2)
- 收藏
- 关注
原创 什么是LoRa协议?
1 开场白 这篇文章给读者分享LoRa和LoRaWAN相关的技术简介, Low-Power, Wide-Area Networks(LPWAN)为实现数十亿的万物互联设备而生, LoRaWAN专为LPWAN网络优化更长的电池寿命,更长的距离和更低的代价。[欢迎大家关注公众号:LoRa万物互联,获取更多LoRa资讯]2 LoRa是什么? LoRa是创建长距离通讯连接的物理层或无线...
2018-08-17 08:10:48 5531
原创 insmod: short read错误
添加 MODULE_LICENSE("Dual BSD/GPL"); MODULE_AUTHOR("xxxx"); MODULE_DESCRIPTION("hwconfig driver");
2016-11-24 10:57:35 11795 1
原创 Linux devfreq
drivers/devfreq/devfreq.cdevfreq_listdevfreq_list_lockfind_device_devfreq() - find devfreq struct using device pointer.devfreq_get_freq_level() - Lookup freq_table for the frequency.
2016-01-07 15:30:55 2498 1
原创 linux watchdog
watchdog_devicewatchdog_opswatchdog_infostatic struct class *watchdog_class;void watchdog_check_min_max_timeout(struct watchdog_device *wdd)int watchdog_init_timeout(struct watchdog_devi
2016-01-04 17:24:28 2282
原创 i2c buss(i2c-core.c)
I2C Bus(i2c-core.c) i2c_device_probe(struct device *dev)i2c_device_remove(struct device *dev)i2c_device_shutdown(struct device *dev) static const struct dev_pm_ops i2c_device_pm_ops = { .su
2015-12-31 15:53:21 992
原创 Linux PM: Hibernate/Sleep
Hibenate/SleepSuspend to Disk(STD) - HibernateSuspend to RAM(STR) - SleepStandby is a special case of Sleep, it is in simple sleep.Wakeup is restore system, no matter from Hibernate/Sleep/
2015-12-17 11:15:55 1479
原创 Power management interface(PM API)
power management interface:down: supply device related PM interfaceup: supply uniform PM interface for PM coredevice PM is the core of Linux PM:in right time put device in right state.
2015-12-17 09:59:37 576
翻译 Give it five minutes by Jason Fried
原文give-it-five-minutes翻译:几年前,我还是一个容易冲动的人。无论何人何时谈论何事,我总会想着去反驳。如果某事不符合我的世界观我会狠狠地拒绝。 就好象我必须是这个观念的发现者(第一人),因为是第一个才会有意义。但是真实的情况是,有关那些问题我并没有思考的够深。你反应的越快,你思考的越少。并不总是这样,但通常会是。谈论膝跳反射很容易,因为它们是只有
2015-12-15 14:25:43 1319
原创 linux reboot flow
1, little machine_desc struture1-1, first eye on arch/arm/include/asm/mach/arch.h/* * Machine type table - also only accessible during boot */extern const struct machine_desc __arch_info_
2015-12-15 10:43:42 928
原创 ubuntu 图形界面卡死,没有出来登录界面怎么办
1, CTRL + ALT + 2, switch to text desktop2, login by user/password3, ps -t tty74, find the pid of Xorg5, kill it by "sudo kill -9 xxx" or "sudo killall Xorg"The graphics desktop will re
2015-12-11 15:43:29 3279
原创 获取股票简单数据:腾讯、新浪、东方财富。。。
1,腾讯的数据显示是用脚本动态改变某个表格的内容。2,新浪直接给你一个可访问的网页能获取所有的数据。
2015-12-03 21:28:05 16437
转载 使用virtualbox安装的Ubuntu,窗口分辨率过小,怎么调整
转载自:http://blog.csdn.net/yasi_xi/article/details/42388119今天用VirtualBox成功装上Ubuntu10.04之后发现了一个问题:默认情况下 ubuntu 的分辨率最高只能设到800*600。但是对于自己的大显示器,在分辨率800*600的ubuntu窗口简直小的可怜。那究竟如何解决这个问题呢?
2015-11-21 20:05:27 9572 2
原创 256 colors in vim
XTerm and most other modern terminal emulators support 256 colors, you can use a script tocheck if your terminal supports 256 colors.To enable colors on XTerm you will need to run the configure
2015-05-19 14:40:08 854
原创 快慢指针和链表原地反转
1,制作环型链表2,检测链表中是否存在环(参考文章)3,计算链表中环的长度4, 计算链表中环起始的位置5,判断一个链表是否存在回文,要求O(n)时间和O(1)空间的复杂度(判断链表是否是回文,要求O(n)时间,O(1)空间)6,计算链表中间位置7,链表原地反转(链表原地反转)8,测试code#include using namespace std;/* @1:
2015-03-13 10:44:10 1500
原创 push gerrit but without auto added "Changed-id"
1). 检查子目录.git/hook下面是否有 commit-msg 文件,https://gerrit-review.googlesource.com/tools/hooks/commit-msg2). 如果是repo sync 下来的代码,只要检查子目录中是否存在 commit-msg 如果不存在,修改工程目录下面 .repo/manifest.xml,添加review项指定即可。
2015-02-06 18:10:01 2081
转载 Understanding process.nextTick()
I have seen quite a few people being confused about process.nextTick(). Let's take a look at whatprocess.nextTick() does, and when to use it.As you might already know, every Node application runs
2015-01-29 16:25:55 624
原创 nodejs 调试技巧
1, 命令行调试run 执行脚本,在第一行暂停restart 重新执行脚本cont, c 继续执行,直到遇到下一个断点next, n 单步执行step, s 单步执行并进入函数out, o 从函数中步出setBreakpoint(), sb() 在当前行设置断点setBreakpoint(‘f()’), sb(...) 在函数f的第一行设置断点setBreakp
2015-01-29 10:31:39 895
原创 nodejs EventEmitter
Many objects in Node emit events: a net.Server emits an event each timea peer connects to it, afs.readStream emits an event when the file isopened. All objects which emit events are instances ofev
2015-01-28 15:31:24 1347
原创 nodejs 创建http server
1, http module require: var声明变量,require在引用module的时候,module名字用''引用。var http=require('http');2,http的几个方法:http.createServer([requestListener])#Returns a new web server object.The requestL
2015-01-28 14:37:18 3934
转载 多线程同步I/O和单线程异步I/O
多线程同步I/O和单线程异步I/O2014-08-24同步I/O与异步I/O线程在执行中如果遇到磁盘读写或网络通信(统称IO操作),通常要耗费较长的时间,这时OS会剥夺此线程的CPU控制权,使其暂停执行,同时将资源让给其他的工作线程,这种线程调度方式称为阻塞。当I/O操作完毕时,操作系统将这个线程的阻塞状态解除,恢复其对CPU的控制权,令其继续执行,这种I/O模式就是同步式I/O或阻塞
2015-01-27 18:28:41 4857
原创 同步式IO和异步式IO
什么是阻塞(block):线程在执行中如果遇到磁盘读写或网络通信(统称为io操作),通常要耗费较长的时间,这时操作系统会剥 .夺这个线程的CPU控制权,使其暂停执行,同时将资源让给其他的工作线程,这种线程调度方式称为阻塞。当IO操作完毕时,操作系统将这个线程的阻塞状态解除,恢复其对CPU的控制权,令其继续执行。这种IO模式就是通常的同步式IO或阻塞式IO。异步式IO或非阻塞式则针对所有
2015-01-27 18:20:51 738
转载 python list comprehension
http://www.secnetix.de/olli/Python/list_comprehensions.hawkhttp://www.secnetix.de/olli/Python/list_comprehensions.hawkPython: List ComprehensionsNote: Lines beginning with ">>>"and "..." i
2015-01-23 10:11:22 837
转载 linux socket server and client
In a previous example we learnt about the basics of socket programming in C. In this example we shall build a basic ECHO client and server. The server/client shown here use TCP sockets or SOCK_STREA
2015-01-22 13:44:20 832
转载 Python的map/filter/reduce常见用法例举
摘要:熟练掌握Python的map、filter、 reduce、 lambda以及list comprehension的用法,可以让你写出简洁的代码。1. map大多数的for循环可以用map来代替。map(func,seq)自动地将func施加到seq的每一个元素,并返回执行结果。例1 返回list array=[3,5,7,12,18]每个元素的立方组成的新list。用for
2015-01-22 13:43:11 616
转载 Yet Another Lambda Tutorial
转载:https://pythonconquerstheuniverse.wordpress.com/2011/08/29/lambda_tutorial/There are a lot of tutorials[1] for Python’slambda out there. One that I stumbled across recently and really found
2015-01-20 15:17:44 595
转载 20分钟学会AWK
转载自:http://ferd.ca/awk-in-20-minutes.htmlAwk in 20 MinutesWhat's AwkAwk is a tiny programming language and a command line tool. It'sparticularly appropriate for log parsing on servers, mos
2015-01-20 14:27:41 2496
原创 git am failed:cannot open <dir>/*.patch: No such file
git am ~/xxx/xxx/xxx/*.patch这个命令在脚本中执行的时候,出现了:/usr/lib/git-core/git-am: 209: /usr/lib/git-core/git-am: cannot open ~/projects-develop/bosch-patch-scripts/bosch-patch-final2/u-boot/*.patch: No such
2015-01-12 15:26:27 1630
转载 What is fast-forward in git
转载自:https://sandofsky.com/images/fast_forward.pdf
2015-01-12 09:33:13 728
原创 beyond compare in Linux
1, download from http://www.scootersoftware.com/download.php2, extract the gz package and run ./install.sh3, bcompare will get.
2014-09-11 18:08:28 1031
原创 uboot 如何运行脚本
1, 在uboot记录命令的运行时间,可以打开CONFIG_CMD_TIME。2, autoscr已经改变成了source命令,可以打开CONFIG_SOURCE,source可以执行内存中脚本,该脚本是由mkimage生成的。#!/bin/shfile=$1result=$2if [ $# -lt 1 ]then echo "$0 file_name result
2014-09-10 17:26:24 3502
转载 Russell King's dma_map_single 's answer
Linux kernel developmentheaderskarl.beldan |30 Jul 22:24 2012About dma_sync_single_for_{cpu,device}Hi,On our board we've got an MV78200 and a network device between which w
2014-06-25 13:19:34 2105 1
原创 UART Receive FIFO and Receive Timeout
为什么UART要有FIFO?现代的CPU运转速度越来越快,UART的波特率通常达不到10M,在没有FIFO的情况下,每次填充数据给UART 或者 从UART取数据都会占用CPU的时间,这是极大的浪费。因而UART在硬件上设置了FIFO用作数据发送和接受的缓冲区。每次CPU要填充数据,把数据填充到UART的TX FIFO里面去了,每次CPU要取数据,从UART的RX FIFO把数据取出来。总之,
2014-05-30 15:29:20 7046 3
转载 LINUX内核内存屏障
================= LINUX内核内存屏障 =================By: David Howells Paul E. McKenney 译: kouu 出处: Linux内核文档 -- Documentation/memory-barr
2014-05-28 14:31:34 1609
转载 systemd service
Man pagesystemd.unitSYSTEMD.UNIT(5) systemd.unit SYSTEMD.UNIT(5)NAME systemd.unit - Unit configurationSYNOPSIS service.service, socket.socket,
2014-05-27 15:35:16 4639
转载 devm_kzalloc and kmalloc
Move resources allocated using unmanaged interface to managed devm interfaceSo today let’s talk about devm functions as that is what I have been upto the past couple of weeks. Yes, should have finis
2014-05-27 15:32:12 17233
原创 DBus Study
1, sudo apt-get install dbus-*2, sudo apt-get install libdbus*3, example #include #include #include #include const int RES_SUCCESS = -1; const int RES_FAILED =
2014-03-14 09:42:34 820
转载 key code and scan code
scan code:当按下一键时,产生 mark 码,产生一次 IRQ1 中断。 放开键时,产生 break 码,产生一次 IRQ1 中断。 因此:当按下 A 键放开,实际上产生了两次 IRQ1 中断break 是 mark 码的 bit7 置 1 得来,也就是: break = mark + 0x80 1、scan code 集 这里只说一般日常应用中的键盘码集
2014-03-04 14:59:59 1361
转载 Pull-up and Pull-down Resistors
Working a lot with Raspberry Pi and Arduino stuff lately. The concept of pull-up and pull-down resistors came up quickly and confused me a little at first. So I thought I’d do a little demo of how the
2014-03-03 18:37:26 2325
转载 How Buildroot works
As mentioned above, Buildroot is basically a set of Makefiles thatdownload, configure, and compile software with the correct options. Italso includes patches for various software packages - mainly the
2014-02-27 19:02:02 648
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人