34 lines
1015 B
C
34 lines
1015 B
C
#ifndef __DRV_ST7920_H__
|
|
#define __DRV_ST7920_H__
|
|
|
|
#include "stm32f1xx_hal.h"
|
|
#include "main.h"
|
|
#include "string.h"
|
|
#include "font.h"
|
|
#include "bsp.h"
|
|
|
|
#define RS(state) HAL_GPIO_WritePin(LCD_RS_GPIO_Port,LCD_RS_Pin,(state)?(GPIO_PIN_SET):(GPIO_PIN_RESET))
|
|
#define RW(state) HAL_GPIO_WritePin(LCD_RW_GPIO_Port,LCD_RW_Pin,(state)?(GPIO_PIN_SET):(GPIO_PIN_RESET))
|
|
#define EN(state) HAL_GPIO_WritePin(LCD_EN_GPIO_Port,LCD_EN_Pin,(state)?(GPIO_PIN_SET):(GPIO_PIN_RESET))
|
|
#define PS(state) HAL_GPIO_WritePin(LCD_PS_GPIO_Port,LCD_PS_Pin,(state)?(GPIO_PIN_SET):(GPIO_PIN_RESET))
|
|
|
|
|
|
void LCD_Init (void);
|
|
void LCD_Update(void);
|
|
void LCD_Clear(void);
|
|
|
|
void LCD_Write(unsigned char type,unsigned char data);
|
|
unsigned char LCD_Read(void);
|
|
uint8_t LCD_DrawDot(uint8_t x,uint8_t y,uint8_t color);
|
|
|
|
|
|
void LCD_DrawNumber(unsigned char row,unsigned char column,int number);
|
|
void LCD_DrawButton(unsigned char row,unsigned char column,unsigned char width,unsigned char height,unsigned char *img);
|
|
|
|
|
|
|
|
|
|
void LCD_DEMO(void);
|
|
|
|
#endif
|