Defines | Functions

analog.c File Reference

Analog subsystem. More...

#include "analog.h"
#include "temp.h"
#include <avr/interrupt.h>
#include "config.h"

Defines

#define DEFINE_TEMP_SENSOR(name, type, pin)   | (((type == TT_THERMISTOR) || (type == TT_AD595)) ? 1 << (pin) : 0)
 automagically generate analog_mask from DEFINE_TEMP_SENSOR entries in config.h

Functions

void analog_init ()
 Configure all registers, start interrupt loop.
 ISR (ADC_vect, ISR_NOBLOCK)
 Analog Interrupt.
uint16_t analog_read (uint8_t channel)
 Read analog value from saved result array.

Detailed Description

Analog subsystem.


Function Documentation

uint16_t analog_read ( uint8_t  channel )

Read analog value from saved result array.

Parameters:
channelChannel to be read
Returns:
analog reading, 10-bit right aligned

Referenced by temp_sensor_tick().

ISR ( ADC_vect  ,
ISR_NOBLOCK   
)

Analog Interrupt.

This is where we read our analog value and store it in an array for later retrieval

 All Data Structures Files Functions Variables Defines