X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Fchips%2Fmsp430%2Fadc12%2FMsp430Adc12SingleChannel.nc;h=630f2b907491903203754e5165f4def52c31a55f;hb=337d0b13acf569c2640b3ed7b7f5c7cec35d7ddd;hp=8a9d0cb22a2ce2194af059017483b4a7d2a626a7;hpb=1a329382c4f4556fd52d85f4e3f4a67e54911682;p=tinyos-2.x.git diff --git a/tos/chips/msp430/adc12/Msp430Adc12SingleChannel.nc b/tos/chips/msp430/adc12/Msp430Adc12SingleChannel.nc index 8a9d0cb2..630f2b90 100644 --- a/tos/chips/msp430/adc12/Msp430Adc12SingleChannel.nc +++ b/tos/chips/msp430/adc12/Msp430Adc12SingleChannel.nc @@ -36,30 +36,31 @@ /** * * This interface provides access to the ADC12 on the level of HAL. It can be - * used to sample an adc channel once or repeatedly (one event is signalled per - * conversion result) or perform multiple conversions for a channel once or - * repeatedly (one event is signalled per multiple conversion results). It - * cannot be used to sample different adc channels with a single command. + * used to sample a single adc channel once or repeatedly (one event is + * signalled per conversion result) or perform multiple conversions for a + * single channel once or repeatedly (one event is signalled per multiple + * conversion results). It cannot be used to sample different adc channels with + * a single command (use the Msp430Adc12MultiChannel interface instead). * Sampling a channel requires calling a sequence of two commands, configureX() * and getData(), where X is either 'Single', 'SingleRepeat', 'Multiple' or * 'MultipleRepeat'. Conversion results will be signalled by the * dataReadySingle() or dataReadyMultiple() event, depending on the previous * configuration, i.e. there are four possible sequences: * - * configureSingle() -> [ getData() -> singleDataReady() ]* - * or configureSingleRepeat() -> [ getData() -> singleDataReady() ]* - * or configureMultiple() -> [ getData() -> multipleDataReady() ]* - * or configureMultipleRepeat() -> getData() -> multipleDataReady() + *

configureSingle() -> ( getData() -> singleDataReady() )* + *

configureSingleRepeat() -> ( getData() -> singleDataReady() )* + *

configureMultiple() -> ( getData() -> multipleDataReady() )* + *

configureMultipleRepeat() -> getData() -> multipleDataReady() * - * where configureX() and getData() are commands called by the client and + *

where configureX() and getData() are commands called by the client and * singleDataReady() and multipleDataReady() are events signalled back to the - * client by the adc subsystem. Note that a configuration is valid until - * the client reconfigures or releases the ADC (using the Resource - * interface), except for configureMultipleRepeat(), which is only valid - * for a single call to getData(). This means that after a successful - * configuration with, for example, configureSingle() the client may call - * getData() more than once without reconfiguring the ADC in between - * (if the client has not released the ADC via the Resource interface). + * client by the adc subsystem. Note that a configuration is valid until the + * client reconfigures or releases the ADC (using the Resource interface), + * except for configureMultipleRepeat(), which is only valid for a single call + * to getData(). This means that after a successful configuration with, for + * example, configureSingle() the client may call getData() more than once + * without reconfiguring the ADC in between (if the client has not released the + * ADC via the Resource interface). * * @author Jan Hauer */ @@ -193,9 +194,7 @@ interface Msp430Adc12SingleChannel * ignored. If the ADC was configured with the * configureSingleRepeat() command then the return value tells * whether another conversion should be performed (SUCCESS()) or - * not (FAIL). If SUCCESS() is returned then the - * sampling period will be as specified in the - * configureSingleRepeat() command. + * not (FAIL). * * @param data Conversion result (lower 12 bit). * @@ -222,7 +221,7 @@ interface Msp430Adc12SingleChannel * @return * A null pointer stops a repeated conversion mode. Any non-zero value is * interpreted as the next buffer, which must have at least - * numSamples entries. The return value us ignored if the ADC + * numSamples entries. The return value is ignored if the ADC * was configured with configureMultiple(). */ async event uint16_t* multipleDataReady(uint16_t buffer[], uint16_t numSamples);