Improve the documentation

This commit is contained in:
Maschell 2022-08-27 13:00:16 +02:00
parent f0df840999
commit 51c67f8c4f

View File

@ -57,9 +57,9 @@ MochaUtilsStatus Mocha_CheckAPIVersion(uint32_t *outVersion);
* @param src - Source address
* @param size - Bytes to copy.
* @return MOCHA_RESULT_SUCCESS: The data has been copied successfully<br>
* MOCHA_RESULT_INVALID_ARGUMENT: invalid version pointer<br>
* MOCHA_RESULT_UNKNOWN_ERROR: Unknown error<br>
* MOCHA_RESULT_UNSUPPORTED_API_VERSION: Failed to get the API version caused by an outdated mocha version.
* MOCHA_RESULT_INVALID_ARGUMENT: Invalid dst or src pointer<br>
* MOCHA_RESULT_LIB_UNINITIALIZED: Library was not initialized. Call Mocha_InitLibrary() before using this function.<br>
* MOCHA_RESULT_UNKNOWN_ERROR: Unknown error
*/
MochaUtilsStatus Mocha_IOSUKernelMemcpy(uint32_t dst, uint32_t src, uint32_t size);
@ -69,9 +69,10 @@ MochaUtilsStatus Mocha_IOSUKernelMemcpy(uint32_t dst, uint32_t src, uint32_t siz
* @param buffer - Pointer to the data which should be written.
* @param size - Bytes to write.
* @return MOCHA_RESULT_SUCCESS: The data has been written successfully<br>
* MOCHA_RESULT_INVALID_ARGUMENT: invalid version pointer<br>
* MOCHA_RESULT_UNKNOWN_ERROR: Unknown error<br>
* MOCHA_RESULT_UNSUPPORTED_API_VERSION: Failed to get the API version caused by an outdated mocha version.
* MOCHA_RESULT_INVALID_ARGUMENT: Invalid address or buffer pointer<br>
* MOCHA_RESULT_LIB_UNINITIALIZED: Library was not initialized. Call Mocha_InitLibrary() before using this function.<br>
* MOCHA_RESULT_OUT_OF_MEMORY: Not enough memory <br>
* MOCHA_RESULT_UNKNOWN_ERROR: Unknown error
*/
MochaUtilsStatus Mocha_IOSUKernelWrite(uint32_t address, const uint8_t *buffer, uint32_t size);
@ -81,9 +82,9 @@ MochaUtilsStatus Mocha_IOSUKernelWrite(uint32_t address, const uint8_t *buffer,
* @param buffer - Pointer to the buffer where the read will be stored
* @param size - Bytes to read.
* @return MOCHA_RESULT_SUCCESS: The data has been read successfully<br>
* MOCHA_RESULT_INVALID_ARGUMENT: invalid version pointer<br>
* MOCHA_RESULT_UNKNOWN_ERROR: Unknown error<br>
* MOCHA_RESULT_UNSUPPORTED_API_VERSION: Failed to get the API version caused by an outdated mocha version.
* MOCHA_RESULT_INVALID_ARGUMENT: Invalid source address<br>
* MOCHA_RESULT_LIB_UNINITIALIZED: Library was not initialized. Call Mocha_InitLibrary() before using this function.<br>
* MOCHA_RESULT_UNKNOWN_ERROR: Unknown error
*/
MochaUtilsStatus Mocha_IOSUKernelRead(uint32_t address, uint8_t *out_buffer, uint32_t size);
@ -92,9 +93,10 @@ MochaUtilsStatus Mocha_IOSUKernelRead(uint32_t address, uint8_t *out_buffer, uin
* @param address Address where the value will be written.
* @param value Value that will be written to address.
* @return MOCHA_RESULT_SUCCESS: The data has been written successfully<br>
* MOCHA_RESULT_INVALID_ARGUMENT: invalid version pointer<br>
* MOCHA_RESULT_UNKNOWN_ERROR: Unknown error<br>
* MOCHA_RESULT_UNSUPPORTED_API_VERSION: Failed to get the API version caused by an outdated mocha version.
* MOCHA_RESULT_INVALID_ARGUMENT: Invalid target address<br>
* MOCHA_RESULT_LIB_UNINITIALIZED: Library was not initialized. Call Mocha_InitLibrary() before using this function.<br>
* MOCHA_RESULT_OUT_OF_MEMORY: Not enough memory <br>
* MOCHA_RESULT_UNKNOWN_ERROR: Unknown error
*/
MochaUtilsStatus Mocha_IOSUKernelWrite32(uint32_t address, uint32_t value);
@ -103,9 +105,9 @@ MochaUtilsStatus Mocha_IOSUKernelWrite32(uint32_t address, uint32_t value);
* @param address Address from which the data will be read.
* @param out_buffer Pointer where the result will be stored
* @return MOCHA_RESULT_SUCCESS: The data has been read successfully<br>
* MOCHA_RESULT_INVALID_ARGUMENT: invalid version pointer<br>
* MOCHA_RESULT_UNKNOWN_ERROR: Unknown error<br>
* MOCHA_RESULT_UNSUPPORTED_API_VERSION: Failed to get the API version caused by an outdated mocha version.
* MOCHA_RESULT_INVALID_ARGUMENT: Invalid target address<br>
* MOCHA_RESULT_LIB_UNINITIALIZED: Library was not initialized. Call Mocha_InitLibrary() before using this function.<br>
* MOCHA_RESULT_UNKNOWN_ERROR: Unknown error
*/
MochaUtilsStatus Mocha_IOSUKernelRead32(uint32_t address, uint32_t *out_buffer);
@ -114,7 +116,7 @@ MochaUtilsStatus Mocha_IOSUKernelRead32(uint32_t address, uint32_t *out_buffer);
*
* @param out_buffer Buffer where the result will be stored.
* @return MOCHA_RESULT_SUCCESS: The OTP has been read into the buffer<br>
* MOCHA_RESULT_INVALID_ARGUMENT: invalid environmentPathBuffer pointer or bufferLen \< 0x100<br>
* MOCHA_RESULT_INVALID_ARGUMENT: Invalid environmentPathBuffer pointer or bufferLen \< 0x100<br>
* MOCHA_RESULT_LIB_UNINITIALIZED: Library was not initialized. Call Mocha_InitLibrary() before using this function.<br>
* MOCHA_RESULT_UNKNOWN_ERROR: Failed to retrieve the environment path.
*/
@ -137,7 +139,7 @@ int Mocha_IOSUCallSVC(uint32_t svc_id, uint32_t *args, uint32_t arg_cnt, int32_t
* @param environmentPathBuffer: buffer where the result will be stored
* @param bufferLen: length of the buffer. Required to be >= 0x100
* @return MOCHA_RESULT_SUCCESS: The environment path has been stored in environmentPathBuffer<br>
* MOCHA_RESULT_INVALID_ARGUMENT: invalid environmentPathBuffer pointer or bufferLen \< 0x100<br>
* MOCHA_RESULT_INVALID_ARGUMENT: Invalid environmentPathBuffer pointer or bufferLen \< 0x100<br>
* MOCHA_RESULT_LIB_UNINITIALIZED: Library was not initialized. Call Mocha_InitLibrary() before using this function.<br>
* MOCHA_RESULT_UNSUPPORTED_COMMAND: Command not supported by the currently loaded mocha version.<br>
* MOCHA_RESULT_UNKNOWN_ERROR: Failed to retrieve the environment path.
@ -159,7 +161,7 @@ MochaUtilsStatus Mocha_StartUSBLogging(bool notSkipExistingLogs);
* Requires Mocha API Version: 1
* @param client The FSClient that should have full permission
* @return MOCHA_RESULT_SUCCESS: The has been unlocked successfully. <br>
* MOCHA_RESULT_INVALID_ARGUMENT: client was NULL <br>
* MOCHA_RESULT_INVALID_ARGUMENT: Client was NULL <br>
* MOCHA_RESULT_MAX_CLIENT: The maximum number of FS Clients have been unlocked.<br>
* MOCHA_RESULT_LIB_UNINITIALIZED: Library was not initialized. Call Mocha_InitLibrary() before using this function.<br>
* MOCHA_RESULT_UNSUPPORTED_COMMAND: Command not supported by the currently loaded mocha version.<br>