Skip to content

Commit

Permalink
Revise I2C HAL gating logic in tpm_to_infineon
Browse files Browse the repository at this point in the history
  • Loading branch information
gojimmypi committed Apr 30, 2024
1 parent 1fa1595 commit e4ff305
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion hal/tpm_io_infineon.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
/******************************************************************************/
/* --- BEGIN IO Callback Logic -- */
/******************************************************************************/
#define WOLFTPM_INCLUDE_IO_FILE
#define CY_USING_HAL

/* Included via tpm_io.c if WOLFTPM_INCLUDE_IO_FILE is defined */
#ifdef WOLFTPM_INCLUDE_IO_FILE
Expand All @@ -43,6 +45,7 @@
defined(WOLFTPM_SWTPM) || \
defined(WOLFTPM_WINAPI) )

#if defined(WOLFTPM_INFINEON_TRICORE) || defined(CY_USING_HAL)
#ifdef WOLFTPM_I2C
#ifndef TPM_I2C_TRIES
#define TPM_I2C_TRIES 10
Expand Down Expand Up @@ -148,7 +151,7 @@

#else
#error Infineon I2C support on this platform not supported yet
#endif /* CY_USING_HAL or WOLFTPM_INFINEON_TRICORE */
#endif /* CY_USING_HAL */

#else /* SPI */

Expand Down Expand Up @@ -211,6 +214,8 @@
#error Infineon I2C support on this platform not supported yet
#endif /* CY_USING_HAL or WOLFTPM_INFINEON_TRICORE */
#endif /* SPI or I2C */
#endif /* WOLFTPM_INFINEON_TRICORE || CY_USING_HAL */


#endif /* !(WOLFTPM_LINUX_DEV || WOLFTPM_SWTPM || WOLFTPM_WINAPI) */
#endif /* WOLFTPM_INCLUDE_IO_FILE */
Expand Down

0 comments on commit e4ff305

Please sign in to comment.