Unlock instant, AI-driven research and patent intelligence for your innovation.

Method for judging whether IO ports conflict or not by using macro compilation

An initialization and definition technology, applied in the computer field, can solve the problem of easy repeated definition, and achieve the effect of reducing the program size

Pending Publication Date: 2020-02-04
重庆东渝中能实业有限公司
View PDF2 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In view of this, the purpose of the present invention is to provide a kind of method using macro compilation to judge whether the IO port conflicts, and a kind of IO port management method independent of a certain specific development platform is provided; It is easy to repeat the definition of the IO port; using conditional compilation reduces the memory size of the compiled program

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 for judging whether IO ports conflict or not by using macro compilation
  • Method for judging whether IO ports conflict or not by using macro compilation

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0019] Embodiments of the present invention are described below through specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific implementation modes, and various modifications or changes can be made to the details in this specification based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the diagrams provided in the following embodiments are only schematically illustrating the basic concept of the present invention, and the following embodiments and the features in the embodiments can be combined with each other in the case of no conflict.

[0020] Wherein, the accompanying drawings are for illustrative purposes only, and represent only schematic diagrams, rather than physical drawings, and should...

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 for judging whether IO ports conflict or not by using macro compiling, and belongs to the field of computers. The method comprises the following steps: initializing an IO port; defining an IO (Input / Output) port as a certain constant by using a macro definition # defeine; using macro compilation statements; when the IO port is initialized, if the IO port is repeatedly initialized, judging that the system cannot be compiled. In an industrial control system for controlling stepping motors by utilizing an MCU (Microprogrammed Control Unit), as the system needs tocontrol six stepping motors, twelve sensors and various peripherals, after IO (Input / Output) ports are distributed on hardware, the system cannot run due to repeated initialization of a certain IO port during programming. After the method is used, the phenomenon of repeated conflict of IO ports is avoided, and meanwhile, the size of compiled programs is reduced by 5%.

Description

technical field [0001] The invention belongs to the field of computers and relates to a method for judging whether IO ports conflict by using macro compilation. Background technique [0002] Embedded systems need to configure and set the IO ports of the MCU. For systems with hundreds of IO ports, how to efficiently maintain and manage these IO ports has become a difficult problem for programmers. Macro conditional compilation is a technology commonly used in programming languages ​​such as C to judge according to conditions and selectively compile the code into the system. It can be used to judge and compile the IO port of the MCU. [0003] Existing IO port management is usually based on a certain development platform (the platform is responsible for IO port management) or manually maintained by programmers. The former method is highly dependent on the development platform and has poor versatility; the latter method greatly increases the workload of programmers, and it is e...

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): G06F8/30G06F8/41
CPCG06F8/31G06F8/44
Inventor 杨君宜徐祥铭周围刘威
Owner 重庆东渝中能实业有限公司