Interface: tos.chips.msp430.adc12.HplAdc12
interface HplAdc12
The HplAdc12 interface exports low-level access to the ADC12 registers
of the MSP430 MCU.
- Author:
-
Jan Hauer
- See:
-
Please refer to TEP 101 for more information about this component and its
intended use.
Commands
command adc12ctl0_t getCtl0()
command adc12ctl1_t getCtl1()
command uint16_t getIEFlags()
command adc12memctl_t getMCtl(uint8_t idx)
command uint16_t getMem(uint8_t idx)
command bool isBusy()
command void resetIFGs()
command void setCtl0(adc12ctl0_t control0)
command void setCtl1(adc12ctl1_t control1)
command void setIEFlags(uint16_t mask)
command void setMCtl(uint8_t idx, adc12memctl_t memControl)
Events
Commands - Details
enableConversion
command void enableConversion()
getCtl0
command adc12ctl0_t getCtl0()
- Returns:
-
ADC12CTL0
*
getCtl1
command adc12ctl1_t getCtl1()
- Returns:
-
ADC12CTL1
*
getIEFlags
command uint16_t getIEFlags()
- Returns:
-
ADC12IE
getMCtl
command adc12memctl_t getMCtl(uint8_t idx)
- Parameters:
-
idx - The register index (the 'x' in ADC12MCTLx) [0..15]
- Returns:
-
memControl ADC12MCTLx register data.
getMem
command uint16_t getMem(uint8_t idx)
- Parameters:
-
idx - The register index (the 'x' in ADC12MEMx) [0..15]
- Returns:
-
ADC12MEMx
isBusy
command bool isBusy()
- Returns:
-
ADC12BUSY
resetIFGs
command void resetIFGs()
setCtl0
command void setCtl0(adc12ctl0_t control0)
- Parameters:
-
control0 - ADC12CTL0 register data.
*
setCtl1
command void setCtl1(adc12ctl1_t control1)
- Parameters:
-
control1 - ADC12CTL1 register data.
*
setIEFlags
command void setIEFlags(uint16_t mask)
- Parameters:
-
mask - Bitmask (0 means interrupt disabled, 1 menas interrupt enabled)
setMCtl
command void setMCtl(uint8_t idx, adc12memctl_t memControl)
- Parameters:
-
idx - The register index (the 'x' in ADC12MCTLx) [0..15]
-
memControl - ADC12MCTLx register data.
startConversion
command void startConversion()
stopConversion
command void stopConversion()
Events - Details
conversionDone
event void conversionDone(uint16_t iv)
- Parameters:
-
iv - ADC12 interrupt vector value 0x6, 0x8, ... , 0x24