/ST7701S-SPI-Driver

[WIP] A Rust driver for controlling displays based on the Sitronix ST7701S chip over SPI.

Primary LanguageRustApache License 2.0Apache-2.0

Sitronix ST7701S SPI/RGB Display Driver

⚠️ This is a work in progress

This is a basic display driver for displays based on the Sitronix ST7701S, using SPI for command and control and parallel RGB for video data. It currently targets ARM single-board computers, but may be able to be compiled for other architectures.

Development Host Setup

Install the following software:

Development Target Setup

You will need a dedicated single-board computer to target:

  • Beaglebone Black (Setup Docs)
  • Raspberry Pi (Untested)

Software

The following programs are required on all development targets:

  • cpp: Used to build the Device Tree Overlay
  • dtc: Used to build the Device Tree Overlay

These are optional, but helpful:

  • fbset: Show and set the mode and timings of the current framebuffer
  • fim: Manually render an image to the framebuffer

Device Tree Overlay

The device tree overlay will need to be built and selected in uBoot (or similar) for your particular target platform. See specific platform docs for more.

Regardless of the platform-specific configuration, these settings will be correct for the timing in any video mode:

  hsync-active    = <0>;
  vsync-active    = <0>;
  de-active       = <1>;
  pixelclk-active = <1>;

Building the Driver

Because the driver is made to target an ARM device, it must be cross-compiled. The most reliable way to do this is in an Ubuntu guest machine which will share the project directory.

To start:

vagrant up && vagrant rsync && vagrant ssh

To build and copy:

cd /vagrant/ && cargo build --target=armv7-unknown-linux-gnueabihf && scp target/armv7-unknown-linux-gnueabihf/debug/st7701s debian@beaglebone.local:~

Remember, you can run vagrant rsync-auto in another shell to continually sync changes for "live" development.