This file implements the APIs for transport layer of the Infineon I2C Protocol Stack library. More...
This file implements the APIs for transport layer of the Infineon I2C Protocol Stack library.
Copyright (c) 2019 Infineon Technologies AG
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
\endcopyright
_STATIC_H void ifx_i2c_dl_event_handler | ( | ifx_i2c_context_t * | p_ctx, |
optiga_lib_status_t | event, | ||
const uint8_t * | p_data, | ||
uint16_t | data_len | ||
) |
_STATIC_H uint8_t ifx_i2c_tl_calculate_pctr | ( | const ifx_i2c_context_t * | p_ctx | ) |
_STATIC_H optiga_lib_status_t ifx_i2c_tl_check_chaining_error | ( | uint8_t | current_chaning, |
uint8_t | previous_chaining | ||
) |
optiga_lib_status_t ifx_i2c_tl_init | ( | ifx_i2c_context_t * | p_ctx, |
ifx_i2c_event_handler_t | handler | ||
) |
Function for initializing the module.
Function initializes and enables the module and registers an event handler to receive events from this module.
[in,out] | p_ctx | Pointer to ifx i2c context. |
[in] | handler | Function pointer to the event handler of the upper layer. |
IFX_I2C_STACK_SUCCESS | If initialization was successful. |
IFX_I2C_STACK_ERROR | If the module is already initialized. |
_STATIC_H optiga_lib_status_t ifx_i2c_tl_resend_packets | ( | ifx_i2c_context_t * | p_ctx | ) |
_STATIC_H optiga_lib_status_t ifx_i2c_tl_send_chaining_error | ( | ifx_i2c_context_t * | p_ctx | ) |
_STATIC_H optiga_lib_status_t ifx_i2c_tl_send_next_fragment | ( | ifx_i2c_context_t * | p_ctx | ) |
optiga_lib_status_t ifx_i2c_tl_transceive | ( | ifx_i2c_context_t * | p_ctx, |
uint8_t * | p_packet, | ||
uint16_t | packet_len, | ||
uint8_t * | p_recv_packet, | ||
uint16_t * | p_recv_packet_len | ||
) |
Function to transmit and receive a packet.
[in,out] | p_ctx | Pointer to ifx i2c context. |
[in] | p_packet | Buffer containing the packet header. |
[in] | packet_len | Packet header length. |
[in] | p_recv_packet | Buffer containing the packet payload. |
[in] | p_recv_packet_len | Packet payload length. |
IFX_I2C_STACK_SUCCESS | If function was successful. |
IFX_I2C_STACK_ERROR | If the module is busy. |
_STATIC_H optiga_lib_status_t presence_bit_check | ( | const ifx_i2c_context_t * | p_ctx, |
uint8_t | pctr | ||
) |