Skip to content

Commit

Permalink
Fix Error[Pe513] error
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushev committed Oct 22, 2021
1 parent 9c98e5a commit f3edcf3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions optiga/comms/ifx_i2c/ifx_i2c_physical_layer.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ optiga_lib_status_t ifx_i2c_pl_init(ifx_i2c_context_t * p_ctx, ifx_i2c_event_han
p_ctx->pl.frame_state = PL_STATE_UNINIT;
p_ctx->pl.negotiate_state = PL_INIT_SET_FREQ_DEFAULT;
p_ctx->p_pal_i2c_ctx->slave_address = p_ctx->slave_address;
p_ctx->p_pal_i2c_ctx->upper_layer_event_handler = ifx_i2c_pl_pal_event_handler;
p_ctx->p_pal_i2c_ctx->upper_layer_event_handler = (void *)ifx_i2c_pl_pal_event_handler;
p_ctx->pl.retry_counter = PL_POLLING_MAX_CNT;
if (TRUE == p_ctx->do_pal_init)
{
Expand Down Expand Up @@ -227,7 +227,7 @@ optiga_lib_status_t ifx_i2c_pl_write_slave_address(ifx_i2c_context_t * p_ctx, ui
//ifx i2c wrapper api for setting slave address in synchronous. hence the event handler is backed up.
p_temp_upper_layer_event_handler = (upper_layer_callback_t * )(p_ctx->p_pal_i2c_ctx->upper_layer_event_handler);
//since the lower level APIs are asynchronous, a temporary event handler for set slave address is assigned
p_ctx->p_pal_i2c_ctx->upper_layer_event_handler = ifx_i2c_pl_pal_slave_addr_event_handler;
p_ctx->p_pal_i2c_ctx->upper_layer_event_handler = (void *)ifx_i2c_pl_pal_slave_addr_event_handler;

p_ctx->pl.buffer[BASE_ADDRESS_REG_OFFSET] = PL_REG_BASE_ADDR;
p_ctx->pl.buffer[MODE_OFFSET] = PL_REG_BASE_ADDR_VOLATILE;
Expand Down

0 comments on commit f3edcf3

Please sign in to comment.