Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //includes
- #define initial 0x00
- #define segment12 0x01
- #define segment23 0x02
- #define segment34 0x03
- #define segment45 0x04
- #deifne segment51 0x05
- #define fin 0x06
- uint8_t fin = 0x00;
- uint8_t debut = 0x00;
- void initial()
- {
- // initialisation des ports?
- }
- void LCD(int& debutParcours, int& finParcours)
- {
- debutParcours = debut;
- finParcours = fin;
- }
- // une fonction pour chaque etat
- // interruption lors du segment 3-4 quand on ne voit plus de ligne
- void fin()
- {
- 360;
- sonorite aigue (1s);
- }
- int main()
- {
- etat = initial;
- while (1)
- {
- switch(etat)
- {
- case initial: initial();
- break;
- case segment12:
- break;
- case segment23:
- break;
- case segment34:
- break;
- case segment45:
- break;
- case segment51:
- break;
- case fin:
- break;
- }
- }
- }
Add Comment
Please, Sign In to add comment