Linux i2c subsystem (1) _Write an i2c device driver manually

i2c bus is a very common board-level bus. Taking Linux 3.14.0 as a reference, this paper discusses the i2c driver model in Linux and uses this model to write a driver of mpu6050. Finally, the original data in mpu6050 is read out in the application layer. i2c subsystem framework The following figure is the schematic diagram of i2c driver framewo ...

Posted on Sat, 15 Dec 2018 14:00:04 -0800 by Jem

Detailed description of / etc/passwd and / etc/shadow files in linux system

In the linux operating system, every user in the / etc/passwd file has a corresponding record line, which records the basic attributes of the user. This file is readable to all users. And the / etc/shadow file, like his name, is a shadow of the passwd file. The record line in the / etc/shadow file corresponds to one of the / e ...

Posted on Thu, 13 Dec 2018 01:36:06 -0800 by MrPen

C Intermediate - SO_REUSEPORT and SO_REUSEADDR

Introduction - the origin of the problem When learning network programming, we often hear a word, first turn on "port multiplexing SO_REUSEADDR". At that time, we knew little about it. You know it should be written like that. It's always strange in my heart that the semantics are not clear. Why do you translate it like this? As I li ...

Posted on Thu, 13 Dec 2018 01:18:07 -0800 by Nightslyr

linux-2.6.11-fork(),v_fork(),clone() process creation

The process creation functions fork(),v_fork(), and u clone() library functions call do_fork() according to their respective parameter flags. First look at the source code composition of linux-2.6.11: unistd.h There are 289 macro definitions. There are eight system calls _syscalln(), where n ranges from 0 to 6. For each macro, there are 2+ ...

Posted on Thu, 13 Dec 2018 01:15:07 -0800 by metrostars

Freesclae i.MX6 Linux PCIE Driver Source Analysis

Recently, a tool needs to be developed to test the success of PCIE link, but because the drivers of PCIE are in the kernel space, it is necessary to first analyze the driver source of i.MX6 PCIE. First of all, I had to tuck up the location of the driver source code is very confusing, in Linux 3.0.35_4.1.0, the driver is actually in the arch/arm ...

Posted on Wed, 12 Dec 2018 23:24:07 -0800 by madan koshti

tr command, wc command, stat command, cut command, diff command, touch command, dd command

tr command The tr command is used to replace characters in text files in the form of "tr [original character] [target character]. In many cases, we want to quickly replace some words in the text, or replace the whole text content. In other words, if we do manual replacement, it will inevitably take too much work. Especial ...

Posted on Wed, 12 Dec 2018 16:36:05 -0800 by Monadoxin

Common control statements in shell for, while, if, case, expect, exit, break, continue

I. for statement The command grammar is as follows: for NUM in 1 2 3 for NUM in {1..3} for NUM in `seq 1 3`perhapsfor NUM in `seq 1 2 10` for (( Expression1;Expression2;Expression3)) do done for statement demonstration [root@136 mnt]# vim ceshi.sh [root@136 mnt]# cat ceshi.sh #!/bin/bash for NUM in 1 2 3 do echo $ ...

Posted on Wed, 12 Dec 2018 03:18:05 -0800 by devilincarnated