/* * Translate HAL error codes to strings. */ #include #include #include #include #include #include "cryptech.h" #define DEFINE_HAL_ERROR(_code_,_text_) \ case _code_: return _text_; const char *hal_error_string(const hal_error_t code) { switch (code) { HAL_ERROR_LIST; default: return "Unknown HAL error code"; } } #undef DEFINE_HAL_ERROR