iLLD_TC27xC  1.0
Channel Functions
Collaboration diagram for Channel Functions:

Functions

IFX_INLINE void IfxPsi5s_Psi5s_enableAscReceiver (IfxPsi5s_Psi5s *psi5s)
 Enable ASC interface receiver. More...
 
IFX_INLINE void IfxPsi5s_Psi5s_enableDisableChannelTriggerCounters (IfxPsi5s_Psi5s *psi5s, uint32 channels, uint32 mask)
 Access function to enable/disable any combination of channel trigger counters selected by mask parameter. More...
 
IFX_INLINE void IfxPsi5s_Psi5s_enableDisableChannels (IfxPsi5s_Psi5s *psi5s, uint32 channels, uint32 mask)
 Access function to enable/disable any combination of channels selected by mask parameter. More...
 
IFX_INLINE void IfxPsi5s_Psi5s_startAscTransactions (IfxPsi5s_Psi5s *psi5s)
 Start ASC transactions. More...
 
IFX_EXTERN boolean IfxPsi5s_Psi5s_initChannel (IfxPsi5s_Psi5s_Channel *channel, const IfxPsi5s_Psi5s_ChannelConfig *config)
 Initialize the channel with the supplied configuration. More...
 
IFX_EXTERN void IfxPsi5s_Psi5s_initChannelConfig (IfxPsi5s_Psi5s_ChannelConfig *config, IfxPsi5s_Psi5s *psi5s)
 Initialise buffer with default channel configuration. More...
 
IFX_EXTERN boolean IfxPsi5s_Psi5s_readFrame (IfxPsi5s_Psi5s_Channel *channel, IfxPsi5s_Psi5s_Frame *frame)
 Get the received psi5s frame for the channel. More...
 
IFX_EXTERN boolean IfxPsi5s_Psi5s_sendChannelData (IfxPsi5s_Psi5s_Channel *channel, uint32 data)
 Transmit the data through the channel. More...
 

Detailed Description

Function Documentation

IFX_INLINE void IfxPsi5s_Psi5s_enableAscReceiver ( IfxPsi5s_Psi5s psi5s)

Enable ASC interface receiver.

Parameters
psi5spointer to the PSI5S module
Returns
None

Usage Example: IfxPsi5s_Psi5s_readFrame

Definition at line 608 of file IfxPsi5s_Psi5s.h.

IFX_INLINE void IfxPsi5s_Psi5s_enableDisableChannels ( IfxPsi5s_Psi5s psi5s,
uint32  channels,
uint32  mask 
)

Access function to enable/disable any combination of channels selected by mask parameter.

Parameters
psi5spointer to the PSI5S module
channelsspecifies the channels which should be enabled/disabled
maskspecifies the channels which should be modified
Returns
None

Usage Example: IfxPsi5s_Psi5s_sendChannelData

Definition at line 620 of file IfxPsi5s_Psi5s.h.

IFX_INLINE void IfxPsi5s_Psi5s_enableDisableChannelTriggerCounters ( IfxPsi5s_Psi5s psi5s,
uint32  channels,
uint32  mask 
)

Access function to enable/disable any combination of channel trigger counters selected by mask parameter.

Parameters
psi5spointer to the PSI5S module
channelsspecifies the channel trigger counters which should be enabled/disabled
maskspecifies the channel trigger counters which should be modified
Returns
None

Usage Example: IfxPsi5s_Psi5s_sendChannelData

Definition at line 614 of file IfxPsi5s_Psi5s.h.

IFX_EXTERN boolean IfxPsi5s_Psi5s_initChannel ( IfxPsi5s_Psi5s_Channel channel,
const IfxPsi5s_Psi5s_ChannelConfig config 
)

Initialize the channel with the supplied configuration.

Parameters
channelpointer to the PSI5S channel
configpointer to the PSI5S channel configuration
Returns
TRUE on success & FALSE if configuration not valid (e.g. missing resource)

Usage Example: IfxPsi5s_Psi5s_sendChannelData

Definition at line 117 of file IfxPsi5s_Psi5s.c.

IFX_EXTERN void IfxPsi5s_Psi5s_initChannelConfig ( IfxPsi5s_Psi5s_ChannelConfig config,
IfxPsi5s_Psi5s psi5s 
)

Initialise buffer with default channel configuration.

Parameters
configpointer to the PSI5S channel configuration
psi5spointer to the PSI5S module
Returns
None

Usage Example: IfxPsi5s_Psi5s_sendChannelData

Definition at line 202 of file IfxPsi5s_Psi5s.c.

IFX_EXTERN boolean IfxPsi5s_Psi5s_readFrame ( IfxPsi5s_Psi5s_Channel channel,
IfxPsi5s_Psi5s_Frame frame 
)

Get the received psi5s frame for the channel.

Parameters
channelpointer to the PSI5S module
framepointer to the PSI5S frame buffer
Returns
TRUE if successful; FALSE if no frame available
// initialize module pointer
psi5s.psi5s = &MODULE_PSI5S;
// create module config
IfxPsi5s_Psi5s_Config psi5sModuleConfig;
IfxPsi5s_Psi5s_initModuleConfig(&psi5sModuleConfig, &psi5s);
// create channel config
IfxPsi5s_Psi5s_ChannelConfig psi5sChannelConfig;
IfxPsi5s_Psi5s_initChannelConfig(&psi5sChannelConfig, &psi5s);
// change payloadlength (default is 0, i.e., no frame expecte; change to 8)
for(int slot=0; slot<6; ++slot)
{
psi5sChannelConfig.receiveControl.payloadLength[slot] = 8;
}
// change channel (default is channel 0, change to channel 4)
psi5sChannelConfig.channelId = IfxPsi5s_ChannelId_4;
// initialize the channel
IfxPsi5s_Psi5s_initChannel(&psi5sChannel, &psi5sChannelConfig);
uint32 channels = (1 << IfxPsi5s_ChannelId_4); // enable channel 4
uint32 mask = (1 << IfxPsi5s_ChannelId_4); // modify the selection for channel 4
// enable the channel
IfxPsi5s_Psi5s_enableDisableChannels(&psi5s, channels, mask);
// enable ASC receiver
// start ASC interface
// add the code below to initiate the sensor to transmit frames
// end of code to initiate the sensor to transmit frames
// uncomment the below code after the adding the code to initiate the sensor to transmit frames
// IfxPsi5s_Psi5s_Frame frame;
// frame.status.rds = 0;
// frame.data.rdr = 0;
// frame.timestamp.tsm = 0;
if(IfxPsi5s_Psi5s_readFrame(&psi5sChannel, &frame))
// {
// printf("RDS %x", frame.status.rds);
// printf("RDR` %x", frame.data.rdr);
// printf("TSM %x", frame.timestamp.tsm);
// }

Definition at line 518 of file IfxPsi5s_Psi5s.c.

IFX_EXTERN boolean IfxPsi5s_Psi5s_sendChannelData ( IfxPsi5s_Psi5s_Channel channel,
uint32  data 
)

Transmit the data through the channel.

Parameters
channelpointer to the PSI5S channel
datadata to be sent
Returns
TRUE if Sends data otherwise FALSE
// initialize module pointer
psi5s.psi5s = &MODULE_PSI5S;
// create module config
IfxPsi5s_Psi5s_Config psi5sModuleConfig;
IfxPsi5s_Psi5s_initModuleConfig(&psi5sModuleConfig, &psi5s);
// create channel config
IfxPsi5s_Psi5s_ChannelConfig psi5sChannelConfig;
IfxPsi5s_Psi5s_initChannelConfig(&psi5sChannelConfig, &psi5s);
// change channel (default is channel 0, change to channel 4)
psi5sChannelConfig.channelId = IfxPsi5s_ChannelId_4;
// initialize the channel
IfxPsi5s_Psi5s_initChannel(&psi5sChannel, &psi5sChannelConfig);
uint32 channels = (1 << IfxPsi5s_ChannelId_4); // enable channel 4
uint32 mask = (1 << IfxPsi5s_ChannelId_4); // modify the selection for channel 4
// enable the channel trigger counter
// enable the channel
IfxPsi5s_Psi5s_enableDisableChannels(&psi5s, channels, mask);
// start ASC interface
uint32 data = 0x5;
// send data
if(IfxPsi5s_Psi5s_sendChannelData(&psi5sChannel, data))
{
// wait till data transfer is completed
while(psi5s.psi5s->INTSTAT[IfxPsi5s_ChannelId_4].B.TPI == 0);
}

Definition at line 554 of file IfxPsi5s_Psi5s.c.

IFX_INLINE void IfxPsi5s_Psi5s_startAscTransactions ( IfxPsi5s_Psi5s psi5s)

Start ASC transactions.

Parameters
psi5spointer to the PSI5S module
Returns
None

Usage Example: IfxPsi5s_Psi5s_sendChannelData

Definition at line 626 of file IfxPsi5s_Psi5s.h.