no-OS
Classes | Functions
adaq7980.h File Reference
#include "spi_engine.h"
#include "no-os/pwm.h"
#include "no-os/gpio.h"
Include dependency graph for adaq7980.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  adaq7980_init_param
 Structure containing the init parameters needed by the adaq7980 device. More...
 
struct  adaq7980_dev
 Structure representing an adaq7980 device. More...
 

Functions

int32_t adaq7980_setup (struct adaq7980_dev **device, struct adaq7980_init_param *init_param)
 
int32_t ad7980_read_data (struct adaq7980_dev *dev, uint16_t *buf, uint16_t samples)
 Read from device. Enter register mode to read/write registers. More...
 

Function Documentation

◆ ad7980_read_data()

int32_t ad7980_read_data ( struct adaq7980_dev dev,
uint16_t *  buf,
uint16_t  samples 
)

Read from device. Enter register mode to read/write registers.

Parameters
[in]dev- adaq7980_dev device handler.
[out]buf- data buffer.
[in]samples- sample number.
Returns
SUCCESS in case of success, FAILURE otherwise.
Here is the caller graph for this function:

◆ adaq7980_setup()

int32_t adaq7980_setup ( struct adaq7980_dev **  device,
struct adaq7980_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.
Here is the caller graph for this function: