Freescale Semiconductor Inc.
    Regional Technical Application Center

 

Main Page | Class List | Directories | File List | File Members | Related Pages

Tasks.h

Go to the documentation of this file.
00001 /*******************************************************************************/
00013 /*******************************************************************************/
00014 /*                                                                             */
00015 /* All software, source code, included documentation, and any implied know-how */
00016 /* are property of Freescale Semiconductor and therefore considered            */ 
00017 /* CONFIDENTIAL INFORMATION.                                                   */
00018 /*                                                                             */
00019 /* This confidential information is disclosed FOR DEMONSTRATION PURPOSES ONLY. */
00020 /*                                                                             */
00021 /* All Confidential Information remains the property of Freescale Semiconductor*/
00022 /* and will not be copied or reproduced without the express written permission */
00023 /* of the Discloser, except for copies that are absolutely necessary in order  */
00024 /* to fulfill the Purpose.                                                     */
00025 /*                                                                             */
00026 /* Services performed by FREESCALE in this matter are performed AS IS and      */
00027 /* without any warranty. CUSTOMER retains the final decision relative to the   */
00028 /* total design and functionality of the end product.                          */
00029 /*                                                                             */
00030 /* FREESCALE neither guarantees nor will be held liable by CUSTOMER for the    */
00031 /* success of this project.                                                    */
00032 /*                                                                             */
00033 /* FREESCALE disclaims all warranties, express, implied or statutory including,*/
00034 /* but not limited to, implied warranty of merchantability or fitness for a    */
00035 /* particular purpose on any hardware, software ore advise supplied to the     */
00036 /* project by FREESCALE, and or any product resulting from FREESCALE services. */
00037 /*                                                                             */
00038 /* In no event shall FREESCALE be liable for incidental or consequential       */
00039 /* damages arising out of this agreement. CUSTOMER agrees to hold FREESCALE    */
00040 /* harmless against any and all claims demands or actions by anyone on account */
00041 /* of any damage,or injury, whether commercial, contractual, or tortuous,      */
00042 /* rising directly or indirectly as a result of the advise or assistance       */
00043 /* supplied CUSTOMER in connectionwith product, services or goods supplied     */
00044 /* under this Agreement.                                                       */
00045 /*                                                                             */
00046 /*******************************************************************************/
00047 
00048 #ifndef __TASKS
00049 #define __TASKS
00050 
00051 /*-- Includes ----------------------------------------------------------------*/
00052 #include "Derivative.h"
00053 #include "Pwm_Cfg.h"
00054 /*-- Types Definitions -------------------------------------------------------*/
00055 extern uint8_t  gu8Index;
00056 /*-- Defines -----------------------------------------------------------------*/
00057 
00058 
00059 /*-- Macros ------------------------------------------------------------------*/
00060 
00062 #define EXECUTE_100MS_TASKS()                               \
00063 {                                                           \
00064    vfnSetDuty_Cycle(PWM_CHANNEL_0,DTY_AT_50P_WITH_150HZ);   \
00065 }                                 
00066 
00068 #define EXECUTE_200MS_TASKS()                               \
00069 {                                                           \
00070    vfnSetDuty_Cycle(PWM_CHANNEL_1,DTY_AT_70P_WITH_100HZ);   \
00071 }
00072 
00074 #define EXECUTE_400MS_TASKS()                                                       \
00075 {                                                                                   \
00076     vfnSetPeriodAndDuty(PWM_CHANNEL_2, SET_PERIOD_AT_100HZ ,DTY_AT_5P_WITH_100HZ);  \
00077 }
00078 
00080 #define EXECUTE_800MS_A_TASKS()  \
00081 {                                \
00082     vfnSetPeriodAndDuty(PWM_CHANNEL_3, SET_PERIOD_AT_100HZ ,DTY_AT_20P_WITH_100HZ);  \
00083 }
00084 /* List of tasks to be executed @ 2ms, second group */
00085 #define EXECUTE_800MS_B_TASKS()   \
00086 {;}       
00087 
00088 
00089 /*============================================================================*/
00090 #endif /*__TASKS */