#ifndef _FONT_LIB_H_
#define _FONT_LIB_H_

#include <inttypes.h>
#include "driver/gpio.h"

#define u32 unsigned long

#define   FONT_CS_PIN           10
#define   FONT_MISO_PIN         9
#define   FONT_MOSI_PIN         11
#define   FONT_CLK_PIN          12

#define LOW_LEVEL               0
#define HIGH_LEVEL              1


#define FONT_CS_LOW         gpio_set_level(FONT_CS_PIN,LOW_LEVEL)
#define FONT_CS_HIGHT       gpio_set_level(FONT_CS_PIN,HIGH_LEVEL)


#define FONT_CLK_0          gpio_set_level(FONT_CLK_PIN,LOW_LEVEL)
#define FONT_CLK_1          gpio_set_level(FONT_CLK_PIN,HIGH_LEVEL)

#define FONT_SDA_0          gpio_set_level(FONT_MOSI_PIN,LOW_LEVEL)
#define FONT_SDA_1          gpio_set_level(FONT_MOSI_PIN,HIGH_LEVEL)

#define FONT_RD_SDA         gpio_get_level(FONT_MISO_PIN)

#define FONT_OUTPUT_PIN_SEL         ((1ULL<<FONT_CS_PIN)|(1ULL<<FONT_MOSI_PIN)|(1ULL<<FONT_CLK_PIN))
#define FONT_INPUT_PIN_SEL          (1ULL<<FONT_MISO_PIN) 

void font_init();

void font_into_sleep();

void font_exit_sleep();

void font_soft_rst();

//unsigned char test_ASCII_GetData(unsigned char asc,unsigned long ascii_kind,unsigned char *DZ_Data);
#endif/*_FONT_LIB_H_*/
