tm1650.h 1010 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #ifndef INCLUDE_TM1650_H_
  2. #define INCLUDE_TM1650_H_
  3. #include <SmingCore.h>
  4. #define LED_NUM 4
  5. typedef enum {
  6. Sym_0 = 0x3f,
  7. Sym_1 = 0x06,
  8. Sym_2 = 0x5b,
  9. Sym_3 = 0x4f,
  10. Sym_4 = 0x66,
  11. Sym_5 = 0x6d,
  12. Sym_6 = 0x7d,
  13. Sym_7 = 0x07,
  14. Sym_8 = 0x7f,
  15. Sym_9 = 0x6f,
  16. Sym_A = 0x77,
  17. Sym_B = 0x7c,
  18. Sym_C = 0x39,
  19. Sym_D = 0x5e,
  20. Sym_E = 0x79,
  21. Sym_F = 0x71,
  22. Sym_Dot = 0x80,
  23. Sym_Minus = 0x40,
  24. Sym_Plus = 0x46,
  25. Sym_H = 0x76,
  26. Sym_r = 0x60,
  27. Sym_o = 0x63,
  28. Sym_Off = 0x00
  29. } tm1650_sym_t;
  30. typedef enum {
  31. Dig_1 = 0x0,
  32. Dig_2 = 0x1,
  33. Dig_3 = 0x2,
  34. Dig_4 = 0x3,
  35. } tm1650_pos_t;
  36. /* Exported Functions */
  37. void TM1650_Init(void);
  38. void TM1650_Out(uint8_t i1, uint8_t i2, uint8_t i3, uint8_t i4);
  39. void TM1650_Out1(tm1650_sym_t value);
  40. void TM1650_Out2(tm1650_sym_t value);
  41. void TM1650_Out3(tm1650_sym_t value);
  42. void TM1650_Out4(tm1650_sym_t value);
  43. void TM1650_DotSet(tm1650_pos_t pos);
  44. void TM1650_DotRes(tm1650_pos_t pos);
  45. void TM1650_Bright(uint8_t bright);
  46. #endif /* INCLUDE_TM1650_H_ */