Guest User

Untitled

a guest
Jul 20th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.86 KB | None | 0 0
  1. //includes
  2.  
  3. #define initial 0x00
  4. #define segment12   0x01
  5. #define segment23 0x02
  6. #define segment34 0x03
  7. #define segment45 0x04
  8. #deifne segment51 0x05
  9. #define fin 0x06
  10.  
  11. uint8_t fin = 0x00;
  12. uint8_t debut = 0x00;
  13.  
  14. void initial()
  15. {
  16.     // initialisation des ports?
  17.    
  18. }
  19.  
  20. void LCD(int& debutParcours, int& finParcours)
  21. {
  22.     debutParcours = debut;
  23.     finParcours = fin;
  24.    
  25.    
  26. }
  27.  
  28. // une fonction pour chaque etat
  29. // interruption lors du segment 3-4 quand on ne voit plus de ligne
  30.  
  31.  
  32. void fin()
  33. {
  34.     360;
  35.     sonorite aigue (1s);
  36. }
  37.  
  38. int main()
  39. {
  40.     etat = initial;
  41.    
  42.     while (1)
  43.     {
  44.         switch(etat)
  45.         {
  46.             case initial:   initial();
  47.                             break;
  48.             case segment12:
  49.                             break;
  50.             case segment23:
  51.                             break;
  52.             case segment34:
  53.                             break;
  54.             case segment45:
  55.                             break;
  56.             case segment51:
  57.                             break;
  58.             case fin:
  59.                             break;
  60.         }
  61.     }
  62.    
  63.    
  64. }
Add Comment
Please, Sign In to add comment