iLLD_TC27xD  1.0
Board support package
Collaboration diagram for Board support package:

Files

file  Bsp.c
 Board support package.
 
file  Bsp.h
 Board support package.
 

Interrupt APIs

IFX_INLINE boolean areInterruptsEnabled (void)
 Return the status of the global interrupts. More...
 
IFX_INLINE boolean disableInterrupts (void)
 Disable the global interrupts. More...
 
IFX_INLINE void enableInterrupts (void)
 enable the global interrupts More...
 
IFX_INLINE void restoreInterrupts (boolean enabled)
 Restore the state of the global interrupts. More...
 
IFX_INLINE void forceDisableInterrupts (void)
 Disable the global interrupts forcefully. More...
 

Time APIs

typedef void(* WaitTimeFunction )(Ifx_TickTime timeout)
 
IFX_INLINE Ifx_TickTime addTTime (Ifx_TickTime a, Ifx_TickTime b)
 Add 2 Ifx_TickTime values and return the result. More...
 
IFX_INLINE Ifx_TickTime elapsed (Ifx_TickTime since)
 Return the elapsed time in ticks. More...
 
IFX_INLINE Ifx_TickTime getDeadLine (Ifx_TickTime timeout)
 Return the time dead line. More...
 
IFX_INLINE Ifx_TickTime getTimeout (Ifx_TickTime deadline)
 Return the time until the dead line. More...
 
IFX_EXTERN void initTime (void)
 Initialize the time constants. More...
 
IFX_INLINE boolean isDeadLine (Ifx_TickTime deadLine)
 Return TRUE if the dead line is over. More...
 
IFX_INLINE Ifx_TickTime now (void)
 Return system timer value (critical section). More...
 
IFX_INLINE Ifx_TickTime nowWithoutCriticalSection (void)
 Return system timer value (without critical section). More...
 
IFX_INLINE boolean poll (volatile boolean *test, Ifx_TickTime timeout)
 Poll a variable for a time. More...
 
IFX_INLINE Ifx_TickTime timingNoInterruptEnd (Ifx_TickTime since, boolean interruptEnabled)
 Return the elapsed time in system timer ticks, and enable the interrupts. More...
 
IFX_INLINE Ifx_TickTime timingNoInterruptStart (boolean *interruptEnabled)
 Disable the interrupt and return system timer value. More...
 
IFX_INLINE void wait (Ifx_TickTime timeout)
 Wait for a while. More...
 
IFX_EXTERN void waitPoll (void)
 Wait function. More...
 
IFX_EXTERN void waitTime (Ifx_TickTime timeout)
 Wait time function. More...
 
#define TimeConst_0s   ((Ifx_TickTime)0)
 time constant equal to 1s More...
 
#define TimeConst_10ns   (TimeConst[TIMER_INDEX_10NS])
 time constant equal to 10ns More...
 
#define TimeConst_100ns   (TimeConst[TIMER_INDEX_100NS])
 time constant equal to 100ns More...
 
#define TimeConst_1us   (TimeConst[TIMER_INDEX_1US])
 time constant equal to 1us More...
 
#define TimeConst_10us   (TimeConst[TIMER_INDEX_10US])
 time constant equal to 10us More...
 
#define TimeConst_100us   (TimeConst[TIMER_INDEX_100US])
 time constant equal to 100us More...
 
#define TimeConst_1ms   (TimeConst[TIMER_INDEX_1MS])
 time constant equal to 1ms More...
 
#define TimeConst_10ms   (TimeConst[TIMER_INDEX_10MS])
 time constant equal to 10ms More...
 
#define TimeConst_100ms   (TimeConst[TIMER_INDEX_100MS])
 time constant equal to 100ms More...
 
#define TimeConst_1s   (TimeConst[TIMER_INDEX_1S])
 time constant equal to 1s More...
 
#define TimeConst_10s   (TimeConst[TIMER_INDEX_10S])
 time constant equal to 10s More...
 
#define TimeConst_100s   (TimeConst[TIMER_INDEX_100S])
 time constant equal to 100s More...
 

Detailed Description

This module implements the board support package

Macro Definition Documentation

#define TimeConst_0s   ((Ifx_TickTime)0)

time constant equal to 1s

Definition at line 175 of file Bsp.h.

#define TimeConst_100ms   (TimeConst[TIMER_INDEX_100MS])

time constant equal to 100ms

Definition at line 183 of file Bsp.h.

#define TimeConst_100ns   (TimeConst[TIMER_INDEX_100NS])

time constant equal to 100ns

Definition at line 177 of file Bsp.h.

#define TimeConst_100s   (TimeConst[TIMER_INDEX_100S])

time constant equal to 100s

Definition at line 186 of file Bsp.h.

#define TimeConst_100us   (TimeConst[TIMER_INDEX_100US])

time constant equal to 100us

Definition at line 180 of file Bsp.h.

#define TimeConst_10ms   (TimeConst[TIMER_INDEX_10MS])

time constant equal to 10ms

Definition at line 182 of file Bsp.h.

#define TimeConst_10ns   (TimeConst[TIMER_INDEX_10NS])

time constant equal to 10ns

Definition at line 176 of file Bsp.h.

#define TimeConst_10s   (TimeConst[TIMER_INDEX_10S])

time constant equal to 10s

Definition at line 185 of file Bsp.h.

#define TimeConst_10us   (TimeConst[TIMER_INDEX_10US])

time constant equal to 10us

Definition at line 179 of file Bsp.h.

#define TimeConst_1ms   (TimeConst[TIMER_INDEX_1MS])

time constant equal to 1ms

Definition at line 181 of file Bsp.h.

#define TimeConst_1s   (TimeConst[TIMER_INDEX_1S])

time constant equal to 1s

Definition at line 184 of file Bsp.h.

Referenced by DateTime_get(), and DateTime_set().

#define TimeConst_1us   (TimeConst[TIMER_INDEX_1US])

time constant equal to 1us

Definition at line 178 of file Bsp.h.

Typedef Documentation

typedef void(* WaitTimeFunction)(Ifx_TickTime timeout)

Prototype for wait() functions

Definition at line 173 of file Bsp.h.

Function Documentation

Add 2 Ifx_TickTime values and return the result.

Parameters
aparameter a
bparameter b
Returns
a + b. If either a or b is TIME_INFINITE, the result is TIME_INFINITE

Definition at line 237 of file Bsp.h.

IFX_INLINE boolean areInterruptsEnabled ( void  )

Return the status of the global interrupts.

Return values
TRUEif the global interrupts are enabled.
FALSEif the global interrupts are disabled.
See Also
restoreInterrupts(), disableInterrupts()

Definition at line 75 of file Bsp.h.

IFX_INLINE boolean disableInterrupts ( void  )

Disable the global interrupts.

Return values
TRUEif the global interrupts were enabled before the call to the function.
FALSEif the global interrupts are disabled before the call to the function.
See Also
areInterruptsEnabled(), restoreInterrupts()

Definition at line 88 of file Bsp.h.

Referenced by now(), and timingNoInterruptStart().

IFX_INLINE Ifx_TickTime elapsed ( Ifx_TickTime  since)

Return the elapsed time in ticks.

Return the elapsed time between the current time and the time passed as parameter

Returns
Returns the elapsed time.

Definition at line 260 of file Bsp.h.

IFX_INLINE void enableInterrupts ( void  )

enable the global interrupts

Definition at line 108 of file Bsp.h.

IFX_INLINE void forceDisableInterrupts ( void  )

Disable the global interrupts forcefully.

See Also
areInterruptsEnabled(), restoreInterrupts()

Definition at line 99 of file Bsp.h.

IFX_INLINE Ifx_TickTime getDeadLine ( Ifx_TickTime  timeout)

Return the time dead line.

Parameters
timeoutSpecifies the dead line from now: Deadline = Now + Timeout
Returns
Return the time dead line.

Definition at line 272 of file Bsp.h.

Referenced by Ifx_Fifo_canReadCount(), Ifx_Fifo_canWriteCount(), Ifx_Fifo_read(), Ifx_Fifo_write(), IfxAsclin_Asc_flushTx(), poll(), and wait().

IFX_INLINE Ifx_TickTime getTimeout ( Ifx_TickTime  deadline)

Return the time until the dead line.

Parameters
deadlineSpecifies the dead line from now: Deadline = Now + Timeout
Returns
Return the time until the dead line.

Definition at line 295 of file Bsp.h.

IFX_EXTERN void initTime ( void  )

Initialize the time constants.

Initialize the time constants TimeConst_0s, TimeConst_100ns, TimeConst_1us, TimeConst_10us, TimeConst_100us, TimeConst_1ms, TimeConst_10ms, TimeConst_100ms, TimeConst_1s, TimeConst_10s

Returns
None.

Definition at line 37 of file Bsp.c.

IFX_INLINE boolean isDeadLine ( Ifx_TickTime  deadLine)

Return TRUE if the dead line is over.

Parameters
deadLineSpecifies the dead line.
Return values
TRUEReturns TRUE if the dead line is over
FALSEReturns FALSE if the dead line is not yet over

Definition at line 319 of file Bsp.h.

Referenced by Ifx_Fifo_canReadCount(), Ifx_Fifo_canWriteCount(), Ifx_Fifo_read(), Ifx_Fifo_write(), IfxAsclin_Asc_flushTx(), poll(), and wait().

IFX_INLINE Ifx_TickTime now ( void  )

Return system timer value (critical section).

The function IfxStm_get() is called in a critical section, disabling the interrupts. The system timer value is limited to TIME_INFINITE.

Returns
Returns system timer value.

Definition at line 201 of file Bsp.h.

Referenced by DateTime_get(), DateTime_set(), elapsed(), getDeadLine(), getTimeout(), IfxAsclin_Asc_isrReceive(), IfxAsclin_Asc_isrTransmit(), IfxStm_getOffsetTimer(), and isDeadLine().

IFX_INLINE Ifx_TickTime nowWithoutCriticalSection ( void  )

Return system timer value (without critical section).

The function IfxStm_get() is called. The system timer value is limited to TIME_INFINITE.

Returns
Returns system timer value.

Definition at line 220 of file Bsp.h.

Referenced by timingNoInterruptEnd(), and timingNoInterruptStart().

IFX_INLINE boolean poll ( volatile boolean test,
Ifx_TickTime  timeout 
)

Poll a variable for a time.

Parameters
testSpecifies the variable to test.
timeoutSpecifies the maximal time the variable will be tested
Return values
TRUEReturns TRUE if the variable gets TRUE before the timeout elapse
FALSEReturns FALSE if the variable is FALSE as the timeout elapse

Definition at line 344 of file Bsp.h.

IFX_INLINE void restoreInterrupts ( boolean  enabled)

Restore the state of the global interrupts.

Parameters
enabledif TRUE, re-enable the global interrupts, else do nothing.
Returns
None.
See Also
areInterruptsEnabled(), disableInterrupts()

Definition at line 122 of file Bsp.h.

Referenced by now(), and timingNoInterruptEnd().

IFX_INLINE Ifx_TickTime timingNoInterruptEnd ( Ifx_TickTime  since,
boolean  interruptEnabled 
)

Return the elapsed time in system timer ticks, and enable the interrupts.

The interrupts are enable by the function

Parameters
sincetime returned by timingNoInterruptStart()
interruptEnabledIf TRUE, the interrupts will be enabled before the function exit. This parameter should be set to the value returned by timingNoInterruptStart()
Returns
Returns the elapsed time.
See Also
timingNoInterruptStart()

Definition at line 366 of file Bsp.h.

IFX_INLINE Ifx_TickTime timingNoInterruptStart ( boolean interruptEnabled)

Disable the interrupt and return system timer value.

The interrupt remains disabled after the function call

Returns
Returns system timer value.
See Also
timingNoInterruptEnd()

Definition at line 385 of file Bsp.h.

IFX_INLINE void wait ( Ifx_TickTime  timeout)

Wait for a while.

Parameters
timeoutSpecifies the waiting time
Returns
None.

Definition at line 399 of file Bsp.h.

Referenced by waitTime().

IFX_EXTERN void waitPoll ( void  )

Wait function.

This is an empty function that just spend some time waiting.

Returns
None.

Definition at line 61 of file Bsp.c.

IFX_EXTERN void waitTime ( Ifx_TickTime  timeout)

Wait time function.

This is an empty function that that returns after the timeout elapsed. The minimal time spend in the function is guaranteed, but not the max time.

Parameters
timeoutSpecifies the time the function waits for before returning
Returns
None.

Definition at line 73 of file Bsp.c.