libctru
v2.4.1
|
QTM Hardware Check service. More...
#include <3ds/types.h>
Go to the source code of this file.
Functions | |
Result | qtmcInit (void) |
Initializes qtm:c . More... | |
void | qtmcExit (void) |
Exits qtm:c . | |
Handle * | qtmcGetSessionHandle (void) |
Returns a pointer to the current qtm:c session handle. | |
Result | QTMC_StartHardwareCheck (void) |
Starts the QTM Hardware Check API. More... | |
Result | QTMC_StopHardwareCheck (void) |
Stops the QTM Hardware Check API. More... | |
Result | QTMC_SetBarrierPattern (u32 pattern) |
Result | QTMC_WaitAndCheckExpanderWorking (bool *outWorking) |
Waits for the expander management thread to (re)initalize the TI TCA6416A I2C->Parallel expander, then checks if that expander is behaving as expected (responds with the port direction config it has been configured with): it checks whether all ports have been configured as outputs. More... | |
Result | QTMC_SetIrLedStatusOverride (bool on) |
Temporarily overrides IR LED state. More... | |
QTM Hardware Check service.
Allows direct control over the parallax barrier's pattern and polarity phase through the TI TCA6416A I2C->Parallel expander, as well as control over IR LED state even when camera is used by user.
TI TCA6416A I2C->Parallel expander is located on bus I2C1 (PA 0x10161000) device ID 0x40.
The top screen parallax barrier was covered by patent US20030234980A1.
Result QTMC_SetIrLedStatusOverride | ( | bool | on | ) |
Temporarily overrides IR LED state.
Requires "manual control" from qtm:u
to be disabled, and has lower priority than it. Same implementation as QTMS_SetIrLedStatusOverride.
on | Whether to turn the IR LED on or off. |
0xD82183F8
if API not started, 0xC8A18005
if manual control was enabled or if the operation failed, or 0xC8A18009
if QTM is unavailable (in particular, QTM is always unavailable on N2DSXL). Otherwise, 0 (success). Result QTMC_StartHardwareCheck | ( | void | ) |
Starts the QTM Hardware Check API.
This must be called before using any other qtm:c
command, and causes barrier pattern to be overriden by what was last set in QTMC_SetBarrierPattern, even in 2D mode. Also allows IR LED state to be overridden even if user uses the inner camera.
0xD82183F9
if already started, otherwise 0 (success). Result QTMC_StopHardwareCheck | ( | void | ) |
Stops the QTM Hardware Check API.
Restore normal barrier and IR LED management behavior.
0xD82183F8
if API not started, otherwise 0 (success). Result QTMC_WaitAndCheckExpanderWorking | ( | bool * | outWorking | ) |
Waits for the expander management thread to (re)initalize the TI TCA6416A I2C->Parallel expander, then checks if that expander is behaving as expected (responds with the port direction config it has been configured with): it checks whether all ports have been configured as outputs.
On N2DSXL, this function waits forever and never returns.
In detail, the hardware init procedure for the expander is as follows (as done by the expander mgmt. thread):
[out] | outWorking | Where to write the working status to. If true, expander is present working. If false, the expander is present but is misbehaving. If the function does not return, then expander is missing (e.g. on N2DSXL). |
0xD82183F8
if API not started, otherwise 0 (success). Result qtmcInit | ( | void | ) |
Initializes qtm:c
.
Only 3 sessions (2 until 9.3.0 sysupdate) for ALL services COMBINED, including the main services, can be open at a time.