tm1650.h 925 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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_Minus = 0x40,
  23. Sym_Dot = 0x80
  24. } tm1650_sym_t;
  25. typedef enum {
  26. Dig_1 = 0x0,
  27. Dig_2 = 0x1,
  28. Dig_3 = 0x2,
  29. Dig_4 = 0x3,
  30. } tm1650_pos_t;
  31. /* Exported Functions */
  32. void TM1650_Init(void);
  33. void TM1650_Out(uint8_t i1, uint8_t i2, uint8_t i3, uint8_t i4);
  34. void TM1650_Out1(tm1650_sym_t value);
  35. void TM1650_Out2(tm1650_sym_t value);
  36. void TM1650_Out3(tm1650_sym_t value);
  37. void TM1650_Out4(tm1650_sym_t value);
  38. void TM1650_DotSet(tm1650_pos_t pos);
  39. void TM1650_DotRes(tm1650_pos_t pos);
  40. void TM1650_Bright(uint8_t bright);
  41. #endif /* INCLUDE_TM1650_H_ */