File tree Expand file tree Collapse file tree 3 files changed +5
-8
lines changed
Boards/WaveshareS3Lcd13/Source Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -15,10 +15,7 @@ static DeviceVector createDevices() {
1515}
1616
1717static 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
2421extern const Configuration waveshare_s3_lcd_13 = {
Original file line number Diff line number Diff 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);
Original file line number Diff line number Diff 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;
You can’t perform that action at this time.
0 commit comments