FMUSER Wirless Transmit Video And Audio More Easier !

[email protected] WhatsApp +8618078869184
Language

    51 single Knowledge Overview

     

    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) Haf files should not have anything Variable definitions, function definitions. 4) EXTERN problem EXTERN is required for variables; For functions, it is not necessary because the default status of the function is extern. If a function is changed 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. In a needed place. 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: // Declaration of the function of the call #ifndef __delay_h__ #define __delay_h__ EXTERN VOID DELAYMS (Unsigned Int N); #ENDIF In the delay.c file: // Function Implementation #include // for crystal 11.0592m Void delayms (unsigned int N) { UNSIGNED INT I, J; For (j = n; j>0; j -) For (i = 112; I>0; I -); } In the main program main.c # include // In the main program contains .h file, you cannot contain .c files ...... The above method still requires that each project needs to copy the corresponding header file to the project folder, which seems to be more troublesome, and another method is to put a good header file in one. In the folder, then copy this folder to ..keilc51inc, if you need to use a header file, if you use Keil's head file, there is a sentence in the main function mani (). You can use the functions in main (). Read all text, original title: 51 MCU C.c file and .h file Article Source: [Micro Signal: Changxuemcu, WeChat Public Number: Study Mechanical Machine] 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