Infineon platform abstraction APIs. More...
Data Structures |
|
| struct | pal_gpio |
|
Structure defines the PAL GPIO configuration.
More...
|
|
| struct | pal_i2c |
|
PAL I2C context structure.
More...
|
|
Macros |
|
| #define | PAL_STATUS_SUCCESS (0x0000) |
|
PAL API execution is successful.
|
|
| #define | PAL_STATUS_FAILURE (0x0001) |
|
PAL API execution failed.
|
|
| #define | PAL_STATUS_I2C_BUSY (0x0002) |
|
PAL I2C is busy.
|
|
| #define | PAL_I2C_EVENT_SUCCESS (0x0000) |
|
Event returned when I2C master completes execution.
|
|
| #define | PAL_I2C_EVENT_ERROR (0x0001) |
|
Event returned when I2C master operation fails.
|
|
| #define | PAL_I2C_EVENT_BUSY (0x0002) |
|
Event returned when lower level I2C bus is busy.
|
|
| #define | OPTIGA_PIN_CONFIG_2GO 0 |
| #define | OPTIGA_PIN_CONFIG_TRUSTX_SHIELD 0 |
| #define | OPTIGA_PIN_CONFIG_MYIOT_SLOT1 0 |
| #define | OPTIGA_PIN_CONFIG_MYIOT_SLOT2_3 1 |
| #define | OPTIGA_PIN_UNUSED UINT32_C(0xFFFFFFFF) |
|
set a pin to this value to mark it as unused and it will not be initialised
|
|
| #define | OPTIGA_PIN_INITIAL_VAL_MASK (UINT32_C(1) << 31) |
| #define | OPTIGA_PIN_INITIAL_VAL_HIGH OPTIGA_PIN_INITIAL_VAL_MASK |
|
defines the initial state of the pin
|
|
| #define | OPTIGA_PIN_INITIAL_VAL_LOW 0 |
| #define | OPTIGA_PIN_ONE_TIME_INIT_MASK (UINT32_C(1) << 30) |
| #define | OPTIGA_PIN_ONE_TIME_INIT OPTIGA_PIN_ONE_TIME_INIT_MASK |
|
If this flag is set, the pin will be initialised with the specified value, but not used.
|
|
| #define | OPTIGA_PIN_ALL_MASKS (OPTIGA_PIN_INITIAL_VAL_MASK | OPTIGA_PIN_ONE_TIME_INIT_MASK) |
| #define | OPTIGA_PIN_RST (ARDUINO_5_PIN | OPTIGA_PIN_INITIAL_VAL_LOW) |
| #define | OPTIGA_PIN_VDD OPTIGA_PIN_UNUSED |
| #define | OPTIGA_PIN_I2C_SCL (ARDUINO_SCL_PIN) |
|
PIN for I2C SCL to Infineon OPTIGA Trust X device.
|
|
| #define | OPTIGA_PIN_I2C_SDA (ARDUINO_SDA_PIN) |
|
PIN for I2C SDA to Infineon OPTIGA Trust X device.
|
|
Typedefs |
|
| typedef uint16_t | pal_status_t |
|
PAL return status.
|
|
| typedef struct pal_gpio | pal_gpio_t |
|
Structure defines the PAL GPIO configuration.
|
|
| typedef struct pal_i2c | pal_i2c_t |
|
PAL I2C context structure.
|
|
| typedef void(* | register_callback )(void *) |
|
typedef for Callback function when timer elapses.
|
|
Functions |
|
| void | pal_gpio_set_high (const pal_gpio_t *p_gpio_context) |
|
Sets the gpio pin to high state.
|
|
| void | pal_gpio_set_low (const pal_gpio_t *p_gpio_context) |
|
Sets the gpio pin to Low state.
|
|
| pal_status_t | pal_i2c_init (const pal_i2c_t *p_i2c_context) |
|
Initializes the I2C master.
|
|
| pal_status_t | pal_i2c_set_bitrate (const pal_i2c_t *p_i2c_context, uint16_t bitrate) |
|
Sets the I2C Master bitrate.
|
|
| pal_status_t | pal_i2c_write ( pal_i2c_t *p_i2c_context, uint8_t *p_data, uint16_t length) |
|
Writes on I2C bus.
|
|
| pal_status_t | pal_i2c_read ( pal_i2c_t *p_i2c_context, uint8_t *p_data, uint16_t length) |
|
Reads from I2C bus.
|
|
| pal_status_t | pal_i2c_deinit (const pal_i2c_t *p_i2c_context) |
|
De-initializes the I2C master.
|
|
| void | pal_os_event_register_callback_oneshot ( register_callback callback, void *callback_args, uint32_t time_us) |
|
Callback registration function to trigger once when timer expires.
|
|
| pal_status_t | pal_os_lock_acquire (void) |
|
Acquires a lock.
More...
|
|
| void | pal_os_lock_release (void) |
|
Releases the lock.
More...
|
|
| uint32_t | pal_os_random_get_counter (void) |
|
Gets the random counter value.
|
|
| uint32_t | pal_os_timer_get_time_in_milliseconds (void) |
|
Gets tick count value in milliseconds.
|
|
| void | pal_os_timer_delay_in_milliseconds (uint16_t milliseconds) |
|
Waits or delay until the supplied milliseconds.
|
|
Variables |
|
| pal_i2c_t | optiga_pal_i2c_context_0 |
| pal_gpio_t | optiga_vdd_0 |
| pal_gpio_t | optiga_reset_0 |
Detailed Description
Infineon platform abstraction APIs.
Function Documentation
| pal_status_t pal_os_lock_acquire | ( | void | ) |
Acquires a lock.
Pre-conditions:
None.
API Details:
-
Acquires the lock.
| void pal_os_lock_release | ( | void | ) |
Releases the lock.
Pre-conditions:
None.
API Details:
-
Releases the lock.