Defines a platform abstraction layer for the Z-Wave initialization. More...
Typedefs | |
typedef enum zpal_reset_reason_t | zpal_reset_reason_t |
Reset reason. | |
Enumerations | |
enum | zpal_reset_reason_t { ZPAL_RESET_REASON_PIN = 0 , ZPAL_RESET_REASON_DEEP_SLEEP_WUT = 1 , ZPAL_RESET_REASON_WATCHDOG = 3 , ZPAL_RESET_REASON_DEEP_SLEEP_EXT_INT = 4 , ZPAL_RESET_REASON_POWER_ON = 5 , ZPAL_RESET_REASON_SOFTWARE = 7 , ZPAL_RESET_REASON_BROWNOUT = 9 , zpal_reset_reason_tAMPER = 10 , ZPAL_RESET_REASON_OTHER = 0xFF } |
Reset reason. More... | |
enum | zpal_library_type_t { ZPAL_LIBRARY_TYPE_CONTROLLER = 0 , ZPAL_LIBRARY_TYPE_SLAVE = 1 , ZPAL_LIBRARY_TYPE_UNDEFINED = 0xFF } |
enumeration for library types More... | |
Functions | |
bool | zpal_init_is_valid (uint8_t generic_type, uint8_t specific_type) |
Returns whether generic and specific is a valid combination for current chip. | |
void | zpal_init_invalidate (void) |
Setup the hardware so that the chip stops working. | |
zpal_reset_reason_t | zpal_get_reset_reason (void) |
Get reset reason. | |
zpal_library_type_t | zpal_get_library_type (void) |
Get the node's library type. | |
zpal_status_t | zpal_init_set_library_type (const zpal_library_type_t library_type) |
Set the node's library type This function should be called at the startup code. It can be used if PAL code need to be initiated differently depending on the library type. | |
void | zpal_system_startup (zpal_reset_reason_t reset_reason) |
System startup, implemented by Z-Wave SDK. | |
Defines a platform abstraction layer for the Z-Wave initialization.
How to use the initialization API
The ZPAL initialization API is required to validate if application can be run on specific chip.
zpal_init_is_valid() must be implemented as Z-Wave always invokes it. zpal_init_invalidate() will be invoked only if zpal_init_is_valid() return false. zpal_system_startup() is an externally defined and implemented by Z-Wave SDK.
The following outlines an example of use:
Requirements:
typedef enum zpal_reset_reason_t zpal_reset_reason_t |
Reset reason.
enum zpal_library_type_t |
enum zpal_reset_reason_t |
Reset reason.
zpal_library_type_t zpal_get_library_type | ( | void | ) |
Get the node's library type.
zpal_reset_reason_t zpal_get_reset_reason | ( | void | ) |
Get reset reason.
void zpal_init_invalidate | ( | void | ) |
Setup the hardware so that the chip stops working.
bool zpal_init_is_valid | ( | uint8_t | generic_type, |
uint8_t | specific_type ) |
Returns whether generic and specific is a valid combination for current chip.
[in] | generic_type | Generic type of the running application. |
[in] | specific_type | Specific type of the running application. |
zpal_status_t zpal_init_set_library_type | ( | const zpal_library_type_t | library_type | ) |
Set the node's library type This function should be called at the startup code. It can be used if PAL code need to be initiated differently depending on the library type.
[in] | library_type | The library type. |
|
extern |
System startup, implemented by Z-Wave SDK.
[in] | reset_reason | Reset reason. |