#include <include/mxf_embedded.h>
#define USER_COMMAND_ID_START_TIMER 0
#define USER_COMMAND_ID_STOP_TIMER 1
#define USER_TIMER_PERIOD 100000
uint32 timerRunning=FALSE;
uint32 timerEvtCnt=0;
extern void
{
uint32 rc;
switch(command)
{
case USER_COMMAND_ID_START_TIMER:
if (buffer && bufferSize > 2)
{
memset(&TxQueueInfo, 0, sizeof(TxQueueInfo));
TxQueueInfo.
options = MXF_EMBEDDED_TXAPERIODIC_FLAG_DEFAULT;
TxQueueInfo.
buffer = &datarec429;
if (!rc)
{
printf("Timer: %s rc=0x%08lx\n", rc==MAXT_SUCCESS ? "Success:" : " Error:", rc);
timerRunning=TRUE;
}
}
else
printf("\nA429 Parameters missing !\n");
break;
case USER_COMMAND_ID_STOP_TIMER:
break;
default:
break;
}
}
extern void
{
}
extern void
{
}
extern void
{
}
extern void
{
uint32 rc;
printf("RX Timer Event(%ld, %ld)\n", timerRunning, timerEvtCnt);
if (timerRunning)
{
datarec429.
data = (timerEvtCnt++ << 10) | 7;
printf("A429 Write: %s rc=0x%08lx\n", rc==MAXT_SUCCESS ? "Success:" : " Error:", rc);
}
timerEvtCnt++;
}