Open olikraus opened 6 months ago
see discussion for details
Proposal copied over from the discussion: Edit the u8g2setupcpp
wiki page as follows, with my additions marked by π (delete the mark before merging!):
The name of the Arduino C++ constructor has the following parts:
No | Description | Example |
---|---|---|
1 | Prefix | U8G2 |
2 | Display Controller | UC1701 |
3 | Display Name | DOGS102 |
π 4 | π Variant (optional) | π ALT |
5 | Buffer Size | 1 , 2 or F (full frame buffer) |
6 | Communication | 4W_SW_SPI |
These parts are connect with _
. The full constructor name for the example will be U8G2_UC1701_DOGS102_ALT_1_4W_SW_SPI
. All available constructor names are listed in the reference section below.
π If multiple variants are available for a display name, you may need to experiment to find the one that works for you. Small unbranded displays often come in "flavors" that have important differences but aren't marked on the packaging!
Those edits should apply to u8x8setupcpp
as well. Similarly, I'd edit the u8g2setupc
page like this:
Each setup procedure name has the following naming convention:
u8g2_Setup_<display>_π<variant>_<i2c>_<memory>
<display>
: Describes the display name and subtype (dimensions, branding). <variant
>: (Optional) Describes a different way to configure the driver.<i2c>
: I2C protocol requires special care. If the display supports I2C communication interface,
then there is a special setup procedure for I2C, which includes the string "i2c" in the procedure name.
For SPI or parallel communication, use the setup procedure without "i2c" in the procedure name.<memory>
: This is 1
, 2
or f
for one page, two page or full page mode.π When multiple variants (_ALT
, _1F
, etc.) are available, you may need to experiment to find the one that works for you. Small unbranded displays often come in "flavors" that have important differences but aren't marked on the packaging!
In any case, the naming convention is just a rough guide; the actual function names and their possible arguments are listed below.
Thanks for this clarification, it would be awesome to have this on the docs, I was scratching my head trying to figure out what _1,_2,_F would mean.
That _1, _2, _F should have been mentioned, but I like the addon from @egnor
Discussed in https://github.com/olikraus/u8g2/discussions/2317