RenHao

for Highlight

Dec 14th, 2016
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.56 KB | None | 0 0
  1. /*
  2.  * mainProject.c
  3.  *
  4.  * Created: 2016/12/13 上午 09:18:58
  5.  * Author : Bryant
  6.  */
  7.  
  8. #include "Definitions.h"
  9.  
  10. int main(void)
  11. {
  12.     Initialization();
  13.    
  14.     while (1)
  15.     {
  16.         //wait for RXC flag
  17.         if(rxcount >= 8)
  18.         {
  19.             rxcount = 0;
  20.             if( (receiveSuccess = analyzePackage()) )
  21.             {
  22.                 //Execute command
  23.                 exeCommand(R_Pack->Command , R_Pack->Data);
  24.                 enableUDRI0();
  25.             }
  26.             else
  27.             {
  28.                 //Response
  29.                 //writeTpkg();
  30.                 enableUDRI0();
  31.             }
  32.             //clearGPIO();  //Be used if it only needs to open one port at a time
  33.         }
  34.        
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment