mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 19:03:16 +00:00
* **Documentation** * Added new C coding style guide detailing naming conventions for files, directories, macros, constants, variables, functions, and type definitions with illustrative examples. * Updated C++ coding style documentation with clarifications on C naming conventions and header directory organization patterns. * **Refactor** * Updated header include paths throughout the codebase to use lowercase naming conventions consistently.
18 lines
470 B
C++
18 lines
470 B
C++
// SPDX-License-Identifier: Apache-2.0
|
|
#include <tactility/error_esp32.h>
|
|
|
|
error_t esp_err_to_error(esp_err_t error) {
|
|
switch (error) {
|
|
case ESP_OK:
|
|
return ERROR_NONE;
|
|
case ESP_ERR_INVALID_ARG:
|
|
return ERROR_INVALID_ARGUMENT;
|
|
case ESP_ERR_INVALID_STATE:
|
|
return ERROR_INVALID_STATE;
|
|
case ESP_ERR_TIMEOUT:
|
|
return ERROR_TIMEOUT;
|
|
default:
|
|
return ERROR_UNDEFINED;
|
|
}
|
|
}
|