Z-Wave Protocol Controller Reference

Functions to access the NVM in a Z-Wave module. More...

Collaboration diagram for NVM API:

Enumerations

enum  zwapi_protocol_nvm_status_t { ZWAPI_PROTOCOL_NVM_STATUS_OK = 0 , ZWAPI_PROTOCOL_NVM_STATUS_ERROR = 1 , ZWAPI_PROTOCOL_NVM_STATUS_EOF = 2 }
 NVM read and write status codes. More...
 

Functions

uint8_t zwapi_nvm_close (void)
 Close the NVM (restart the radio) after a read or write operation. More...
 
uint32_t zwapi_nvm_open (void)
 Open the NVM (stops the radio) before read or write operation. More...
 
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. More...
 
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. More...
 

NVM operations

#define ZWAVE_API_NVM_OPEN_OPERATION   0x00
 
#define ZWAVE_API_NVM_READ_OPERATION   0x01
 
#define ZWAVE_API_NVM_WRITE_OPERATION   0x02
 
#define ZWAVE_API_NVM_CLOSE_OPERATION   0x03
 

NVM return codes from Z-Wave module

#define ZWAVE_API_NVM_RETURN_CODE_OK   0x00
 
#define ZWAVE_API_NVM_RETURN_CODE_ERROR   0x01
 
#define ZWAVE_API_NVM_RETURN_CODE_ERROR_OPERATION_MISMATCH   0x02
 
#define ZWAVE_API_NVM_RETURN_CODE_ERROR_OPERATION_DISTURBED   0x03
 
#define ZWAVE_API_NVM_RETURN_CODE_END_OF_FILE   0xFF
 

Detailed Description

Functions to access the NVM in a Z-Wave module.

Functions in this module are used to access Non-Volatile memory in aZ-Wave module.

Macro Definition Documentation

◆ ZWAVE_API_NVM_CLOSE_OPERATION

#define ZWAVE_API_NVM_CLOSE_OPERATION   0x03

◆ ZWAVE_API_NVM_OPEN_OPERATION

#define ZWAVE_API_NVM_OPEN_OPERATION   0x00

◆ ZWAVE_API_NVM_READ_OPERATION

#define ZWAVE_API_NVM_READ_OPERATION   0x01

◆ ZWAVE_API_NVM_RETURN_CODE_END_OF_FILE

#define ZWAVE_API_NVM_RETURN_CODE_END_OF_FILE   0xFF

◆ ZWAVE_API_NVM_RETURN_CODE_ERROR

#define ZWAVE_API_NVM_RETURN_CODE_ERROR   0x01

◆ ZWAVE_API_NVM_RETURN_CODE_ERROR_OPERATION_DISTURBED

#define ZWAVE_API_NVM_RETURN_CODE_ERROR_OPERATION_DISTURBED   0x03

◆ ZWAVE_API_NVM_RETURN_CODE_ERROR_OPERATION_MISMATCH

#define ZWAVE_API_NVM_RETURN_CODE_ERROR_OPERATION_MISMATCH   0x02

◆ ZWAVE_API_NVM_RETURN_CODE_OK

#define ZWAVE_API_NVM_RETURN_CODE_OK   0x00

◆ ZWAVE_API_NVM_WRITE_OPERATION

#define ZWAVE_API_NVM_WRITE_OPERATION   0x02

Enumeration Type Documentation

◆ zwapi_protocol_nvm_status_t

NVM read and write status codes.

Enumerator
ZWAPI_PROTOCOL_NVM_STATUS_OK 

Read/write operation successful.

ZWAPI_PROTOCOL_NVM_STATUS_ERROR 

Unspecified error occurred.

ZWAPI_PROTOCOL_NVM_STATUS_EOF 

Read/write operation successful and has reached the end of file.

Function Documentation

◆ zwapi_nvm_close()

uint8_t zwapi_nvm_close ( void  )

Close the NVM (restart the radio) after a read or write operation.

Returns
Status code of the close operation:

aka SerialAPI_nvm_close

Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwapi_nvm_open()

uint32_t zwapi_nvm_open ( void  )

Open the NVM (stops the radio) before read or write operation.

Returns
uint32_t the expected size in bytes of the NVM area.

aka SerialAPI_nvm_open

Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwapi_nvm_read()

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.

Parameters
offsetNVM offset (in bytes) from which to start reading data
bufReading buffer where the read data will be returned
lengththe desired amount of bytes to read from "offset"
length_readpointer that reports the actual amount of bytes read
Returns
Status Code for the read operation:

aka SerialAPI_nvm_backup

Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwapi_nvm_write()

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.

Parameters
offsetNVM offset (in bytes) from which to start writing data
bufbuffer containing the data to be written to the NVM
lengththe desired amount of bytes to written from "offset"
length_writtenpointer that reports the actual amount of bytes written
Returns
Status Code for the write operation:

aka SerialAPI_nvm_restore

Here is the call graph for this function:
Here is the caller graph for this function: