avr/cpp/ADC.h File Reference

#include "IO.h"
#include "Assembler.h"

Go to the source code of this file.

Namespaces

namespace  AVRCpp
namespace  AVRCpp::AnalogToDigital

Classes

struct  AVRCpp::AnalogToDigital::ConversionCompleteInterrupt

Defines

#define __ADC_SIMPLE__   0x00
#define __ADC_DIFFERENTIAL__   0x01
#define __ADC_DIGITAL_INPUT__   0x02
#define __ADC_AUTO_TRIGGER__   0x04
#define __ADC_INTERNAL_REF1__   0x08
#define __ADC_HIGH_SPEED__   0x10
#define __ADC_PROPERTIES__   (__ADC_SIMPLE__ | __ADC_DIFFERENTIAL__ | __ADC_AUTO_TRIGGER__ | __ADC_DIGITAL_INPUT__ | __ADC_INTERNAL_REF1__)
#define ADC_ns   AnalogToDigital
#define ADC_struct   AnalogToDigital::ConversionCompleteInterrupt

Typedefs

typedef _ADC AVRCpp::AnalogToDigital::Result

Enumerations

enum  AVRCpp::AnalogToDigital::Reference {
  AVRCpp::AnalogToDigital::AREF = 0x00,
  AVRCpp::AnalogToDigital::AVCC = 0x40,
  AVRCpp::AnalogToDigital::Internal1V = 0x80,
  AVRCpp::AnalogToDigital::InternalRef = 0x80 | 0x40
}
enum  AVRCpp::AnalogToDigital::Adjustment {
  AVRCpp::AnalogToDigital::AlignRight = 0x00,
  AVRCpp::AnalogToDigital::AlignLeft = 0x20
}
enum  AVRCpp::AnalogToDigital::InterruptEnableFlag {
  AVRCpp::AnalogToDigital::InterruptEnable = 0x8,
  AVRCpp::AnalogToDigital::InterruptDisable = 0x00
}
enum  AVRCpp::AnalogToDigital::EnableFlag {
  AVRCpp::AnalogToDigital::ADCEnable = 0x80,
  AVRCpp::AnalogToDigital::ADCDisable = 0x00
}
enum  AVRCpp::AnalogToDigital::ConversionStart {
  AVRCpp::AnalogToDigital::StartNow = 0x40,
  AVRCpp::AnalogToDigital::StartLater = 0x00
}
enum  AVRCpp::AnalogToDigital::FreeRunning {
  AVRCpp::AnalogToDigital::FreeRunMode = 0x20,
  AVRCpp::AnalogToDigital::FreeRunStopped = 0x00
}
enum  AVRCpp::AnalogToDigital::Prescaler {
  AVRCpp::AnalogToDigital::Div2 = 0x01,
  AVRCpp::AnalogToDigital::Div4 = 0x02,
  AVRCpp::AnalogToDigital::Div8 = 0x03,
  AVRCpp::AnalogToDigital::Div16 = 0x04,
  AVRCpp::AnalogToDigital::Div32 = 0x05,
  AVRCpp::AnalogToDigital::Div64 = 0x06,
  AVRCpp::AnalogToDigital::Div128 = 0x07
}
enum  AVRCpp::AnalogToDigital::AnalogChannel {
  AVRCpp::AnalogToDigital::ADC0 = 0x00,
  AVRCpp::AnalogToDigital::ADC1 = 0x01,
  AVRCpp::AnalogToDigital::ADC2 = 0x02,
  AVRCpp::AnalogToDigital::ADC3 = 0x03,
  AVRCpp::AnalogToDigital::ADC4 = 0x04,
  AVRCpp::AnalogToDigital::ADC5 = 0x05,
  AVRCpp::AnalogToDigital::ADC6 = 0x06,
  AVRCpp::AnalogToDigital::ADC7 = 0x07,
  AVRCpp::AnalogToDigital::Vbandgap = 0x1E,
  AVRCpp::AnalogToDigital::GND = 0x1F
}
enum  AVRCpp::AnalogToDigital::Gain {
  AVRCpp::AnalogToDigital::Gain1x = 0x10,
  AVRCpp::AnalogToDigital::Gain10x = 0x08,
  AVRCpp::AnalogToDigital::Gain200x = 0x0a
}
enum  AVRCpp::AnalogToDigital::AutoTriggerSource {
  AVRCpp::AnalogToDigital::FreeRunningMode = 0x00,
  AVRCpp::AnalogToDigital::AnalogComparator = 0x01,
  AVRCpp::AnalogToDigital::ExternalInterruptRequest0 = 0x02,
  AVRCpp::AnalogToDigital::Counter0CompareMatch = 0x03,
  AVRCpp::AnalogToDigital::Counter0Overflow = 0x04,
  AVRCpp::AnalogToDigital::Counter1CompareMatchB = 0x05,
  AVRCpp::AnalogToDigital::Counter1Overflow = 0x06,
  AVRCpp::AnalogToDigital::Counter1CaptureEvent = 0x07
}

Functions

bool AVRCpp::AnalogToDigital::IsConverting ()
void AVRCpp::AnalogToDigital::WaitWhileConverting ()
void AVRCpp::AnalogToDigital::EnsureChangeSafety ()
void AVRCpp::AnalogToDigital::SelectionSetUp (Reference reference, Adjustment adjustment, AnalogChannel channel)
void AVRCpp::AnalogToDigital::ControlSetUp (EnableFlag enableFlag, ConversionStart conversionStart, FreeRunning freeRunning, InterruptEnableFlag interruptEnableFlag, Prescaler prescaler)
void AVRCpp::AnalogToDigital::SetChannel (AnalogChannel channel)
void AVRCpp::AnalogToDigital::SelectPrescaler (Prescaler prescaler)
void AVRCpp::AnalogToDigital::Enable ()
void AVRCpp::AnalogToDigital::Disable ()
bool AVRCpp::AnalogToDigital::IsEnabled ()
void AVRCpp::AnalogToDigital::StartConversion ()
void AVRCpp::AnalogToDigital::SetDifferentialChannels (AnalogChannel positive, AnalogChannel negative, Gain gain)
void AVRCpp::AnalogToDigital::EnableAutoTrigger ()
void AVRCpp::AnalogToDigital::DisableAutoTrigger ()
bool AVRCpp::AnalogToDigital::IsAutoTriggerEnabled ()
void AVRCpp::AnalogToDigital::SetAutoTriggerSource (AutoTriggerSource source)
void AVRCpp::AnalogToDigital::EnableFreeRun ()
void AVRCpp::AnalogToDigital::DisableFreeRun ()
bool AVRCpp::AnalogToDigital::IsFreeRunEnabled ()
void AVRCpp::AnalogToDigital::StartFreeRun ()
void AVRCpp::AnalogToDigital::StopFreeRun ()
void AVRCpp::AnalogToDigital::DigitalInputDisable (uint8_t pins)
 Disables the digital input buffers of the pins specified.
void AVRCpp::AnalogToDigital::DigitalInputEnable (uint8_t pins)
 Enables the digital input buffers for the specified pins.
void AVRCpp::AnalogToDigital::SetDigitalInput (uint8_t pins)
 Enables the digital input buffers for the specified pins, disables for others.


Define Documentation

#define __ADC_AUTO_TRIGGER__   0x04

Definition at line 34 of file ADC.h.

#define __ADC_DIFFERENTIAL__   0x01

Definition at line 32 of file ADC.h.

#define __ADC_DIGITAL_INPUT__   0x02

Definition at line 33 of file ADC.h.

#define __ADC_HIGH_SPEED__   0x10

Definition at line 36 of file ADC.h.

#define __ADC_INTERNAL_REF1__   0x08

Definition at line 35 of file ADC.h.

#define __ADC_PROPERTIES__   (__ADC_SIMPLE__ | __ADC_DIFFERENTIAL__ | __ADC_AUTO_TRIGGER__ | __ADC_DIGITAL_INPUT__ | __ADC_INTERNAL_REF1__)

Definition at line 57 of file ADC.h.

#define __ADC_SIMPLE__   0x00

Definition at line 31 of file ADC.h.

#define ADC_ns   AnalogToDigital

Definition at line 74 of file ADC.h.

#define ADC_struct   AnalogToDigital::ConversionCompleteInterrupt

Definition at line 75 of file ADC.h.


Generated on Sat Sep 15 23:40:30 2007 for AVR C++ Lib for ATmega164P by  doxygen 1.5.2
SourceForge.net Logo MTÜ TTÜ Robotiklubi