/***********************************************************************************************************
 * Copyright (c)  2021 - 2022, Unicmicro Co.,Ltd .
 * All rights reserved.
 * Filename    : oled.h
 * Description : oled driver header file
 * Author(s)   : yanhaihua
 * version     : V1.0
 * Modify date : 2021-09-23
 ***********************************************************************************************************/
#ifndef __OLED_H__
#define __OLED_H__

#include "config.h"

typedef struct
{
	void (*spi_init)(void);	
	void (*spi_cs_enable)(void);
	void (*spi_cs_disable)(void);	
	void (*spi_write_byte)(uint8_t dat);
	void (*oled_dc_high)(void);
	void (*oled_dc_low)(void);
	void (*oled_res_high)(void);
	void (*oled_res_low)(void);
	void (*oled_delay_ms)(uint16_t ms);
}s_oled_ops_t;

void oled_display_refresh(void);

void oled_clear(void);

uint8_t oled_init(s_oled_ops_t *ops);

void oled_show_str(uint8_t x,uint8_t y,uint8_t *data,uint8_t len,uint8_t size,uint8_t mode);

void oled_show_line(uint8_t y,uint8_t interval);

#endif
