mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 19:03:16 +00:00
* **New Features** * Plugin-style modules for platforms and devices with start/stop lifecycle and a runtime-consumable device tree array. * **Refactor** * Consolidated initialization into a kernel/module startup flow. * Generated devicetree artifacts moved to the build Generated directory. * **Changes** * Removed legacy no-op registration hooks and I2C lock/unlock wrappers. * Driver ownership and private state moved to explicit module/owner model. * Added ERROR_NOT_ALLOWED error code.
38 lines
999 B
C++
38 lines
999 B
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";
|
|
default:
|
|
return "unknown";
|
|
}
|
|
}
|
|
|
|
}
|