Functions to access storage in a Z-Wave module.
More...
|
| sl_status_t | zwapi_nvr_get_value (uint8_t bOffset, uint8_t bLength, uint8_t *bRetBuffer) |
| | Get a value from the NVR flash page. More...
|
| |
| sl_status_t | zwapi_memory_get_ids (zwave_home_id_t *home_id, zwave_node_id_t *node_id) |
| | Get the Home ID and Node ID of the Z-Wave module. More...
|
| |
| sl_status_t | zwapi_memory_get_byte (uint16_t offset, uint8_t *byte_value) |
| | Read one byte from the EEPROM. More...
|
| |
| uint8_t | zwapi_memory_put_byte (uint16_t offset, uint8_t bData) |
| | Add one byte to the EEPROM write queue. More...
|
| |
| sl_status_t | zwapi_memory_get_buffer (uint16_t offset, uint8_t *buffer, uint8_t length) |
| | Read the number of bytes from the EEPROM. More...
|
| |
| uint8_t | zwapi_memory_put_buffer (uint16_t offset, const uint8_t *buffer, uint16_t length, void(*callback_function)(void)) |
| | Copy the number of bytes to the EEPROM. More...
|
| |
| uint8_t | zwapi_memory_put_buffer_blocking (uint16_t offset, uint8_t *buffer, uint16_t length, uint16_t timeout) |
| | Copy the number of bytes to the EEPROM and waits for Z-Wave module callback before returning. More...
|
| |
Functions to access storage in a Z-Wave module.
Functions in this module are used to access storage in Z-Wave module.
◆ NVR_CRC16_SIZE
| #define NVR_CRC16_SIZE 0x02 |
◆ NVR_NVM_PAGE_SIZE_SIZE
| #define NVR_NVM_PAGE_SIZE_SIZE 0x02 |
◆ NVR_NVM_SIZE_SIZE
| #define NVR_NVM_SIZE_SIZE 0x02 |
◆ NVR_SAW_CENTER_FREQ_SIZE
| #define NVR_SAW_CENTER_FREQ_SIZE 0x03 |
◆ NVR_SECURITY_PRIVATE_KEY_SIZE
| #define NVR_SECURITY_PRIVATE_KEY_SIZE 0x20 |
◆ NVR_SECURITY_PUBLIC_KEY_SIZE
| #define NVR_SECURITY_PUBLIC_KEY_SIZE 0x20 |
◆ NVR_USBID_SIZE
| #define NVR_USBID_SIZE 0x02 |
◆ NVR_UUID_SIZE
| #define NVR_UUID_SIZE 0x10 |
◆ NVR_FLASH_STRUCT
◆ zwapi_memory_get_buffer()
| sl_status_t zwapi_memory_get_buffer |
( |
uint16_t |
offset, |
|
|
uint8_t * |
buffer, |
|
|
uint8_t |
length |
|
) |
| |
Read the number of bytes from the EEPROM.
- Parameters
-
| offset | Application area offset |
| buffer | Buffer pointer |
| length | Number of bytes to read |
- Returns
- SL_STATUS_OK on success and SL_STATUS_FAIL if something went wrong
aka MemoryGetBuffer
◆ zwapi_memory_get_byte()
| sl_status_t zwapi_memory_get_byte |
( |
uint16_t |
offset, |
|
|
uint8_t * |
byte_value |
|
) |
| |
Read one byte from the EEPROM.
- Parameters
-
| offset | Application area offset |
| byte_value | pointer for the function to store the read byte |
- Returns
- SL_STATUS_OK on success and SL_STATUS_FAIL if something went wrong
aka MemoryGetByte
◆ zwapi_memory_get_ids()
Get the Home ID and Node ID of the Z-Wave module.
- Parameters
-
| home_id | Home ID pointer (stored in host endianness) |
| node_id | Node ID pointer |
- Returns
- SL_STATUS_OK on success and SL_STATUS_FAIL if something went wrong
aka MemoryGetID
◆ zwapi_memory_put_buffer()
| uint8_t zwapi_memory_put_buffer |
( |
uint16_t |
offset, |
|
|
const uint8_t * |
buffer, |
|
|
uint16_t |
length, |
|
|
void(*)(void) |
callback_function |
|
) |
| |
Copy the number of bytes to the EEPROM.
- Parameters
-
| offset | Application area offset |
| buffer | Buffer pointer. NULL pointer can be passed to zero out an area |
| length | Number of bytes to write |
| callback_function | Write completed function pointer |
- Returns
- 0 on error, 1 on OK but no change, >=2 represents the number of bytes written +1
aka MemoryPutBuffer
◆ zwapi_memory_put_buffer_blocking()
| uint8_t zwapi_memory_put_buffer_blocking |
( |
uint16_t |
offset, |
|
|
uint8_t * |
buffer, |
|
|
uint16_t |
length, |
|
|
uint16_t |
timeout |
|
) |
| |
Copy the number of bytes to the EEPROM and waits for Z-Wave module callback before returning.
- Parameters
-
| offset | Application area offset |
| buffer | Buffer pointer. NULL pointer can be passed to zero out an area |
| length | Number of bytes to write |
| timeout | Time in ms to wait for the Z-Wave Module callback. |
- Returns
- 0 on error, 1 on OK but no change, >=2 represents the number of bytes written +1
◆ zwapi_memory_put_byte()
| uint8_t zwapi_memory_put_byte |
( |
uint16_t |
offset, |
|
|
uint8_t |
bData |
|
) |
| |
Add one byte to the EEPROM write queue.
- Parameters
-
| offset | Application area offset |
| bData | Data to store |
- Returns
- 0 on error, 1 on OK but no change, 2 Ok with changes
aka MemoryPutByte
◆ zwapi_nvr_get_value()
| sl_status_t zwapi_nvr_get_value |
( |
uint8_t |
bOffset, |
|
|
uint8_t |
bLength, |
|
|
uint8_t * |
bRetBuffer |
|
) |
| |
Get a value from the NVR flash page.
- Parameters
-
| bOffset | Offset 0 is the first byte in the protocol NVR area. |
| bLength | Number of bytes to read |
| bRetBuffer | Pointer to buffer to receive value |
- Returns
- SL_STATUS_OK on success and SL_STATUS_FAIL if something went wrong
If the CRC16 field in the protocol area of the NVR is not correct all fields will return the value 0xFF when read with this function.
aka ZW_NVRGetValue