SceOled

Resources
TODO: move to OLED.


 * Datasheets:
 * AMS495QA04 (very useful: hardware + driver API): [[File:AMS495QA04_Ver2.0_20121113_201509238327.pdf]]
 * AMS495QA01 (hardware, not very useful): [[File:AMS495QA01_datasheet.pdf]]
 * Baremetal OLED usage: https://github.com/xerpi/vita-baremetal-sample/blob/master/src/oled.c
 * Linux driver of a similar screen: http://elixir.free-electrons.com/linux/latest/source/drivers/gpu/drm/panel/panel-samsung-ld9040.c#L37
 * Some interesting paper explaining how the gamma lookup table is generated: http://proceedings.spiedigitallibrary.org/proceeding.aspx?articleid=1343918
 * DCS documentation: https://www.tonylabs.com/wp-content/uploads/MIPI_DCS_specification_v1.02.00.pdf

Types
A  is a contiguous array of   of different sizes. To get the next  of a queue, do:

sceOledWaitReadyForDriver
Waits until the OLED has been initialized.

SceOledForDriver_26F9EEA8
Disables the OLED by clearing the GPIO bus 0 port 0.

SceOledForDriver_2F0C4B67
Sends a command to the OLED (via SPI).

sceOledGetBrightnessForDriver
Get the wide brightness value.

SceOledForDriver_6B1E0B52
Enables the OLED by setting the GPIO bus 0 port 0.

SceOledForDriver_9F4ABDDC
Returns the OLED status by reading the GPIO bus 0 port 0.

sceOledGetDDBForDriver
Returns the Device Descriptor Block (DDB), read with MIPI DSI command.

SceOledForDriver_E30604CC
Dispatches the OLED cmd list (using ksceOledForDriver_2F0C4B67).

sceOledSetBrightnessForDriver
Set the brightness (brightness needs to be in the range ). means screen turned off,  means screen dimmed (like if you wait for a long time without touching your screen).

The brightness has actually 17 different values: 1 special value for, and 16 different values for the rest.