Trident IoT Z-Wave SDK
 
Loading...
Searching...
No Matches
zpal_misc.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Silicon Laboratories Inc. <https://www.silabs.com/>
2//
3// SPDX-License-Identifier: BSD-3-Clause
4
13#ifndef ZPAL_MISC_H_
14#define ZPAL_MISC_H_
15
16#include <stdbool.h>
17#include <stddef.h>
18#include <stdint.h>
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
49
58
63typedef void * zpal_debug_config_t;
64
68typedef uint16_t zpal_soft_reset_info_t;
69
70
74typedef uint16_t zpal_soft_reset_mfid_t;
75
76static const zpal_soft_reset_info_t ZPAL_RESET_REQUESTED_BY_SAPI = 0x0000;
77static const zpal_soft_reset_info_t ZPAL_RESET_UNHANDLED_RADIO_EVENT = 0x0001;
78static const zpal_soft_reset_info_t ZPAL_RESET_RADIO_ASSERT = 0x0002;
79static const zpal_soft_reset_info_t ZPAL_RESET_ASSERT_PTR = 0x0003;
80static const zpal_soft_reset_info_t ZPAL_RESET_EVENT_FLUSH_MEMORY = 0x0004;
81static const zpal_soft_reset_info_t ZPAL_RESET_INFO_DEFAULT = 0xFFFF;
82
90 const zpal_soft_reset_info_t reset_info);
91
96
101
108
114void zpal_get_serial_number(uint8_t *serial_number);
115
122bool zpal_in_isr(void);
123
129uint8_t zpal_get_chip_type(void);
130
137
145uint32_t zpal_get_app_version(void);
146
155
164
173
182
194
204void zpal_debug_output(const uint8_t *data, uint32_t length);
205
211
219
227void zpal_psa_set_location_persistent_key(const void *attributes);
228
236void zpal_psa_set_location_volatile_key(const void *attributes);
237
243#ifdef __cplusplus
244}
245#endif
246
247#endif /* ZPAL_MISC_H_ */
void zpal_get_product_id(zpal_product_id_t *product_id)
Get product id.
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 t...
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.
uint32_t zpal_get_app_version(void)
Get application version.
void zpal_debug_output(const uint8_t *data, uint32_t length)
Output debug logs.
uint8_t zpal_get_app_version_major(void)
Get major part of application version.
zpal_chip_se_type_t zpal_get_secure_element_type(void)
Get secure element type supported in the chip.
void zpal_get_serial_number(uint8_t *serial_number)
Get serial number.
void zpal_disable_interrupts(void)
Disable interrupts.
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 secu...
void zpal_initiate_shutdown_handler(void)
Prepare for shutdown handler.
void zpal_shutdown_handler(void)
Shutdown handler.
bool zpal_in_isr(void)
Check if in ISR context.
uint8_t zpal_get_chip_revision(void)
Get chip revision.
zpal_chip_se_type_t
Defines for identifying the secure element type supported by the chip.
Definition zpal_misc.h:53
uint16_t zpal_soft_reset_mfid_t
Manufacturer ID used by zpal_reboot_with_info.
Definition zpal_misc.h:74
uint8_t zpal_get_app_version_minor(void)
Get minor part of application version.
uint8_t zpal_get_chip_type(void)
Get chip type.
size_t zpal_get_serial_number_length(void)
Get serial number length.
void zpal_debug_init(zpal_debug_config_t config)
Initialize debug output.
void * zpal_debug_config_t
Debug config type. Default implementation of zpal_debug_init() will expect this to be a pointer to a ...
Definition zpal_misc.h:63
uint16_t zpal_soft_reset_info_t
Manufacturer's reset information.
Definition zpal_misc.h:68
uint8_t zpal_get_app_version_patch(void)
Get patch part of application version.
@ ZPAL_CHIP_SE_MID
Secure element uses mid-level security features.
Definition zpal_misc.h:55
@ ZPAL_CHIP_SE_HIGH
Secure element uses high-level security features.
Definition zpal_misc.h:56
@ ZPAL_CHIP_SE_UNKNOWN
Secure element is unknown.
Definition zpal_misc.h:54
Product id struct.
Definition zpal_misc.h:40
uint8_t specyfic_type
Specific Device Class identifier. (SPECYFIC_TYPE_XXX_XXX)
Definition zpal_misc.h:46
uint16_t app_icon_type
Z-Wave+ Icon Type identifiers. (ICON_TYPE_XXX_XXX)
Definition zpal_misc.h:44
uint16_t app_product_id
Product ID. (PRODUCT_ID_XXX_XXX)
Definition zpal_misc.h:42
uint8_t generic_type
Generic Device Class identifier. (GENERIC_TYPE_XXX_XXX)
Definition zpal_misc.h:45
uint16_t app_product_type
Product type Id. (PRODUCT_TYPE_ID_ZWAVE_XXX_XXX)
Definition zpal_misc.h:43
uint8_t requested_security_key
Bitmask for security keys. (SECURITY_KEY_SX_XXX)
Definition zpal_misc.h:47
uint16_t app_manufacturer_id
Manufacturer ID identifiers. (MFG_ID_XXX_XXX)
Definition zpal_misc.h:41