no-OS
Loading...
Searching...
No Matches
gmsl_reg_access.c File Reference
#include "no_os_error.h"
#include "no_os_alloc.h"
#include "no_os_util.h"
#include "no_os_i2c.h"
#include "gmsl_reg_access.h"
#include "gmsl_dbg.h"
Include dependency graph for gmsl_reg_access.c:

Functions

int32_t gmsl_reg_read (struct no_os_i2c_desc *i2c_desc, uint16_t reg, uint8_t mask, uint8_t *readval)
 Read a value from a GMSL register.
 
int32_t gmsl_reg_write (struct no_os_i2c_desc *i2c_desc, uint16_t reg, uint8_t writeval)
 Write a value to a GMSL register.
 
int32_t gmsl_reg_update (struct no_os_i2c_desc *i2c_desc, uint16_t reg, uint8_t val, uint8_t mask)
 Update a value in a GMSL register.
 

Function Documentation

◆ gmsl_reg_read()

int32_t gmsl_reg_read ( struct no_os_i2c_desc * i2c_desc,
uint16_t reg,
uint8_t mask,
uint8_t * readval )

Read a value from a GMSL register.

Parameters
i2c_desc- Pointer to the I2C descriptor.
reg- Register address to read from.
mask- Mask to apply to the read value.
readval- Pointer to store the read value.
Returns
0 in case of success, negative error code in case of PAL errors.
Here is the caller graph for this function:

◆ gmsl_reg_update()

int32_t gmsl_reg_update ( struct no_os_i2c_desc * i2c_desc,
uint16_t reg,
uint8_t val,
uint8_t mask )

Update a value in a GMSL register.

Parameters
i2c_desc- Pointer to the I2C descriptor.
reg- Register address to update.
val- Value to write to the register.
mask- Mask to apply to the value.
Returns
0 in case of success, negative error code in case of PAL errors.
Todo
Revert this after removal of explicit mask being used in mission mode api's
Here is the caller graph for this function:

◆ gmsl_reg_write()

int32_t gmsl_reg_write ( struct no_os_i2c_desc * i2c_desc,
uint16_t reg,
uint8_t writeval )

Write a value to a GMSL register.

Parameters
i2c_desc- Pointer to the I2C descriptor.
reg- Register address to write to.
writeval- Value to write to the register.
Returns
0 in case of success, negative error code in case of PAL errors.
Here is the caller graph for this function: