SceOled

Resources
TODO: move to OLED.

PS Vita OLED models: - AMS495QA01 - Other models?


 * 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_oled_disable
Disables the OLED by clearing the GPIO bus 0 port 0.

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

sceOledGetBrightnessForDriver
Get the wide brightness value.

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

SceOledForDriver_9F4ABDDC_get_status
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_dispatch_cmd_list
Dispatches the OLED cmd list (using SceOledForDriver_2F0C4B67_send_cmd).

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.

SceOledForDriver_ED2D6F19_set_status
Used to enable or disable.

SceOledForDriver_DDB1412B_reset
Used to reset.

SceOledForDriver_3C990F53
Returns 0 on success.