82 uint8_t common_error_code,
83 uint8_t application_specific_error_code);
94 uint8_t common_error_code,
95 uint8_t application_specific_error_code,
107#define SWAP_ERROR_HELPER_MAX_BUFFER_COUNT 8
109 uint8_t common_error_code,
110 uint8_t application_specific_error_code,
127#define send_swap_error_with_string( \
128 status_word, common_error_code, application_specific_error_code, format, ...) \
131 char format_buffer[sizeof(G_io_apdu_buffer) - sizeof(status_word) - 2] = {0}; \
134 snprintf(format_buffer, sizeof(format_buffer), format, ##__VA_ARGS__); \
135 PRINTF("send_swap_error_with_string %s\n", format_buffer); \
136 buffer_t string_buffer; \
137 string_buffer.ptr = (uint8_t *) &format_buffer; \
138 string_buffer.size = strnlen(format_buffer, sizeof(format_buffer)); \
139 string_buffer.offset = 0; \
140 send_swap_error_with_buffers( \
141 status_word, common_error_code, application_specific_error_code, &string_buffer, 1); \
enum swap_error_common_code_e swap_error_common_code_t
NORETURN void send_swap_error_with_buffers(uint16_t status_word, uint8_t common_error_code, uint8_t application_specific_error_code, const buffer_t *buffer_data, size_t count)
@ SWAP_EC_ERROR_WRONG_DESTINATION
@ SWAP_EC_ERROR_WRONG_METHOD
@ SWAP_EC_ERROR_CROSSCHAIN_WRONG_MODE
@ SWAP_EC_ERROR_CROSSCHAIN_WRONG_METHOD
@ SWAP_EC_ERROR_WRONG_AMOUNT
@ SWAP_EC_ERROR_WRONG_FEES
@ SWAP_EC_ERROR_CROSSCHAIN_WRONG_HASH
NORETURN void send_swap_error_simple(uint16_t status_word, uint8_t common_error_code, uint8_t application_specific_error_code)
NORETURN void send_swap_error_with_buffer(uint16_t status_word, uint8_t common_error_code, uint8_t application_specific_error_code, const buffer_t buffer_data)