Skip to content

Conversation

@DrayxR3X
Copy link
Contributor

@DrayxR3X DrayxR3X commented Nov 4, 2025

No description provided.

Copy link
Owner

@78 78 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

代码风格需要调整一下。

另外,墨水屏的驱动,可以参考 https://github.com/hlym123/esp_epd_gdey027t91/blob/main/esp_epd_gdey027t91.c 这里的写法,是可以考虑做成一个 esp pannel 的组件的。这个有空可以尝试一下。


void InitializeLcdDisplay() {
custom_lcd_spi_t lcd_spi_data = {};
lcd_spi_data.cs = EPD_CS_PIN;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里格式没有对齐

lcd_spi_data.scl = EPD_SCK_PIN;
lcd_spi_data.spi_host = EPD_SPI_NUM;
lcd_spi_data.buffer_len = 5000;
display_ = new CustomLcdDisplay(NULL, NULL, EXAMPLE_LCD_WIDTH,EXAMPLE_LCD_HEIGHT,DISPLAY_OFFSET_X, DISPLAY_OFFSET_Y, DISPLAY_MIRROR_X, DISPLAY_MIRROR_Y, DISPLAY_SWAP_XY,lcd_spi_data);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SWAP_XY, 逗号后面缺少一个空格。

#define __BOARD_POWER_BSP_H__


class board_power_bsp
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个类的类名,构造函数的参数, 以及方法名,需要统一 Google C++ 代码风格。


const uint8_t WF_Full_1IN54[159] =
{
0x80, 0x48, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不要 tab 和空格混用,统一用空格。

#include "freertos/semphr.h"

#include "config.h"

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里不用空行


#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/semphr.h"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

系统或外部头文件,用 <> ,项目的头文件用 ""

@DrayxR3X
Copy link
Contributor Author

DrayxR3X commented Nov 4, 2025

代码风格需要调整一下。

另外,墨水屏的驱动,可以参考 https://github.com/hlym123/esp_epd_gdey027t91/blob/main/esp_epd_gdey027t91.c 这里的写法,是可以考虑做成一个 esp pannel 的组件的。这个有空可以尝试一下。

可以的,这近两周我去试下

@78
Copy link
Owner

78 commented Nov 5, 2025

代码风格需要调整一下。
另外,墨水屏的驱动,可以参考 https://github.com/hlym123/esp_epd_gdey027t91/blob/main/esp_epd_gdey027t91.c 这里的写法,是可以考虑做成一个 esp pannel 的组件的。这个有空可以尝试一下。

可以的,这近两周我去试下

我不确定会不会更复杂,但这应该是乐鑫推荐的方案

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants