RAFW Flexible Software Package Documentation  Release v2.0.1

 
Matter Interface

Functions

MATTERReturnCode_t MATTER_On (void)
 Turns on Matter. More...
 
MATTERReturnCode_t MATTER_Off (void)
 Turns off Matter. More...
 

Detailed Description

Interface for Matter functions.

Summary

The interface provides Matter functionality including resetting the device or generating an interrupt.

Data Structures

struct  rm_matter_app_cfg_t
 
struct  matter_api_t
 
struct  rm_matter_app_instance_t
 

Typedefs

typedef void matter_ctrl_t
 

Enumerations

enum  MATTERReturnCode_t
 

Data Structure Documentation

◆ rm_matter_app_cfg_t

struct rm_matter_app_cfg_t

User configuration structure, used in open function.

Data Fields
spi_flash_instance_t const * p_flash_instance Pointer to flash(ospi) instance.
void const * p_context User defined context passed into callback function.
void const * p_extend Pointer to extended configuration by instance of interface.

◆ matter_api_t

struct matter_api_t

Matter functions implemented at the HAL layer will follow this API.

Data Fields

fsp_err_t(* open )(matter_ctrl_t *const p_ctrl, rm_matter_app_cfg_t const *const p_cfg)
 
fsp_err_t(* close )(matter_ctrl_t *const p_ctrl)
 

Field Documentation

◆ open

fsp_err_t(* matter_api_t::open) (matter_ctrl_t *const p_ctrl, rm_matter_app_cfg_t const *const p_cfg)

Initialize the Matter service.

Parameters
[in]p_ctrlPointer to Matter instance control structure.
[in]p_cfgPointer to Matter configuration structure.
Return values
FSP_SUCCESSMatter successfully configured.
FSP_ERR_ASSERTIONNull pointer, or one or more configuration options is invalid.
FSP_ERR_ALREADY_OPENModule is already open. This module can only be opened once.

◆ close

fsp_err_t(* matter_api_t::close) (matter_ctrl_t *const p_ctrl)

Closes the Matter service.

Parameters
[in]p_ctrlPointer to Matter instance control structure.
Return values
FSP_SUCCESSMatter successfully configured.
FSP_ERR_ASSERTIONNull pointer, or one or more configuration options is invalid.
FSP_ERR_ALREADY_OPENModule is already open. This module can only be opened once.

◆ rm_matter_app_instance_t

struct rm_matter_app_instance_t

This structure encompasses everything that is needed to use an instance of this interface.

Data Fields
matter_ctrl_t * p_ctrl Pointer to the control structure for this instance.
rm_matter_app_cfg_t const * p_cfg Pointer to the configuration structure for this instance.
matter_api_t const * p_api Pointer to the API structure for this instance.

Typedef Documentation

◆ matter_ctrl_t

typedef void matter_ctrl_t

Matter control block. Allocate an instance specific control block to pass into the Matter API calls.

Enumeration Type Documentation

◆ MATTERReturnCode_t

Matter return codes

Enumerator
eMatterSuccess 

Success.

eMatterFailure 

Failure.

eMatterTimeout 

Timeout.

eMatterNotSupported 

Not supported.

Function Documentation

◆ MATTER_On()

MATTERReturnCode_t MATTER_On ( void  )

Turns on Matter.

This function turns on the Matter module, initializes the drivers and must be called before calling any other Matter API

Note
Wi-Fi module must be initialized before calling this function.
Returns
eMatterFailure if Matter module was successfully turned on, failure code otherwise.

◆ MATTER_Off()

MATTERReturnCode_t MATTER_Off ( void  )

Turns off Matter.

This function turns off the Matter module.

Returns
eMatterFailure if Matter module was successfully turned on, failure code otherwise.