Zpal-retention-register#
Defines a platform abstraction layer for the Z-Wave retention register.
How to use the retention register API
The retention register should support at least 32 x 32 bit registers which can be retained in deep sleep.
The following outlines an example of use:
Store value in retention register using zpal_retention_register_write().
Read value from retention register using zpal_retention_register_read().
Note:
Retention registers with index 0-15 are reserved for Z-Wave protocol code.
Retention registers are frequently written, so it is not recommended to use flash memory as storage.
Functions#
Reads a 32-bit value from the specified retention register.
Write a 32-bit value to the specified retention register.
Get number of available retention registers.
Macros#
Reserved for Smart Start.
Reserved for response route 1.
Reserved for response route 2.
Reserved for response route 3.
Reserved for response route 4.
Reserved for Long Range transmit power and RSSI.
Reserved for reset information.
Number of registers reserved for the stack.
Function Documentation#
zpal_retention_register_read#
zpal_status_t zpal_retention_register_read (uint32_t index, uint32_t * data)
Reads a 32-bit value from the specified retention register.
[in] | index | Retention register number (zero-based). |
[out] | data | Pointer to a 32-bit variable where the value can be stored. |
Returns
ZPAL_STATUS_OK on success, ZPAL_STATUS_INVALID_ARGUMENT on invalid
index
ordata
and ZPAL_STATUS_FAIL otherwise.
Note
Retention Register should support at least 32 objects.
63
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/PAL/inc/zpal_retention_register.h
zpal_retention_register_write#
zpal_status_t zpal_retention_register_write (uint32_t index, uint32_t value)
Write a 32-bit value to the specified retention register.
[in] | index | Retention register number (zero-based). |
[in] | value | 32-bit value to save in retention register. |
Returns
ZPAL_STATUS_OK on success, ZPAL_STATUS_INVALID_ARGUMENT on invalid
index
and ZPAL_STATUS_FAIL otherwise.
Note
Retention Register should support at least 32 objects.
75
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/PAL/inc/zpal_retention_register.h
zpal_retention_register_count#
size_t zpal_retention_register_count (void )
Get number of available retention registers.
N/A |
Returns
number of retention registers.
81
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/PAL/inc/zpal_retention_register.h
Macro Definition Documentation#
ZPAL_RETENTION_REGISTER_SMARTSTART#
#define ZPAL_RETENTION_REGISTER_SMARTSTARTValue:
0
Reserved for Smart Start.
43
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/PAL/inc/zpal_retention_register.h
ZPAL_RETENTION_REGISTER_RESPONSEROUTE_1#
#define ZPAL_RETENTION_REGISTER_RESPONSEROUTE_1Value:
1
Reserved for response route 1.
44
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/PAL/inc/zpal_retention_register.h
ZPAL_RETENTION_REGISTER_RESPONSEROUTE_2#
#define ZPAL_RETENTION_REGISTER_RESPONSEROUTE_2Value:
2
Reserved for response route 2.
45
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/PAL/inc/zpal_retention_register.h
ZPAL_RETENTION_REGISTER_RESPONSEROUTE_3#
#define ZPAL_RETENTION_REGISTER_RESPONSEROUTE_3Value:
3
Reserved for response route 3.
46
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/PAL/inc/zpal_retention_register.h
ZPAL_RETENTION_REGISTER_RESPONSEROUTE_4#
#define ZPAL_RETENTION_REGISTER_RESPONSEROUTE_4Value:
4
Reserved for response route 4.
47
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/PAL/inc/zpal_retention_register.h
ZPAL_RETENTION_REGISTER_TXPOWER_RSSI_LR#
#define ZPAL_RETENTION_REGISTER_TXPOWER_RSSI_LRValue:
5
Reserved for Long Range transmit power and RSSI.
48
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/PAL/inc/zpal_retention_register.h
ZPAL_RETENTION_REGISTER_RESET_INFO#
#define ZPAL_RETENTION_REGISTER_RESET_INFOValue:
6
Reserved for reset information.
49
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/PAL/inc/zpal_retention_register.h
ZPAL_RETENTION_REGISTER_PROTOCOL_RESERVED_COUNT#
#define ZPAL_RETENTION_REGISTER_PROTOCOL_RESERVED_COUNTValue:
16
Number of registers reserved for the stack.
51
of file /mnt/raid/workspaces/ws.T7KR5OZRo/overlay/gsdk/protocol/z-wave/PAL/inc/zpal_retention_register.h