Linux Device Driver Article 3: How to Write a simple character device driver ?, Linux Article 3
In the first article on linux Device Drivers: the device drivers briefly introduce character drivers. This article briefly introduces how to write a simple character device driver. This article draws on the source code in LDD to implement a character device
first, the Linux system divides the device into 3 categories: Character device, block device, network device. Using drivers:1, character device : Refers to a byte can only one byte read and write devices, can not randomly read the device memory of a certain data, read data need to follow the data. The character device is a stream-oriented device, and the common character devices are mouse, keyboard, serial port, console and led device.2, block device : Refers to the device can be read from any l
In the previous blog post, we have compiled the First_drv.ko file by makefile, which is a driver module that can be installed in Ubuntu.Execution in/work/my_drivers/first_drv/1th/directory: Insmod First_drv.koIf you are executing this command in a normal user state, you can see that the system reminds us: insmod:error inserting ' First_drv.ko ':-1 operation not permittedThis is because installing the driver
The relationship between device and driver in linux driver development-Linux general technology-Linux programming and kernel information. The following is a detailed description. Yesterday I saw a piece of news titled "Housewives use LINUX". If we saw this news 10 years ago, we would be surprised to say, "I rely on it, housewives also use LINUX ", but now housewives use LINUX is not new to us because LINUX
Hyper-V Virtual Machine installation and nic cannot be found, driver cannot be installed Solution
I recently used a virtual machine in win2008 and encountered some problems during use. Now I have recorded the installation process and handling methods.
1. Install hyper-V. Right-click my computer and choose manage → Server Manager → role → add role on the right → select hyper-V for Installation
2. Choose "start"> "Management Tools"> "hyper-V ".
3. First
Before analyzing the driver, we will analyze the model of the IIC subsystem. There are 2 ways to IIC device drivers, one of which is to write user-driven through a universal driver. The other is to add a IIC device driver directly to the IIC subsystem, such as a driver for AT24C02.
Next we'll learn how to write a I
Now that we know the protocol, we can start to look at the SPI driver code in Linux kenerl. There are many struct in the code, so let's take a look at the main struct first, in this way, we can better understand the driver. Mainly include/Linux/SPI. h
The first is the communication interface between the SPI host and the slave, that is, the SPI bus,
extern struct bus_type spi_bus_type;
Bus_type is defined
Knowledge Point analysis:Microsoft UAA (Microsoft Universal Audio Architecture) bus driver is Microsoft's system-level support driver for HD Audio standard HD Audio bus (High Definition Audio. The new HD Audio card driver and Modem driver are both developed based on the HD Audio bus.This problem does not occur if y
Buzzer driver source code in the/driver/char/buzzer/x210-buzzer.c file, the source code is as follows#include The driver module code for the buzzer is as above. As with other driver module code, the function in Module_init is the function that runs when the driver module is
, HDREADON3850 is a video card that is expected by a DIY player following Readon9550. "A rice n rice to pk!88gt and 3850 to see who more cost-effective" after the introduction of the new graphics card manufacturers must introduce a new driver with it. For ATI-driven comments, both praise and derogatory, can be regarded as mixed. is the ATI drive really so hard to tame? Not also, see the author how to train ATI graphics
Adding a driver to the android kernel is actually adding a driver to the Linux kernel. It mainly adds vertex information to two files, one is the kconfig file and the other is the MAKEFILE file. For example, if the driver you added is placed in the xxx directory under the DRIVERS directory, the kconfig and makefile files under the directory will be repaired.
Spec
between the device and the drive, through the platform bus, the device and the driver is separate registration, through the platform bus probe to detect and match the device at any time, such as matching on the device driver registration;C: Due to the above advantages, a driver can be used for several similar devices;3:platform Bus and platform bus device
[Microsoft] [ODBC driver manager] no data source name is found and default driver error information is not specified:
Source: Microsoft ole db Provider for ODBC Drivers
Description: [Microsoft] [ODBC driver manager] no data source name found and default driver not specified
Conn code:
function conn(){ try {
1, we first find the "computer" on the desktop and then right-click it pop-up menu Device Manager-Display adapter Click "Update Driver Software";
2, then our computer will automatically scan all updatable or problematic drivers, such as will display "automatic search updated driver software";
Original unofficial Microsoft SQL Server Driver for PHP (sqlsrv)Here is unofficial modified builds of Microsoft ' s sqlsrv and pdo_sqlsrv drivers for PHP, version 3.0, for:
PHP 5.6 for Windows vista/2008 and above (+ +)
PHP 5.5 for Windows vista/2008 and above (+ +)
PHP 5.3 and 5.4 for Windows xp/2003 and aboveMicrosoft's version 3.0 driver does not run on xp/2003 because it had a hard-code
A WiFi module was used in the recent project, the master being mt7612u, and the USB interface. Use of Linux version 2.6.35, in the process of compiling the driver encountered a lot of problems, especially in this record. Get the source
MTK official website Drive. Contains Windows, Linux, and drivers under the Mac. I modified the GitHub drive. Add a new platform
In the source code built some hardware platform configuration information, if not suitable
Original article: Documentation/I2C/upgrading-clientsTranslator: Guo shaobei2010/05/10
Update I2C drivers to the new 2.6 Driver Model========================================================== ==========
Note: the I2C driver here refers to the I2C client driver, for example, RTC, USBTransceiver driver and so on.
Ben doo
Call other driver functions in the driver (fastcall)
Author: Lai yuping (auly) aulyp@163.com
In embedded systems, some communication ports are public, such as IIC ports and serial ports. Drivers of these ports are usually written by the OEM manufacturer and tested, relatively stable. We do not need to write an IIC driver when developing drivers for other devices
This kind of driver mainly presents streaming function interfaces, including XXX_Init, XXX_Deinit, XXX_Open, XXX_Close, XXX_Read, XXX_Write, XXX_Seek, XXX_IOControl, XXX_PowerUp, XXX_PowerDown, etc, note that the preceding interfaces must be output, and XXX must contain three characters. Otherwise, an error occurs. You can manually call the RegisterDevice () and DeregisterDevice () functions to load and uninstall the
Kernel 2.6.29.4 USB devices are actually complicated, but the Linux Kernel provides a subsystem called USB core to handle most of the complicated work. Therefore, the interface between the driver and USB core is described here.In the USB device organization structure, there are four layers: device, config, interface, and endpoint.A brief description of these four layers is as follows:A device usually has one or more configurations.Configuration often
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.