Zpal-misc#

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

Modules#

zpal_product_id_t

Enumerations#

enum
ZPAL_CHIP_SE_UNKNOWN
ZPAL_CHIP_SE_MID
ZPAL_CHIP_SE_HIGH
}

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

Typedefs#

typedef uint16_t

Manufacturer's reset information.

typedef uint16_t

Manufacturer ID used by zpal_reboot_with_info.

typedef uint32_t

type to store a time in zpal format.

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

Prepare for shutdown handler.

void

Shutdown handler.

size_t

Get serial number length.

void
zpal_get_serial_number(uint8_t *serial_number)

Get serial number.

bool

Check if in ISR context.

uint8_t

Get chip type.

uint8_t

Get chip revision.

uint32_t

Get application version.

uint8_t

Get major part of application version.

uint8_t

Get minor part of application version.

uint8_t

Get patch part of application version.

void
zpal_get_product_id(zpal_product_id_t *product_id)

Get product id.

void

Initialize debug output.

void
zpal_debug_output(const uint8_t *data, uint32_t length)

Output debug logs.

void

Disable interrupts.

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.

Enumeration Documentation#

zpal_chip_se_type_t#

zpal_chip_se_type_t

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

Enumerator
ZPAL_CHIP_SE_UNKNOWN
ZPAL_CHIP_SE_MID
ZPAL_CHIP_SE_HIGH

Typedef Documentation#

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.


zpal_time_t#

typedef uint32_t zpal_time_t

type to store a time in zpal format.

This format of this data depend on the zpal, so the stack should never try to manipulate this data. TODO: how to make this definition configurable by the zpal?


Variable Documentation#

ZPAL_RESET_REQUESTED_BY_SAPI#

const zpal_soft_reset_info_t ZPAL_RESET_REQUESTED_BY_SAPI

ZPAL_RESET_UNHANDLED_RADIO_EVENT#

const zpal_soft_reset_info_t ZPAL_RESET_UNHANDLED_RADIO_EVENT

ZPAL_RESET_RADIO_ASSERT#

const zpal_soft_reset_info_t ZPAL_RESET_RADIO_ASSERT

ZPAL_RESET_ASSERT_PTR#

const zpal_soft_reset_info_t ZPAL_RESET_ASSERT_PTR

ZPAL_RESET_EVENT_FLUSH_MEMORY#

const zpal_soft_reset_info_t ZPAL_RESET_EVENT_FLUSH_MEMORY

ZPAL_RESET_INFO_DEFAULT#

const zpal_soft_reset_info_t ZPAL_RESET_INFO_DEFAULT

Function Documentation#

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
TypeDirectionArgument NameDescription
const zpal_soft_reset_mfid_t[in]manufacturer_id

manufacturer ID identifier.

const zpal_soft_reset_info_t[in]reset_info

the information to pass to boot.


zpal_initiate_shutdown_handler#

void zpal_initiate_shutdown_handler (void )

Prepare for shutdown handler.

Parameters
TypeDirectionArgument NameDescription
voidN/A

zpal_shutdown_handler#

void zpal_shutdown_handler (void )

Shutdown handler.

Parameters
TypeDirectionArgument NameDescription
voidN/A

zpal_get_serial_number_length#

size_t zpal_get_serial_number_length (void )

Get serial number length.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • Serial number length.


zpal_get_serial_number#

void zpal_get_serial_number (uint8_t * serial_number)

Get serial number.

Parameters
TypeDirectionArgument NameDescription
uint8_t *[out]serial_number

Serial number.


zpal_in_isr#

bool zpal_in_isr (void )

Check if in ISR context.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

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


zpal_get_chip_type#

uint8_t zpal_get_chip_type (void )

Get chip type.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • Chip type.


zpal_get_chip_revision#

uint8_t zpal_get_chip_revision (void )

Get chip revision.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • Chip revision.


zpal_get_app_version#

uint32_t zpal_get_app_version (void )

Get application version.

Parameters
TypeDirectionArgument NameDescription
voidN/A

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.

Parameters
TypeDirectionArgument NameDescription
voidN/A

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.

Parameters
TypeDirectionArgument NameDescription
voidN/A

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.

Parameters
TypeDirectionArgument NameDescription
voidN/A

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_product_id#

void zpal_get_product_id (zpal_product_id_t * product_id)

Get product id.

Parameters
TypeDirectionArgument NameDescription
zpal_product_id_t *[out]product_id

Product id.

Note

  • This function exists in PAL to allow use product id by external module (e.g. bootloader).


zpal_debug_init#

void zpal_debug_init (void )

Initialize debug output.

Parameters
TypeDirectionArgument NameDescription
voidN/A

zpal_debug_output#

void zpal_debug_output (const uint8_t * data, uint32_t length)

Output debug logs.

Parameters
TypeDirectionArgument NameDescription
const uint8_t *[out]data

Pointer to debug data.

uint32_t[in]length

Length of debug data.


zpal_disable_interrupts#

void zpal_disable_interrupts (void )

Disable interrupts.

Parameters
TypeDirectionArgument NameDescription
voidN/A

zpal_get_secure_element_type#

zpal_chip_se_type_t zpal_get_secure_element_type (void )

Get secure element type supported in the chip.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • Secure element type supported.


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
TypeDirectionArgument NameDescription
const void *[in]attributes

of 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
TypeDirectionArgument NameDescription
const void *[in]attributes

of the key