no-OS
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
iio_adxl313.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include "no_os_error.h"
#include "no_os_util.h"
#include "no_os_alloc.h"
#include "iio_adxl313.h"
#include "adxl313.h"
Include dependency graph for iio_adxl313.c:

Macros

#define SCALE_FACTOR   1000000000UL
 
#define MIN_SHIFT   9
 
#define ADXL313_ACCEL_CHANNEL(index, reg, axis)
 

Enumerations

enum  adxl313_iio_accel_chans {
  CHAN_X = 0 ,
  CHAN_Y = 1 ,
  CHAN_Z = 2
}
 

Functions

int adxl313_read (struct adxl313_dev *dev, uint8_t base_address, uint16_t size, uint8_t *read_data)
 
int adxl313_write (struct adxl313_dev *dev, uint8_t base_address, uint16_t size, uint8_t *write_data)
 
int adxl313_iio_init (struct adxl313_iio_dev **iio_dev, struct adxl313_iio_dev_init_param *init_param)
 
int adxl313_iio_remove (struct adxl313_iio_dev *desc)
 

Macro Definition Documentation

◆ ADXL313_ACCEL_CHANNEL

#define ADXL313_ACCEL_CHANNEL ( index,
reg,
axis )
Value:
{ \
.ch_type = IIO_ACCEL, \
.channel = index, \
.address = reg, \
.modified = true, \
.channel2 = IIO_MOD_##axis, \
.scan_type = &adxl313_iio_accel_scan_type, \
.scan_index = index, \
.attributes = adxl313_iio_accel_attrs, \
.ch_out = false \
}
@ IIO_ACCEL
Definition iio_types.h:62

◆ MIN_SHIFT

#define MIN_SHIFT   9

◆ SCALE_FACTOR

#define SCALE_FACTOR   1000000000UL

Enumeration Type Documentation

◆ adxl313_iio_accel_chans

Enumerator
CHAN_X 
CHAN_Y 
CHAN_Z 

Function Documentation

◆ adxl313_iio_init()

int adxl313_iio_init ( struct adxl313_iio_dev ** iio_dev,
struct adxl313_iio_dev_init_param * init_param )
Here is the caller graph for this function:

◆ adxl313_iio_remove()

int adxl313_iio_remove ( struct adxl313_iio_dev * desc)

◆ adxl313_read()

int adxl313_read ( struct adxl313_dev * dev,
uint8_t base_address,
uint16_t size,
uint8_t * read_data )
extern
Here is the caller graph for this function:

◆ adxl313_write()

int adxl313_write ( struct adxl313_dev * dev,
uint8_t base_address,
uint16_t size,
uint8_t * write_data )
extern
Here is the caller graph for this function: