Advertisement
Guest User

Untitled

a guest
May 15th, 2022
16
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. #ifndef _SEVEN_SEGMENT_H_
  3. #define _SEVEN_SEGMENT_H_
  4.  
  5. #ifdef INND_TS56
  6. //      SEVEN_SEGMENT_<X>   0b<DP><G><F><E><D><C><B><A>
  7. #define _SS_A   0b00000001
  8. #define _SS_B   0b00000010
  9. #define _SS_C   0b00000100
  10. #define _SS_D   0b00001000
  11. #define _SS_E   0b00010000
  12. #define _SS_F   0b00100000
  13. #define _SS_G   0b01000000
  14. #define _SS_DP  0b10000000
  15.  
  16. #define SS_0    _SS_A | _SS_B | _SS_C | _SS_D | _SS_E | _SS_F
  17. #define SS_1    _SS_B | _SS_C
  18. #define SS_2    _SS_A | _SS_B | _SS_G | _SS_E | _SS_D
  19. #define SS_3    _SS_A | _SS_B | _SS_G | _SS_C | _SS_D
  20. #define SS_4    _SS_F | _SS_G | _SS_B | _SS_C
  21. #define SS_5    _SS_A | _SS_F | _SS_G | _SS_C | _SS_D
  22. #define SS_6    _SS_A | _SS_F | _SS_G | _SS_C | _SS_D | _SS_E
  23. #define SS_7    _SS_A | _SS_B | _SS_C
  24. #define SS_8    _SS_A | _SS_B | _SS_C | _SS_D | _SS_E | _SS_F \
  25.     | _SS_G
  26. #define SS_9    _SS_A | _SS_F | _SS_B | _SS_G | _SS_C
  27. #define SS_DEC  _SS_DP
  28. #define SS_NEG  _SS_G
  29. #define SS_CLEAR    0
  30. #endif
  31.  
  32. #endif
Advertisement
RAW Paste Data Copied
Advertisement