no-OS
Functions
max31343.c File Reference
#include <stdlib.h>
#include <errno.h>
#include "max31343.h"
#include "no_os_delay.h"
#include "no_os_alloc.h"
Include dependency graph for max31343.c:

Functions

int max31343_reg_read (struct max31343_dev *dev, uint8_t reg_addr, uint8_t *reg_data)
 Read device register. More...
 
int max31343_reg_write (struct max31343_dev *dev, uint8_t reg_addr, uint8_t reg_data)
 Write device register. More...
 
int max31343_update_bits (struct max31343_dev *dev, uint8_t reg_addr, uint8_t mask, uint8_t reg_data)
 Update specific register bits. More...
 
int max31343_init (struct max31343_dev **device, struct max31343_init_param init_param)
 Initialize the device. More...
 
int max31343_set_time_stamp (struct max31343_dev *dev, struct max31343_time_stamp ts)
 Set time stamp. More...
 
int max31343_reg_read_time_stamp (struct max31343_dev *dev, struct max31343_time_stamp *ts)
 Read time stamp. More...
 
int max31343_remove (struct max31343_dev *dev)
 Remove the device and release resources. More...
 

Function Documentation

◆ max31343_init()

int max31343_init ( struct max31343_dev **  device,
struct max31343_init_param  init_param 
)

Initialize the device.

Parameters
device- The device structure.
init_param- The structure that contains the device initial parameters.
Returns
0 in case of success, negative error code otherwise.

◆ max31343_reg_read()

int max31343_reg_read ( struct max31343_dev dev,
uint8_t  reg_addr,
uint8_t *  reg_data 
)

Read device register.

Parameters
dev- The device structure.
reg_addr- The register address.
reg_data- The data read from the register.
Returns
0 in case of success, negative error code otherwise.
Here is the caller graph for this function:

◆ max31343_reg_read_time_stamp()

int max31343_reg_read_time_stamp ( struct max31343_dev dev,
struct max31343_time_stamp ts 
)

Read time stamp.

Parameters
dev- The device structure.
ts- Structure holding the time stamp to read.
Returns
0 in case of success, negative error code otherwise.

◆ max31343_reg_write()

int max31343_reg_write ( struct max31343_dev dev,
uint8_t  reg_addr,
uint8_t  reg_data 
)

Write device register.

Parameters
dev-The device structure.
reg_addr- The register address.
reg_data- The data to be written.
Returns
0 in case of success, negative error code otherwise.
Here is the caller graph for this function:

◆ max31343_remove()

int max31343_remove ( struct max31343_dev dev)

Remove the device and release resources.

Parameters
dev- The device structure.
Returns
0 in case of success, negative error code otherwise.

◆ max31343_set_time_stamp()

int max31343_set_time_stamp ( struct max31343_dev dev,
struct max31343_time_stamp  ts 
)

Set time stamp.

Parameters
dev- The device structure.
ts- Structure holding the time stamp to be set.
Returns
0 in case of success, negative error code otherwise.

◆ max31343_update_bits()

int max31343_update_bits ( struct max31343_dev dev,
uint8_t  reg_addr,
uint8_t  mask,
uint8_t  reg_data 
)

Update specific register bits.

Parameters
dev- The device structure.
reg_addr- The register address.
mask- Specific bits mask.
reg_data- The data to be written.
Returns
0 in case of success, negative error code otherwise.
Here is the caller graph for this function: