digits.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /**
  2. * Digits 4x7 px normal
  3. * Digits 4x7 px 7-segment style
  4. * font for screen based on HT1632C
  5. * Vladimir N. Shilov shilow@ukr.net
  6. */
  7. #pragma once
  8. #ifndef _DIGITS_H
  9. #define _DIGITS_H
  10. /*
  11. ## # ## ## # #### ## #### ## ##
  12. # # ## # # # # ## # # # # # # # # ##
  13. # # # # # # # # # # # # # # ##
  14. # # # # ## #### ### ### # ## ###
  15. # # # # # # # # # # # # # ##
  16. # # # # # # # # # # # # # # # # ##
  17. ## ### #### ## # ## ## # ## ##
  18. */
  19. static const uint8_t digit_4x7[11][4] = {
  20. {0x3e, 0x41, 0x41, 0x3e},
  21. {0x00, 0x42, 0x7f, 0x40},
  22. {0x72, 0x49, 0x45, 0x42},
  23. {0x22, 0x49, 0x49, 0x36},
  24. {0x08, 0x0c, 0x0a, 0x7f},
  25. {0x2f, 0x49, 0x49, 0x31},
  26. {0x3e, 0x49, 0x49, 0x32},
  27. {0x01, 0x79, 0x05, 0x03},
  28. {0x36, 0x49, 0x49, 0x36},
  29. {0x26, 0x49, 0x49, 0x3e},
  30. {0x00, 0x36, 0x36, 0x00}
  31. };
  32. /*
  33. ## ## ## ## ## ## ## ##
  34. # # # # # # # # # # # # # #
  35. # # # # # # # # # # # # # #
  36. ## ## ## ## ## ## ##
  37. # # # # # # # # # # # # #
  38. # # # # # # # # # # # # #
  39. ## ## ## ## ## ## ##
  40. */
  41. static const uint8_t digit_7seg[10][4] = {
  42. {0x36, 0x41, 0x41, 0x36},
  43. {0x00, 0x00, 0x00, 0x36},
  44. {0x30, 0x49, 0x49, 0x06},
  45. {0x00, 0x49, 0x49, 0x36},
  46. {0x06, 0x08, 0x08, 0x36},
  47. {0x06, 0x49, 0x49, 0x30},
  48. {0x36, 0x49, 0x49, 0x30},
  49. {0x00, 0x01, 0x01, 0x36},
  50. {0x36, 0x49, 0x49, 0x36},
  51. {0x06, 0x49, 0x49, 0x36}
  52. };
  53. #endif /* _DIGITS_H */