Ken Van Hoeylandt 25c3f19e5d
Merge develop into main (#494)
* Updated runtime gating to enable LilyGO T-Deck specific apps and services
  * New device compatibility and model-detection APIs
  * Added a buffer-overflow error code and message
  * Updated GitHub Actions checkout to v4
  * Adjusted an LVGL-related library version
  * Device config now emits a T-Deck workaround flag when applicable
  * Removed internal developer comments and minor cleanups
2026-02-09 22:12:03 +01:00

40 lines
1.0 KiB
C++

// SPDX-License-Identifier: Apache-2.0
#include <tactility/error.h>
extern "C" {
const char* error_to_string(error_t error) {
switch (error) {
case ERROR_NONE:
return "no error";
case ERROR_UNDEFINED:
return "undefined";
case ERROR_INVALID_STATE:
return "invalid state";
case ERROR_INVALID_ARGUMENT:
return "invalid argument";
case ERROR_MISSING_PARAMETER:
return "missing parameter";
case ERROR_NOT_FOUND:
return "not found";
case ERROR_ISR_STATUS:
return "ISR status";
case ERROR_RESOURCE:
return "resource";
case ERROR_TIMEOUT:
return "timeout";
case ERROR_OUT_OF_MEMORY:
return "out of memory";
case ERROR_NOT_SUPPORTED:
return "not supported";
case ERROR_NOT_ALLOWED:
return "not allowed";
case ERROR_BUFFER_OVERFLOW:
return "buffer overflow";
default:
return "unknown";
}
}
}