Arrow3-MBN-APP
 
Loading...
Searching...
No Matches
external_adc_test.c File Reference

Source file to check external ADC test. More...

#include <stdio.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <linux/gpio.h>
#include <fcntl.h>
#include <linux/spi/spidev.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <pthread.h>
#include <sys/eventfd.h>
#include <sys/epoll.h>
#include <stdint.h>
#include <time.h>
#include <getopt.h>
#include <sys/time.h>
#include <linux/types.h>
#include <linux/i2c-dev.h>
#include "main.h"
Include dependency graph for external_adc_test.c:

Macros

#define I2C_DEVICE   "/dev/i2c-1"
 
#define I2C_ADDR_EX   0x48
 

Functions

float external_adc_reading_voltage (int i2cFile_ex_va)
 To read the voltage of the VA measured using external adc.
 
int external_adc (void)
 Function to test the External ADC.
 

Variables

struct i2c_msg i2cmsg
 
struct i2c_rdwr_ioctl_data msg_rdwr
 
int i2c_va_led_file
 

Detailed Description

Source file to check external ADC test.

Macro Definition Documentation

◆ I2C_ADDR_EX

#define I2C_ADDR_EX   0x48

◆ I2C_DEVICE

#define I2C_DEVICE   "/dev/i2c-1"

Function Documentation

◆ external_adc()

int external_adc ( void )

Function to test the External ADC.

Returns
API_FAILURE_test on failure or API_SUCCESS_test on success
Here is the call graph for this function:
Here is the caller graph for this function:

◆ external_adc_reading_voltage()

float external_adc_reading_voltage ( int i2cFile_ex_va)

To read the voltage of the VA measured using external adc.

Parameters
i2cFile_ex_vafile discriptor
Returns
voltage_va Value of the voltage read
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ i2c_va_led_file

int i2c_va_led_file
extern

◆ i2cmsg

struct i2c_msg i2cmsg
extern

◆ msg_rdwr

struct i2c_rdwr_ioctl_data msg_rdwr
extern