Advertisement
Guest User

Untitled

a guest
Nov 2nd, 2013
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. /**
  2. * This is the main emictest program file.
  3. */
  4. #include "simpletools.h" // Include simpletools header
  5. #include "fdserial.h"
  6. #include "simpletext.h"
  7.  
  8. #define emic_tx 6
  9. #define emic_rx 7
  10.  
  11. int main() // main function
  12. {
  13. pause(1000);
  14. fdserial *Emic2 = fdserial_open(emic_rx, emic_tx, 0, 9600);
  15.  
  16. fdserial_txChar(Emic2, '\n');
  17.  
  18. // wait for emic2 to be ready
  19. while (fdserial_rxCheck(Emic2) != ':');
  20.  
  21. dprint(Emic2, "sHello World!\n");
  22.  
  23. // wait for emic2 to be done with above line
  24. while (fdserial_rxCheck(Emic2) != ':');
  25.  
  26. dprint(Emic2, "sSecond Line\n");
  27.  
  28. // wait for emic2 to be done with above line
  29. while (fdserial_rxCheck(Emic2) != ':');
  30.  
  31. fdserial_close(Emic2);
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement