Skip to content

增加电池电压读取和physton-esp32s3-1.54tft开发板 #661

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ elseif(CONFIG_BOARD_TYPE_ZHENGCHEN_1_54TFT_ML307)
set(BOARD_TYPE "zhengchen-1.54tft-ml307")
elseif(CONFIG_BOARD_TYPE_ESP32_S3_1_54_MUMA)
set(BOARD_TYPE "sp-esp32-s3-1.54-muma")
elseif(CONFIG_BOARD_TYPE_PHYSTON_ESP32S3_1_54TFT)
set(BOARD_TYPE "physton-esp32s3-1.54tft")
endif()
file(GLOB BOARD_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/boards/${BOARD_TYPE}/*.cc
Expand Down
2 changes: 2 additions & 0 deletions main/Kconfig.projbuild
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ choice BOARD_TYPE
bool "征辰科技1.54(ML307)"
config BOARD_TYPE_ESP32_S3_1_54_MUMA
bool "Spotpear ESP32-S3-1.54-MUMA"
config BOARD_TYPE_PHYSTON_ESP32S3_1_54TFT
bool "Physton 1.54TFT(s3)"
endchoice

choice ESP_S3_LCD_EV_Board_Version_TYPE
Expand Down
4 changes: 4 additions & 0 deletions main/boards/common/board.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ bool Board::GetBatteryLevel(int &level, bool& charging, bool& discharging) {
return false;
}

bool Board::GetBatteryVoltage(float &voltage) {
return false;
}

bool Board::GetTemperature(float& esp32temp){
return false;
}
Expand Down
1 change: 1 addition & 0 deletions main/boards/common/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class Board {
virtual void StartNetwork() = 0;
virtual const char* GetNetworkStateIcon() = 0;
virtual bool GetBatteryLevel(int &level, bool& charging, bool& discharging);
virtual bool GetBatteryVoltage(float &voltage);
virtual std::string GetJson();
virtual void SetPowerSaveMode(bool enabled) = 0;
virtual std::string GetBoardJson() = 0;
Expand Down
1 change: 1 addition & 0 deletions main/boards/physton-esp32s3-1.54tft/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://phystons.feishu.cn/wiki/FxZBw5Z0MitMq2kWJt4cihTAnXd
47 changes: 47 additions & 0 deletions main/boards/physton-esp32s3-1.54tft/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@

#ifndef _BOARD_CONFIG_H_
#define _BOARD_CONFIG_H_

#include <driver/gpio.h>

#define AUDIO_INPUT_SAMPLE_RATE 16000
#define AUDIO_OUTPUT_SAMPLE_RATE 24000
#define AUDIO_I2S_MIC_GPIO_WS GPIO_NUM_4
#define AUDIO_I2S_MIC_GPIO_SCK GPIO_NUM_5
#define AUDIO_I2S_MIC_GPIO_DIN GPIO_NUM_6
#define AUDIO_I2S_SPK_GPIO_DOUT GPIO_NUM_7
#define AUDIO_I2S_SPK_GPIO_BCLK GPIO_NUM_15
#define AUDIO_I2S_SPK_GPIO_LRCK GPIO_NUM_16

#define BOOT_BUTTON_GPIO GPIO_NUM_0
#define VOLUME_UP_BUTTON_GPIO GPIO_NUM_40
#define VOLUME_DOWN_BUTTON_GPIO GPIO_NUM_39

#define DISPLAY_SDA GPIO_NUM_10
#define DISPLAY_SCL GPIO_NUM_9
#define DISPLAY_DC GPIO_NUM_8
#define DISPLAY_CS GPIO_NUM_14
#define DISPLAY_RES GPIO_NUM_18
#define DISPLAY_WIDTH 240
#define DISPLAY_HEIGHT 240
#define DISPLAY_SWAP_XY false
#define DISPLAY_MIRROR_X false
#define DISPLAY_MIRROR_Y false
#define BACKLIGHT_INVERT false
#define DISPLAY_OFFSET_X 0
#define DISPLAY_OFFSET_Y 0
#define DISPLAY_BACKLIGHT_PIN GPIO_NUM_13
#define DISPLAY_BACKLIGHT_OUTPUT_INVERT false

#define BUILTIN_LED_NUM 1
#define BUILTIN_LED_GPIO GPIO_NUM_48

#define SD_CS GPIO_NUM_46
#define SD_DAT0 GPIO_NUM_1
#define SD_CMD GPIO_NUM_2
#define SD_CLK GPIO_NUM_3

#define ML307_RX_PIN GPIO_NUM_11
#define ML307_TX_PIN GPIO_NUM_12

#endif // _BOARD_CONFIG_H_
11 changes: 11 additions & 0 deletions main/boards/physton-esp32s3-1.54tft/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"target": "esp32s3",
"builds": [
{
"name": "physton-esp32s3-1.54tft",
"sdkconfig_append": [
"CONFIG_USE_WECHAT_MESSAGE_STYLE=y"
]
}
]
}
Loading