📄 csl_tcp2aux.h
字号:
* @n@b TCP2_setPacked32Endian
*
* @b Description
* @n This function programs the TCP to view the format of all data as
* packed data in 32-bit words. This should always be used when running
* in little endian mode and should be used in big endian mode only if
* the CPU is formatting the data.
*
* @b Arguments
* @n None
*
* <b> Return Value </b>
* @n None
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n TCPEND register configured to packed 32 mode for all data.
*
* @b Modifies
* @n TCPEND register
*
* @b Example
* @verbatim
TCP2_setPacked32Endian ();
@endverbatim
* =============================================================================
*/
CSL_IDEF_INLINE void TCP2_setPacked32Endian (
void
)
{
CSL_FINST (tcp2Regs->TCPEND, TCP2_TCPEND_ENDIAN_INTR, 32BITS);
CSL_FINST (tcp2Regs->TCPEND, TCP2_TCPEND_ENDIAN_EXTR, 32BITS);
return;
}
/** ============================================================================
* @n@b TCP2_start
*
* @b Description
* @n This function starts the TCP by writing a 1 to the EXEINST field
* of the TCPEXE register. See also TCP2_debug(), TCP2_debugStep() and
* TCP2_debugComplete().
*
* @b Arguments
* @n None
*
* <b> Return Value </b>
* @n None
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n TCP state machine starts executing.
*
* @b Modifies
* @n TCPEXE register
*
* @b Example
* @verbatim
TCP2_start ();
@endverbatim
* =============================================================================
*/
CSL_IDEF_INLINE void TCP2_start (
void
)
{
CSL_FINST (tcp2Regs->TCPEXE, TCP2_TCPEXE_EXECUTION_INSTR, START);
return;
}
/** ============================================================================
* @n@b TCP2_debug
*
* @b Description
* @n This function puts the TCP into debug mode by writing '4h' to the
* EXEINST field of the TCPEXE register. Normal initialization is
* performed and TCP waits in MAP state 0 for Debug Step or Debug Complete
* to be performed. See also TCP2_start(), TCP2_debugStep() and
* TCP2_debugComplete()
*
* @b Arguments
* @n None
*
* <b> Return Value </b>
* @n None
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n EXEINST feild of the TCPEXE register is configured with the value passed.
*
* @b Modifies
* @n TCPEXE register
*
* @b Example
* @verbatim
TCP2_debug ();
@endverbatim
* =============================================================================
*/
CSL_IDEF_INLINE void TCP2_debug (
void
)
{
CSL_FINST (tcp2Regs->TCPEXE, TCP2_TCPEXE_EXECUTION_INSTR, DEBUG0);
return;
}
/** ============================================================================
* @n@b TCP2_debugStep
*
* @b Description
* @n This function executes one MAP decode and waits in state 6 when the
* TCP is in Debug mode, by writing '5h' to the EXEINST field of the
* TCPEXE register. See also TCP2_start(), TCP2_debug() and
* TCP2_debugComplete()
*
* @b Arguments
* @n None
*
* <b> Return Value </b>
* @n None
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n EXEINST feild of the TCPEXE register is configured with the value passed.
*
* @b Modifies
* @n TCPEXE register
*
* @b Example
* @verbatim
TCP2_debugStep ();
@endverbatim
* =============================================================================
*/
CSL_IDEF_INLINE void TCP2_debugStep (
void
)
{
CSL_FINST (tcp2Regs->TCPEXE, TCP2_TCPEXE_EXECUTION_INSTR, DEBUG6);
return;
}
/** ============================================================================
* @n@b TCP2_debugComplete
*
* @b Description
* @n This function executes the remaing MAP decodes when the TCP is in
* Debug mode, by writing '6h' to the EXEINST field of the TCPEXE register.
* See also TCP2_start(), TCP2_debug() and TCP2_debugComplete()
*
* @b Arguments
* @n None
*
* <b> Return Value </b>
* @n None
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n EXEINST feild of the TCPEXE register is configured with the value passed.
*
* @b Modifies
* @n TCPEXE register
*
* @b Example
* @verbatim
TCP2_debugComplete ();
@endverbatim
* =============================================================================
*/
CSL_IDEF_INLINE void TCP2_debugComplete (
void
)
{
CSL_FINST (tcp2Regs->TCPEXE, TCP2_TCPEXE_EXECUTION_INSTR, DEBUG);
return;
}
/** ============================================================================
* @n@b TCP2_reset
*
* @b Description
* @n This function performs a soft reset of all TCP registers except for
* TCPEXE and TCPEND registers.
*
* @b Arguments
* @n None
*
* <b> Return Value </b>
* @n None
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n performs soft reset of TCP.
*
* @b Modifies
* @n TCPEXE register
*
* @b Example
* @verbatim
TCP2_reset ();
@endverbatim
* =============================================================================
*/
CSL_IDEF_INLINE void TCP2_reset (
void
)
{
CSL_FINST (tcp2Regs->TCPEXE, TCP2_TCPEXE_EXECUTION_INSTR, SOFTRESET);
return;
}
/** ============================================================================
* @n@b TCP2_setSlpzvdd
*
* @b Description
* @n This function enables/disables the internal control of the slpzvdd.
*
* @b Arguments
@verbatim
slpzvddCtrl enable/disable configuration of the slpzvdd
@endverbatim
*
* <b> Return Value </b>
* @n None
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n TCPEND register configured with the value passed.
*
* @b Modifies
* @n TCPEND register
*
* @b Example
* @verbatim
TCP2_setSlpzvdd (1);
@endverbatim
* =============================================================================
*/
CSL_IDEF_INLINE void TCP2_setSlpzvdd (
Uint32 slpzvddCtrl
)
{
CSL_FINS (tcp2Regs->TCPEND, TCP2_TCPEND_SLPZVDD_EN, slpzvddCtrl);
return;
}
/** ============================================================================
* @n@b TCP2_setSlpzvss
*
* @b Description
* @n This function enables/disables the internal control of the slpzvss.
*
* @b Arguments
@verbatim
slpzvssCtrl enable/disable configuration of the slpzvss
@endverbatim
*
* <b> Return Value </b>
* @n None
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n TCPEND register configured with the value passed.
*
* @b Modifies
* @n TCPEND register
*
* @b Example
* @verbatim
TCP2_setSlpzvss (1);
@endverbatim
* =============================================================================
*/
CSL_IDEF_INLINE void TCP2_setSlpzvss (
Uint32 slpzvssCtrl
)
{
CSL_FINS (tcp2Regs->TCPEND, TCP2_TCPEND_SLPZVSS_EN, slpzvssCtrl);
return;
}
/** ============================================================================
* @n@b TCP2_getIcConfig
*
* @b Description
* @n This function reads the input configuration values currently programmed
* into the TCP.
*
* @b Arguments
@verbatim
config TCP configuration structure to hold the read values
@endverbatim
*
* <b> Return Value </b>
* @n None
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n config structure contains the TCP input configuration values.
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
TCP2_getIcConfig (&config);
@endverbatim
* =============================================================================
*/
CSL_IDEF_INLINE void TCP2_getIcConfig (
TCP2_ConfigIc *config
)
{
Uint32 gie;
gie = _disable_interrupts ();
config->ic0 = tcp2CfgRegs->TCPIC0;
config->ic1 = tcp2CfgRegs->TCPIC1;
config->ic2 = tcp2CfgRegs->TCPIC2;
config->ic3 = tcp2CfgRegs->TCPIC3;
config->ic4 = tcp2CfgRegs->TCPIC4;
config->ic5 = tcp2CfgRegs->TCPIC5;
config->ic6 = tcp2CfgRegs->TCPIC6;
config->ic7 = tcp2CfgRegs->TCPIC7;
config->ic8 = tcp2CfgRegs->TCPIC8;
config->ic9 = tcp2CfgRegs->TCPIC9;
config->ic10 = tcp2CfgRegs->TCPIC10;
config->ic11 = tcp2CfgRegs->TCPIC11;
config->ic12 = tcp2CfgRegs->TCPIC12;
config->ic13 = tcp2CfgRegs->TCPIC13;
config->ic14 = tcp2CfgRegs->TCPIC14;
config->ic15 = tcp2CfgRegs->TCPIC15;
_restore_interrupts (gie);
}
/** ============================================================================
* @n@b TCP2_icConfig
*
* @b Description
* @n Programs the TCP with the input configuration values passed in the
* TCP2_ConfigIc structure. This is not the recommended means by which to
* program the TCP, as it is more efficient to transfer the IC values using
* the EDMA.
*
* @b Arguments
@verbatim
config TCP configuration structure containing the values to be
programmed
@endverbatim
*
* <b> Return Value </b>
* @n None
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n TCP input configuration registers are programmed with the values passed.
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
TCP2_ConfigIc configIc;
configIc.ic0 = 0x00283300;
configIc.ic1 = 0x00270000;
configIc.ic2 = 0x00080118;
configIc.ic3 = 0x00000011;
configIc.ic4 = 0x00000100;
configIc.ic5 = 0x00000000;
configIc.ic6 = 0x00032c2f;
configIc.ic7 = 0x00027831;
configIc.ic8 = 0x00000000;
configIc.ic9 = 0x00018430;
configIc.ic10 = 0x0003bfcd;
configIc.ic11 = 0x00000000;
configIc.ic12 = 0x00820820;
configIc.ic13 = 0x00820820;
configIc.ic14 = 0x00820820;
configIc.ic15 = 0x00820820;
TCP2_icConfig (&config);
@endverbatim
* =============================================================================
*/
CSL_IDEF_INLINE void TCP2_icConfig (
TCP2_ConfigIc *config
)
{
Uint32 gie;
gie = _disable_interrupts ();
tcp2CfgRegs->TCPIC0 = config->ic0;
tcp2CfgRegs->TCPIC1 = config->ic1;
tcp2CfgRegs->TCPIC2 = config->ic2;
tcp2CfgRegs->TCPIC3 = config->ic3;
tcp2CfgRegs->TCPIC4 = config->ic4;
tcp2CfgRegs->TCPIC5 = config->ic5;
tcp2CfgRegs->TCPIC6 = config->ic6;
tcp2CfgRegs->TCPIC7 = config->ic7;
tcp2CfgRegs->TCPIC8 = config->ic8;
tcp2CfgRegs->TCPIC9 = config->ic9;
tcp2CfgRegs->TCPIC10 = config->ic10;
tcp2CfgRegs->TCPIC11 = config->ic11;
tcp2CfgRegs->TCPIC12 = config->ic12;
tcp2CfgRegs->TCPIC13 = config->ic13;
tcp2CfgRegs->TCPIC14 = config->ic14;
tcp2CfgRegs->TCPIC15 = config->ic15;
_restore_interrupts (gie);
}
/** ============================================================================
* @n@b TCP2_icConfigArgs
*
* @b Description
* @n Programs the TCP with the input configuration values passed. This is
* not the recommended means by which to program the TCP, as it is more
* efficient to transfer the IC values using the EDMA.
*
* @b Arguments
@verbatim
ic0 TCP input configuration register 0 value
ic1 TCP input configuration register 1 value
ic2 TCP input configuration register 2 value
ic3 TCP input configuration register 3 value
ic4 TCP input configuration register 4 value
ic5 TCP input configuration register 5 value
ic6 TCP input configuration register 6 value
ic7 TCP input configuration register 7 value
ic8 TCP input configuration register 8 value
ic9 TCP input configuration register 9 value
ic10 TCP input configuration register 10 value
ic11 TCP input configuration register 11 value
ic12 TCP input configuration register 12 value
ic13 TCP input configuration register 13 value
ic14 TCP input configuration register 14 value
ic15 TCP input configuration register 15 value
@endverbatim
*
* <b> Return Value </b>
* @n None
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n TCP input configuration registers are programmed with the values passed.
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
Uint32 ic0, ic1, ic2, ic3, ic4, ic5, ic6, ic7, ic8, ic9 , ic10,
ic11, ic12, ic13, ic14, ic15;
ic0 = 0x00283300;
ic1 = 0x00270000;
ic2 = 0x00080118;
ic3 = 0x00000011;
ic4 = 0x00000100;
ic5 = 0x00000000;
ic6 = 0x00032c2f;
ic7 = 0x00027831;
ic8 = 0x00000000;
ic9 = 0x00018430;
ic10 = 0x0003bfcd;
ic11 = 0x00000000;
ic12 = 0x00820820;
ic13 = 0x00820820;
ic14 = 0x00820820;
ic15 = 0x00820820;
TCP2_icConfigArgs (ic0, ic1, ic2, ic3, ic4, ic5, ic6, ic7,
ic8, ic9, ic10, ic11, ic12, ic13, ic14, ic15);
@endverbatim
* =============================================================================
*/
CSL_IDEF_INLINE void TCP2_icConfigArgs (
Uint32 ic0,
Uint32 ic1,
Uint32 ic2,
Uint32 ic3,
Uint32 ic4,
Uint32 ic5,
Uint32 ic6,
Uint32 ic7,
Uint32 ic8,
Uint32 ic9,
Uint32 ic10,
Uint32 ic11,
Uint32 ic12,
Uint32 ic13,
Uint32 ic14,
Uint32 ic15
)
{
Uint32 gie;
gie = _disable_interrupts ();
tcp2CfgRegs->TCPIC0 = ic0;
tcp2CfgRegs->TCPIC1 = ic1;
tcp2CfgRegs->TCPIC2 = ic2;
tcp2CfgRegs->TCPIC3 = ic3;
tcp2CfgRegs->TCPIC4 = ic4;
tcp2CfgRegs->TCPIC5 = ic5;
tcp2CfgRegs->TCPIC6 = ic6;
tcp2CfgRegs->TCPIC7 = ic7;
tcp2CfgRegs->TCPIC8 = ic8;
tcp2CfgRegs->TCPIC9 = ic9;
tcp2CfgRegs->TCPIC10 = ic10;
tcp2CfgRegs->TCPIC11 = ic11;
tcp2CfgRegs->TCPIC12 = ic12;
tcp2CfgRegs->TCPIC13 = ic13;
tcp2CfgRegs->TCPIC14 = ic14;
tcp2CfgRegs->TCPIC15 = ic15;
_restore_interrupts (gie);
}
#ifdef __cplusplus
}
#endif
#endif /* _CSL_TCP2AUX_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -