Interface: tos.chips.msp430.pins.HplMsp430GeneralIO

interface HplMsp430GeneralIO

HPL for the TI MSP430 family of microprocessors. This provides an abstraction for general-purpose I/O.

Author:
Cory Sharp <cssharp@eecs.berkeley.edu>

Commands
command void clr() Set pin to low.
command bool get() Read pin value.
command uint8_t getRaw() Get the port status that contains the pin.
command bool isInput()
command bool isIOFunc()
command bool isModuleFunc()
command bool isOutput()
command void makeInput() Set pin direction to input.
command void makeOutput() Set pin direction to output.
command void selectIOFunc() Set pin for I/O functionality.
command void selectModuleFunc() Set pin for module specific functionality.
command void set() Set pin to high.
command void toggle() Toggle pin status.

Commands - Details

clr

command void clr()

Set pin to low.

get

command bool get()

Read pin value.

Returns:
TRUE if pin is high, FALSE otherwise.

getRaw

command uint8_t getRaw()

Get the port status that contains the pin.

Returns:
Status of the port that contains the given pin. The x'th pin on the port will be represented in the x'th bit.

isInput

command bool isInput()

isIOFunc

command bool isIOFunc()

isModuleFunc

command bool isModuleFunc()

isOutput

command bool isOutput()

makeInput

command void makeInput()

Set pin direction to input.

makeOutput

command void makeOutput()

Set pin direction to output.

selectIOFunc

command void selectIOFunc()

Set pin for I/O functionality.

selectModuleFunc

command void selectModuleFunc()

Set pin for module specific functionality.

set

command void set()

Set pin to high.

toggle

command void toggle()

Toggle pin status.