![]() |
vitasdk
Documentation of the vitasdk
|
Exports for Kernel. More...
Enumerations | |
| enum | SceOledErrorCode { SCE_OLED_ERROR_INVALID_ARGUMENT = 0x803F0A02 , SCE_OLED_ERROR_INITIALIZATION_FAILED = 0x803F0A03 , SCE_OLED_ERROR_NOT_READY = 0x803F0A04 , SCE_OLED_ERROR_INVALID_STATE = 0x803F0A05 } |
| OLED driver error codes observed on FW 3.60. More... | |
| enum | SceOledColorSpaceMode { SCE_OLED_COLOR_SPACE_MODE_0 = 0 , SCE_OLED_COLOR_SPACE_MODE_1 = 1 } |
| OLED color-space modes. More... | |
Functions | |
| VITASDK_BUILD_ASSERT_EQ (4, SceOledErrorCode) | |
| VITASDK_BUILD_ASSERT_EQ (1, SceOledColorSpaceMode) | |
| int | ksceOledDisplayOff (void) |
| Queue the OLED display-off sequence. | |
| int | ksceOledDisplayOn (void) |
| Queue the OLED display-on sequence. | |
| SceUInt32 | ksceOledGetBrightness (void) |
| Get the exact wide-brightness value most recently accepted by the driver. | |
| int | ksceOledGetDDB (SceUInt16 *supplier_id, SceUInt16 *supplier_elective_data) |
| Get the Device Descriptor Block values cached during OLED initialization. | |
| SceOledColorSpaceMode | ksceOledGetDisplayColorSpaceMode (void) |
| Get the cached OLED color-space mode. | |
| int | ksceOledSetBrightness (SceUInt32 brightness) |
| Set the wide OLED brightness. | |
| int | ksceOledSetDisplayColorSpaceMode (SceOledColorSpaceMode mode) |
| Set the OLED color-space mode. | |
| int | ksceOledWaitReady (void) |
| Wait until the asynchronous OLED initialization attempt has completed. | |
Exports for Kernel.
Include the header file in your project:
Link the library to the executable:
| enum SceOledErrorCode |
| VITASDK_BUILD_ASSERT_EQ | ( | 4 | , |
| SceOledErrorCode | |||
| ) |
| VITASDK_BUILD_ASSERT_EQ | ( | 1 | , |
| SceOledColorSpaceMode | |||
| ) |
| int ksceOledDisplayOff | ( | void | ) |
Queue the OLED display-off sequence.
The sequence sends DCS display-off command 0x28, waits 16 ms, sends sleep-in command 0x10, and waits 96 ms. The cached brightness is set to 0. SPI and initialization errors from individual commands are not returned to the caller.
| int ksceOledDisplayOn | ( | void | ) |
Queue the OLED display-on sequence.
The sequence waits 64 ms, sends DCS sleep-out command 0x11, waits 208 ms, sends display-on command 0x29, and waits 16 ms. It does not restore the cached brightness. SPI and initialization errors from individual commands are not returned to the caller.
| SceUInt32 ksceOledGetBrightness | ( | void | ) |
Get the exact wide-brightness value most recently accepted by the driver.
Get the Device Descriptor Block values cached during OLED initialization.
Initialization reads five bytes with MIPI DSI command 0xA1. Either output pointer may be NULL.
| [out] | supplier_id | - Receives the first 16-bit DDB value when non-NULL. |
| [out] | supplier_elective_data | - Receives the second 16-bit DDB value when non-NULL. Its low byte selects the panel calibration table on FW 3.60. |
| SceOledColorSpaceMode ksceOledGetDisplayColorSpaceMode | ( | void | ) |
Get the cached OLED color-space mode.
| int ksceOledSetBrightness | ( | SceUInt32 | brightness | ) |
Set the wide OLED brightness.
Valid values range from 0 through 0x10000. Zero queues the display-off sequence. One selects a special dimmed calibration. Values from 2 through 0x10000 map to one of 16 panel-calibrated hardware levels. The exact requested value remains available through ksceOledGetBrightness. Changing from zero to a nonzero value appends the display-on sequence. SPI and initialization errors from individual commands are not returned to the caller.
| [in] | brightness | - Wide brightness from 0 through 0x10000. |
| int ksceOledSetDisplayColorSpaceMode | ( | SceOledColorSpaceMode | mode | ) |
Set the OLED color-space mode.
If brightness is zero, the new mode is cached without sending a command. Otherwise the driver sends DCS command 0xB3 with the selected mode. Before panel calibration has been installed, the function returns success without changing the cached mode. SPI and initialization errors from individual commands are not returned to the caller.
| [in] | mode | - One of SceOledColorSpaceMode. |
| int ksceOledWaitReady | ( | void | ) |
Wait until the asynchronous OLED initialization attempt has completed.
This function busy-waits and returns 0 for both successful and failed initialization. Call ksceOledGetDDB to check whether initialization succeeded.