屏幕和编码器OK

This commit is contained in:
2025-03-23 20:45:23 +08:00
parent 9d910c6770
commit 3f4efa0554
88 changed files with 4812 additions and 13918 deletions
+23
View File
@@ -0,0 +1,23 @@
#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