FMUSER Wirless Transmit Video And Audio More Easier !

[email protected] WhatsApp +8618078869184
Language

    Freertos_005_freeertosconfig.h Profile (2) HOOK Hook Functions

     

    Geese Hook Introduction Many beginners (including me), when I start school, I am completely awkward, I don't know what it is. If you need to understand the HOOK function related configuration in this article, you need to understand what hook functions. Hook function: hook translation means hook, hook, so it is called "hook function", you can understand what you want. The hook function is actually a block of the operating system message processing mechanism, and it is hung into the system through system call. The hook function can be said to be a function of operating system, like Windows, Linux, and UCOS embedded real-time operating systems that I have previously described in front of me have such hook functions. The hook function is a function provided to the developer and implements something you want to implement. For example: The IDLE idle task in RTOS provides a hook function, I want to count it, count to 1W, I will print it out (that is, I want to implement what I want to implement). In short, beginners do not have to fully master and master everything in the operating system, but must understand. Thanks to the article I shared in the WeChat public number, you don't have to analyze or in depth. But it is necessary to understand, don't wait for the problem, then ask me to share the problems before you! II HOOK configuration The above describes so much, I believe that everyone has a certain understanding of hook, below to describe the configuration in "freertosconfig.h". 1.configuse_idle_hook Whether to define the IDLE idle task hook function Configured to 0: Undefined Configure 1: Definition CONFIGUSE_IDLE_HOOK is the beginning of the system design and must be defined in "freertosconfig.h". Unlike some macro definitions may not be defined in "freertosconfig.h" because they have the default definition if they are defined in "freertos.h". If they are not defined, there is a default definition. For example: The last article said "configuse_mutexes", can be defined in "freertosconfig.h", and you can see the following code in "Freertos.h": #ifndef configuse_mutexes #define configuse_mutexes 0 #ENDIF That is, if it is not defined, it will default to you by default. Let's come back, configuse_idle_hook, in the task.c file, there is the following code: #if (configuse_idle_hook == 1) { Extern void vApplicationIdlehook (void); vApplicationIdlehook (); } #ENDIF It means: If you configure configuse_idle_hook 1, then you must implement "VAPPLICATIONIDEHOK ()" function, otherwise compiling will be wrong. The initiator does not default the function by default. 2.configuse_tick_hook Whether to define Tick Tick Hook Functions Configured to 0: Undefined Configure 1: Definition You can see the following code under the xtaskincrementTick function in the task.c file: #if (configuse_tick_hook == 1) { IF (UxpendedTicks == (UbaseType_t) 0U) { VApplicationTickHook (); } Else { MTCOVERAGE_TEST_MARKER (); } } #ENDIF Tip: The XTaskIncremeTick function is called in the PENDSV_HANDLER interrupt function. Therefore, the time that the vApplication onTickhook () function executes must be short. 3.configcheck_for_stack_overflow Whether defining stack overflow hook functions Configured to 0: Undefined Configure 1: Definition This configuration is more important, especially for complex system design, the amount of code is relatively large, using this feature, you can help you analyze if there is a memory-proof. 4.configuse_malloc_failed_hook Whether to define a memory allocation failure hook function Configured to 0: Undefined Configure 1: Definition We create tasks, semaphors, queues, etc. need to spend system stack. If we are not enough to allocate stacks to the system, it is easy to assign a failure when creating multiple tasks or queues, and this time it plays a prompt. 5.configuse_daemon_task_startup_hook Whether to define the daemon hook function Configured to 0: Undefined Configure 1: Definition By analyzing the software source code, you can find that this hook function is implemented below the Timer Task, so you need to configuSE_timers 1. Read more

     

     

     

     

    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