AEM
YKX122 Class Reference

#include <kx122.h>

Inheritance diagram for YKX122:
YADC

Public Member Functions

 YKX122 (uint8_t address, const YSPI *const y=NULL)
 
float acquireChannel (uint8_t channel)
 
bool selftest (void)
 
uint8_t getAddr () const
 
- Public Member Functions inherited from YADC
 YADC (const YSPI *const y)
 

Static Public Attributes

static const uint8_t addrVec [] = {0x1E,0x1F}
 

Protected Member Functions

void configKX122 () const
 
- Protected Member Functions inherited from YADC
void selfTestFailed () const
 

Protected Attributes

const uint8_t addr
 
- Protected Attributes inherited from YADC
const YSPI *const yspi = NULL
 

Static Protected Attributes

static const uint8_t regVec [][2]
 

Detailed Description

YKH122 Represents the KX122, acts like an ADC with 3 channels does not use YSPI functionality since it is an I2C device

Constructor & Destructor Documentation

YKX122::YKX122 ( uint8_t  address,
const YSPI *const  y = NULL 
)

The vector of hardware adresses for all the KX122s in the sestem

Member Function Documentation

float YKX122::acquireChannel ( uint8_t  channel)
virtual

constructor does not need the YPSI pointer

Implements YADC.

void YKX122::configKX122 ( ) const
protected

The hardware adresss for this instance for all the KX122s in the sestem

uint8_t YKX122::getAddr ( ) const

runs a simple selftest

bool YKX122::selftest ( void  )
virtual

as per parent class but 0=x, 1=y, 2=z

Implements YADC.

Field Documentation

const uint8_t YKX122::addr
protected

The vector of register, value pairs used in initial configuration of the device

const uint8_t YKX122::addrVec = {0x1E,0x1F}
static

call this at instanciation to set up the device

const uint8_t YKX122::regVec
staticprotected

The documentation for this class was generated from the following files: