]> Chaos Git - corbenik/ctrulib.git/commitdiff
Doc consistency.
authorSteven Smith <Steveice10@gmail.com>
Sun, 4 Oct 2015 21:08:02 +0000 (14:08 -0700)
committerSteven Smith <Steveice10@gmail.com>
Sun, 4 Oct 2015 21:08:02 +0000 (14:08 -0700)
14 files changed:
libctru/include/3ds/console.h
libctru/include/3ds/gfx.h
libctru/include/3ds/gpu/gx.h
libctru/include/3ds/ipc.h
libctru/include/3ds/os.h
libctru/include/3ds/romfs.h
libctru/include/3ds/sdmc.h
libctru/include/3ds/services/fs.h
libctru/include/3ds/srv.h
libctru/include/3ds/svc.h
libctru/include/3ds/synchronization.h
libctru/include/3ds/types.h
libctru/include/3ds/util/rbtree.h
libctru/include/3ds/util/utf.h

index f63598670889e72044f70cc98361db65725d32ff..05aef1a792aa40917090dbbdaa0cf5df1d35075c 100644 (file)
@@ -1,19 +1,16 @@
-/*! \file console.h\r
-    \brief 3ds stdio support.\r
-\r
-<div class="fileHeader">\r
-Provides stdio integration for printing to the 3DS screen as well as debug print\r
-functionality provided by stderr.\r
-\r
-General usage is to initialize the console by:\r
-consoleDemoInit()\r
-or to customize the console usage by:\r
-consoleInit()\r
-\r
+/**\r
+ * @file console.h\r
+ * @brief 3ds stdio support.\r
+ *\r
+ * Provides stdio integration for printing to the 3DS screen as well as debug print\r
+ * functionality provided by stderr.\r
+ *\r
+ * General usage is to initialize the console by:\r
+ * consoleDemoInit()\r
+ * or to customize the console usage by:\r
+ * consoleInit()\r
 */\r
-\r
-#ifndef CONSOLE_H\r
-#define CONSOLE_H\r
+#pragma once\r
 \r
 #include <3ds/types.h>\r
 #include <3ds/gfx.h>\r
@@ -22,73 +19,74 @@ consoleInit()
 extern "C" {\r
 #endif\r
 \r
-typedef bool(* ConsolePrint)(void* con, int c);\r
+/// A callback for printing a character.\r
+typedef bool(*ConsolePrint)(void* con, int c);\r
 \r
-//! a font struct for the console.\r
+/// A font struct for the console.\r
 typedef struct ConsoleFont\r
 {\r
-       u8* gfx;                //!< A pointer to the font graphics\r
-       u16 asciiOffset;        //!<  Offset to the first valid character in the font table\r
-       u16 numChars;           //!< Number of characters in the font graphics\r
+       u8* gfx;         ///< A pointer to the font graphics\r
+       u16 asciiOffset; ///< Offset to the first valid character in the font table\r
+       u16 numChars;    ///< Number of characters in the font graphics\r
 \r
 }ConsoleFont;\r
 \r
-/** \brief console structure used to store the state of a console render context.\r
-\r
-Default values from consoleGetDefault();\r
-<div class="fixedFont"><pre>\r
-PrintConsole defaultConsole =\r
-{\r
-       //Font:\r
-       {\r
-               (u8*)default_font_bin, //font gfx\r
-               0, //first ascii character in the set\r
-               128, //number of characters in the font set\r
-       },\r
-       0,0, //cursorX cursorY\r
-       0,0, //prevcursorX prevcursorY\r
-       40, //console width\r
-       30, //console height\r
-       0,  //window x\r
-       0,  //window y\r
-       32, //window width\r
-       24, //window height\r
-       3, //tab size\r
-       0, //font character offset\r
-       0,  //print callback\r
-       false //console initialized\r
-};\r
-</pre></div>\r
-*/\r
+/**\r
+ * @brief console structure used to store the state of a console render context.\r
+ *\r
+ * Default values from consoleGetDefault();\r
+ * <div class="fixedFont"><pre>\r
+ * PrintConsole defaultConsole =\r
+ * {\r
+ *     //Font:\r
+ *     {\r
+ *             (u8*)default_font_bin, //font gfx\r
+ *             0, //first ascii character in the set\r
+ *             128, //number of characters in the font set\r
+ *     },\r
+ *     0,0, //cursorX cursorY\r
+ *     0,0, //prevcursorX prevcursorY\r
+ *     40, //console width\r
+ *     30, //console height\r
+ *     0,  //window x\r
+ *     0,  //window y\r
+ *     32, //window width\r
+ *     24, //window height\r
+ *     3, //tab size\r
+ *     0, //font character offset\r
+ *     0,  //print callback\r
+ *     false //console initialized\r
+ * };\r
+ * </pre></div>\r
+ */\r
 typedef struct PrintConsole\r
 {\r
-       ConsoleFont font;       //!< font of the console.\r
+       ConsoleFont font;        ///< Font of the console.\r
 \r
-       u16 *frameBuffer;       //!< framebuffer address.\r
+       u16 *frameBuffer;        ///< Framebuffer address.\r
 \r
-       int cursorX;            /*!< Current X location of the cursor (as a tile offset by default) */\r
-       int cursorY;            /*!< Current Y location of the cursor (as a tile offset by default) */\r
+       int cursorX;             ///< Current X location of the cursor (as a tile offset by default)\r
+       int cursorY;             ///< Current Y location of the cursor (as a tile offset by default)\r
 \r
-       int prevCursorX;        /*!< Internal state */\r
-       int prevCursorY;        /*!< Internal state */\r
+       int prevCursorX;         ///< Internal state\r
+       int prevCursorY;         ///< Internal state\r
 \r
-       int consoleWidth;       /*!< Width of the console hardware layer in characters */\r
-       int consoleHeight;      /*!< Height of the console hardware layer in characters  */\r
+       int consoleWidth;        ///< Width of the console hardware layer in characters\r
+       int consoleHeight;       ///< Height of the console hardware layer in characters\r
 \r
-       int windowX;            /*!< Window X location in characters (not implemented) */\r
-       int windowY;            /*!< Window Y location in characters (not implemented) */\r
-       int windowWidth;        /*!< Window width in characters (not implemented) */\r
-       int windowHeight;       /*!< Window height in characters (not implemented) */\r
+       int windowX;             ///< Window X location in characters (not implemented)\r
+       int windowY;             ///< Window Y location in characters (not implemented)\r
+       int windowWidth;         ///< Window width in characters (not implemented)\r
+       int windowHeight;        ///< Window height in characters (not implemented)\r
 \r
-       int tabSize;            /*!< Size of a tab*/\r
-       int fg;                         /*!< foreground color*/\r
-       int bg;                         /*!< background color*/\r
-       int flags;                      /*!< reverse/bright flags*/\r
+       int tabSize;             ///< Size of a tab\r
+       int fg;                  ///< Foreground color\r
+       int bg;                  ///< Background color\r
+       int flags;               ///< Reverse/bright flags\r
 \r
-       ConsolePrint PrintChar;                 /*!< callback for printing a character. Should return true if it has handled rendering the graphics\r
-                                                                       (else the print engine will attempt to render via tiles) */\r
+       ConsolePrint PrintChar;  ///< Callback for printing a character. Should return true if it has handled rendering the graphics (else the print engine will attempt to render via tiles).\r
 \r
-       bool consoleInitialised;        /*!< True if the console is initialized */\r
+       bool consoleInitialised; ///< True if the console is initialized\r
 }PrintConsole;\r
 \r
 #define CONSOLE_COLOR_BOLD     (1<<0)\r
@@ -101,58 +99,61 @@ typedef struct PrintConsole
 #define CONSOLE_CONCEAL                (1<<7)\r
 #define CONSOLE_CROSSED_OUT    (1<<8)\r
 \r
-//! Console debug devices supported by libnds.\r
+/// Console debug devices supported by libnds.\r
 typedef enum {\r
-       debugDevice_NULL,       //!< swallows prints to stderr\r
-       debugDevice_3DMOO,      //!< Directs stderr debug statements to 3dmoo\r
-       debugDevice_CONSOLE,    //!< Directs stderr debug statements to 3DS console window\r
+       debugDevice_NULL,    ///< swallows prints to stderr\r
+       debugDevice_3DMOO,   ///< Directs stderr debug statements to 3dmoo\r
+       debugDevice_CONSOLE, ///< Directs stderr debug statements to 3DS console window\r
 } debugDevice;\r
 \r
-/*!    \brief Loads the font into the console\r
-       \param console pointer to the console to update, if NULL it will update the current console\r
-       \param font the font to load\r
+/**\r
+ * @brief Loads the font into the console.\r
+ * @param console Pointer to the console to update, if NULL it will update the current console.\r
+ * @param font The font to load.\r
 */\r
 void consoleSetFont(PrintConsole* console, ConsoleFont* font);\r
 \r
-/*!    \brief Sets the print window\r
-       \param console console to set, if NULL it will set the current console window\r
-       \param x x location of the window\r
-       \param y y location of the window\r
-       \param width width of the window\r
-       \param height height of the window\r
+/**\r
+ * @brief Sets the print window.\r
+ * @param console Console to set, if NULL it will set the current console window.\r
+ * @param x X location of the window.\r
+ * @param y Y location of the window.\r
+ * @param width Width of the window.\r
+ * @param height Height of the window.\r
 */\r
 void consoleSetWindow(PrintConsole* console, int x, int y, int width, int height);\r
 \r
-/*!    \brief Gets a pointer to the console with the default values\r
-       this should only be used when using a single console or without changing the console that is returned, other wise use consoleInit()\r
-       \return A pointer to the console with the default values\r
+/**\r
+ * @brief Gets a pointer to the console with the default values.\r
+ * This should only be used when using a single console or without changing the console that is returned, otherwise use consoleInit().\r
+ * @return A pointer to the console with the default values.\r
 */\r
 PrintConsole* consoleGetDefault(void);\r
 \r
-/*!    \brief Make the specified console the render target\r
-       \param console A pointer to the console struct (must have been initialized with consoleInit(PrintConsole* console)\r
-       \return a pointer to the previous console\r
+/**\r
+ * @brief Make the specified console the render target.\r
+ * @param console A pointer to the console struct (must have been initialized with consoleInit(PrintConsole* console)).\r
+ * @return A pointer to the previous console.\r
 */\r
 PrintConsole *consoleSelect(PrintConsole* console);\r
 \r
-/*!    \brief Initialise the console.\r
-       \param screen The screen to use for the console\r
-       \param console A pointer to the console data to initialze (if it's NULL, the default console will be used)\r
-       \return A pointer to the current console.\r
+/**\r
+ * @brief Initialise the console.\r
+ * @param screen The screen to use for the console.\r
+ * @param console A pointer to the console data to initialize (if it's NULL, the default console will be used).\r
+ * @return A pointer to the current console.\r
 */\r
 PrintConsole* consoleInit(gfxScreen_t screen, PrintConsole* console);\r
 \r
-/*!    \brief Initializes debug console output on stderr to the specified device\r
-       \param device The debug device (or devices) to output debug print statements to\r
+/**\r
+ * @brief Initializes debug console output on stderr to the specified device.\r
+ * @param device The debug device (or devices) to output debug print statements to.\r
 */\r
 void consoleDebugInit(debugDevice device);\r
 \r
-\r
-//! Clears the screan by using iprintf("\x1b[2J");\r
+/// Clears the screan by using iprintf("\x1b[2J");\r
 void consoleClear(void);\r
 \r
 #ifdef __cplusplus\r
 }\r
 #endif\r
-\r
-#endif\r
index cf37fecd9857ee2acea98b29c2e4e5c5b006b81f..072ac6c02701b40a92837d1b41f6200f21bc0599 100644 (file)
@@ -13,7 +13,7 @@
 #define RGB565(r,g,b)  (((b)&0x1f)|(((g)&0x3f)<<5)|(((r)&0x1f)<<11))
 #define RGB8_to_565(r,g,b)  (((b)>>3)&0x1f)|((((g)>>2)&0x3f)<<5)|((((r)>>3)&0x1f)<<11)
 
-//! Available screens.
+/// Available screens.
 typedef enum
 {
        GFX_TOP = 0,   ///< Top screen
index 290119639a4e349d09fbe253490e5a4f7920fd7d..8f059b092c684377f8d1a187eff3356394894ddd 100644 (file)
@@ -32,9 +32,7 @@ typedef enum
        GX_TRANSFER_SCALE_XY = 2, ///< 2x2 anti-aliasing
 } GX_TRANSFER_SCALE;
 
-/**
- * @brief GX transfer control flags
- */
+/// GX transfer control flags
 typedef enum
 {
        GX_FILL_TRIGGER     = 0x001, ///< Trigger the PPF event
index 6baba482c7eb0367be29df96d42688ddbce3db1d..f13c59f884158335d39bab00eb0b68a78286235e 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <3ds/types.h>
 
-//! IPC buffer access rights.
+/// IPC buffer access rights.
 typedef enum
 {
        IPC_BUFFER_R  = BIT(1),                     ///< Readable
index ddac57362ec70bf0d30213b7cbe2e22bcc6fd64b..dbf5453043b0d4a117b3e3be1e7788adc0c375d3 100644 (file)
 #define GET_VERSION_REVISION(version) (((version)>> 8)&0xFF)
 
 /**
- * Converts an address from virtual (process) memory to physical memory.
+ * @brief Converts an address from virtual (process) memory to physical memory.
  * It is sometimes required by services or when using the GPU command buffer.
  */
 u32 osConvertVirtToPhys(u32 vaddr);
 
 /**
- * Converts 0x14* vmem to 0x30*.
+ * @brief Converts 0x14* vmem to 0x30*.
  * @return The input address when it's already within the new vmem.
  * @return 0 when outside of either LINEAR mem areas.
  */
 u32 osConvertOldLINEARMemToNew(u32 addr);
 
 /**
- * @brief Basic information about a service error.
+ * @brief Retreives basic information about a service error.
  * @return A string of the summary of an error.
  *
  * This can be used to get some details about an error returned by a service call.
@@ -34,14 +34,16 @@ u32 osConvertOldLINEARMemToNew(u32 addr);
 const char* osStrError(u32 error);
 
 /**
- * @return The Firm version
+ * @brief Gets the system's FIRM version.
+ * @return The FIRM version.
  *
  * This can be used to compare system versions easily with @ref SYSTEM_VERSION.
  */
 u32 osGetFirmVersion(void);
 
 /**
- * @return The kernel version
+ * @brief Gets the system's kernel version.
+ * @return The kernel version.
  *
  * This can be used to compare system versions easily with @ref SYSTEM_VERSION.
  *
@@ -52,6 +54,7 @@ u32 osGetFirmVersion(void);
 u32 osGetKernelVersion(void);
 
 /**
+ * @brief Gets the current time.
  * @return The number of milliseconds since 1st Jan 1900 00:00.
  */
 u64 osGetTime(void);
index 5f5dab0a7ff3170a254843295b4e07f31f5c65ee..e031cf79d59d3f0c5d61d5a56f20373302d96dd1 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <3ds/types.h>
 
-//! RomFS header.
+/// RomFS header.
 typedef struct
 {
        u32 headerSize;        ///< Size of the header.
@@ -21,7 +21,7 @@ typedef struct
        u32 fileDataOff;       ///< Offset of the file data.
 } romfs_header;
 
-//! RomFS directory.
+/// RomFS directory.
 typedef struct
 {
        u32 parent;    ///< Offset of the parent directory.
@@ -33,7 +33,7 @@ typedef struct
        u16 name[];    ///< Name. (UTF-16)
 } romfs_dir;
 
-//! RomFS file.
+/// RomFS file.
 typedef struct
 {
        u32 parent;   ///< Offset of the parent directory.
@@ -45,7 +45,7 @@ typedef struct
        u16 name[];   ///< Name. (UTF-16)
 } romfs_file;
 
-//! Initializes the RomFS driver.
+/// Initializes the RomFS driver.
 Result romfsInit(void);
 
 /**
@@ -55,5 +55,5 @@ Result romfsInit(void);
  */
 Result romfsInitFromFile(Handle file, u32 offset);
 
-//! Exits the RomFS driver.
+/// Exits the RomFS driver.
 Result romfsExit(void);
index 9606510923f1b710e3e065f87fbc770156147ae7..d86acde10aebcdc7a54e0d669f095c1984574f3c 100644 (file)
@@ -6,8 +6,8 @@
 
 #include <3ds/types.h>
 
-//! Initializes the SDMC driver.
+/// Initializes the SDMC driver.
 Result sdmcInit(void);
 
-//! Exits the SDMC driver.
+/// Exits the SDMC driver.
 Result sdmcExit(void);
index a6e1f9b400e5f4c7d3552bae497b091362a85b2c..d31ccccbcbb6e12d2668aca41649a7dd3ffcd0cd 100644 (file)
@@ -1,72 +1,75 @@
+/**
+ * @file FS.h
+ * @brief Filesystem Services
+ */
 #pragma once
-#include <3ds/types.h>
 
-/*! @file FS.h
- *
- *  Filesystem Services
- */
+#include <3ds/types.h>
 
-/*! @defgroup fs_open_flags FS Open Flags
+/**
+ * @defgroup fs_open_flags FS Open Flags
  *
- *  @sa FSUSER_OpenFile
- *  @sa FSUSER_OpenFileDirectly
+ * @sa FSUSER_OpenFile
+ * @sa FSUSER_OpenFileDirectly
  *
- *  @{
+ * @{
  */
 
-/*! Open file for read. */
+/// Open file for read.
 #define FS_OPEN_READ   (1<<0)
-/*! Open file for write. */
+/// Open file for write.
 #define FS_OPEN_WRITE  (1<<1)
-/*! Create file if it doesn't exist. */
+/// Create file if it doesn't exist.
 #define FS_OPEN_CREATE (1<<2)
-/* @} */
+/// @}
 
-/*! @defgroup fs_create_attributes FS Create Attributes
+/**
+ * @defgroup fs_create_attributes FS Create Attributes
  *
- *  @sa FSUSER_OpenFile
- *  @sa FSUSER_OpenFileDirectly
+ * @sa FSUSER_OpenFile
+ * @sa FSUSER_OpenFileDirectly
  *
- *  @{
+ * @{
  */
 
-/*! No attributes. */
+/// No attributes.
 #define FS_ATTRIBUTE_NONE      (0x00000000)
-/*! Create with read-only attribute. */
+/// Create with read-only attribute.
 #define FS_ATTRIBUTE_READONLY  (0x00000001)
-/*! Create with archive attribute. */
+/// Create with archive attribute.
 #define FS_ATTRIBUTE_ARCHIVE   (0x00000100)
-/*! Create with hidden attribute. */
+/// Create with hidden attribute.
 #define FS_ATTRIBUTE_HIDDEN    (0x00010000)
-/*! Create with directory attribute. */
+/// Create with directory attribute.
 #define FS_ATTRIBUTE_DIRECTORY (0x01000000)
-/*! @} */
+/// @}
 
-/*! @defgroup fs_write_flush_flags FS Flush Flags
+/**
+ * @defgroup fs_write_flush_flags FS Flush Flags
  *
- *  @sa FSFILE_Write
+ * @sa FSFILE_Write
  *
- *  @{
+ * @{
  */
 
-/*! Don't flush */
+/// Don't flush
 #define FS_WRITE_NOFLUSH (0x00000000)
-/*! Flush */
+/// Flush
 #define FS_WRITE_FLUSH   (0x00010001)
 
-/* @} */
+/// @}
 
-/*! FS path type */
+/// FS path type
 typedef enum
 {
-       PATH_INVALID = 0, //!< Specifies an invalid path.
-       PATH_EMPTY   = 1, //!< Specifies an empty path.
-       PATH_BINARY  = 2, //!< Specifies a binary path, which is non-text based.
-       PATH_CHAR    = 3, //!< Specifies a text based path with a 8-bit byte per character.
-       PATH_WCHAR   = 4, //!< Specifies a text based path with a 16-bit short per character.
+       PATH_INVALID = 0, ///< Specifies an invalid path.
+       PATH_EMPTY   = 1, ///< Specifies an empty path.
+       PATH_BINARY  = 2, ///< Specifies a binary path, which is non-text based.
+       PATH_CHAR    = 3, ///< Specifies a text based path with a 8-bit byte per character.
+       PATH_WCHAR   = 4, ///< Specifies a text based path with a 16-bit short per character.
 } FS_pathType;
 
-/*! FS archive ids */
+/// FS archive ids
 typedef enum
 {
        ARCH_ROMFS = 0x3,
@@ -83,48 +86,48 @@ typedef enum
        ARCH_NAND_RO_WRITE_ACCESS = 0x1234567F,
 } FS_archiveIds;
 
-/*! FS path */
+/// FS path
 typedef struct
 {
-       FS_pathType type;  //!< FS path type.
-       u32         size;  //!< FS path size.
-       const u8    *data; //!< Pointer to FS path data.
+       FS_pathType type;  ///< FS path type.
+       u32         size;  ///< FS path size.
+       const u8    *data; ///< Pointer to FS path data.
 } FS_path;
 
-/*! FS archive */
+/// FS archive
 typedef struct
 {
-       u32     id;         //!< Archive ID.
-       FS_path lowPath;    //!< FS path.
-       Handle  handleLow;  //!< High word of handle.
-       Handle  handleHigh; //!< Low word of handle.
+       u32     id;         ///< Archive ID.
+       FS_path lowPath;    ///< FS path.
+       Handle  handleLow;  ///< High word of handle.
+       Handle  handleHigh; ///< Low word of handle.
 } FS_archive;
 
-/*! Directory entry */
+/// Directory entry
 typedef struct
 {
   // 0x00
-  u16 name[0x106];     //!< UTF-16 encoded name
+  u16 name[0x106];     ///< UTF-16 encoded name
   // 0x20C
-  u8  shortName[0x09]; //!< 8.3 file name
+  u8  shortName[0x09]; ///< 8.3 file name
   // 0x215
-  u8  unknown1;        //!< ???
+  u8  unknown1;        ///< ???
   // 0x216
-  u8  shortExt[0x04];  //!< 8.3 file extension (set to spaces for directories)
+  u8  shortExt[0x04];  ///< 8.3 file extension (set to spaces for directories)
   // 0x21A
-  u8  unknown2;        //!< ???
+  u8  unknown2;        ///< ???
   // 0x21B
-  u8  unknown3;        //!< ???
+  u8  unknown3;        ///< ???
   // 0x21C
-  u8  isDirectory;     //!< directory bit
+  u8  isDirectory;     ///< directory bit
   // 0x21D
-  u8  isHidden;        //!< hidden bit
+  u8  isHidden;        ///< hidden bit
   // 0x21E
-  u8  isArchive;       //!< archive bit
+  u8  isArchive;       ///< archive bit
   // 0x21F
-  u8  isReadOnly;      //!< read-only bit
+  u8  isReadOnly;      ///< read-only bit
   // 0x220
-  u64 fileSize;        //!< file size
+  u64 fileSize;        ///< file size
 } FS_dirent;
 
 Result fsInit(void);
index 6b2a8e27ef984d7ad1a4d2721872b7ca694c5982..bbdbe58e9b3a5d0b579555eb9787065d10501185 100644 (file)
@@ -4,10 +4,10 @@
  */
 #pragma once
 
-//! Initializes the service API.
+/// Initializes the service API.
 Result srvInit(void);
 
-//! Exits the service API.
+/// Exits the service API.
 Result srvExit(void);
 
 /**
@@ -16,7 +16,7 @@ Result srvExit(void);
  */
 Handle *srvGetSessionHandle(void);
 
-//! Registers the current process as a client to the service API.
+/// Registers the current process as a client to the service API.
 Result srvRegisterClient(void);
 
 /**
@@ -47,7 +47,7 @@ Result srvRegisterService(Handle* out, const char* name, int maxSessions);
  */
 Result srvUnregisterService(const char* name);
 
-//! Initializes the srv:pm port.
+/// Initializes the srv:pm port.
 Result srvPmInit(void);
 
 /**
index ba81b0ba503f46864a3c59298563b491e2ba2ea4..fd917215234849c118bae9b56d03ffd97f8f94fa 100644 (file)
@@ -37,7 +37,7 @@ typedef enum {
        MEMOP_ALLOC_LINEAR   = MEMOP_LINEAR_FLAG | MEMOP_ALLOC, ///< Allocates linear memory.
 } MemOp;
 
-//! The state of a memory block.
+/// The state of a memory block.
 typedef enum {
        MEMSTATE_FREE       = 0,  ///< Free memory
        MEMSTATE_RESERVED   = 1,  ///< Reserved memory
@@ -53,7 +53,7 @@ typedef enum {
        MEMSTATE_LOCKED     = 11  ///< Locked memory
 } MemState;
 
-//! Memory permission flags
+/// Memory permission flags
 typedef enum {
        MEMPERM_READ     = 1,         ///< Readable
        MEMPERM_WRITE    = 2,         ///< Writable
@@ -61,7 +61,7 @@ typedef enum {
        MEMPERM_DONTCARE = 0x10000000 ///< Don't care
 } MemPerm;
 
-//! Memory information.
+/// Memory information.
 typedef struct {
     u32 base_addr; ///< Base address.
     u32 size;      ///< Size.
@@ -69,12 +69,12 @@ typedef struct {
     u32 state;     ///< Memory state. See @ref MemState
 } MemInfo;
 
-//! Memory page information.
+/// Memory page information.
 typedef struct {
     u32 flags; ///< Page flags.
 } PageInfo;
 
-//! Arbitration modes.
+/// Arbitration modes.
 typedef enum {
        ARBITRATION_SIGNAL                                  = 0, ///< Signal #value threads for wake-up.
        ARBITRATION_WAIT_IF_LESS_THAN                       = 1, ///< If the memory at the address is strictly lower than #value, then wait for signal.
@@ -91,7 +91,7 @@ typedef enum {
 ///@name Multithreading
 ///@{
 
-//! Types of thread info.
+/// Types of thread info.
 typedef enum {
        THREADINFO_TYPE_UNKNOWN ///< Unknown.
 } ThreadInfoType;
@@ -105,13 +105,13 @@ typedef enum {
 ///@name Debugging
 ///@{
 
-//! Reasons for a process event.
+/// Reasons for a process event.
 typedef enum {
        REASON_CREATE = 1, ///< Process created.
        REASON_ATTACH = 2  ///< Process attached.
 } ProcessEventReason;
 
-//! Event relating to a process.
+/// Event relating to a process.
 typedef struct {
        u64 program_id;      ///< ID of the program.
        u8  process_name[8]; ///< Name of the process.
@@ -119,26 +119,26 @@ typedef struct {
        u32 reason;          ///< Reason for the event. See @ref ProcessEventReason
 } ProcessEvent;
 
-//! Reasons for an exit process event.
+/// Reasons for an exit process event.
 typedef enum {
        EXITPROCESS_EVENT_NONE                = 0, ///< No reason.
        EXITPROCESS_EVENT_TERMINATE           = 1, ///< Process terminated.
        EXITPROCESS_EVENT_UNHANDLED_EXCEPTION = 2  ///< Unhandled exception occurred.
 } ExitProcessEventReason;
 
-//! Event relating to the exiting of a process.
+/// Event relating to the exiting of a process.
 typedef struct {
        u32 reason; ///< Reason for exiting. See @ref ExitProcessEventReason
 } ExitProcessEvent;
 
-//! Event relating to the creation of a thread.
+/// Event relating to the creation of a thread.
 typedef struct {
        u32 creator_thread_id; ///< ID of the creating thread.
        u32 base_addr;         ///< Base address.
        u32 entry_point;       ///< Entry point of the thread.
 } CreateThreadEvent;
 
-//! Reasons for an exit thread event.
+/// Reasons for an exit thread event.
 typedef enum {
        EXITTHREAD_EVENT_NONE              = 0, ///< No reason.
        EXITTHREAD_EVENT_TERMINATE         = 1, ///< Thread terminated.
@@ -146,19 +146,19 @@ typedef enum {
        EXITTHREAD_EVENT_TERMINATE_PROCESS = 3  ///< Process terminated.
 } ExitThreadEventReason;
 
-//! Event relating to the exiting of a thread.
+/// Event relating to the exiting of a thread.
 typedef struct {
        u32 reason; ///< Reason for exiting. See @ref ExitThreadEventReason
 } ExitThreadEvent;
 
-//! Reasons for a user break.
+/// Reasons for a user break.
 typedef enum {
        USERBREAK_PANIC  = 0, ///< Panic.
        USERBREAK_ASSERT = 1, ///< Assertion failed.
        USERBREAK_USER   = 2  ///< User related.
 } UserBreakType;
 
-//! Reasons for an exception event.
+/// Reasons for an exception event.
 typedef enum {
        EXC_EVENT_UNDEFINED_INSTRUCTION = 0, ///< Undefined instruction.   arg: (None)
        EXC_EVENT_UNKNOWN1              = 1, ///< Unknown.                 arg: (None)
@@ -171,31 +171,31 @@ typedef enum {
        EXC_EVENT_UNDEFINED_SYSCALL     = 8  ///< Undefined syscall.       arg: attempted syscall
 } ExceptionEventType;
 
-//! Event relating to exceptions.
+/// Event relating to exceptions.
 typedef struct {
        u32 type;     ///< Type of event. See @ref ExceptionEventType
        u32 address;  ///< Address of the exception.
        u32 argument; ///< Event argument. See @ref ExceptionEventType
 } ExceptionEvent;
 
-//! Event relating to the scheduler.
+/// Event relating to the scheduler.
 typedef struct {
        u64 clock_tick; ///< Clock tick that the event occurred.
 } SchedulerInOutEvent;
 
-//! Event relating to syscalls.
+/// Event relating to syscalls.
 typedef struct {
        u64 clock_tick; ///< Clock tick that the event occurred.
        u32 syscall;    ///< Syscall sent/received.
 } SyscallInOutEvent;
 
-//! Event relating to debug output.
+/// Event relating to debug output.
 typedef struct {
        u32 string_addr; ///< Address of the outputted string.
        u32 string_size; ///< Size of the outputted string.
 } OutputStringEvent;
 
-//! Event relating to the mapping of memory.
+/// Event relating to the mapping of memory.
 typedef struct {
        u32 mapped_addr; ///< Mapped address.
        u32 mapped_size; ///< Mapped size.
@@ -203,7 +203,7 @@ typedef struct {
        u32 memstate;    ///< Memory state. See @ref MemState
 } MapEvent;
 
-//! Debug event type.
+/// Debug event type.
 typedef enum {
        DBG_EVENT_PROCESS        = 0,  ///< Process event.
        DBG_EVENT_CREATE_THREAD  = 1,  ///< Thread creation event.
@@ -220,7 +220,7 @@ typedef enum {
        DBG_EVENT_MAP            = 12  ///< Map event.
 } DebugEventType;
 
-//! Information about a debug event.
+/// Information about a debug event.
 typedef struct {
        u32 type;       ///< Type of event. See @ref DebugEventType
        u32 thread_id;  ///< ID of the thread.
@@ -441,7 +441,7 @@ Result svcWriteProcessMemory(Handle debug, const void* buffer, u32 addr, u32 siz
  */
 Result svcOpenProcess(Handle* process, u32 processId);
 
-//! Exits the current process.
+/// Exits the current process.
 void svcExitProcess() __attribute__((noreturn));
 
 /**
@@ -535,7 +535,7 @@ void svcExitThread(void) __attribute__((noreturn));
  */
 void svcSleepThread(s64 ns);
 
-//! Retrieves the priority of a thread.
+/// Retrieves the priority of a thread.
 Result svcGetThreadPriority(s32 *out, Handle handle);
 
 /**
index 9d61ae1ebc1a87bf58fd09be93c232a34e692f8a..eb0ee841697ac6a6dc5ca83e5f35244aca96acb0 100644 (file)
@@ -4,10 +4,10 @@
  */
 #pragma once
 
-//! A light lock.
+/// A light lock.
 typedef s32 LightLock;
 
-//! A recursive lock.
+/// A recursive lock.
 typedef struct
 {
        LightLock lock; ///< Inner light lock.
@@ -15,7 +15,7 @@ typedef struct
        u32 counter;    ///< Lock count.
 } RecursiveLock;
 
-//! Performs a clrex operation.
+/// Performs a clrex operation.
 static inline void __clrex(void)
 {
        __asm__ __volatile__("clrex");
index 5a5c45ae3a269167b3ed5f62241acb3f8ef3e312..d7754c0ce3ba4076cc53daa34ea6af1bb8719d24 100644 (file)
@@ -8,10 +8,10 @@
 #include <stdbool.h>
 #include <stddef.h>
 
-//! The maximum value of a u64.
+/// The maximum value of a u64.
 #define U64_MAX        UINT64_MAX
 
-//! Possible media types.
+/// Possible media types.
 typedef enum
 {
        mediatype_NAND,     ///< NAND
@@ -43,15 +43,15 @@ typedef u32 Handle;                 ///< Resource handle.
 typedef s32 Result;                 ///< Function result.
 typedef void (*ThreadFunc)(void *); ///< Thread entrypoint function.
 
-//! Creates a bitmask from a bit number.
+/// Creates a bitmask from a bit number.
 #define BIT(n) (1U<<(n))
 
-//! aligns a struct (and other types?) to m, making sure that the size of the struct is a multiple of m.
+/// aligns a struct (and other types?) to m, making sure that the size of the struct is a multiple of m.
 #define ALIGN(m)   __attribute__((aligned(m)))
-//! packs a struct (and other types?) so it won't include padding bytes.
+/// packs a struct (and other types?) so it won't include padding bytes.
 #define PACKED     __attribute__((packed))
 
-//! flags a function as deprecated.
+/// flags a function as deprecated.
 #ifndef LIBCTRU_NO_DEPRECATION
 #define DEPRECATED __attribute__ ((deprecated))
 #else
index c78c6b285ca946cb1801e0b594e083902c1c52ca..6e1cf34ae0cf88cbec0c75cb8f7ea007243cebe3 100644 (file)
@@ -7,7 +7,7 @@
 #include <stdint.h>
 #include <stddef.h>
 
-//! brief Retreives an rbtree item.
+/// brief Retreives an rbtree item.
 #define rbtree_item(ptr, type, member) \
   ((type*)(((char*)ptr) - offsetof(type, member)))
 
@@ -18,14 +18,14 @@ typedef void (*rbtree_node_destructor_t)(rbtree_node_t *Node);      ///< rbtree
 typedef int  (*rbtree_node_comparator_t)(const rbtree_node_t *lhs,
                                          const rbtree_node_t *rhs); ///< rbtree node comparator.
 
-//! An rbtree node.
+/// An rbtree node.
 struct rbtree_node
 {
   uintptr_t      parent_color; ///< Parent color.
   rbtree_node_t  *child[2];    ///< Node children.
 };
 
-//! An rbtree.
+/// An rbtree.
 struct rbtree
 {
   rbtree_node_t            *root;      ///< Root node.
index 3d4e3c835b4aa3f7efd844ff29d8ba46df847f08..bc2966d67de23b383efb91907bcd0e2be3db46c1 100644 (file)
@@ -7,7 +7,7 @@
 #include <stdint.h>
 #include <sys/types.h>
 
-/*! Convert a UTF-8 sequence into a UTF-32 codepoint
+/** Convert a UTF-8 sequence into a UTF-32 codepoint
  *
  *  @param[out] out Output codepoint
  *  @param[in]  in  Input sequence
@@ -17,7 +17,7 @@
  */
 ssize_t decode_utf8 (uint32_t *out, const uint8_t *in);
 
-/*! Convert a UTF-16 sequence into a UTF-32 codepoint
+/** Convert a UTF-16 sequence into a UTF-32 codepoint
  *
  *  @param[out] out Output codepoint
  *  @param[in]  in  Input sequence
@@ -27,7 +27,7 @@ ssize_t decode_utf8 (uint32_t *out, const uint8_t *in);
  */
 ssize_t decode_utf16(uint32_t *out, const uint16_t *in);
 
-/*! Convert a UTF-32 codepoint into a UTF-8 sequence
+/** Convert a UTF-32 codepoint into a UTF-8 sequence
  *
  *  @param[out] out Output sequence
  *  @param[in]  in  Input codepoint
@@ -39,7 +39,7 @@ ssize_t decode_utf16(uint32_t *out, const uint16_t *in);
  */
 ssize_t encode_utf8 (uint8_t *out, uint32_t in);
 
-/*! Convert a UTF-32 codepoint into a UTF-16 sequence
+/** Convert a UTF-32 codepoint into a UTF-16 sequence
  *
  *  @param[out] out Output sequence
  *  @param[in]  in  Input codepoint
@@ -51,7 +51,7 @@ ssize_t encode_utf8 (uint8_t *out, uint32_t in);
  */
 ssize_t encode_utf16(uint16_t *out, uint32_t in);
 
-/*! Convert a UTF-8 sequence into a UTF-16 sequence
+/** Convert a UTF-8 sequence into a UTF-16 sequence
  *
  *  @param[out] out Output sequence
  *  @param[in]  in  Input sequence
@@ -61,7 +61,7 @@ ssize_t encode_utf16(uint16_t *out, uint32_t in);
  */
 size_t utf8_to_utf16(uint16_t *out, const uint8_t  *in, size_t len);
 
-/*! Convert a UTF-8 sequence into a UTF-32 sequence
+/** Convert a UTF-8 sequence into a UTF-32 sequence
  *
  *  @param[out] out Output sequence
  *  @param[in]  in  Input sequence
@@ -71,7 +71,7 @@ size_t utf8_to_utf16(uint16_t *out, const uint8_t  *in, size_t len);
  */
 size_t utf8_to_utf32(uint32_t *out, const uint8_t  *in, size_t len);
 
-/*! Convert a UTF-16 sequence into a UTF-8 sequence
+/** Convert a UTF-16 sequence into a UTF-8 sequence
  *
  *  @param[out] out Output sequence
  *  @param[in]  in  Input sequence
@@ -81,7 +81,7 @@ size_t utf8_to_utf32(uint32_t *out, const uint8_t  *in, size_t len);
  */
 size_t utf16_to_utf8(uint8_t  *out, const uint16_t *in, size_t len);
 
-/*! Convert a UTF-16 sequence into a UTF-32 sequence
+/** Convert a UTF-16 sequence into a UTF-32 sequence
  *
  *  @param[out] out Output sequence
  *  @param[in]  in  Input sequence
@@ -91,7 +91,7 @@ size_t utf16_to_utf8(uint8_t  *out, const uint16_t *in, size_t len);
  */
 size_t utf16_to_utf32(uint32_t *out, const uint16_t *in, size_t len);
 
-/*! Convert a UTF-32 sequence into a UTF-8 sequence
+/** Convert a UTF-32 sequence into a UTF-8 sequence
  *
  *  @param[out] out Output sequence
  *  @param[in]  in  Input sequence
@@ -101,7 +101,7 @@ size_t utf16_to_utf32(uint32_t *out, const uint16_t *in, size_t len);
  */
 size_t utf32_to_utf8(uint8_t  *out, const uint32_t *in, size_t len);
 
-/*! Convert a UTF-32 sequence into a UTF-16 sequence
+/** Convert a UTF-32 sequence into a UTF-16 sequence
  *
  *  @param[out] out Output sequence
  *  @param[in]  in  Input sequence