📄 etpuc_ic.c
字号:
else if ((MatchA_TransB && flag0 == 0) || (MatchB_TransA && flag0 == 0))
{
IC_Trans:
IC_TransCount++; /* 1. */
if (IC_TransCount < IC_MaxCount) /* 2. */
{
IC_Last = erta; /* 3. */
}
else
{
IC_Final = erta; /* 4. */
if (fm1 == IC_LINK_MODE) /* 5. */
{
#ifdef REGISTER_PASSING
#asm
ram p31_0 <- IC_Link1.
#endasm
Link4();
#asm
ram p31_0 <- IC_Link2.
#endasm
Link4();
#else
Link4 (IC_Link1);
Link4 (IC_Link2);
#endif
}
if (fm0 == IC_SINGLE_MODE) /* 6. */
{
SetChannelInterrupt (); /* 7. */
SetDataTransferInterrupt ();
DisableEventHandling (); /* 8. */
ClearAllLatches (); /* 9. */
return;
}
}
if (TransitionBLatch) /* 10. */
{
if (IC_TransCount < IC_MaxCount) /* 11. */
{
IC_Last = ertb; /* 12. */
}
else
{
IC_Final = ertb; /* 13. */
if (fm1 == IC_LINK_MODE) /* 14. */
{
#ifdef REGISTER_PASSING
#asm
ram p31_0 <- IC_Link1.
#endasm
Link4();
#asm
ram p31_0 <- IC_Link2.
#endasm
Link4();
#else
Link4 (IC_Link1);
Link4 (IC_Link2);
#endif
}
if (fm0 == IC_SINGLE_MODE) /* 15. */
{
SetChannelInterrupt (); /* 16. */
SetDataTransferInterrupt ();
DisableEventHandling (); /* 17. */
}
}
}
ClearAllLatches (); /* 18. */
}
/*--------------------------------------------------------------------------+
| THREAD NAME: Transition with Parameter RAM location as reference (S4) |
| DESCRIPTION: Instead of getting the TCR value when an edge happens, this |
| routine supports using a parameter RAM location instead. To|
| make things easier just stuff the parameter RAM value into |
| the ert registers. It does not matter if there are 1 or 2 |
| edges. |
| 1. Get value from parameter RAM and store in ERTa and ERTb. |
| 2. Then goto TCR tranistion routine. |
+--------------------------------------------------------------------------*/
else if ((MatchA_TransB && flag0 == 1) || (MatchB_TransA && flag0 == 1))
{
erta = IC_Address; /* 1. */
ertb = erta;
goto IC_Trans; /* 2. */
}
/*--------------------------------------------------------------------------+
| THREAD NAME: Error (S5) |
| DESCRIPTION: Something has gone wrong. :-( |
| Call the Global error routine and end. |
+--------------------------------------------------------------------------*/
else
{
#ifdef GLOBAL_ERROR_FUNC
Global_Error_Func();
#else
ClearAllLatches();
#endif
}
}
/* Information exported to Host CPU program */
#pragma write h, (::ETPUfilename (cpu/etpu_ic_auto.h));
#pragma write h, (/****************************************************************);
#pragma write h, ( * WARNING this file is automatically generated DO NOT EDIT IT! *);
#pragma write h, ( * *);
#pragma write h, ( * FILE NAME: etpu_ic_auto.c COPYRIGHT (c) Freescale 2004 *);
#pragma write h, ( * All Rights Reserved *);
#pragma write h, ( * This file generated by: *);
#pragma write h, ( * $RCSfile: etpuc_ic.c,v $ $Revision: 1.4 $);
#pragma write h, ( * *);
#pragma write h, ( * This file provides an interface between eTPU code and CPU *);
#pragma write h, ( * code. All references to the IC function should be made with *);
#pragma write h, ( * information in this file. This allows only symbolic *);
#pragma write h, ( * information to be referenced which allows the eTPU code to be*);
#pragma write h, ( * optimized without effecting the CPU code. *);
#pragma write h, ( ****************************************************************/);
#pragma write h, (#ifndef _ETPU_IC_AUTO_H_ );
#pragma write h, (#define _ETPU_IC_AUTO_H_ );
#pragma write h, ( );
#pragma write h, (/* Function Configuration Information */);
#pragma write h, (::ETPUliteral(#define ETPU_IC_FUNCTION_NUMBER) IC_FUNCTION_NUMBER );
#pragma write h, (::ETPUliteral(#define ETPU_IC_TABLE_SELECT) ::ETPUentrytype(IC) );
#pragma write h, (::ETPUliteral(#define ETPU_IC_NUM_PARMS) ::ETPUram(IC) );
#pragma write h, ( );
#pragma write h, (/* Host Service Request Definitions */);
#pragma write h, (::ETPUliteral(#define ETPU_IC_INIT_TCR1) IC_INIT_TCR1 );
#pragma write h, (::ETPUliteral(#define ETPU_IC_INIT_TCR2) IC_INIT_TCR2 );
#pragma write h, (::ETPUliteral(#define ETPU_IC_INIT_PRAM) IC_INIT_PRAM );
#pragma write h, ( );
#pragma write h, (/* Function Mode Definitions */);
#pragma write h, (::ETPUliteral(#define ETPU_IC_MODE_SINGLE) IC_SINGLE_MODE );
#pragma write h, (::ETPUliteral(#define ETPU_IC_MODE_CONT) IC_CONT_MODE );
#pragma write h, (::ETPUliteral(#define ETPU_IC_MODE_LINK) (IC_LINK_MODE << 1) );
#pragma write h, ( );
#pragma write h, (/* Parameter Definitions */);
#pragma write h, (::ETPUliteral(#define ETPU_IC_FLAGS_OFFSET) ::ETPUlocation (IC, IC_Flags) );
#pragma write h, (::ETPUliteral(#define ETPU_IC_MAXCOUNT_OFFSET) ::ETPUlocation (IC, IC_MaxCount) );
#pragma write h, (::ETPUliteral(#define ETPU_IC_TRANSCOUNT_OFFSET) ::ETPUlocation (IC, IC_TransCount) );
#pragma write h, (::ETPUliteral(#define ETPU_IC_FINAL_OFFSET) ::ETPUlocation (IC, IC_Final) );
#pragma write h, (::ETPUliteral(#define ETPU_IC_LAST_OFFSET) ::ETPUlocation (IC, IC_Last) );
#pragma write h, (::ETPUliteral(#define ETPU_IC_ADDRESS_OFFSET) ::ETPUlocation (IC, IC_Address) );
#pragma write h, (::ETPUliteral(#define ETPU_IC_LINK1_OFFSET) ::ETPUlocation (IC, IC_Link1) );
#pragma write h, (::ETPUliteral(#define ETPU_IC_LINK2_OFFSET) ::ETPUlocation (IC, IC_Link2) );
#pragma write h, ( );
#pragma write h, (/* Flag Parameter Definitions */);
#pragma write h, (::ETPUliteral(#define ETPU_IC_FALLING_EDGE) 0 );
#pragma write h, (::ETPUliteral(#define ETPU_IC_RISING_EDGE) 1 );
#pragma write h, (::ETPUliteral(#define ETPU_IC_ANY_EDGE) 2 );
#pragma write h, ( );
#pragma write h, (#endif /* _ETPU_IC_AUTO_H_ */);
#pragma write h, ( );
/*********************************************************************
*
* Copyright:
* Freescale Semiconductor, INC. All Rights Reserved.
* You are hereby granted a copyright license to use, modify, and
* distribute the SOFTWARE so long as this entire notice is
* retained without alteration in any modified and/or redistributed
* versions, and that such modified versions are clearly identified
* as such. No licenses are granted by implication, estoppel or
* otherwise under any patents or trademarks of Freescale
* Semiconductor, Inc. This software is provided on an "AS IS"
* basis and without warranty.
*
* To the maximum extent permitted by applicable law, Freescale
* Semiconductor DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED,
* INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
* PARTICULAR PURPOSE AND ANY WARRANTY AGAINST INFRINGEMENT WITH
* REGARD TO THE SOFTWARE (INCLUDING ANY MODIFIED VERSIONS THEREOF)
* AND ANY ACCOMPANYING WRITTEN MATERIALS.
*
* To the maximum extent permitted by applicable law, IN NO EVENT
* SHALL Freescale Semiconductor BE LIABLE FOR ANY DAMAGES WHATSOEVER
* (INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS,
* BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER
* PECUNIARY LOSS) ARISING OF THE USE OR INABILITY TO USE THE SOFTWARE.
*
* Freescale Semiconductor assumes no responsibility for the
* maintenance and support of this software
********************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -