FMUSER Wirless Transmit Video And Audio More Easier !

[email protected] WhatsApp +8618078869184
Language

    51 The relationship and difference between the MCU C is about .C file and .h file

     

    C file is an important concept in programming. The so-called "file" generally refers to a collection of data stored on the external medium. A batch of documents is stored in an external medium (such as a disk) in the form of data. The operating system is managed by files, that is, if you want to find data on the external medium, you must first find the specified file by file name, and then read data from this file. Document is an important concept in programming. The so-called "file" generally refers to a collection of data stored on the external medium. A batch of documents is stored in an external medium (such as a disk) in the form of data. The operating system is managed by files, that is, if you want to find data on the external medium, you must first find the specified file by file name, and then read data from this file. To store data to the external medium, you must also create a file (with file name ID) to output data to it. Be 1) H file role 1 Convenient development: Contains common constants, structures, type definitions, functions, variables required for files; 2 Provide an interface: For a package, you can provide an interface to the outside world (for example: stdio.h). 2) What should I have in the H file? Constants, structures, type definitions, functions, variables declaration. 3) The H file should not have any variable definition, the function is defined. 4) EXTERN issues need externs for variables; The function is not required because the default state of the function is extern. If a function is to change to only in the file, add static. 5) Include contains problems Although the decision and type definition can be repeated, it is recommended to compile the use conditions. #ifndef_filename_h #define_filename_h ... #ENDIF 6) There should be H files there. Where needed. For example, an H file that provides an interface is only required by the 1.c file, then it is included in the 1.c file. The written programs generally have .h files and corresponding .c files, .h files are used, .c files are their function implementation. As long as the .h file is included, we have never heard of the program of #include "delay.c", and does not advocate this form. In the delay.h file: // Declare the called function #ifndef__delay_h__#define__delay_h__ EXTERNVOIDELAYMS (unsigned int n); #endif In the delay.c file: // Function Implement part #include // for crystal11.0592m VoidDelayms (unsigned int n) { Unsignedinti, J; for (j = n; j "0; j -) for (i = 112; i" 0; I -); In the main program main.c #Include // In the main program, the .h file is included, it cannot contain .c files ... The above method still requires every project to copy the corresponding header file to the project's folder, which seems to be more troublesome, there is another way to put the header file in one. In the folder, then copy this folder to. Because of the use of a header file, Keilc51Inc, as you need to use the header file with the Keil, there is a function of #include before main () before the main function mani (). , Reading the full text, the technology area About μClinux transplantation on ARM7 S3C4510B Multi-looped into charge and discharge controller design Interrupt service routines for ARM embedded systems LED dimming engine design based on 8-bit MCU How to display Chinese characters, ASCII characters and color graphics on the LCD monitor

     

     

     

     

    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