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#
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.
62
of file /mnt/raid/workspaces/ws.1eyhFLSdc/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.
74
of file /mnt/raid/workspaces/ws.1eyhFLSdc/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.
80
of file /mnt/raid/workspaces/ws.1eyhFLSdc/overlay/gsdk/protocol/z-wave/PAL/inc/zpal_retention_register.h
Macro Definition Documentation#
ZPAL_RETENTION_REGISTER_SMARTSTART#
#define ZPAL_RETENTION_REGISTER_SMARTSTARTValue:
0
43
of file /mnt/raid/workspaces/ws.1eyhFLSdc/overlay/gsdk/protocol/z-wave/PAL/inc/zpal_retention_register.h
ZPAL_RETENTION_REGISTER_RESPONSEROUTE_1#
#define ZPAL_RETENTION_REGISTER_RESPONSEROUTE_1Value:
1
44
of file /mnt/raid/workspaces/ws.1eyhFLSdc/overlay/gsdk/protocol/z-wave/PAL/inc/zpal_retention_register.h
ZPAL_RETENTION_REGISTER_RESPONSEROUTE_2#
#define ZPAL_RETENTION_REGISTER_RESPONSEROUTE_2Value:
2
45
of file /mnt/raid/workspaces/ws.1eyhFLSdc/overlay/gsdk/protocol/z-wave/PAL/inc/zpal_retention_register.h
ZPAL_RETENTION_REGISTER_RESPONSEROUTE_3#
#define ZPAL_RETENTION_REGISTER_RESPONSEROUTE_3Value:
3
46
of file /mnt/raid/workspaces/ws.1eyhFLSdc/overlay/gsdk/protocol/z-wave/PAL/inc/zpal_retention_register.h
ZPAL_RETENTION_REGISTER_RESPONSEROUTE_4#
#define ZPAL_RETENTION_REGISTER_RESPONSEROUTE_4Value:
4
47
of file /mnt/raid/workspaces/ws.1eyhFLSdc/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
48
of file /mnt/raid/workspaces/ws.1eyhFLSdc/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
50
of file /mnt/raid/workspaces/ws.1eyhFLSdc/overlay/gsdk/protocol/z-wave/PAL/inc/zpal_retention_register.h