iLLD_TC27xC  1.0
Channel Initialize Functions
Collaboration diagram for Channel Initialize Functions:

Functions

IFX_EXTERN void IfxCcu6_Icu_initChannel (IfxCcu6_Icu_Channel *channel, const IfxCcu6_Icu_ChannelConfig *channelConfig)
 Initialises the channel. More...
 
IFX_EXTERN void IfxCcu6_Icu_initChannelConfig (IfxCcu6_Icu_ChannelConfig *channelConfig, Ifx_CCU6 *ccu6)
 Fills the channel config structure with default values. More...
 

Detailed Description

Function Documentation

IFX_EXTERN void IfxCcu6_Icu_initChannel ( IfxCcu6_Icu_Channel channel,
const IfxCcu6_Icu_ChannelConfig channelConfig 
)

Initialises the channel.

Parameters
channelChannel handle
channelConfigConfiguration structure of the channel
Returns
None
//---- when using inconjunction with Timer driver ----//
// after initialising the timer
IfxCcu6_TimerConfig timerConfig;
IfxCcu6_Timer_initModule(&timer, &timerConfig); // e.g. Timer 12 is specified previously in timerConfig.
//----------------------------------------------------//
// create Icu channel config
IfxCcu6_Icu_channelConfig icuChannelConfig;
IfxCcu6_Icu_initChannelConfig(&icuChannelConfig, &MODULE_CCU60);
//---- when using inconjunction with Timer driver ----//
icuChannelConfig.timer = (Timer*)&timer;
//----------------------------------------------------//
// configure the channel
icuChannelConfig.channelNumber = IfxCcu6_T12Channel_0;
// configure the interrupts
icuChannelConfig.interrupt.interruptSource = IfxCcu6_InterruptSource_cc60RisingEdge;
icuChannelConfig.interrupt.serviceRequest = IfxCcu6_ServiceRequest_sR2;
icuChannelConfig.interrupt.priority = IFX_INTRPRIO_CCU6;
icuChannelConfig.interrupt.ypeOfService = IfxSrc_Tos_cpu0;
//---- when not using inconjunction with Timer driver ----//
// configure input and output triggers
icuChannelConfig.trigger.extInputTrigger = IfxCcu60_T12HRB_P00_7_IN;
icuChannelConfig.trigger.extInputTriggerMode = IfxCcu6_ExternalTriggerMode_risingEdge;
//--------------------------------------------------------//
// pin configuration, in case of multi input capture mode select the respective CC6xIn and CCPOSxIn pins of the selected channel
const IfxCcu6_Icu_Pins pins = {
NULL, // CC61In pin not used
NULL, // CC62In pin not used
NULL, // CCPOS0In pin not used
NULL, // CCPOS1In pin not used
NULL, // CCPOS2In pin not used
IfxPort_InputMode_pullUp
};
IcuConfig.pins = &pins;
// configure multi input capture mode
icuChannelConfig->multiInputCaptureEnabled = FALSE;
// initialize the channel
IfxCcu6_Icu_initChannel(&icuChannel, &icuChannelConfig);

Definition at line 46 of file IfxCcu6_Icu.c.

IFX_EXTERN void IfxCcu6_Icu_initChannelConfig ( IfxCcu6_Icu_ChannelConfig channelConfig,
Ifx_CCU6 *  ccu6 
)

Fills the channel config structure with default values.

Parameters
channelConfigConfiguration structure of the channel
ccu6Pointer to the base of CCU6 registers
Returns
None

A coding example can be found in IfxCcu6_Icu_initChannel

Definition at line 143 of file IfxCcu6_Icu.c.