FONT_LIB.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef _FONT_LIB_H_
  2. #define _FONT_LIB_H_
  3. #include <inttypes.h>
  4. #include "driver/gpio.h"
  5. #define u32 unsigned long
  6. #define FONT_CS_PIN 10
  7. #define FONT_MISO_PIN 9
  8. #define FONT_MOSI_PIN 11
  9. #define FONT_CLK_PIN 12
  10. #define LOW_LEVEL 0
  11. #define HIGH_LEVEL 1
  12. #define FONT_CS_LOW gpio_set_level(FONT_CS_PIN,LOW_LEVEL)
  13. #define FONT_CS_HIGHT gpio_set_level(FONT_CS_PIN,HIGH_LEVEL)
  14. #define FONT_CLK_0 gpio_set_level(FONT_CLK_PIN,LOW_LEVEL)
  15. #define FONT_CLK_1 gpio_set_level(FONT_CLK_PIN,HIGH_LEVEL)
  16. #define FONT_SDA_0 gpio_set_level(FONT_MOSI_PIN,LOW_LEVEL)
  17. #define FONT_SDA_1 gpio_set_level(FONT_MOSI_PIN,HIGH_LEVEL)
  18. #define FONT_RD_SDA gpio_get_level(FONT_MISO_PIN)
  19. #define FONT_OUTPUT_PIN_SEL ((1ULL<<FONT_CS_PIN)|(1ULL<<FONT_MOSI_PIN)|(1ULL<<FONT_CLK_PIN))
  20. #define FONT_INPUT_PIN_SEL (1ULL<<FONT_MISO_PIN)
  21. void font_init();
  22. void font_into_sleep();
  23. void font_exit_sleep();
  24. void font_soft_rst();
  25. //unsigned char test_ASCII_GetData(unsigned char asc,unsigned long ascii_kind,unsigned char *DZ_Data);
  26. #endif/*_FONT_LIB_H_*/