24 lines
723 B
C
24 lines
723 B
C
|
|
#ifndef __DRV_ST7920_H__
|
||
|
|
#define __DRV_ST7920_H__
|
||
|
|
|
||
|
|
#include "stm32f1xx_hal.h"
|
||
|
|
#include "main.h"
|
||
|
|
#include "string.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_Write(unsigned char type,unsigned char data);
|
||
|
|
void LCD_Read(unsigned char type,unsigned char data);
|
||
|
|
|
||
|
|
void LCD_init (void);
|
||
|
|
|
||
|
|
void LCD_DEMO(void);
|
||
|
|
|
||
|
|
#endif
|