Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method and device for reading and writing serial data, computer device, and storage medium

A technology of serial data, reading and writing methods, applied in the direction of electrical digital data processing, instruments, etc., to save CPU resources, save system resource overhead, and fast transmission.

Active Publication Date: 2018-08-31
GUANGZHOU HI TARGET SURVEYING INSTRUMENT CO LTD
View PDF6 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Based on this, it is necessary to provide a method for reading and writing serial data to solve the problems of a small amount of overflow, loss, and usurpation of serial data.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for reading and writing serial data, computer device, and storage medium
  • Method and device for reading and writing serial data, computer device, and storage medium
  • Method and device for reading and writing serial data, computer device, and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0051] In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

[0052] figure 1 It is a schematic flowchart of a method for reading and writing serial port data in an embodiment. like figure 1 As shown, the present invention provides a method for reading and writing serial port data, including:

[0053] Step S101: Configure the direct memory access resource of the serial port device in the device tree.

[0054]Specifically, in the system device number file, add the direct memory access (DirectMemory Access) resource corresponding to the serial port device. As the name implies, the direct memory access function is to allow the device to bypass the processor a...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to a method and a device for reading and writing serial data, a computer device, and a storage medium. The method comprises: configuring a direct memory access resource; traversing direct memory access node names and comparing the direct memory access node names with preset node names; when the direct memory access node names are consistent with the preset node names, analyzing the direct memory access resource and configuring a direct memory access transmission mode; establishing a double-ring buffer region memory; establishing a device file descriptor and monitoring thedevice file descriptor; when dynamic conditions are monitored, performing writing-reading operation on a double-ring buffer region. Through a direct memory access transmission module, data rapid transmission is realized. Through establishing the double-ring buffer region to store and manage data, a data buffer storage problem is effectively solved. Through an epoll mechanism to monitor data of serial equipment, system resource cost is saved, data real-time transmitting-receiving efficiency is improved, so as to further solve problems of little overflow, loss, and usurpation in serial data transmission.

Description

technical field [0001] The invention relates to the technical field of embedded systems, in particular to a serial port data reading and writing method, device, computer equipment and storage medium. Background technique [0002] The GNSS (Global Navigation Satellite System) positioning module can be configured to update and output GNSS raw data to the serial port at a rate of 1Hz, 5Hz, and 10Hz. User applications need to write data to the serial port while continuously reading data from the serial port device. That is to say, the serial port Data interaction and communication between the two parties are required with the user application. [0003] The traditional technical solution is that in the kernel layer of the LINUX system, the serial port communication adopts the PIO mode (Programming Input / Output Model), and the CPU responds to the interrupt and executes the IO port command to read and write data to realize data communication. In the serial port communication applic...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F13/16G06F13/42
CPCG06F13/1673G06F13/4282
Inventor 陈校陈伟李成钢周谷
Owner GUANGZHOU HI TARGET SURVEYING INSTRUMENT CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products