A collection of Analog Devices drivers for the mbed platform

Embed: (wiki syntax)

« Back to documentation index

CN0397 Class Reference

CN0397 Class Reference

The CN0397 shield class. More...

#include <CN0397.h>

Public Member Functions

 CN0397 (PinName cs)
 The CN0397 class constructor.
void init (void)
 Initialization method of the class.
void display_data (void)
 Displays data on the serial interface.
void data_to_voltage (uint16_t adcValue, float *voltage)
 Converts ADC counts to voltage.
void calc_light_intensity (uint8_t channel, uint16_t adcValue, float *intensity)
 Computes light intensity of the channel.
void calc_light_concentration (uint8_t channel, float intensity, float *conc)
 Computes light concentration from light intensity.
void set_app_data (void)
 Reads the ADC channels and computes intensity and concentration.
void calibration (uint8_t channel)
 Calibrates the channel.

Data Fields

AD7798 ad7798
 Instance of the AD7798.

Detailed Description

The CN0397 shield class.

Definition at line 99 of file CN0397.h.


Constructor & Destructor Documentation

CN0397 ( PinName  cs )

The CN0397 class constructor.

Definition at line 65 of file CN0397.cpp.


Member Function Documentation

void calc_light_concentration ( uint8_t  channel,
float  intensity,
float *  conc 
)

Computes light concentration from light intensity.

Parameters:
channel- channel to be converted
intensity- light intensity
conc- computed light concentration

Definition at line 194 of file CN0397.cpp.

void calc_light_intensity ( uint8_t  channel,
uint16_t  adcValue,
float *  intensity 
)

Computes light intensity of the channel.

Parameters:
channel- channel to be converted
adcValue- ADC counts
intensity- computed light intensity

Definition at line 187 of file CN0397.cpp.

void calibration ( uint8_t  channel )

Calibrates the channel.

Parameters:
channel- channel to be calibrated

Definition at line 231 of file CN0397.cpp.

void data_to_voltage ( uint16_t  adcValue,
float *  voltage 
)

Converts ADC counts to voltage.

Parameters:
adcValue- ADC counts
voltage- computed voltage

Definition at line 142 of file CN0397.cpp.

void display_data ( void   )

Displays data on the serial interface.

Definition at line 69 of file CN0397.cpp.

void init ( void   )

Initialization method of the class.

Initializes the AD7798 and initiates calibration if needed

Definition at line 149 of file CN0397.cpp.

void set_app_data ( void   )

Reads the ADC channels and computes intensity and concentration.

Definition at line 201 of file CN0397.cpp.


Field Documentation

AD7798 ad7798

Instance of the AD7798.

Definition at line 153 of file CN0397.h.