BOOTLOADER
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
testinfo.c
Go to the documentation of this file.
1 #include "includes.h"
2 
3 #define TestInfoIdleState 0
4 #define TestInfoRunState 1
5 
7 
8 INT8U TestInfoName[9]={'t','e','s','t','i','n','f','o',0};
9 //INT8U TestInfoName[]="testinfo";
10 void F_TestInfoInit(void);
14 void F_TestInfoSvc(void);
17 
19  TestInfoCtrl.pName=ApplicationName;
20  TestInfoCtrl.InUse=FALSE;
21  TestInfoCtrl.Id=ID_TESTINFO;
22  TestInfoCtrl.Status=0;
23  TestInfoCtrl.State=TestInfoIdleState;
24 }
26  if(TestInfoCtrl.InUse==TRUE) return TRUE;
27  else return FALSE
28 }
30  if(TestInfoCtrl.InUse==FALSE){
31  TestInfoCtrl.UserId=UserId;
32  TestInfoCtrl.InUse=TRUE;
33  return TRUE;
34  }
35  else return FALSE;
36 }
38  if((TestInfoCtrl.InUse==TRUE)&&(TestInfoCtrl.UserId==UserId)){
39  TestInfoCtrl.InUse=FALSE;
40  return TRUE;
41  }
42  else return FALSE;
43 }
44 void F_TestInfoSvc(void){
45  switch(TestInfoCtrl.State){
46  case TestInfoIdleState:
47  break;
48  case TestInfoRunState:
49  printf("\n This is testinfo \n");
50  TestInfoCtrl.State=TestInfoIdleState;
51  break;
52  }
53 
54 }
56  if((TestInfoCtrl.InUse==TRUE)&&(TestInfoCtrl.UserId==UserId)){
57  TestInfoCtrl.State=TestInfoRunState;
58  return TURE;
59  }
60  else return FALSE;
61 }
63  if(TestInfoCtrl.Staus==TestInfoIdleState) return TRUE;
64  else return FALSE;
65 }
66 
67