|
Embedded SDK
Embedded SDK
|


Go to the source code of this file.
Macros | |
| #define | SWAP_ERROR_HELPER_MAX_BUFFER_COUNT 8 |
| #define | send_swap_error_with_string( status_word, common_error_code, application_specific_error_code, format, ...) |
Typedefs | |
| typedef enum swap_error_common_code_e | swap_error_common_code_t |
Enumerations | |
| enum | swap_error_common_code_e { SWAP_EC_ERROR_INTERNAL = 0x00 , SWAP_EC_ERROR_WRONG_AMOUNT = 0x01 , SWAP_EC_ERROR_WRONG_DESTINATION = 0x02 , SWAP_EC_ERROR_WRONG_FEES = 0x03 , SWAP_EC_ERROR_WRONG_METHOD = 0x04 , SWAP_EC_ERROR_CROSSCHAIN_WRONG_MODE = 0x05 , SWAP_EC_ERROR_CROSSCHAIN_WRONG_METHOD = 0x06 , SWAP_EC_ERROR_CROSSCHAIN_WRONG_HASH = 0x07 , SWAP_EC_ERROR_GENERIC = 0xFF } |
Functions | |
| 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) |
| 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) |
| #define send_swap_error_with_string | ( | status_word, | |
| common_error_code, | |||
| application_specific_error_code, | |||
| format, | |||
| ... | |||
| ) |
Macro to send a swap error with a formatted string as data.
Constructs a buffer from a formatted string and passes it to send_swap_error_with_buffers.
| status_word | RAPDU status word. |
| common_error_code | Common error code. |
| application_specific_error_code | Application-specific error code. |
| format | printf-style format string. |
| ... | Additional arguments for formatting. |
Definition at line 127 of file swap_error_code_helpers.h.
| #define SWAP_ERROR_HELPER_MAX_BUFFER_COUNT 8 |
Sends a swap error with multiple buffers containing error details as data.
| status_word | RAPDU status word. |
| common_error_code | Common error code. |
| application_specific_error_code | Application-specific error code. |
| buffer_data | Array of buffers with error details. SWAP_ERROR_HELPER_MAX_BUFFER_COUNT |
| count | Number of buffers provided. |
Definition at line 107 of file swap_error_code_helpers.h.
| typedef enum swap_error_common_code_e swap_error_common_code_t |
Definition at line 61 of file swap_error_code_helpers.h.
| NORETURN void send_swap_error_simple | ( | uint16_t | status_word, |
| uint8_t | common_error_code, | ||
| uint8_t | application_specific_error_code | ||
| ) |
Sends a basic swap error with no extra data.
| status_word | RAPDU status word. |
| common_error_code | Common error code defined in swap_error_common_code_t. |
| application_specific_error_code | Application-specific error code. |
Definition at line 8 of file swap_error_code_helpers.c.
| 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 | ||
| ) |
Sends a swap error with one additional buffer data.
| status_word | RAPDU status word. |
| common_error_code | Common error code. |
| application_specific_error_code | Application-specific error code. |
| buffer_data | Additional application-specific error details. |
Definition at line 16 of file swap_error_code_helpers.c.
| 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 | ||
| ) |
Definition at line 25 of file swap_error_code_helpers.c.