iLLD_TC27xD
1.0
|
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... | |
This module implements the board support package
#define TimeConst_0s ((Ifx_TickTime)0) |
#define TimeConst_100ms (TimeConst[TIMER_INDEX_100MS]) |
#define TimeConst_100ns (TimeConst[TIMER_INDEX_100NS]) |
#define TimeConst_100s (TimeConst[TIMER_INDEX_100S]) |
#define TimeConst_100us (TimeConst[TIMER_INDEX_100US]) |
#define TimeConst_10ms (TimeConst[TIMER_INDEX_10MS]) |
#define TimeConst_10ns (TimeConst[TIMER_INDEX_10NS]) |
#define TimeConst_10s (TimeConst[TIMER_INDEX_10S]) |
#define TimeConst_10us (TimeConst[TIMER_INDEX_10US]) |
#define TimeConst_1ms (TimeConst[TIMER_INDEX_1MS]) |
#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]) |
typedef void(* WaitTimeFunction)(Ifx_TickTime timeout) |
IFX_INLINE Ifx_TickTime addTTime | ( | Ifx_TickTime | a, |
Ifx_TickTime | b | ||
) |
IFX_INLINE boolean areInterruptsEnabled | ( | void | ) |
Return the status of the global interrupts.
TRUE | if the global interrupts are enabled. |
FALSE | if the global interrupts are disabled. |
IFX_INLINE boolean disableInterrupts | ( | void | ) |
Disable the global interrupts.
TRUE | if the global interrupts were enabled before the call to the function. |
FALSE | if the global interrupts are disabled before the call to the function. |
Definition at line 88 of file Bsp.h.
Referenced by now(), and timingNoInterruptStart().
IFX_INLINE Ifx_TickTime elapsed | ( | Ifx_TickTime | since) |
IFX_INLINE void enableInterrupts | ( | void | ) |
IFX_INLINE void forceDisableInterrupts | ( | void | ) |
Disable the global interrupts forcefully.
IFX_INLINE Ifx_TickTime getDeadLine | ( | Ifx_TickTime | timeout) |
Return the time dead line.
timeout | Specifies the dead line from now: Deadline = Now + Timeout |
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) |
IFX_EXTERN void initTime | ( | void | ) |
IFX_INLINE boolean isDeadLine | ( | Ifx_TickTime | deadLine) |
Return TRUE if the dead line is over.
deadLine | Specifies the dead line. |
TRUE | Returns TRUE if the dead line is over |
FALSE | Returns 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.
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.
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.
test | Specifies the variable to test. |
timeout | Specifies the maximal time the variable will be tested |
TRUE | Returns TRUE if the variable gets TRUE before the timeout elapse |
FALSE | Returns FALSE if the variable is FALSE as the timeout elapse |
IFX_INLINE void restoreInterrupts | ( | boolean | enabled) |
Restore the state of the global interrupts.
enabled | if TRUE, re-enable the global interrupts, else do nothing. |
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
since | time returned by timingNoInterruptStart() |
interruptEnabled | If TRUE, the interrupts will be enabled before the function exit. This parameter should be set to the value returned by timingNoInterruptStart() |
IFX_INLINE Ifx_TickTime timingNoInterruptStart | ( | boolean * | interruptEnabled) |
Disable the interrupt and return system timer value.
The interrupt remains disabled after the function call
IFX_INLINE void wait | ( | Ifx_TickTime | timeout) |
Wait for a while.
timeout | Specifies the waiting time |
Definition at line 399 of file Bsp.h.
Referenced by waitTime().
IFX_EXTERN void waitPoll | ( | void | ) |
IFX_EXTERN void waitTime | ( | Ifx_TickTime | timeout) |