... tenths //of a second. optiont .c_ cc[VTIME] = 1; //CLOCAL means don’t allow //control of the port to be changed //CREAD says to enable the receiver options .c_ cflag |= (CLOCAL | CREAD); //apply ... each operating system. The actual application can then use the common header file as its interface to the serial port. This creates a cross-platform serial inter- face allowing the creation of code ... { //error code goes here } 3.4.2 Linux Closing the serial port on Linux involves a single call to the close() system function, as the following code demonstrates. //close the serial port if(close(fd)...
Ngày tải lên: 05/11/2013, 20:15
... of clock cycles taken; e.g., for a 50 MHz processor (e.g. 486DX−50 or 486DX2−50), one clock cycle takes 1/50000000 seconds (=200 nanoseconds). Instruction i386 clock cycles i486 clock cycles xchg ... x86 architecture. rdtsc for Pentiums For Pentiums, you can get the number of clock cycles elapsed since the last reboot with the following C code (which executes the CPU instrution named RDTSC): ... For more accurate times, gettimeofday() is accurate to about a microsecond (but see above about scheduling). For Pentiums, the rdtsc code fragment above is accurate to one clock cycle. If you...
Ngày tải lên: 22/12/2013, 10:15
Tài liệu Advanced Linux Programming: C Table of Signals ppt
... kill command. SIGCHLD Linux sends a process this signal when a child process exits. See Section 3.4.4,“Cleaning Up Children Asynchronously,” in Chapter 3,“Processes.” SIGXCPU Linux sends a process ... pointer” can cause a SIGSEGV. SIGPIPE The program has attempted to access a broken data stream, such as a socket connection that has been closed by the other party. SIGALRM The alarm system call schedules ... illegal instruction.This could indicate that the program’s stack is corrupted. SIGABRT The abort function causes the process to receive this signal. SIGFPE The process has executed an invalid floating-point...
Ngày tải lên: 21/01/2014, 07:20
Koenig, moo accelerated c++ practical programming by example
... giving programmers concise, focused guides to specific topics. Each book in this series presents a single topic, at a technical level appropriate to that topic. The Series' practical approach is designed ... named second, which will contain the second line of the output, and then the program constructs first as a variable that contains as many * characters as the number of characters in second. Finally, ... discarding whitespace characters (space, tab, backspace, or the end of the line) from the input, then reads characters into name until it encounters another whitespace character or end-of-file. Therefore,...
Ngày tải lên: 19/03/2014, 14:10
linux socket programming by example
... Each chapter builds upon the previous, until all of the basic concepts are mastered in Part 1, “Basic Socket Concepts.” Part 2, “Advanced Socket Programming, ” contains some more advanced topics ... macros equivalent to the PF_ prefixed macros. Forming Socket Addresses Introduction About the Author Part 1—Basic Socket Concepts Chapter 1—Introducing Sockets A Brief Historical Introduction ... 7—Connection-Oriented Protocols for Clients Reviewing the Methods of Communication TCP/IP Handles Lost Packets TCP/IP Handles Duplicated Packets TCP/IP Handles Sequencing TCP/IP Handles Flow Control Understanding...
Ngày tải lên: 28/04/2014, 16:53
VHDL Programming by Example 4th Edition
... 183 Generics in Configurations 185 Generic Value Specification in Architecture 188 Generic Specifications in Configurations 190 Board-Socket-Chip Analogy 195 Block Configurations 199 Architecture Configurations ... mux device. There is an inverter component, an andgate component and an orgate component. Each of these components is declared in the architecture declaration section, which is between the architecture statement ... std_logic); END test; ARCHITECTURE test_arch OF test IS COMPONENT and2 GENERIC(rise, fall : TIME := 10 NS; GENERIC(load : INTEGER := 0); PORT ( a, b : IN std_logic; PORT ( c : OUT std_logic); END COMPONENT; BEGIN U1:...
Ngày tải lên: 16/08/2012, 08:46
Foreword và Predace của VHDL Programming by Example 4th Edition_01
... description capability of VHDL. Chapter 1 discusses how VHDL design relates to schematic based design, and introduces the basic terms of the language. Chapter 2 describes some of the basic concepts ... advanced VHDL features to the reader. Chapter 7 discusses how VHDL configurations can be used to construct and manage complex VHDL designs. Each of the different configuration styles are discussed ... VHDL, including the different delay mecha- nisms available, how to use instance specific data, and defines VHDL dri- vers. Chapter 2 discusses concurrent statements while Chapter 3 introduces the...
Ngày tải lên: 29/09/2013, 19:20
O''''Reilly - Programming C#
... general concept of classes, interfaces, delegates (which support callbacks), reference types, and value types. Additionally, .NET includes a Common Language Specification (CLS), which provides ... interface, a C# class in effect promises to provide the functionality the interface specifies. C# also provides support for structs, a concept whose meaning has changed significantly from C+ +. ... possible to call components from C# applications into COM and to call components from COM into C# . Chapter 22 describes how this is done. The book concludes with an appendix of C# Keywords....
Ngày tải lên: 04/11/2013, 13:15
Serial Port Complete
... Framework class library can use the SerialPort class to access COM ports. Some USB devices function as virtual COM ports, which applications can access in the same way as physical serial ports. ... system’s CPU. Any PC with a free expansion slot can add this type of port on an expansion card. ã RS-232 ports on PC Cards (also called PCMCIA cards). Any PC with a free PC-Card slot can use these. ã ... networks. On PCs, ports that applications can access as COM ports include these: ã RS-232 ports on older motherboards or on expansion cards. ã Ports that connect to a PC via a USB converter that...
Ngày tải lên: 06/11/2013, 08:15
Tài liệu Programming C# pdf
... New Project window. Figure 2-1. Creating a C# console application in Visual Studio .NET Programming C# 13 use. The CLR's garbage collector checks the heap for unreferenced objects and ... const int Republican = 2; const int Libertarian = 3; const int NewLeft = 4; const int Progressive = 5; int myChoice = Libertarian; switch (myChoice) { case Democrat: Console.WriteLine("You ... interact with COM components created outside the managed environment of the .NET Framework. It is possible to call components from C# applications into COM and to call components from COM into C# ....
Ngày tải lên: 10/12/2013, 14:16
Bạn có muốn tìm thêm với từ khóa: