4G_module/include/cmiot/cm_lcd.h

115 lines
2.3 KiB
C
Raw Permalink Normal View History

2024-09-02 17:54:29 +08:00
/**
* @file cm_lcd.h
* @brief
* @copyright Copyright © 2021 China Mobile IOT. All rights reserved.
* @author By lixuelin
* @date 2022/12/28
*
* @defgroup LCD
* @ingroup LCD
* @{
*/
#ifndef __CM_LCD_H__
#define __CM_LCD_H__
/****************************************************************************
* Included Files
****************************************************************************/
#include "stdint.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
#define LCD_PIN_RST 77 // HAL_GPIO_77
#define LCD_PIN_SPI_4L_DCX 14 // HAL_GPIO_14
#define LCD_PIN_SPI_CS 13 // HAL_GPIO_13
#define LCD_PIN_BACKLIGHT 23 // HAL_GPIO_23
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
/**
* @brief cmd
*
* @param [in] cmd
*
* @return
*
* @details More details
*/
void cm_lcd_write_cmd(unsigned char cmd);
/**
* @brief data
*
* @param [in] data
*
* @return
*
* @details More details
*/
void cm_lcd_write_data(unsigned char data);
/**
* @brief
*
* @param [in] data
* @param [in] len
*
* @return
*
* @details More details
*/
void cm_lcd_write_buf(unsigned char *data, int len);
/**
* @brief lcd
*
*
* @return
*
* @details More details
*/
void cm_lcd_init(void);
/**
* @brief lcd
*
*
* @return
*
* @details More details
*/
void cm_lcd_deinit(void);
/**
* @brief lcd ID
*
*
* @return
* > 0 - lcd ID \n
* = 0 -
*
* @details ST7735S
*/
uint32_t cm_lcd_read_id(void);
/**
* @brief lcd ID
*
* @param [in] cmd
* @param [in] cmd_len 4
* @param [out] id id
* @param [in] id_len id长度4
*
* @return
* = 0 - \n
* < 0 -
*
* @details More details
*/
int32_t cm_lcd_read_id_v2(const uint32_t cmd, int cmd_len, void *id, int id_len);
#endif