Skip to content

Commit 431207c

Browse files
eRgo35j-g00da
authored andcommitted
fix: revert redundant docs
1 parent 6fc250e commit 431207c

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

spi_display_example/src/main.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ use tinybmp::Bmp;
2323

2424
use mipidsi::options::ColorInversion;
2525

26-
// It is important to define display offsets and size so that
27-
// the image and the text renders correctly on the display
2826
const DISPLAY_OFFSET: (u16, u16) = (52, 40);
2927
const DISPLAY_SIZE: (u16, u16) = (135, 240);
3028

@@ -35,15 +33,10 @@ fn main() -> Result<(), Box<dyn Error>> {
3533
let peripherals = Peripherals::take()?;
3634

3735
// Turn on display backlight
38-
// GPIO configuration here works simillarly as in C++ coding paradigm
39-
// Select the role of the pin (here output)
40-
// and then set the pin to the wanted state (here high)
4136
let mut backlight = PinDriver::output(peripherals.pins.gpio4)?;
4237
backlight.set_high()?;
4338

44-
// Define SPI configuration
45-
// Before the initialization the display,
46-
// first define the SPI pin configuration
39+
// Configure SPI
4740
let config = SpiConfig::new().baudrate(26.MHz().into()).data_mode(MODE_3);
4841
let spi_device = SpiDeviceDriver::new_single(
4942
peripherals.spi2,
@@ -62,8 +55,6 @@ fn main() -> Result<(), Box<dyn Error>> {
6255
);
6356

6457
// Configure display
65-
// Here, the display is finally initialized
66-
// The device used is ST7789
6758
let mut delay = Ets;
6859
let mut display = Builder::new(ST7789, spi_interface)
6960
.invert_colors(ColorInversion::Inverted)

0 commit comments

Comments
 (0)