C-Language Wrappers

Description

The CTR-SDK APIs are mostly written in C++. C++ APIs cannot be called directly from C-language files.

The CTR-SDK therefore provides wrappers that allow you to call the C++ APIs from C source files.

Mutex Example

In C++, you would use the nn::os::Mutex class to use mutexes. The mutex class maintains mutex objects internally.

The names of the wrappers that allow this class to be used in C begin with nnosMutex, as shown in the examples below. These functions have a 1:1 correspondence with the C++ methods.

For more details on a C wrapper function, see the explanation for the corresponding class method.

The nnosMutex structure, the data type that stores mutex objects in C, is an exception. This structure is actually a class instance under the hood, so it cannot be referenced directly from the C language.

Revision History

2011/06/16
Deleted the list title.
2010/01/07
Initial version.

CONFIDENTIAL