and cannot predict when it will end. In VB program, this problem can be solved by inserting a doevent statement in the loop structure. In Java, the best way is to use threads, just like the following code fragment.
Public Testport Extend Thread
{
...
InputStream input = Serialport.getinputstream ();
StringBuffer buf = new StringBuffer ();
Boolean stopped = false;
...
public void Run ()
{
try {
while (!stopped)
int ch = input.read ();
if (ch== ' q ' | | ch== ' q ')
{
/* End read,
Obtain the COM port number mapped to the serial port
Background: Recently, due to project requirements, you need to operate the SMS cat. After the SMS cat is inserted into the computer, it will map the COM port based on the current PC status. Here, you need to dynamically obtain the COM
function in C performs further initialization, such as the NIC, and then enters the main_loop loop. The relocated U-boot memory layout is as follows:
Now execute make all to compile the u-boot.bin and u-boot-spl.bin, but compilation error:
In clock. the s5pv210_get_arm-clk of C uses the macro samsung_get_base_clock and the related registers, because our clock code was previously implemented using assembly, so we have the arch-s5pc1xx in arch/ARM/include/ASM/clock. h to define these registers:
driver is set to COM, which is consistent with the prefix of the physical serial driver. In this way, the application layer can access the virtual serial driver just like the physical serial driver .)
1. Open the physical serial port in the COM_Open () function, and create
set to null.);
For exampleProgramUsed to open the serial port COM1 in synchronous read/write mode:
Handle hcom;DWORD dwerror;Hcon = createfile ("COM1", generic_read | generic_write, 0, null, open_existing, 0, null );If (hcom = (handle) 0 xffffffff){Dwerror = getlasterror ();MessageBox (dwerror );}
The dwattrsandflags parameter and the file_flag_overlapped flag are describ
From https://www.ibm.com/developerworks/cn/linux/l-serials/
Introduction to serial ports
The serial port is a common interface for computers. It has a wide range of applications, such as a few connection lines and simple communication. Commonly used serial port is RS-232-C
To change the listener port of Oracle 9i, you only need to change it in listener. ora and then restart it. The Migration Group on Oracle 10g rac needs to load data and only allow migration users to access it. It is best to change the port of Oracle 10g. The details are as follows:
1. the
To modify the port number of an oracle 10g rac listener to 1523, rac1523To modify the port number of an oracle 10g rac listener to 1523I,Modify listener. ora and change 1521 to 1523. Back up the file in advance for quick recoveryII,Modify tnsnames. ora, change the value of r
operated in two ways: synchronous operation mode and overlapping operation mode (also called asynchronous operation mode). When synchronizing, the API functions block until the operation is complete (in multithreading, although the main thread is not blocked, but the listener threads are still blocked), and the overlapping operation, the API function will return immediately, the operation in the background, to avoid the thread blocking.
Regardless o
. Parity = parity. None; // Data bit Seriasettingplay. databits = 8 ; // Stop bit Seriasettingplay. stopbits = stopbits. One;Textchanged + = new updatetexteventhandler (changetext ); Try { // Open serial port Seriasettingplay. open ();} Catch (Exception ex){ // The caught exception information does not check whether the serial
When installing oracle on Linux, I accidentally installed the listener twice. The port number of the listener is changed to 1522 instead of the default 1521. The client has not been connected for a long time, finally, we found that the port number of listener is incorrect. T
An embedded system usually needs to carry out Full-duplex communication with its main control system, for example, a pipelined control system needs to continuously accept the query and control information sent from the master control system, and send the execution result or query result back to the master control system. This paper introduces a simple Java class library which realizes Full-duplex communication through serial
to modify the Oracle 10g RAC Listener Port number 1523OneModify the Listener.ora to change the 1521 to 1523. Make a backup of the file in advance for quick recoveryTwoModify the Tnsnames.ora, change the remote_listener corresponding value in the Tnsnames.ora parameter to 1523, make a backup of the file in advance for quick recoveryThreemodifying Local_listener database initialization parameters alter system
Summary: Taking the serial port driver of the b0x Chip Based on the ARM7TDMI kernel as an example, this paper analyzes the hierarchy and mechanism of the VxWorks serial port driver, and studies the working principle of the TTY driver and the underlying SCC driver. Combined with the
Android Development (37) android uses android_serialport_api to operate the serial port to solve the permission problem. androidserialport
Recently, we have a project where we want to use the android device to operate the serial port zebra GK888T printer and print the QR code using the printer.
Hardware Device connect
Http://www.cnblogs.com/lwngreat/p/4098374.htmlSoftware IntroductionAn Indian compiled by the VC serial port Class (also a VC serial control ), he also cooperated with this class to write a VC serial communication of some basic knowledge, such as how to open the serial
Recently, the department is doing high-speed camera, through the image capture card and its own high-speed camera link, so as to capture and collect images. Image capture card and high-speed camera is through the Cameralink connection, which also contains the camera and image capture card between the serial port hardware excuse, in the teacher's request, the realization of two
★Software Used
● Keil Software Development
● Virtual serial port Software
● Serial port debugging Assistant★Software Introduction 1. virtual serial port Software
For a laptop, virtual serial
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.