|
hsw-nbt 1.2.0
OPTIGA Authenticate NBT Host Library for C
|
Global Platform T=1' protocol. More...
#include <stddef.h>#include <stdint.h>#include "infineon/ifx-error.h"#include "infineon/ifx-protocol.h"#include "infineon/ifx-t1prime-lib.h"Go to the source code of this file.
Macros | |
| #define | IFX_T1PRIME_LOG(logger_object, source_information, logger_level, formatter, ...) |
| T1PRIME library data log macro. | |
| #define | IFX_T1PRIME_LOG_BYTES(logger_object, source_information, logger_level, delimeter_1, data, data_len, delimeter_2) |
| T1PRIME library array of bytes data log macro. | |
| #define | IFX_T1PRIME_LOG_TAG "T=1'" |
| String used as source information for logging. | |
| #define | IFX_T1PRIME_IRQ_TRIGGERED IFX_SUCCESS |
| Return code for successful calls to ifx_t1prime_irq_handler_t. | |
| #define | IFX_T1PRIME_IRQ 0x09u |
| IFX error encoding function identifier for ifx_t1prime_irq_handler_t. | |
| #define | IFX_T1PRIME_IRQ_NOT_TRIGGERED 0x01u |
| Error reason if interrupt did not trigger in time during ifx_t1prime_irq_handler_t. | |
Typedefs | |
| typedef ifx_status_t(* | ifx_t1prime_irq_handler_t) (ifx_protocol_t *self, uint32_t timeout_us) |
| Custom function type used to wait for T=1' data interrupt. | |
Functions | |
| ifx_status_t | ifx_t1prime_s_por (ifx_protocol_t *self) |
| Performs Global Platform T=1' power on reset (POR). | |
| ifx_status_t | ifx_t1prime_s_swr (ifx_protocol_t *self) |
| Performs Global Platform T=1' software reset (SWR). | |
Global Platform T=1' protocol.
Definition in file ifx-t1prime.h.
| #define IFX_T1PRIME_IRQ 0x09u |
IFX error encoding function identifier for ifx_t1prime_irq_handler_t.
Definition at line 87 of file ifx-t1prime.h.
| #define IFX_T1PRIME_IRQ_NOT_TRIGGERED 0x01u |
Error reason if interrupt did not trigger in time during ifx_t1prime_irq_handler_t.
Definition at line 93 of file ifx-t1prime.h.
| #define IFX_T1PRIME_IRQ_TRIGGERED IFX_SUCCESS |
Return code for successful calls to ifx_t1prime_irq_handler_t.
Definition at line 81 of file ifx-t1prime.h.
| #define IFX_T1PRIME_LOG | ( | logger_object, | |
| source_information, | |||
| logger_level, | |||
| formatter, | |||
| ... ) |
T1PRIME library data log macro.
| [in] | logger_object | Logger object in which logging to be done. |
| [in] | source_information | Source information from where logs are originated. |
| [in] | logger_level | Log level |
| [in] | formatter | String with formatter for data passed as variable argument |
It maps to the ifx_logger_log function if IFX_T1PRIME_LOG_ENABLE macro is defined other wise it defines IFX_SUCCESS.
Definition at line 62 of file ifx-t1prime.h.
| #define IFX_T1PRIME_LOG_BYTES | ( | logger_object, | |
| source_information, | |||
| logger_level, | |||
| delimeter_1, | |||
| data, | |||
| data_len, | |||
| delimeter_2 ) |
T1PRIME library array of bytes data log macro.
| [in] | logger_object | Logger object in which logging to be done. |
| [in] | source_information | Source information from where logs are originated. |
| [in] | logger_level | Log level |
| [in] | delimeter_1 | Delimeter to differentiate log information and data. |
| [in] | data | Data to be log. |
| [in] | data_len | Length of the data |
| [in] | delimeter_2 | Delimeter to differentiate each data byte |
It maps to the ifx_logger_log_bytes function if IFX_T1PRIME_LOG_ENABLE macro is defined other wise it defines IFX_SUCCESS.
Definition at line 65 of file ifx-t1prime.h.
| #define IFX_T1PRIME_LOG_TAG "T=1'" |
String used as source information for logging.
Definition at line 76 of file ifx-t1prime.h.
| typedef ifx_status_t(* ifx_t1prime_irq_handler_t) (ifx_protocol_t *self, uint32_t timeout_us) |
Custom function type used to wait for T=1' data interrupt.
Set using ifx_t1prime_set_irq_handler() to enable IRQ mode.
| [in] | self | T=1' protocol stack waiting for data interrupt. |
| [in] | timeout_us | Timeout until interrupt has to have triggered (in [us]). |
IFX_T1PRIME_IRQ_TRIGGERED if successful, any other value in case of error. Definition at line 159 of file ifx-t1prime.h.
| ifx_status_t ifx_t1prime_s_por | ( | ifx_protocol_t * | self | ) |
Performs Global Platform T=1' power on reset (POR).
Sends S(POR request).
| [in] | self | Protocol stack for performing necessary operations. |
IFX_SUCCESS if successful, any other value in case of error. | ifx_status_t ifx_t1prime_s_swr | ( | ifx_protocol_t * | self | ) |
Performs Global Platform T=1' software reset (SWR).
Sends S(SWR request) and expects S(SWR response).
| [in] | self | Protocol stack for performing necessary operations. |
IFX_SUCCESS if successful, any other value in case of error.