19#ifndef ZWAPI_PROTOCOL_NVM_H
20#define ZWAPI_PROTOCOL_NVM_H
40#define ZWAVE_API_NVM_OPEN_OPERATION 0x00
41#define ZWAVE_API_NVM_READ_OPERATION 0x01
42#define ZWAVE_API_NVM_WRITE_OPERATION 0x02
43#define ZWAVE_API_NVM_CLOSE_OPERATION 0x03
48#define ZWAVE_API_NVM_RETURN_CODE_OK 0x00
49#define ZWAVE_API_NVM_RETURN_CODE_ERROR 0x01
50#define ZWAVE_API_NVM_RETURN_CODE_ERROR_OPERATION_MISMATCH 0x02
51#define ZWAVE_API_NVM_RETURN_CODE_ERROR_OPERATION_DISTURBED 0x03
52#define ZWAVE_API_NVM_RETURN_CODE_END_OF_FILE 0xFF
105 uint8_t *length_read);
124 uint8_t *length_written);
zwapi_protocol_nvm_status_t
NVM read and write status codes.
Definition: zwapi_protocol_nvm.h:56
uint32_t zwapi_nvm_open(void)
Open the NVM (stops the radio) before read or write operation.
Definition: zwapi_protocol_nvm.c:41
zwapi_protocol_nvm_status_t zwapi_nvm_read(uint32_t offset, uint8_t *buf, uint8_t length, uint8_t *length_read)
Read a chunk of the 500-series NVM or 700-series NVM3.
Definition: zwapi_protocol_nvm.c:72
zwapi_protocol_nvm_status_t zwapi_nvm_write(uint32_t offset, const uint8_t *buf, uint8_t length, uint8_t *length_written)
Write a chunk of the 500-series NVM or 700-series NVM3.
Definition: zwapi_protocol_nvm.c:116
uint8_t zwapi_nvm_close(void)
Close the NVM (restart the radio) after a read or write operation.
Definition: zwapi_protocol_nvm.c:20
@ ZWAPI_PROTOCOL_NVM_STATUS_ERROR
Unspecified error occurred.
Definition: zwapi_protocol_nvm.h:58
@ ZWAPI_PROTOCOL_NVM_STATUS_OK
Read/write operation successful.
Definition: zwapi_protocol_nvm.h:57
@ ZWAPI_PROTOCOL_NVM_STATUS_EOF
Read/write operation successful and has reached the end of file.
Definition: zwapi_protocol_nvm.h:59