FMUSER Wirless Transmit Video And Audio More Easier !

[email protected] WhatsApp +8618078869184
Language

    MCU C language programming: H file with .C file relationship

     

    During this 8 * 8 button, no matter whether it is written or referred to the procedure of others, it is found that there is a lot of basic knowledge points and programming specifications for C language, and some are their previous program habits. Ok, some is the basic knowledge is not solid, so it is concluded. First, .h file and .C file relationship: So far, the procedures written are some very simple programs, never think of writing .H files yourself, and don't know what. What is the use of .C files. Just recently write keyboard programs, when referring to other procedures, find a strict program written by others with a "key.h", defined in the .C file to write the function, such as Keyhit (), Keyscan ()Wait. After finding the information, .h file is the header file, it is estimated that it means to mean. This is the need for structural design of the specification program, which can achieve the modularity of the large program, and the connection debugging of the root module can be realized. 1, .h file introduction: In the single-chip C program design, the project is generally modularly designed according to functional modularization. Divide a project into multiple functions, and each function is placed in a C program document, called a module, the corresponding file name is the module name. A module is usually composed of two documents, one is a header file * .H, describes the data structure and function prototype in the module; the other is C file * .c, definition of data instance or object, and function algorithm accomplish. 2, .h file role As a project design, in addition to the detailed description of the project's overall function, the detailed definition of each module is to give the header file of the module. Usually the H header files want to define the functions of each function in the module, and the requirements for input and output parameters. The specific implementation of the module is designed, programmed, and debugged by the project composition according to the H file. For confidentiality and security, the module is implemented to be available to the project other member using the accessible file OBJ, or the library library. Since there is no need to provide source program documentation, on the one hand, it can be publicly issued, to ensure the ownership of the developer; on the other hand, it can prevent someone from intentional or unintentional modification to generate non-consistency, resulting in version confusion. Therefore, the H header file is the basis for the detailed design of the project and the basis of the team's work division, and the function description of the module is tested. To reference data or algorithms within the module, just use the include the module H header file with the include. 3, the basic composition of .h file / * The header document driven by the keyboard * / #ifndef _key_h_// anti-repeat reference, if it is not defined _key_h_, compile the sentence #define _key_h_// This symbol is unique, indicating that only the reference is once, ie #i nclude, define symbols _key_h_ //////////////////////////////////////> //////// / / / / / / / Char keyhit (void); // 否 UNSIGNED Char Keyscan (Void); // Take the key value //////////////////////////////////////> //////// / / / / / / / #ENDIF, read full text, original title: MCU C language programming, experience is here! Article Source: [Micro Signal: FCSDE-SH, WeChat Public Number: Semiconductor PDSA] Welcome to add attention! Please indicate the source of the article.

     

     

     

     

    List all Question

    Nickname

    Email

    Questions

    Our other product:

    Professional FM Radio Station Equipment Package

     



     

    Hotel IPTV Solution

     


      Enter email  to get a surprise

      fmuser.org

      es.fmuser.org
      it.fmuser.org
      fr.fmuser.org
      de.fmuser.org
      af.fmuser.org ->Afrikaans
      sq.fmuser.org ->Albanian
      ar.fmuser.org ->Arabic
      hy.fmuser.org ->Armenian
      az.fmuser.org ->Azerbaijani
      eu.fmuser.org ->Basque
      be.fmuser.org ->Belarusian
      bg.fmuser.org ->Bulgarian
      ca.fmuser.org ->Catalan
      zh-CN.fmuser.org ->Chinese (Simplified)
      zh-TW.fmuser.org ->Chinese (Traditional)
      hr.fmuser.org ->Croatian
      cs.fmuser.org ->Czech
      da.fmuser.org ->Danish
      nl.fmuser.org ->Dutch
      et.fmuser.org ->Estonian
      tl.fmuser.org ->Filipino
      fi.fmuser.org ->Finnish
      fr.fmuser.org ->French
      gl.fmuser.org ->Galician
      ka.fmuser.org ->Georgian
      de.fmuser.org ->German
      el.fmuser.org ->Greek
      ht.fmuser.org ->Haitian Creole
      iw.fmuser.org ->Hebrew
      hi.fmuser.org ->Hindi
      hu.fmuser.org ->Hungarian
      is.fmuser.org ->Icelandic
      id.fmuser.org ->Indonesian
      ga.fmuser.org ->Irish
      it.fmuser.org ->Italian
      ja.fmuser.org ->Japanese
      ko.fmuser.org ->Korean
      lv.fmuser.org ->Latvian
      lt.fmuser.org ->Lithuanian
      mk.fmuser.org ->Macedonian
      ms.fmuser.org ->Malay
      mt.fmuser.org ->Maltese
      no.fmuser.org ->Norwegian
      fa.fmuser.org ->Persian
      pl.fmuser.org ->Polish
      pt.fmuser.org ->Portuguese
      ro.fmuser.org ->Romanian
      ru.fmuser.org ->Russian
      sr.fmuser.org ->Serbian
      sk.fmuser.org ->Slovak
      sl.fmuser.org ->Slovenian
      es.fmuser.org ->Spanish
      sw.fmuser.org ->Swahili
      sv.fmuser.org ->Swedish
      th.fmuser.org ->Thai
      tr.fmuser.org ->Turkish
      uk.fmuser.org ->Ukrainian
      ur.fmuser.org ->Urdu
      vi.fmuser.org ->Vietnamese
      cy.fmuser.org ->Welsh
      yi.fmuser.org ->Yiddish

       
  •  

    FMUSER Wirless Transmit Video And Audio More Easier !

  • Contact

    Address:
    No.305 Room HuiLan Building No.273 Huanpu Road Guangzhou China 510620

    E-mail:
    [email protected]

    Tel / WhatApps:
    +8618078869184

  • Categories

  • Newsletter

    FIRST OR FULL NAME

    E-mail

  • paypal solution  Western UnionBank OF China
    E-mail:[email protected]   WhatsApp:+8618078869184   Skype:sky198710021 Chat with me
    Copyright 2006-2020 Powered By www.fmuser.org

    Contact Us