1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00
RIOT/tests/pkg_u8g2/README.md
2016-07-13 21:23:36 +02:00

43 lines
1.7 KiB
Markdown

# U8g2 Package Test
## About
This is a test application for the U8g2 package. This package is a graphical display library, including display drivers.
## Usage
This test application will initialize the U8g2 to output on one of the following:
* output to stdout virtual screen.
* output to SDL virtual screen.
* output to I2C graphics screen.
* output to SPI graphics screen.
### Output to stdout
To output to this virtual screen, supply `TEST_U8G2_OUTPUT=1` to the `make` command.
### Output to SDL
To output to this virtual screen, supply `TEST_U8G2_OUTPUT=2` to the `make` command.
This is a native-only option.
### Output to SPI
To output to screen, supply `TEST_U8G2_OUTPUT=3` to the `make` command.
* `TEST_U8G2_SPI` — The SPI device.
* `TEST_U8G2_PIN_CS` — If applicable, the CS pin.
* `TEST_U8G2_PIN_DC` — If applicable, the Command/Data pin.
* `TEST_U8G2_PIN_RESET` — If applicable, the reset pin.
* `TEST_U8G2_DISPLAY` — The used display driver (see https://github.com/olikraus/u8g2/wiki/u8g2setupc). Make sure you select a SPI compatible display.
### Output to I2C
To output to screen, supply `TEST_U8G2_OUTPUT=4` to the `make` command.
Furthermore, you can configure the following:
* `TEST_U8G2_I2C` — The I2C device.
* `TEST_U8G2_ADDR` — The address to write commands to.
* `TEST_U8G2_PIN_RESET` — If applicable, the reset pin.
* `TEST_U8G2_DISPLAY` — The used display driver (see https://github.com/olikraus/u8g2/wiki/u8g2setupc). Make sure you select an I2C compatible display.
## Expected result
The output of this test depends on the output mode and used hardware. If it works, the application cycles through three screens with the text: 'This is RIOT-OS'.