/****************************************************************************************************/
//Test.c
#include <stdlib.h>
#include <stdio.h>
#include "Test.h"
#include <taskLib.h>
#include <msgQLib.h>
#include <semLib.h>
#define MAX_MESSAGE_COUNT 100
#define MAX_MESSAGE_LENGTH 400
int offset;
unsigned char SharedBuf[2*1024];
/*任务1 消息的发送*/
void loop1(MSG_Q_ID id)/*the function for task 1, like a thread under Windows or Unix*/
{
unsigned char msg[MAX_MESSAGE_LENGTH] = {1};
for( ; ;)
{
taskDelay(10);//快速发送消息,10ms,直至消息队列满
if (msgQSend(id, msg, MAX_MESSAGE_LENGTH, WAIT_FOREVER, MSG_PRI_NORMAL) == OK)
{
printf("longping1!! Send %d/n", msg[0]);
}
else
{
printf("Sending message ERRO