32 lines
574 B
C++
32 lines
574 B
C++
/*
|
||
* ADS1259PulseModeAdcReader.cpp
|
||
*
|
||
* Created on: 25 авг. 2019 г.
|
||
* Author: user
|
||
*/
|
||
|
||
#include "ADS1259PulseModeAdcReader.hh"
|
||
|
||
void driver::chipset::ADS1259PulseModeAdcReader::process() {
|
||
|
||
if( read() ) {
|
||
|
||
adc_code = adc_packager.unpack( read_adc_operation.output );
|
||
|
||
}
|
||
|
||
}
|
||
|
||
bool driver::chipset::ADS1259PulseModeAdcReader::read() {
|
||
|
||
bool adc_readed = false;
|
||
|
||
if( start_conv )
|
||
start_conv = not ( adc_readed = read_adc_operation() );
|
||
|
||
if( not start_conv )
|
||
start_conv = start_adc_operation();
|
||
|
||
return adc_readed;
|
||
}
|