Module capsules::adc [] [src]

Provides userspace applications with the ability to sample analog signals.

Reexports

use core::cell::Cell;
use core::cmp;
use kernel::AppId;
use kernel::AppSlice;
use kernel::Callback;
use kernel::Driver;
use kernel::ReturnCode;
use kernel::Shared;
use kernel::common::take_cell::MapCell;
use kernel::common::take_cell::TakeCell;
use kernel::hil;

Structs

Adc

ADC application driver, used by applications to interact with ADC. Not currently virtualized, only one application can use it at a time.

App

Holds buffers that the application has passed us

Enums

AdcMode

ADC modes, used to track internal state and to signify to applications which state a callback came from

Constants

DRIVER_NUM

Syscall driver number.

Statics

ADC_BUFFER1

Buffers to use for DMA transfers The size is chosen somewhat arbitrarily, but has been tested. At 175000 Hz, buffers need to be swapped every 70 us and copied over before the next swap. In testing, it seems to keep up fine.

ADC_BUFFER2
ADC_BUFFER3