libeasymcp2221 2.0.3
Functions
mcp2221_errors.h File Reference

Error-code formatting helpers. More...

#include "mcp2221_export.h"
#include "mcp2221_error_codes.h"
Include dependency graph for mcp2221_errors.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

const char * mcp2221_error_code_to_string (mcp2221_error_code_t code)
 Convert an error code to its stable symbolic name. More...
 

Detailed Description

Error-code formatting helpers.

Definition in file mcp2221_errors.h.

Function Documentation

◆ mcp2221_error_code_to_string()

const char * mcp2221_error_code_to_string ( mcp2221_error_code_t  code)

Convert an error code to its stable symbolic name.

The returned string has static storage duration and must not be freed. Known error codes map to names such as "OK", "USBError", and "InvalidError". Unknown values map to "GenericError".

Parameters
[in]codeError code to format.
Returns
Pointer to a null-terminated static string.