rename icsneo_error_code
parent
9acd669feb
commit
a2feff5dbd
|
|
@ -33,7 +33,7 @@ typedef struct icsneo_event_t {
|
||||||
static std::vector<std::shared_ptr<icsneo_device_t>> g_devices;
|
static std::vector<std::shared_ptr<icsneo_device_t>> g_devices;
|
||||||
static std::vector<icsneo_event_t> g_events;
|
static std::vector<icsneo_event_t> g_events;
|
||||||
|
|
||||||
ICSNEO_API icsneo_error_t icsneo_error_code(icsneo_error_t error_code, const char* value, uint32_t* value_length) {
|
ICSNEO_API icsneo_error_t icsneo_get_error_code(icsneo_error_t error_code, const char* value, uint32_t* value_length) {
|
||||||
if (!value || !value_length) {
|
if (!value || !value_length) {
|
||||||
return icsneo_error_invalid_parameters;
|
return icsneo_error_invalid_parameters;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ void sleep_ms(uint32_t ms) {
|
||||||
int print_error_code(const char* message, icsneo_error_t error) {
|
int print_error_code(const char* message, icsneo_error_t error) {
|
||||||
char error_str[256] = {0};
|
char error_str[256] = {0};
|
||||||
uint32_t error_length = 256;
|
uint32_t error_length = 256;
|
||||||
icsneo_error_t res = icsneo_error_code(error, error_str, &error_length);
|
icsneo_error_t res = icsneo_get_error_code(error, error_str, &error_length);
|
||||||
if (res != icsneo_error_success) {
|
if (res != icsneo_error_success) {
|
||||||
printf("%s: Failed to get string for error code %d with error code %d\n", message, error, res);
|
printf("%s: Failed to get string for error code %d with error code %d\n", message, error, res);
|
||||||
return res;
|
return res;
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ typedef uint32_t icsneo_error_t;
|
||||||
*
|
*
|
||||||
* @return icsneo_error_t icsneo_error_success if successful, icsneo_error_invalid_parameters otherwise.
|
* @return icsneo_error_t icsneo_error_success if successful, icsneo_error_invalid_parameters otherwise.
|
||||||
*/
|
*/
|
||||||
ICSNEO_API icsneo_error_t icsneo_error_code(icsneo_error_t error_code, const char* value, uint32_t* value_length);
|
ICSNEO_API icsneo_error_t icsneo_get_error_code(icsneo_error_t error_code, const char* value, uint32_t* value_length);
|
||||||
|
|
||||||
/** @brief Get the device type string for a icsneo_devicetype_t.
|
/** @brief Get the device type string for a icsneo_devicetype_t.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue