| Files |
Description |
| WSTTarget.h |
This file must define the following functions:
|
|
This function is called as first call in RiCOXFInit(), which is the first call generated by Rhapsody in WST_RXF_Main().
So this is the place to hook code into when your target is not already
initialized by your startup code, prior to calling main().
Its prototype is:
void WSTTarget_Init( void );
|
|
|
This function is not called by the RXF.
You must implement it and call it in your <Rhapsody component>__Cleanup() if you need it.
Its prototype is:
void WSTTarget_Cleanup( void );
|
- WSTTarget_enterCriticalRegion
|
This function is called by the RXF
on entering a critical
region.
Its prototype is:
void
WSTTarget_enterCriticalRegion( void );
In
some cases an interrupt mask must be stored. In that case, you must set
the constant WST_TARGET_SAVEISRMASK,
in which case the prototype of the function is:
isrmask_t
WSTRTOS_enterCriticalRegion( void );
For ARM, you can use the constant WST_TARGET_ARM_USE_SWI_FOR_CRITICAL_REGIONS if you want to use SWI handlers for this critical region function.
|
- WSTTarget_exitCriticalRegion
|
This function is called by the RXF
on exit of a critical
region.
Its prototype is:
void
WSTTarget_exitCriticalRegion( void );
In
some cases an interrupt mask must be restored. In that case, you must
set the constant WST_TARGET_SAVEISRMASK,
in which case the prototype of the function is:
void
WSTTarget_enterCriticalRegion( isrmask_t mask );
For ARM, you can use the constant
WST_TARGET_ARM_USE_SWI_FOR_CRITICAL_REGIONS if you want to use SWI
handlers for this critical region function.
|
|
| WSTTarget.c |
This file must implement the following functions:
|
|
See its description for WSTTarget.h.
|
|
|
Optional, see its description for WSTTarget.h. |
- WSTTarget_enterCriticalRegion
|
See its description for WSTTarget.h. |
- WSTTarget_exitCriticalRegion
|
See its description for WSTTarget.h. |
|
| WSTRTOS.h |
This file must define the following macro:
|
|
The number of ticks per milisecond.
|
This
file must define the following functions:
|
|
This function is called as second call in RiCOXFINit(), which is the first call generated by Rhapsody in WST_RXF_Main().
If you need to initialize a timer, you could also use RIC_MS_PER_TICK in here.
Its prototype is:
void WSTRTOS_Init( void );
|
|
|
This function is not called by the RXF.
You must implement it and call it in your <Rhapsody component>_Cleanup() if you need it.
Its prototype is:
void WSTRTOS_Cleanup( void );
|
- WSTRTOS_incrementRxfTicks
|
This
function is not called by the RXF.
You must implement it and call it as the heartbeat of your RXF,
typically from within an Interrupt Service Routine.
Its prototype is:
void
WSTRTOS_incrementRxfTicks( void );
|
|
|
This function is called by the RXF.
Its prototype is:
timeUnit WSTRTOS_getRxfTicks(
void );
|
|
|
This function is called by the RXF when no
events are found in an event queue (timeouts also result in a event).
Its prototype is:
void
WSTRTOS_sleep( timeUnit aTime );
|
|
| WSTRTOS.c |
This
file must implement the following functions:
|
|
See its description for WSTRTOS.h. |
|
|
See its description for WSTRTOS.h. |
- WSTRTOS_incrementRxfTicks
|
See its description for WSTRTOS.h.
If you provide the heartbeat via a ISR, it is good practice to name
this ISR WSTRTOS_timerInterrupt |
|
|
See its description for WSTRTOS.h. |
|
|
See its description for WSTRTOS.h. |
|