mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 19:03:16 +00:00
* **New Features** * Time and delay utilities added (ticks, ms, µs); SD card now uses an expansion-header CS pin; HTTP downloads warn when run on the GUI task and yield to avoid blocking. * **Bug Fixes / Reliability** * Many hard-crash paths converted to guarded checks to reduce abrupt termination and improve stability. * **Tests** * Unit tests added to validate time and delay accuracy. * **Chores** * License header and build/macro updates.
18 lines
469 B
C++
18 lines
469 B
C++
// SPDX-License-Identifier: Apache-2.0
|
|
#include <Tactility/ErrorEsp32.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;
|
|
}
|
|
}
|