Skip to content

Commit b44b313

Browse files
committed
1.3 test
1 parent 787d518 commit b44b313

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

Boards/WaveshareS3Lcd13/Source/WaveshareS3Lcd13.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@ static DeviceVector createDevices() {
1515
}
1616

1717
static bool initBoot() {
18-
//return driver::pwmbacklight::init(GPIO_NUM_20);
19-
gpio_set_direction(GPIO_NUM_20, GPIO_MODE_OUTPUT);
20-
gpio_set_level(GPIO_NUM_20, 1);
21-
return true;
18+
return driver::pwmbacklight::init(GPIO_NUM_20, 256);
2219
}
2320

2421
extern const Configuration waveshare_s3_lcd_13 = {

Boards/WaveshareS3Lcd13/Source/devices/Display.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ std::shared_ptr<tt::hal::display::DisplayDevice> createDisplay() {
99
SPI2_HOST,
1010
GPIO_NUM_39,
1111
GPIO_NUM_38,
12-
GPIO_NUM_42,
1312
240,
1413
240,
1514
nullptr,
@@ -19,7 +18,9 @@ std::shared_ptr<tt::hal::display::DisplayDevice> createDisplay() {
1918
true
2019
);
2120

22-
//configuration->backlightDutyFunction = driver::pwmbacklight::setBacklightDuty;
21+
22+
configuration->resetPin = GPIO_NUM_42;
23+
configuration->backlightDutyFunction = driver::pwmbacklight::setBacklightDuty;
2324

2425
auto display = std::make_shared<St7789Display>(std::move(configuration));
2526
return std::reinterpret_pointer_cast<tt::hal::display::DisplayDevice>(display);

Drivers/ST7789/Source/St7789Display.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ class St7789Display final : public EspLcdDisplay {
2525
spi_host_device_t spiHostDevice,
2626
gpio_num_t csPin,
2727
gpio_num_t dcPin,
28-
gpio_num_t resetPin,
2928
unsigned int horizontalResolution,
3029
unsigned int verticalResolution,
3130
std::shared_ptr<tt::hal::touch::TouchDevice> touch,
@@ -54,7 +53,7 @@ class St7789Display final : public EspLcdDisplay {
5453
spi_host_device_t spiHostDevice;
5554
gpio_num_t csPin;
5655
gpio_num_t dcPin;
57-
gpio_num_t resetPin;
56+
gpio_num_t resetPin = GPIO_NUM_NC;
5857
unsigned int pixelClockFrequency = 80'000'000; // Hertz
5958
size_t transactionQueueDepth = 10;
6059
unsigned int horizontalResolution;

0 commit comments

Comments
 (0)