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. |
Analog subsystem.
uint16_t analog_read | ( | uint8_t | channel ) |
Read analog value from saved result array.
channel | Channel to be read |
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