... 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) ... to be changed //CREAD says to enable the receiver options .c_ cflag |= (CLOCAL | CREAD); //apply the settings to the serial port //TCSNOW means apply the changes now //other valid options include: //...
Ngày tải lên: 05/11/2013, 20: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. ... other support for serial- port communications. Pro- grammers thus can access ports without understanding every detail of the UART’s architecture. To gain access to a port, an application selects a ... 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. ã...
Ngày tải lên: 06/11/2013, 08:15
... Xóa c ngắt thu (RI=0) ⇒ Vi c thu dữ liệu bắt ñầu: C c xung clock dịch bit ñư c gởi ra chân TxD và dữ liệu từ thiết bị bên ngoài ñư c dịch vào chân RxD bởi c c xung clock dịch bit này (vi c ... SM0: Serial Mode 0 Bit 0 chọn chế độ c a port noái tieáp. C c chế ñộ c a port nối tiếp: Trư c khi sử dụng port nối tiếp c n phải: Chương 5: Hoạt ñộng c a port nối tiếp (Serial Port) . ... KHIỂN PORT NỐI TIẾP (SCON): Thanh ghi SCON (Serial Control Register): chứa c c bit dùng ñể ñiều khiển chế ñộ hoạt ñộng và báo trạng thái c a port nối tiếp. C u tr c của thanh ghi SCON: SCON: Serial...
Ngày tải lên: 20/01/2014, 19:20
Hướng dẫn giao tiếp Serial port sử dụng VB.Net 2008 qua một số ví dụ pot
... Sonbui1903 Chat giữa hai máy tính qua c ng Com II: C c ví dụ C c câu lệnh sử dụng với Serialport c thể xem tại: http://msdn.microsoft.com/en-us /library/ system.io.ports.serialport.aspx#Y3078 ... SerialPort1.Close() End If 'Lấy danh sách c c cổng c trên máy' For i As Integer = 0 To My.Computer.Ports.SerialPortNames.Count - 1 ComboBox1.Items.Add(My.Computer.Ports.SerialPortNames(i)) ... Chat giữa hai máy tính qua c ng Com TextBox1 TextBox RichTextBox RichTextBox1 SerialPort SerialPort1 1.2: Lập trình Để lập trình cho c c đối tượng bạn double click vào c c...
Ngày tải lên: 09/03/2014, 20:20
Linux system programming talking directly to the kernel and c library
... Collection (gcc). Originally, gcc was GNU’s version of cc, the C Compiler. Thus, gcc stood for GNU C Compiler. Over time, support was added for more and more languages. Consequently, nowadays gcc ... the GNU C library (glibc), and the GNU C Compiler (gcc—now formally called the GNU Compiler Collection, but we are concerned only with C) . This book covers the system interface defined by Linux ... us. With respect to language standards, Linux fares well. The gcc C compiler is ISO C9 9- compliant; support for C1 1 is ongoing. The g++ C+ + compiler is ISO C+ +03-compliant with support for C+ +11 in...
Ngày tải lên: 19/03/2014, 13:39
Bài thuyết trình sự khác nhau giữa c++ trong windows và g++ trong linux
Ngày tải lên: 20/08/2013, 15:35
Laapj trình shell và lập trình C trên Linux
... gcc -c editor .c 5. screen.o : screen .c screen.h 6. gcc -c screen .c 7. keyboard.o : keyboard .c keyboard.h 8. gcc -c keyboard .c 9. clean: 10. rm *.o Để biên dịch chương trình này ta chỉ c n ... trong c c thư m c /usr/lib và /lib. Dưới đây là c c tùy chọn c a lệnh này: C c tuỳ chọn C c miêu tả -p Đơn thuần chỉ in ra nội dung c a /etc/ld.so.cache, một danh sách hiện thời c c thư ... 7.2.2.4 C c cấu tr c lựa chọn: case và select C u tr c điều khiển luồng tiếp theo là case, hoạt động c ng tương tự như lệnh switch c a C. Nó cho phép ta th c hiện c c khối lệnh phụ thu c vào...
Ngày tải lên: 06/10/2013, 11:20
LẬP TRÌNH SHELL VÀ LẬP TRÌNH C TRÊN LINUX
... hoàn chỉnh. Ta c thể kiểm tra c c thu c tính file, so sánh c c xâu và c c biểu th c số h c. Chú ý: C c khoảng trống trƣ c dấu mở ngo c và sau dấu đóng ngo c trong [condition] là c n phải c . ... ldconfig x c định rõ c c liên kết động (liên kết khi chạy) đƣ c yêu c u bởi thƣ viện đƣ c chia sẻ nằm trong c c thƣ m c /usr/lib và /lib. Dƣới đây là c c tùy chọn c a lệnh này: C c tuỳ chọn ... done * C c cấu tr c lựa chọn: case và select C u tr c điều khiển luồng tiếp theo là case, hoạt động c ng tƣơng tự nhƣ lệnh switch c a C. Nó cho phép ta th c hiện c c khối lệnh phụ thu c vào...
Ngày tải lên: 18/10/2013, 23:20
Tài liệu Linux IO Port Programming pptx
... 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): ... or Pentium processors (or 12 clock cycles on an i386). asm() is translated into inline assembler code by gcc, so there is no function call overhead. Shorter delays than one clock cycle are impossible...
Ngày tải lên: 22/12/2013, 10:15
Lập trình hướng đối tượng tren C/C++ - OOP 06 the STL library and encapsulation
... năng (Phương th c) BàiBài tậptập BàiBài tậptập 6.4:6.4: XâyXây dựngdựng c cc c lớplớp c ncần thiếtthiết đểđể thựcth c hiệnhiện c cc c thaothao táct c trêntrên tam tam giácgi c: : TínhTính chuchu vi ... ngườingười điđi trướctrư c CC c c lớplớp, , hàmhàm dựngdựng sẵnsẵn (file .lib).(file .lib). C cC c thưthư việnviện C+ + C+ + phổphổ biếnbiến:: ThưThư việnviện chuẩnchuẩn C+ + .C+ +. ThưThư ... trìnhtrình:: BộBộ c ngcông c c hỗhỗ trợtrợ c acủa lậplập trìnhtrình viênviên BộBộ c ngcông c c hỗhỗ trợtrợ c acủa lậplập trìnhtrình viênviên TậpTập hợphợp tri tri thứcth c củacủa ngườingười...
Ngày tải lên: 12/01/2014, 16:57
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
Tài liệu The C++ Standard Library Second Edition pdf
... numeric components of the C+ + standard library: in par- ticular, classes for random numbers and distributions, types for complex numbers, and some numeric C functions. ã Chapter 18: Concurrency ... informit.com/aw Library of Congress Cataloging-in-Publication Data Josuttis, Nicolai M. The C+ + standard library : a tutorial and reference / Nicolai M. Josuttis.—2nd ed. p. cm. Includes bibliographical ... develop all code from scratch. Now, with the second standard, called C+ +11 (see Section 2.1, page 7, for the detailed history of C+ + standards), we have a huge C+ + standard library whose specification...
Ngày tải lên: 17/02/2014, 22:20
Tìm hiểu, cài đặt, xây dựng ứng dụng trên C# trong SUSE Linux
... th c tế . ã C c Controls ã CSDL mysSQL, (http://www.yolinux.com/TUTORIALS/LinuxTutorialMySQL.html) ã Trong b office ca Linux cng c CSDL ging nh Access ã Th vin h tr kt nối tới csdl 1.M c tiêu. ... trong linux (Gtk#) hỗ trợ không kém gì C# trong .Net c a Windows • Thiết đặt c c properties c a Control Thiết đặt c c properties c a Control • Lấy c c sự kiên c a Control Lấy c c sự kiên c a ... hiểu vi c cài đặt C# trong SUSE Linux (video) ã b. Xõy dng ng dng C# trong SUSE linux c bản nhất (video) Kết quả Kết quả Cảm ơn C và ca c bạn đã chú ý lắng nghe Cảm ơn C và ca c bạn...
Ngày tải lên: 22/02/2014, 09:14