fa4a6e255c
- Added modular device support and devicetree bindings for ILI9341, ILI9488, CST816S, XPT2046, and GPIO button input, updating several board configurations for display/touch/backlight/keyboard/battery. - Added a setting to control deprecated HAL usage (device property + Kconfig).
42 lines
1.1 KiB
C++
42 lines
1.1 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";
|
|
case ERROR_RESOURCE_BUSY:
|
|
return "resource busy";
|
|
default:
|
|
return "unknown";
|
|
}
|
|
}
|
|
|
|
}
|