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:

  1. Store value in retention register using zpal_retention_register_write().

  2. 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#

zpal_retention_register_read(uint32_t index, uint32_t *data)

Reads a 32-bit value from the specified retention register.

zpal_retention_register_write(uint32_t index, uint32_t value)

Write a 32-bit value to the specified retention register.

size_t

Get number of available retention registers.

Macros#

#define

Reserved for Smart Start.

#define

Reserved for response route 1.

#define

Reserved for response route 2.

#define

Reserved for response route 3.

#define

Reserved for response route 4.

#define

Reserved for Long Range transmit power and RSSI.

#define

Reserved for reset information.

#define

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.

Parameters
[in]index

Retention register number (zero-based).

[out]data

Pointer to a 32-bit variable where the value can be stored.

Returns

Note

  • Retention Register should support at least 32 objects.


Definition at line 63 of file /mnt/raid/workspaces/ws.Mh9rMZz8x/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.

Parameters
[in]index

Retention register number (zero-based).

[in]value

32-bit value to save in retention register.

Returns

Note

  • Retention Register should support at least 32 objects.


Definition at line 75 of file /mnt/raid/workspaces/ws.Mh9rMZz8x/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.

Parameters
N/A

Returns

  • number of retention registers.


Definition at line 81 of file /mnt/raid/workspaces/ws.Mh9rMZz8x/overlay/gsdk/protocol/z-wave/PAL/inc/zpal_retention_register.h

Macro Definition Documentation#

ZPAL_RETENTION_REGISTER_SMARTSTART#

#define ZPAL_RETENTION_REGISTER_SMARTSTART
Value:
0

Reserved for Smart Start.


Definition at line 43 of file /mnt/raid/workspaces/ws.Mh9rMZz8x/overlay/gsdk/protocol/z-wave/PAL/inc/zpal_retention_register.h

ZPAL_RETENTION_REGISTER_RESPONSEROUTE_1#

#define ZPAL_RETENTION_REGISTER_RESPONSEROUTE_1
Value:
1

Reserved for response route 1.


Definition at line 44 of file /mnt/raid/workspaces/ws.Mh9rMZz8x/overlay/gsdk/protocol/z-wave/PAL/inc/zpal_retention_register.h

ZPAL_RETENTION_REGISTER_RESPONSEROUTE_2#

#define ZPAL_RETENTION_REGISTER_RESPONSEROUTE_2
Value:
2

Reserved for response route 2.


Definition at line 45 of file /mnt/raid/workspaces/ws.Mh9rMZz8x/overlay/gsdk/protocol/z-wave/PAL/inc/zpal_retention_register.h

ZPAL_RETENTION_REGISTER_RESPONSEROUTE_3#

#define ZPAL_RETENTION_REGISTER_RESPONSEROUTE_3
Value:
3

Reserved for response route 3.


Definition at line 46 of file /mnt/raid/workspaces/ws.Mh9rMZz8x/overlay/gsdk/protocol/z-wave/PAL/inc/zpal_retention_register.h

ZPAL_RETENTION_REGISTER_RESPONSEROUTE_4#

#define ZPAL_RETENTION_REGISTER_RESPONSEROUTE_4
Value:
4

Reserved for response route 4.


Definition at line 47 of file /mnt/raid/workspaces/ws.Mh9rMZz8x/overlay/gsdk/protocol/z-wave/PAL/inc/zpal_retention_register.h

ZPAL_RETENTION_REGISTER_TXPOWER_RSSI_LR#

#define ZPAL_RETENTION_REGISTER_TXPOWER_RSSI_LR
Value:
5

Reserved for Long Range transmit power and RSSI.


Definition at line 48 of file /mnt/raid/workspaces/ws.Mh9rMZz8x/overlay/gsdk/protocol/z-wave/PAL/inc/zpal_retention_register.h

ZPAL_RETENTION_REGISTER_RESET_INFO#

#define ZPAL_RETENTION_REGISTER_RESET_INFO
Value:
6

Reserved for reset information.


Definition at line 49 of file /mnt/raid/workspaces/ws.Mh9rMZz8x/overlay/gsdk/protocol/z-wave/PAL/inc/zpal_retention_register.h

ZPAL_RETENTION_REGISTER_PROTOCOL_RESERVED_COUNT#

#define ZPAL_RETENTION_REGISTER_PROTOCOL_RESERVED_COUNT
Value:
16

Number of registers reserved for the stack.


Definition at line 51 of file /mnt/raid/workspaces/ws.Mh9rMZz8x/overlay/gsdk/protocol/z-wave/PAL/inc/zpal_retention_register.h