the device number, the fourth parameter is the device name, and the fifth parameter is the slave device number.
The following uses a simple character device driver to demonstrate how to use these functions: (Extended reading:Driver comparison between Block devices and character Devices)/** Copyright (c) 2005 farsight** This program is free software; you can redistribute it and/or modify* It under the terms of the GNU General Public License as publish
(){Int FD;Char key = 0;FD = open ("/dev/button_scan", o_rdwr); // open the deviceIf (FD =-1){Printf ("open device button errr! \ N ");Return 0;}
IOCTL (FD,); // clears the keyboard buffer. The following two parameters are meaningless,While (key! = 16){If (read (FD, Key, 1)> 0) // read the keyboard to obtain the corresponding key value.{Printf ("********************* key value = % d *********** ****************** \ n ", key );}}Close (FD); // close the deviceReturn 0;}
// ---------------------
);
(3) Reconfigure the kernelRoot @ farsight:/source/kernel/linux-2.6.26.5 # Make menuconfigDevice Drivers ---> graphics support --->Logo configuration --->[*] Bootup logo [*] Standard black and white Linux logo [*] standard 16-colo rlinux logo [*] standard 224-color Linux logo(4) recompile the kernelReplaying Development BoardAt this time, there will be a cute little penguin logo. This indicates that your driver has been successfully transplanted.
Frequently Asked Questions When Using realviewmdk (2)Author: Zhao Ming, a lecturer at Huaqing vision embedded College.
Download with realviewmdkProgramHave you ever encountered an error message similar to the following?
Load "D: // David // project // farsight // led_uart // OBJ // led_test.axf"
No algorithm found for: 30000000 H-300041efh
Erase skipped!
The error dialog box "error: Flash download failed-ARM920T" is displayed.
From the error
/2387040/how-to-retrieve-the-gcc-version-used-to-compile-a-given-elf-executableques: I ' d like to retrieve the GCC version used to compile a given executable. I tried but readelf didn ' t get the information. Any thoughts?ANS: To complete what others has Said:it's not stored in the object (or EXE) file, unless you compile wit H Debugging Information! (option -g ). If you compile with the debug info, you can get the it back with readelf :[email protected] test]# gcc a.c[[email protected] test]#
1. In the command Line Definition Editor commandcommand format sed options script fileSED does not modify the text file's data, he only sends the modified data to stdout.2. Use multiple editor commands on the command linePlace the command in a fileThe 3.S command uses the replacement tagThe number representing the new text will replace the place where the pattern matches the first. g, replace All. P, the original content is printed out. W file, which writes the result of the substitution to the
. It is really lost, but it is also the greatest gospel for new code beginners.
The equals method in Java is similar to operater = in C ++, that is, how to compare whether two objects have the same content
The clone method in Java is similar to operater = in C ++, but objects in Java are basically referenced semantics and do not have operater = semantics in C ++, therefore, the copy constructor and operater = which are very important in C ++ basically do not exist. In Java, only one object can b
Cardboard Chrome experiments: Contains a number of demo programs, as well as code examples.
Myo ArmbandCool gesture arm Ring Myo armband allows the user to wear on the forearm of the arm, can control the computer through the action command, through the movement and the EEG activity detection, Myo armband can identify the user's gesture activity.JavaScript interaction Capabilities
Myojs: An unofficial MYO armband Javascript framework.
NestThe
/139239/201410/ 141121347942278.png "border=" 0 "/>Cool gesture arm Ring Myo armband allows the user to wear on the forearm of the arm, can control the computer through the action command, through the movement and the EEG activity detection, Myo armband can identify the user's gesture activity.JavaScript interaction Capabilities
Myojs: An unofficial MYO armband Javascript framework.
Nest650) this.width=650; "Width=" 539 "height=" 543 "title=" image "style=" border-width:0px;padding
ObjectiveThe nest is a node. JS framework that is compatible with typescript and JavaScript. This article uses some of the basic modules of nest to build a simple Web backend curd application. Typeorm is a relatively mature object-relational mapper, written by Typescript. Nest and Typeorm, you can view the official documentation.Project BuildingUsing the CLI to b
I have just installed fedora17 as an essential installation tool. to solve the problem of video format and Chinese input method, I changed ubuntu12.04 to fedora17 today. I like gnome3. In order to stimulate English learning, we chose English. The result is that there is no Chinese input method .... My computer is 64-bit, 32-bit...
I have just installed fedora 17 and it is essential to solve the problem of video format and Chinese input method. today I changed ubuntu 12.04 to fedora 17 and liked
: qt-sdk-linux-x86-opensource-2009.04.1.bin
Run the preceding file on the terminal. The installation guide dialog box is displayed. Install the file as prompted in the dialog box.
(3) Compile and install from source code
Download the source code of qt-x11from "ftp://ftp.qt.nokia.com/qt/source/", as shown in
Download qt-x11-opensource-src-4.5.3.tar.gz;
On the Ubuntu terminal, decompress, configure, compile, and install the tool.
The procedure is as follows:
(1) decompress the source
. : The third method is to use its own player. Specify action as action_view, data as Uri, and type as its MIME type.
Common Methods for vidoeview are as follows:
In addition, mediacontroller also provides some useful methods, as shown in the following table:
Here is an example.
First, we need to define a layout. In this layout, we need a videoview component. The file is as follows:Android: Orientation = "vertical" Android: layout_width = "fill_parent"Android: layout_height = "fill_parent">And
directory.
The toolkit used is as follows (the gcc-3.4.5-glibc-2.3.6.dat has instructions, if your Linux environment can access the Internet, the installation script used later will automatically download the required package ):Gcc-3.4.5.tar.gz glibc-2.3.6.tar.gz linux-2.6.14.tar.gz crosstool-0.43.tar.gz
Binutils-2.15.tar.gz glibc-linuxthreads-2.3.3.tar.gz linux-libc-headers-2.6.12.0.tar.bz2 gdb-6.5.tar.bz2Copy them to/home/farsight/downloads:
(3) de
Memdev.h#ifndef _memdev_h#define _memdev_h#define mem_magic ' m ' #define Mem_restart _io (mem_magic, 0)//Use the kernel-provided macros to generate commands #define MEM _set _iow (mem_magic, 1, int)//change command to pass a shaping parameter to the kernel #endifDriver MEMDEV.C#include Application MEM_READ.C#include The device number is dynamically assigned in the driver and the device number assigned by the system to Memdev is viewed through cat/proc/devices.Use the command Mknod/dev/memde
parent device of the device, if none is specified as NULL, the third parameter is the device number, the fourth parameter is the device name, and the fifth parameter is the device number. Here's a simple character device driver to show you how to use these functions:/** Copyright (C) 2005 Farsight** This program was free software; You can redistribute it and/or modify* It under the terms of the GNU general public License as published by* The free sof
Why the importance of UML modeling
If you want to build a dog nest, prepare wood, nails, and some basic tools (such as hammers, saws, and tape ), you can start working. From developing a preliminary plan to completing a dog's nest that meets the appropriate functions, it may be possible to implement it within a few hours without the help of others. As long as the dog's
Nest (cell)--The contents of the table
Nest Filler (table fill) (cellpadding)-Represents a distance outside the nest used to separate nests from nest spaces
Nest Space (table spacing) (cellspacing)--represents the distance between the table border and the nesting fille
Advantage One : High Income! Annual salary 20-50 million . Now it instructor talent gap is large, resulting in it lecturer's annual salary than the same work experience programmer 8.1 million higher, for example: three years of work experience of the programmer annual salary is generally around 100,000, but also has three years of work experience of the programmer transformed to the dish Bird's Nest it lecturer, annual salary of about 180,000. Five ye
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.