iLLD_TC29x  1.0
Standard interface: Data Pipe
Collaboration diagram for Standard interface: Data Pipe:

Functions

IFX_INLINE boolean IfxStdIf_DPipe_write (IfxStdIf_DPipe *stdif, void *data, Ifx_SizeT *count, Ifx_TickTime timeout)
 Write binary data into the IfxStdIf_DPipe. More...
 
IFX_INLINE boolean IfxStdIf_DPipe_read (IfxStdIf_DPipe *stdif, void *data, Ifx_SizeT *count, Ifx_TickTime timeout)
 Read data from the IfxStdIf_DPipe object. More...
 
IFX_INLINE sint32 IfxStdIf_DPipe_getReadCount (IfxStdIf_DPipe *stdif)
 Returns the number of bytes in the rx buffer. More...
 
IFX_INLINE sint32 IfxStdIf_DPipe_getWriteCount (IfxStdIf_DPipe *stdif)
 Returns the number of free bytes (free space) in the tx buffer. More...
 
IFX_INLINE boolean IfxStdIf_DPipe_canReadCount (IfxStdIf_DPipe *stdif, Ifx_SizeT count, Ifx_TickTime timeout)
 Indicates if the required number of bytes are available for read in the buffer. More...
 
IFX_INLINE boolean IfxStdIf_DPipe_canWriteCount (IfxStdIf_DPipe *stdif, Ifx_SizeT count, Ifx_TickTime timeout)
 Indicates if there is enough free space to write the data in the buffer. More...
 
IFX_INLINE IfxStdIf_DPipe_ReadEvent IfxStdIf_DPipe_getReadEvent (IfxStdIf_DPipe *stdif)
 Returns read event object. More...
 
IFX_INLINE
IfxStdIf_DPipe_WriteEvent 
IfxStdIf_DPipe_getWriteEvent (IfxStdIf_DPipe *stdif)
 Returns write event object. More...
 
IFX_INLINE boolean IfxStdIf_DPipe_flushTx (IfxStdIf_DPipe *stdif, Ifx_TickTime timeout)
 Flush the transmit buffer by transmitting all data. More...
 
IFX_INLINE void IfxStdIf_DPipe_clearTx (IfxStdIf_DPipe *stdif)
 Clears the TX buffer by removing all data. More...
 
IFX_INLINE void IfxStdIf_DPipe_clearRx (IfxStdIf_DPipe *stdif)
 Clears the RX buffer by removing all data. More...
 
IFX_INLINE void IfxStdIf_DPipe_onReceive (IfxStdIf_DPipe *stdif)
 handler called on reveive event More...
 
IFX_INLINE void IfxStdIf_DPipe_onTransmit (IfxStdIf_DPipe *stdif)
 handler called on transmit event More...
 
IFX_INLINE void IfxStdIf_DPipe_onError (IfxStdIf_DPipe *stdif)
 handler called on error event More...
 
IFX_INLINE uint32 IfxStdIf_DPipe_getSendCount (IfxStdIf_DPipe *stdif)
 Returns number of bytes send. More...
 
IFX_INLINE Ifx_TickTime IfxStdIf_DPipe_getTxTimeStamp (IfxStdIf_DPipe *stdif)
 Returns the time stamp of the last transmit data. More...
 
IFX_INLINE void IfxStdIf_DPipe_resetSendCount (IfxStdIf_DPipe *stdif)
 Reset the sendCount counter. More...
 
IFX_EXTERN void IfxStdIf_DPipe_print (IfxStdIf_DPipe *stdif, pchar format,...)
 

Detailed Description

The standard interafce data pipe (DPipe) abstract the hardware used for data transfer. It provide, after proper initialization an hardware independant way to write and read data to/from as communciation channel.

Porting StandardIo to DPipe
replace all
  • StandardIo type with IfxStdIf_DPipe
  • StandardIo_print with IfxStdIf_DPipe_print delete StandardIo.c and StandardIo.h Include "StdIf/IfxStdIf_DPipe.h" instead of "SysSe/Bsp/StandardIo.h"

The following files are already ported: Ifx_Console, Ifx_Shell

Function Documentation

IFX_INLINE boolean IfxStdIf_DPipe_canReadCount ( IfxStdIf_DPipe stdif,
Ifx_SizeT  count,
Ifx_TickTime  timeout 
)

Indicates if the required number of bytes are available for read in the buffer.

Parameters
driverPointer to the interface driver object
countPointer to the count of data (in bytes).
timeoutin system timer ticks
Returns
Returns TRUE if at least count bytes are available for read in the rx buffer, if not the Event is armed to be set when the buffer count is bigger or equal to the requested count

Definition at line 274 of file IfxStdIf_DPipe.h.

IFX_INLINE boolean IfxStdIf_DPipe_canWriteCount ( IfxStdIf_DPipe stdif,
Ifx_SizeT  count,
Ifx_TickTime  timeout 
)

Indicates if there is enough free space to write the data in the buffer.

Parameters
driverPointer to the interface driver object
countPointer to the count of data (in bytes).
timeoutin system timer ticks
Returns
Returns TRUE if at least count bytes can be written to the tx buffer, if not the Event is armed to be set when the buffer free count is bigger or equal to the requested count

Definition at line 282 of file IfxStdIf_DPipe.h.

IFX_INLINE void IfxStdIf_DPipe_clearRx ( IfxStdIf_DPipe stdif)

Clears the RX buffer by removing all data.

Parameters
driverPointer to the interface driver object
Returns
void

Definition at line 322 of file IfxStdIf_DPipe.h.

Referenced by Ifx_Shell_enable().

IFX_INLINE void IfxStdIf_DPipe_clearTx ( IfxStdIf_DPipe stdif)

Clears the TX buffer by removing all data.

Parameters
driverPointer to the interface driver object
Returns
void

Definition at line 314 of file IfxStdIf_DPipe.h.

IFX_INLINE boolean IfxStdIf_DPipe_flushTx ( IfxStdIf_DPipe stdif,
Ifx_TickTime  timeout 
)

Flush the transmit buffer by transmitting all data.

Parameters
driverPointer to the interface driver object
timeouttimeout for the flush operation
Returns
Returns TRUE if the FIFO is empty

Definition at line 306 of file IfxStdIf_DPipe.h.

IFX_INLINE sint32 IfxStdIf_DPipe_getReadCount ( IfxStdIf_DPipe stdif)

Returns the number of bytes in the rx buffer.

Parameters
driverPointer to the interface driver object
Returns
Returns the number of bytes in the rx buffer

Definition at line 258 of file IfxStdIf_DPipe.h.

IFX_INLINE IfxStdIf_DPipe_ReadEvent IfxStdIf_DPipe_getReadEvent ( IfxStdIf_DPipe stdif)

Returns read event object.

Parameters
driverPointer to the interface driver object
Returns
Returns read event object

Definition at line 290 of file IfxStdIf_DPipe.h.

IFX_INLINE uint32 IfxStdIf_DPipe_getSendCount ( IfxStdIf_DPipe stdif)

Returns number of bytes send.

Parameters
driverPointer to the interface driver object
Returns
Returns number of bytes send

Definition at line 354 of file IfxStdIf_DPipe.h.

IFX_INLINE Ifx_TickTime IfxStdIf_DPipe_getTxTimeStamp ( IfxStdIf_DPipe stdif)

Returns the time stamp of the last transmit data.

Parameters
driverPointer to the interface driver object
Returns
Returns the time stamp of the last transmit data

Definition at line 362 of file IfxStdIf_DPipe.h.

IFX_INLINE sint32 IfxStdIf_DPipe_getWriteCount ( IfxStdIf_DPipe stdif)

Returns the number of free bytes (free space) in the tx buffer.

Parameters
driverPointer to the interface driver object
Returns
Returns the number of free bytes in the tx buffer

Definition at line 266 of file IfxStdIf_DPipe.h.

IFX_INLINE IfxStdIf_DPipe_WriteEvent IfxStdIf_DPipe_getWriteEvent ( IfxStdIf_DPipe stdif)

Returns write event object.

Parameters
driverPointer to the interface driver object
Returns
Returns write event object

Definition at line 298 of file IfxStdIf_DPipe.h.

IFX_INLINE void IfxStdIf_DPipe_onError ( IfxStdIf_DPipe stdif)

handler called on error event

Parameters
driverPointer to the interface driver object
Returns
none

Definition at line 346 of file IfxStdIf_DPipe.h.

IFX_INLINE void IfxStdIf_DPipe_onReceive ( IfxStdIf_DPipe stdif)

handler called on reveive event

Parameters
driverPointer to the interface driver object
Returns
none

Definition at line 330 of file IfxStdIf_DPipe.h.

IFX_INLINE void IfxStdIf_DPipe_onTransmit ( IfxStdIf_DPipe stdif)

handler called on transmit event

Parameters
driverPointer to the interface driver object
Returns
none

Definition at line 338 of file IfxStdIf_DPipe.h.

IFX_INLINE boolean IfxStdIf_DPipe_read ( IfxStdIf_DPipe stdif,
void *  data,
Ifx_SizeT count,
Ifx_TickTime  timeout 
)

Read data from the IfxStdIf_DPipe object.

Initially the parameter 'count' specifies count of data to read. After execution the data pointed by 'count' specifies the data actually read.

Parameters
driverPointer to the interface driver object
dataPointer to the start of data
countPointer to the count of data (in bytes).
timeoutin system timer ticks
Return values
TRUEReturns TRUE if all items could be read
FALSEReturns FALSE if not all the items could be read

Definition at line 250 of file IfxStdIf_DPipe.h.

Referenced by Ifx_Shell_process().

IFX_INLINE void IfxStdIf_DPipe_resetSendCount ( IfxStdIf_DPipe stdif)

Reset the sendCount counter.

Parameters
driverPointer to the interface driver object
Returns
none

Definition at line 370 of file IfxStdIf_DPipe.h.

IFX_INLINE boolean IfxStdIf_DPipe_write ( IfxStdIf_DPipe stdif,
void *  data,
Ifx_SizeT count,
Ifx_TickTime  timeout 
)

Write binary data into the IfxStdIf_DPipe.

Initially the parameter 'count' specifies count of data to write. After execution the data pointed by 'count' specifies the data actually written

Parameters
driverPointer to the interface driver object
dataPointer to the start of data
countPointer to the count of data (in bytes).
timeoutin system timer ticks
Return values
TRUEReturns TRUE if all items could be written
FALSEReturns FALSE if not all the items could be written

Definition at line 242 of file IfxStdIf_DPipe.h.

Referenced by Ifx_Console_print(), Ifx_Console_printAlign(), and IfxStdIf_DPipe_print().