Zpal-init#
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:
Initialize hardware.
Invoke zpal_system_startup() at the end of main().
During Z-Wave SDK initialization zpal_init_is_valid() will be invoked.
If zpal_init_is_valid() returns false, zpal_init_invalidate() will be invoked.
Requirements:
The ZPAL initialization requires that zpal_system_startup() is invoked at the end of main() after hardware initialization is done. (check main() from PAL/templates/main.c)
Function zpal_init_invalidate() never exits. It must setup the hardware so that the chip stops working.
Enumerations#
Reset reason.
Typedefs#
Reset reason.
Functions#
Returns whether generic and specific is a valid combination for current chip.
Setup the hardware so that the chip stops working.
Get reset reason.
System startup, implemented by Z-Wave SDK.
Enumeration Documentation#
zpal_reset_reason_t#
zpal_reset_reason_t
Reset reason.
Enumerator | |
---|---|
ZPAL_RESET_REASON_PIN | Reset triggered by reset pin. |
ZPAL_RESET_REASON_DEEP_SLEEP_WUT | Reset triggered by wake up by timer from deep sleep state. |
ZPAL_RESET_REASON_WATCHDOG | Reset triggered by watchdog. |
ZPAL_RESET_REASON_DEEP_SLEEP_EXT_INT | Reset triggered by external interrupt event in deep sleep state. |
ZPAL_RESET_REASON_POWER_ON | Reset triggered by power on. |
ZPAL_RESET_REASON_SOFTWARE | Reset triggered by software. |
ZPAL_RESET_REASON_BROWNOUT | Reset triggered by brownout circuit. |
ZPAL_RESET_REASON_TAMPER | Reset triggered by a tamper attempt. |
ZPAL_RESET_REASON_OTHER | Reset triggered by none of the above. |
52
of file /mnt/raid/workspaces/ws.5ZeoF8fvV/overlay/gsdk/protocol/z-wave/PAL/inc/zpal_init.h
Typedef Documentation#
zpal_reset_reason_t#
typedef enum zpal_reset_reason_t zpal_reset_reason_t
Reset reason.
63
of file /mnt/raid/workspaces/ws.5ZeoF8fvV/overlay/gsdk/protocol/z-wave/PAL/inc/zpal_init.h
Function Documentation#
zpal_init_is_valid#
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. |
Returns
True if combination is valid, false otherwise.
72
of file /mnt/raid/workspaces/ws.5ZeoF8fvV/overlay/gsdk/protocol/z-wave/PAL/inc/zpal_init.h
zpal_init_invalidate#
void zpal_init_invalidate (void )
Setup the hardware so that the chip stops working.
N/A |
Note
This function never exits.
79
of file /mnt/raid/workspaces/ws.5ZeoF8fvV/overlay/gsdk/protocol/z-wave/PAL/inc/zpal_init.h
zpal_get_reset_reason#
zpal_reset_reason_t zpal_get_reset_reason (void )
Get reset reason.
N/A |
Returns
Reset reason.
85
of file /mnt/raid/workspaces/ws.5ZeoF8fvV/overlay/gsdk/protocol/z-wave/PAL/inc/zpal_init.h
zpal_system_startup#
void zpal_system_startup (zpal_reset_reason_t reset_reason)
System startup, implemented by Z-Wave SDK.
[in] | reset_reason | Reset reason. |
Note
This function never exits.
94
of file /mnt/raid/workspaces/ws.5ZeoF8fvV/overlay/gsdk/protocol/z-wave/PAL/inc/zpal_init.h