npmx  1.0.0
 
Loading...
Searching...
No Matches
Backend

npmx backend API. More...

Data Structures

struct  npmx_backend_t
 Data structure of backend configuration. More...
 

Typedefs

typedef npmx_error_t(* npmx_backend_function_t) (void *p_context, uint32_t register_address, uint8_t *p_data, size_t num_of_bytes)
 Definition of pointer to type of function used to write and read data.
 

Functions

npmx_error_t npmx_backend_register_write (npmx_backend_t const *p_config, uint32_t register_address, uint8_t *p_data, size_t num_of_bytes)
 Function for sending a message over the chosen transport backend.
 
npmx_error_t npmx_backend_register_read (npmx_backend_t const *p_config, uint32_t register_address, uint8_t *p_data, size_t num_of_bytes)
 Function for reading a message over the chosen transport backend.
 

Detailed Description

npmx backend API.

Typedef Documentation

◆ npmx_backend_function_t

typedef npmx_error_t(* npmx_backend_function_t) (void *p_context, uint32_t register_address, uint8_t *p_data, size_t num_of_bytes)

Definition of pointer to type of function used to write and read data.

Parameters
[in]p_contextPointer to user-defined context data.
[in]register_addressRegister address in npmx device to be modified.
[in]p_dataPointer to data.
[in]num_of_bytesNumber of bytes of data.
Return values
NPMX_SUCCESSOperation performed successfully.
NPMX_ERROR_IOError using IO bus line.

Function Documentation

◆ npmx_backend_register_read()

npmx_error_t npmx_backend_register_read ( npmx_backend_t const * p_config,
uint32_t register_address,
uint8_t * p_data,
size_t num_of_bytes )

Function for reading a message over the chosen transport backend.

This function is used by services to read npmx registers.

Parameters
[in]p_configPointer to the backend configuration structure.
[in]register_addressRegister address in npmx device to be read.
[in]p_dataPointer to buffer for read data.
[in]num_of_bytesNumber of bytes to read.
Return values
NPMX_SUCCESSAll data read successfully.
NPMX_ERROR_IOBackend returned IO error during data reading.

◆ npmx_backend_register_write()

npmx_error_t npmx_backend_register_write ( npmx_backend_t const * p_config,
uint32_t register_address,
uint8_t * p_data,
size_t num_of_bytes )

Function for sending a message over the chosen transport backend.

This function is used by services to write to npmx registers.

Parameters
[in]p_configPointer to the backend configuration structure.
[in]register_addressRegister address in npmx device to be modified.
[in]p_dataPointer to data to write.
[in]num_of_bytesNumber of bytes of data to write.
Return values
NPMX_SUCCESSAll data written successfully.
NPMX_ERROR_IOBackend returned IO error during data writing.