Trident IoT Z-Wave SDK
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
Zpal-misc

Defines a platform abstraction layer for the Z-Wave miscellaneous functions, not covered by other modules. More...

+ Collaboration diagram for Zpal-misc:

Data Structures

struct  zpal_product_id_t
 Product id struct. More...
 

Typedefs

typedef void * zpal_debug_config_t
 Debug config type. Default implementation of zpal_debug_init() will expect this to be a pointer to a zpal_uart_config_t structure.
 
typedef uint16_t zpal_soft_reset_info_t
 Manufacturer's reset information.
 
typedef uint16_t zpal_soft_reset_mfid_t
 Manufacturer ID used by zpal_reboot_with_info.
 

Enumerations

enum  zpal_chip_se_type_t {
  ZPAL_CHIP_SE_UNKNOWN ,
  ZPAL_CHIP_SE_MID ,
  ZPAL_CHIP_SE_HIGH
}
 Defines for identifying the secure element type supported by the chip. More...
 

Functions

void zpal_reboot_with_info (const zpal_soft_reset_mfid_t manufacturer_id, const zpal_soft_reset_info_t reset_info)
 Perform a system reboot and provide information about the context.
 
void zpal_initiate_shutdown_handler (void)
 Prepare for shutdown handler.
 
void zpal_shutdown_handler (void)
 Shutdown handler.
 
size_t zpal_get_serial_number_length (void)
 Get serial number length.
 
void zpal_get_serial_number (uint8_t *serial_number)
 Get serial number.
 
bool zpal_in_isr (void)
 Check if in ISR context.
 
uint8_t zpal_get_chip_type (void)
 Get chip type.
 
uint8_t zpal_get_chip_revision (void)
 Get chip revision.
 
uint32_t zpal_get_app_version (void)
 Get application version.
 
uint8_t zpal_get_app_version_major (void)
 Get major part of application version.
 
uint8_t zpal_get_app_version_minor (void)
 Get minor part of application version.
 
uint8_t zpal_get_app_version_patch (void)
 Get patch part of application version.
 
void zpal_get_product_id (zpal_product_id_t *product_id)
 Get product id.
 
void zpal_debug_init (zpal_debug_config_t config)
 Initialize debug output.
 
void zpal_debug_output (const uint8_t *data, uint32_t length)
 Output debug logs.
 
void zpal_disable_interrupts (void)
 Disable interrupts.
 
zpal_chip_se_type_t zpal_get_secure_element_type (void)
 Get secure element type supported in the chip.
 
void zpal_psa_set_location_persistent_key (const void *attributes)
 Set vendor specific location for storing keys persistently in wrapped or plain form based on the secure element type supported by the chip.
 
void zpal_psa_set_location_volatile_key (const void *attributes)
 Set vendor specific location for storing keys in volatile memory, in wrapped or plain form based on the secure element type supported by the chip.
 

Detailed Description

Defines a platform abstraction layer for the Z-Wave miscellaneous functions, not covered by other modules.

Typedef Documentation

◆ zpal_debug_config_t

typedef void* zpal_debug_config_t

Debug config type. Default implementation of zpal_debug_init() will expect this to be a pointer to a zpal_uart_config_t structure.

◆ zpal_soft_reset_info_t

typedef uint16_t zpal_soft_reset_info_t

Manufacturer's reset information.

◆ zpal_soft_reset_mfid_t

typedef uint16_t zpal_soft_reset_mfid_t

Manufacturer ID used by zpal_reboot_with_info.

Enumeration Type Documentation

◆ zpal_chip_se_type_t

Defines for identifying the secure element type supported by the chip.

Enumerator
ZPAL_CHIP_SE_UNKNOWN 

Secure element is unknown.

ZPAL_CHIP_SE_MID 

Secure element uses mid-level security features.

ZPAL_CHIP_SE_HIGH 

Secure element uses high-level security features.

Function Documentation

◆ zpal_debug_init()

void zpal_debug_init ( zpal_debug_config_t config)

Initialize debug output.

Parameters
[in]configconfiguration for debug output port. If NULL, default platform configuration will be used. Implementation should usa a UART for output and config should point to a structure of the type zpal_uart_config_t
Note
If another output device than UART wants to be used for debug output, this function is implemented as weak so it can be replaced by a custom implementation in an application

◆ zpal_debug_output()

void zpal_debug_output ( const uint8_t * data,
uint32_t length )

Output debug logs.

Parameters
[out]dataPointer to debug data.
[in]lengthLength of debug data.
Note
This function will use a UART for debug output. If another output device is used for debug this function is implemented as weak so it can be replaced by a custom implementation in an application

◆ zpal_disable_interrupts()

void zpal_disable_interrupts ( void )

Disable interrupts.

◆ zpal_get_app_version()

uint32_t zpal_get_app_version ( void )

Get application version.

Returns
Application version.
Note
This function exists in PAL to allow use app version by external module (e.g. bootloader).

◆ zpal_get_app_version_major()

uint8_t zpal_get_app_version_major ( void )

Get major part of application version.

Returns
Major part of application version.
Note
This function exists in PAL to allow use app version by external module (e.g. bootloader).

◆ zpal_get_app_version_minor()

uint8_t zpal_get_app_version_minor ( void )

Get minor part of application version.

Returns
Minor part of application version.
Note
This function exists in PAL to allow use app version by external module (e.g. bootloader).

◆ zpal_get_app_version_patch()

uint8_t zpal_get_app_version_patch ( void )

Get patch part of application version.

Returns
Patch part of application version.
Note
This function exists in PAL to allow use app version by external module (e.g. bootloader).

◆ zpal_get_chip_revision()

uint8_t zpal_get_chip_revision ( void )

Get chip revision.

Returns
Chip revision.

◆ zpal_get_chip_type()

uint8_t zpal_get_chip_type ( void )

Get chip type.

Returns
Chip type.

◆ zpal_get_product_id()

void zpal_get_product_id ( zpal_product_id_t * product_id)

Get product id.

Parameters
[out]product_idProduct id.
Note
This function exists in PAL to allow use product id by external module (e.g. bootloader).

◆ zpal_get_secure_element_type()

zpal_chip_se_type_t zpal_get_secure_element_type ( void )

Get secure element type supported in the chip.

Returns
Secure element type supported.

◆ zpal_get_serial_number()

void zpal_get_serial_number ( uint8_t * serial_number)

Get serial number.

Parameters
[out]serial_numberSerial number.

◆ zpal_get_serial_number_length()

size_t zpal_get_serial_number_length ( void )

Get serial number length.

Returns
Serial number length.

◆ zpal_in_isr()

bool zpal_in_isr ( void )

Check if in ISR context.

Returns
True if the CPU is in handler mode (currently executing an interrupt handler). False if the CPU is in thread mode.

◆ zpal_initiate_shutdown_handler()

void zpal_initiate_shutdown_handler ( void )

Prepare for shutdown handler.

◆ zpal_psa_set_location_persistent_key()

void zpal_psa_set_location_persistent_key ( const void * attributes)

Set vendor specific location for storing keys persistently in wrapped or plain form based on the secure element type supported by the chip.

Parameters
[in]attributesof the key

◆ zpal_psa_set_location_volatile_key()

void zpal_psa_set_location_volatile_key ( const void * attributes)

Set vendor specific location for storing keys in volatile memory, in wrapped or plain form based on the secure element type supported by the chip.

Parameters
[in]attributesof the key

◆ zpal_reboot_with_info()

void zpal_reboot_with_info ( const zpal_soft_reset_mfid_t manufacturer_id,
const zpal_soft_reset_info_t reset_info )

Perform a system reboot and provide information about the context.

Parameters
[in]manufacturer_idmanufacturer ID identifier.
[in]reset_infothe information to pass to boot.

◆ zpal_shutdown_handler()

void zpal_shutdown_handler ( void )

Shutdown handler.