Tab.h 937 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Tab.h
  3. *
  4. * Created on: 14 janv. 2019
  5. * Author: e_rcluze
  6. */
  7. #ifndef TAB_H_
  8. #define TAB_H_
  9. #define NBLIGNEACTIVE 4
  10. #define ALLUME 0
  11. #define ETEIN 1
  12. #define ENALLUME 2
  13. #define ENETEIN 3
  14. #include <stdint.h>
  15. typedef struct {
  16. /*
  17. * Sortie OUT en binnaire
  18. * 0b 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
  19. * X X X X X X S10 S9 S8 S7 S6 S5 S4 S3 S2 S1
  20. */
  21. uint16_t OUT;
  22. uint16_t Demmarage; //Heure de D�marage (en Minute)
  23. uint16_t Extinxtion; //Heure de D�xtintion (en Minute)
  24. uint8_t PuissanceMax; //Puissance Maximum (En pourcentage)
  25. uint8_t Pente; //Pente (en Minute)
  26. uint8_t PuissanceEssai; // puissance d'essai
  27. uint8_t Status;
  28. }Sortie;
  29. /**
  30. * initialise les tableaus des sortie
  31. * utile pour les OUT
  32. */
  33. void initTab(Sortie *S);
  34. /*
  35. * renvoie le status dans laquelle la sortie devrai etre (mise a jour du status)
  36. */
  37. uint8_t newStatus(Sortie *S, uint16_t heure);
  38. #endif /* TAB_H_ */