Module sam4l::adc 
                   
                       [−]
                   
               [src]
Implementation of the SAM4L ADCIFE.
This is an implementation of the SAM4L analog to digital converter. It is bare-bones because it provides little flexibility on how samples are taken. Currently, all samples:
- are 12 bits
 - use the ground pad as the negative reference
 - use a VCC/2 positive reference
 - are right justified
 
Samples can either be collected individually or continuously at a specified frequency.
- Author: Philip Levis pal@cs.stanford.edu, Branden Ghena brghena@umich.edu
 - Updated: May 1, 2017
 
Reexports
use core::cmp; | 
use core::mem; | 
use core::slice; | 
use core::cell::Cell; | 
use dma; | 
use kernel::ReturnCode; | 
use kernel::common::VolatileCell; | 
use kernel::common::math; | 
use kernel::common::take_cell::TakeCell; | 
use kernel::hil; | 
use pm; | 
use pm::Clock; | 
use pm::PBAClock; | 
use scif; | 
Structs
| Adc | 
                                 ADC driver code for the SAM4L.  | 
                       
| AdcChannel | 
                                 Representation of an ADC channel on the SAM4L.  | 
                       
| AdcRegisters | 
                                 Memory mapped registers for the ADC.  | 
                       
Enums
| Channel | 
                                 SAM4L ADC channels.  | 
                       
Constants
| BASE_ADDRESS | 
Statics
| ADC0 | 
                                 Statically allocated ADC driver. Used in board configurations to connect to various capsules.  | 
                       
| CHANNEL_AD0 | 
                                 Statically allocated ADC channels. Used in board configurations to specify which channels are used on the platform.  | 
                       
| CHANNEL_AD1 | |
| CHANNEL_AD2 | |
| CHANNEL_AD3 | |
| CHANNEL_AD4 | |
| CHANNEL_AD5 | |
| CHANNEL_AD6 | |
| CHANNEL_AD7 | |
| CHANNEL_AD8 | |
| CHANNEL_AD9 | |
| CHANNEL_AD10 | |
| CHANNEL_AD11 | |
| CHANNEL_AD12 | |
| CHANNEL_AD13 | |
| CHANNEL_AD14 | |
| CHANNEL_BANDGAP | |
| CHANNEL_DAC | |
| CHANNEL_REFERENCE_GROUND | |
| CHANNEL_SCALED_VCC | |
| CHANNEL_VSINGLE | 
Traits
| EverythingClient | 
                                 Create a trait of both client types to allow a single client reference to act as both  |