# ST7789 LCD ST7789 driver to connect to TFT displays, with embedded-graphics support ## Usage ``` let mut nss = Pin::new(PortNum::PA, PinNum::Pin15).into_output(PinModeOutput::OutPP); nss.set_high().ok(); let dc = Pin::new(PortNum::PB, PinNum::Pin6).into_output(PinModeOutput::OutPP); let rst = Pin::new(PortNum::PF, PinNum::Pin7).into_output(PinModeOutput::OutPP); let _sck = Pin::new(PortNum::PB, PinNum::Pin3).into_alternate(PinModeAlternate::AF(0)); let _mosi = Pin::new(PortNum::PB, PinNum::Pin5).into_alternate(PinModeAlternate::AF(0)); let spi_cfg = spi::Config::default(); let _spi_bus = SpiBus::new(SpiBusId::Bus1, &spi_cfg); let lcd_spi = _spi_bus.to_device(nss); let mut disp = ST7789::<_, _, _, 280, 240, 20, 0>::new(lcd_spi, dc, rst); let mut disp_delay = Delay::new(); disp.init(&mut disp_delay, Orientation::Portrait, true, true).ok(); disp.clear(Rgb565::BLACK).ok(); Text::new("Hello world!", POS, ch_style).draw(&mut disp).ok(); ```