no-OS
Functions
ad7280a.c File Reference

Driver for the AD7280A Lithium Ion Battery Monitoring System. More...

#include <stdlib.h>
#include "ad7280a.h"
#include "no_os_alloc.h"
Include dependency graph for ad7280a.c:

Functions

int8_t ad7280a_init (struct ad7280a_dev **device, struct ad7280a_init_param init_param)
 
int32_t ad7280a_remove (struct ad7280a_dev *dev)
 Free the resources allocated by AD7280A_Init(). More...
 
uint32_t ad7280a_transfer_32bits (struct ad7280a_dev *dev, uint32_t data)
 
uint32_t ad7280a_crc_write (uint32_t message)
 
int32_t ad7280a_crc_read (uint32_t message)
 
int8_t ad7280a_convert_read_all (struct ad7280a_dev *dev)
 
int8_t ad7280a_convert_data_all (struct ad7280a_dev *dev)
 
int16_t ad7280a_read_register (struct ad7280a_dev *dev, uint8_t dev_addr, uint8_t read_reg)
 
int16_t ad7280a_read_conversion (struct ad7280a_dev *dev, uint8_t dev_addr, uint8_t read_reg)
 
float ad7280a_convert_data (uint8_t type, uint16_t data)
 
void ad7280a_write_register (struct ad7280a_dev *dev, uint8_t dev_addr, uint8_t read_reg, uint8_t reg_val)
 
void ad7280a_selftest_all (struct ad7280a_dev *dev, float *self_test_reg_a, float *self_test_reg_b)
 
uint8_t ad7280a_alert_pin (struct ad7280a_dev *dev)
 

Detailed Description

Driver for the AD7280A Lithium Ion Battery Monitoring System.

Driver's header for the AD7280A Lithium Ion Battery Monitoring System.

Author
Lucian Sin (Lucia.nosp@m.n.Si.nosp@m.n@ana.nosp@m.log..nosp@m.com)

Copyright 2014(c) Analog Devices, Inc.

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Function Documentation

◆ ad7280a_alert_pin()

uint8_t ad7280a_alert_pin ( struct ad7280a_dev dev)

◆ ad7280a_convert_data()

float ad7280a_convert_data ( uint8_t  type,
uint16_t  data 
)

◆ ad7280a_convert_data_all()

int8_t ad7280a_convert_data_all ( struct ad7280a_dev dev)
Here is the caller graph for this function:

◆ ad7280a_convert_read_all()

int8_t ad7280a_convert_read_all ( struct ad7280a_dev dev)

◆ ad7280a_crc_read()

int32_t ad7280a_crc_read ( uint32_t  message)
Here is the caller graph for this function:

◆ ad7280a_crc_write()

uint32_t ad7280a_crc_write ( uint32_t  message)
Here is the caller graph for this function:

◆ ad7280a_init()

int8_t ad7280a_init ( struct ad7280a_dev **  device,
struct ad7280a_init_param  init_param 
)

◆ ad7280a_read_conversion()

int16_t ad7280a_read_conversion ( struct ad7280a_dev dev,
uint8_t  dev_addr,
uint8_t  read_reg 
)

◆ ad7280a_read_register()

int16_t ad7280a_read_register ( struct ad7280a_dev dev,
uint8_t  dev_addr,
uint8_t  read_reg 
)

◆ ad7280a_remove()

int32_t ad7280a_remove ( struct ad7280a_dev dev)

Free the resources allocated by AD7280A_Init().

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

◆ ad7280a_selftest_all()

void ad7280a_selftest_all ( struct ad7280a_dev dev,
float *  self_test_reg_a,
float *  self_test_reg_b 
)

◆ ad7280a_transfer_32bits()

uint32_t ad7280a_transfer_32bits ( struct ad7280a_dev dev,
uint32_t  data 
)
Here is the caller graph for this function:

◆ ad7280a_write_register()

void ad7280a_write_register ( struct ad7280a_dev dev,
uint8_t  dev_addr,
uint8_t  read_reg,
uint8_t  reg_val 
)