HWAdmux Class Reference

#include <hwad.h>

Inheritance diagram for HWAdmux:
Inheritance graph
[legend]
Collaboration diagram for HWAdmux:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 HWAdmux (AvrDevice *c, Pin *_ad0, Pin *_ad1, Pin *_ad2, Pin *_ad3, Pin *_ad4, Pin *_ad5, Pin *_ad6, Pin *_ad7)
unsigned char GetAdmux ()
void SetAdmux (unsigned char)
void Reset ()
int GetMuxOutput ()
 Get analog voltage (0..INT_MAX=Vcc) of the selected pin.

Public Attributes

IOReg< HWAdmuxadmux_reg

Protected Attributes

unsigned char admux
Pinad [8]
AvrDevicecore

Detailed Description

ADC multiplexer. This version does not handle differential inputs.

Definition at line 36 of file hwad.h.


Constructor & Destructor Documentation

HWAdmux::HWAdmux ( AvrDevice c,
Pin _ad0,
Pin _ad1,
Pin _ad2,
Pin _ad3,
Pin _ad4,
Pin _ad5,
Pin _ad6,
Pin _ad7 
)

Definition at line 39 of file hwad.cpp.

References ad, and Reset().

Here is the call graph for this function:


Member Function Documentation

unsigned char HWAdmux::GetAdmux (  ) 

Definition at line 75 of file hwad.cpp.

References admux.

Referenced by HWAd::CpuCycle().

Here is the caller graph for this function:

int HWAdmux::GetMuxOutput (  ) 

Get analog voltage (0..INT_MAX=Vcc) of the selected pin.

Definition at line 79 of file hwad.cpp.

References ad, admux, Pin::GetAnalog(), MUX0, MUX1, and MUX2.

Referenced by HWAd::CpuCycle().

Here is the call graph for this function:

Here is the caller graph for this function:

void HWAdmux::Reset ( void   )  [virtual]

Implement the hardware's reset functionality here. The default is no action on reset.

Reimplemented from Hardware.

Definition at line 67 of file hwad.cpp.

References admux.

Referenced by HWAdmux().

Here is the caller graph for this function:

void HWAdmux::SetAdmux ( unsigned char  val  ) 

Definition at line 71 of file hwad.cpp.

References admux.


Member Data Documentation

Pin* HWAdmux::ad[8] [protected]

Definition at line 39 of file hwad.h.

Referenced by GetMuxOutput(), and HWAdmux().

unsigned char HWAdmux::admux [protected]

Definition at line 38 of file hwad.h.

Referenced by GetAdmux(), GetMuxOutput(), Reset(), and SetAdmux().

AvrDevice* HWAdmux::core [protected]

Definition at line 40 of file hwad.h.


The documentation for this class was generated from the following files:
Generated on Sun Feb 12 16:51:32 2012 for Simulavr by  doxygen 1.6.3