blackbox/driver/adc.h

Fri, 09 Dec 2011 11:54:19 +0100

author
Malte Bayer <mbayer@neo-soft.org>
date
Fri, 09 Dec 2011 11:54:19 +0100
changeset 54
68eca8057d68
parent 0
9b7de464f0ea
permissions
-rw-r--r--

added livemode display to slotcli, without communication yet

#ifndef _ADC_H__
#define _ADC_H__
#include <stdint.h>

// Functions to access the ADC

// We have two implementations:
// MCP3204.c and internal_ADC.c


// get a sample from ADC chip.
uint16_t getADC(int channel);

// initialize the ADC chip
void initADC(void);

// select reference
// returns 1 on success
uint8_t setAREF(char* name);

#ifdef EXT_AREF
    // get current reference voltage
    float getAREF(void);
#endif

// get smoothed adc readings
uint16_t getADC_smooth(uint8_t channel, uint8_t samples);


#endif // _ADC_H__

mercurial