54 lines
1.8 KiB
C
54 lines
1.8 KiB
C
/*
|
|
* @Author: DaMingSY zxm5337@163.com
|
|
* @Date: 2024-08-29 10:34:51
|
|
* @LastEditors: wujunchao wujunchao@wuxismart.com
|
|
* @LastEditTime: 2024-12-25 10:14:46
|
|
* @FilePath: \signal_generator\App\LCD\JLX240-00301-BN.h
|
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
*/
|
|
#ifndef __JLX240X320_H
|
|
#define __JLX240X320_H
|
|
#include "data_type_def.h"
|
|
|
|
#define CS_SET() HAL_GPIO_WritePin(LCD_CS_GPIO_Port, LCD_CS_Pin, GPIO_PIN_SET)
|
|
#define CS_RESET() HAL_GPIO_WritePin(LCD_CS_GPIO_Port, LCD_CS_Pin, GPIO_PIN_RESET)
|
|
|
|
#define RS_SET() HAL_GPIO_WritePin(LCD_RS_GPIO_Port, LCD_RS_Pin, GPIO_PIN_SET)
|
|
#define RS_RESET() HAL_GPIO_WritePin(LCD_RS_GPIO_Port, LCD_RS_Pin, GPIO_PIN_RESET)
|
|
|
|
#define RD_SET() HAL_GPIO_WritePin(LCD_RD_GPIO_Port, LCD_RD_Pin, GPIO_PIN_SET)
|
|
#define RD_RESET() HAL_GPIO_WritePin(LCD_RD_GPIO_Port, LCD_RD_Pin, GPIO_PIN_RESET)
|
|
|
|
#define WR_SET() HAL_GPIO_WritePin(LCD_WR_GPIO_Port, LCD_WR_Pin, GPIO_PIN_SET)
|
|
#define WR_RESET() HAL_GPIO_WritePin(LCD_WR_GPIO_Port, LCD_WR_Pin, GPIO_PIN_RESET)
|
|
|
|
#define RST_SET() HAL_GPIO_WritePin(LCD_RST_GPIO_Port, LCD_RST_Pin, GPIO_PIN_SET)
|
|
#define RST_RESET() HAL_GPIO_WritePin(LCD_RST_GPIO_Port, LCD_RST_Pin, GPIO_PIN_RESET)
|
|
|
|
typedef union
|
|
{
|
|
uint8_t data;
|
|
struct
|
|
{
|
|
uint8_t bit0 : 1;
|
|
uint8_t bit1 : 1;
|
|
uint8_t bit2 : 1;
|
|
uint8_t bit3 : 1;
|
|
uint8_t bit4 : 1;
|
|
uint8_t bit5 : 1;
|
|
uint8_t bit6 : 1;
|
|
uint8_t bit7 : 1;
|
|
} st_bit;
|
|
} un_data;
|
|
|
|
void lcd_initial(void);
|
|
|
|
void lcd_menu(void);
|
|
|
|
void display_color_new(int32_t xa, int32_t ya, int32_t xb, int32_t yb ,int color_data);
|
|
|
|
void lcd_address(int XS, int YS, int x_total, int y_total);
|
|
void transfer_data_16(uint16_t data_16bit);
|
|
|
|
#endif
|