Classes | |
struct | ConversionCompleteInterrupt |
Typedefs | |
typedef _ADC | Result |
Enumerations | |
enum | Reference { AREF = 0x00, AVCC = 0x40, InternalRef = 0x80 | 0x40 } |
enum | Adjustment { AlignRight = 0x00, AlignLeft = 0x20 } |
enum | InterruptEnableFlag { InterruptEnable = 0x8, InterruptDisable = 0x00 } |
enum | EnableFlag { ADCEnable = 0x80, ADCDisable = 0x00 } |
enum | ConversionStart { StartNow = 0x40, StartLater = 0x00 } |
enum | FreeRunning { FreeRunMode = 0x20, FreeRunStopped = 0x00 } |
enum | Prescaler { Div2 = 0x01, Div4 = 0x02, Div8 = 0x03, Div16 = 0x04, Div32 = 0x05, Div64 = 0x06, Div128 = 0x07 } |
enum | AnalogChannel { ADC0 = 0x00, ADC1 = 0x01, ADC2 = 0x02, ADC3 = 0x03, ADC4 = 0x04, ADC5 = 0x05, ADC6 = 0x06, ADC7 = 0x07, Vbandgap = 0x0E, GND = 0x0F } |
Functions | |
bool | IsConverting () |
void | WaitWhileConverting () |
void | EnsureChangeSafety () |
void | SelectionSetUp (Reference reference, Adjustment adjustment, AnalogChannel channel) |
void | ControlSetUp (EnableFlag enableFlag, ConversionStart conversionStart, FreeRunning freeRunning, InterruptEnableFlag interruptEnableFlag, Prescaler prescaler) |
void | SetChannel (AnalogChannel channel) |
void | SelectPrescaler (Prescaler prescaler) |
void | Enable () |
void | Disable () |
bool | IsEnabled () |
void | StartConversion () |
void | EnableFreeRun () |
void | DisableFreeRun () |
bool | IsFreeRunEnabled () |
void | StartFreeRun () |
void | StopFreeRun () |
typedef _ADC AVRCpp::AnalogToDigital::Result |
Definition at line 114 of file ADC.h.
00115 { 00116 AlignRight = 0x00, 00117 AlignLeft = _ADLAR 00118 00119 }; // enum Adjustment
Definition at line 135 of file ADC.h.
00136 { 00137 StartNow = _ADSC, 00138 StartLater = 0x00 00139 00140 }; // enum ConversionStart
Definition at line 128 of file ADC.h.
00129 { 00130 ADCEnable = _ADEN, 00131 ADCDisable = 0x00 00132 00133 }; // enum EnableFlag
Definition at line 142 of file ADC.h.
00143 { 00144 FreeRunMode = 0x20, 00145 FreeRunStopped = 0x00 00146 00147 }; // enum FreeRunning
Definition at line 121 of file ADC.h.
00122 { 00123 InterruptEnable = _ADIE, 00124 InterruptDisable = 0x00 00125 00126 }; // enum InterruptEnableFlag
void AVRCpp::AnalogToDigital::ControlSetUp | ( | EnableFlag | enableFlag, | |
ConversionStart | conversionStart, | |||
FreeRunning | freeRunning, | |||
InterruptEnableFlag | interruptEnableFlag, | |||
Prescaler | prescaler | |||
) | [inline] |
void AVRCpp::AnalogToDigital::Disable | ( | ) | [inline] |
void AVRCpp::AnalogToDigital::DisableFreeRun | ( | ) | [inline] |
void AVRCpp::AnalogToDigital::Enable | ( | ) | [inline] |
void AVRCpp::AnalogToDigital::EnableFreeRun | ( | ) | [inline] |
void AVRCpp::AnalogToDigital::EnsureChangeSafety | ( | ) | [inline] |
Definition at line 229 of file ADC.h.
00230 { 00231 if (IsConverting() ) 00232 Assembler::NOP(); 00233 00234 } // EnsureChangeSafety
bool AVRCpp::AnalogToDigital::IsConverting | ( | ) | [inline] |
bool AVRCpp::AnalogToDigital::IsEnabled | ( | ) | [inline] |
bool AVRCpp::AnalogToDigital::IsFreeRunEnabled | ( | ) | [inline] |
void AVRCpp::AnalogToDigital::SelectionSetUp | ( | Reference | reference, | |
Adjustment | adjustment, | |||
AnalogChannel | channel | |||
) | [inline] |
Definition at line 237 of file ADC.h.
00241 { 00242 EnsureChangeSafety(); 00243 ADMUX = reference | adjustment | channel; 00244 00245 } // SelectionSetUp
void AVRCpp::AnalogToDigital::SelectPrescaler | ( | Prescaler | prescaler | ) | [inline] |
void AVRCpp::AnalogToDigital::SetChannel | ( | AnalogChannel | channel | ) | [inline] |
void AVRCpp::AnalogToDigital::StartConversion | ( | ) | [inline] |
void AVRCpp::AnalogToDigital::StartFreeRun | ( | ) | [inline] |
void AVRCpp::AnalogToDigital::StopFreeRun | ( | ) | [inline] |
void AVRCpp::AnalogToDigital::WaitWhileConverting | ( | ) | [inline] |
MTÜ TTÜ Robotiklubi |