X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Fchips%2Fmsp430%2Fusci%2FHplMsp430UsciRegP.nc;h=3dcaf9caae90fe48973316cf5252b931de175f0a;hb=2fc550ecfc8fb03f258b5a692c8e7e90793aced2;hp=67f650a7e5d4e8a94f658410071ae9b17394bfe0;hpb=b054fbe2a8deacc35f0067deb15274da53d96984;p=tinyos-2.x.git diff --git a/tos/chips/msp430/usci/HplMsp430UsciRegP.nc b/tos/chips/msp430/usci/HplMsp430UsciRegP.nc index 67f650a7..3dcaf9ca 100644 --- a/tos/chips/msp430/usci/HplMsp430UsciRegP.nc +++ b/tos/chips/msp430/usci/HplMsp430UsciRegP.nc @@ -26,17 +26,17 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + /** * HPL register interface to USCI peripherals. The interface abstracts the * differences between pysical devices (aka addresses) such that a user of * the interface can equally use any USCI device, providing the device * provides the necessary capabilities. For example, I2C is only available * on USCI_Bx ports. - * + * * @author R. Steve McKown */ - + #include "Msp430Usci.h" #include "msp430hardware.h" @@ -57,8 +57,8 @@ generic module HplMsp430UsciRegP( uint16_t I2Csa_addr, /* B devices only */ uint16_t Ie_addr, uint16_t Ifg_addr, - uint16_t UCAxRXIFG, /* We rely on xIE and xIFG at same bit positions */ - uint16_t UCAxTXIFG + uint16_t UCxxRXIFG, /* We rely on xIE and xIFG at same bit positions */ + uint16_t UCxxTXIFG ) @safe() { provides interface HplMsp430UsciReg as Registers; } @@ -242,62 +242,47 @@ implementation /* RENDER(Ie); */ async command bool Registers.getIeRx() { - return READ_FLAG(UCxxIe, UCAxRXIFG); + return READ_FLAG(UCxxIe, UCxxRXIFG); } async command void Registers.setIeRx() { - SET_FLAG(UCxxIe, UCAxRXIFG); + SET_FLAG(UCxxIe, UCxxRXIFG); } async command void Registers.clrIeRx() { - CLR_FLAG(UCxxIe, UCAxRXIFG); + CLR_FLAG(UCxxIe, UCxxRXIFG); } async command bool Registers.getIeTx() { - return READ_FLAG(UCxxIe, UCAxTXIFG); + return READ_FLAG(UCxxIe, UCxxTXIFG); } async command void Registers.setIeTx() { - SET_FLAG(UCxxIe, UCAxTXIFG); + SET_FLAG(UCxxIe, UCxxTXIFG); } async command void Registers.clrIeTx() { - CLR_FLAG(UCxxIe, UCAxTXIFG); + CLR_FLAG(UCxxIe, UCxxTXIFG); } /* RENDER(Ifg); */ async command bool Registers.getIfgRx() { - return READ_FLAG(UCxxIfg, UCAxRXIFG); - } - - async command void Registers.setIfgRx() - { - SET_FLAG(UCxxIfg, UCAxRXIFG); + return READ_FLAG(UCxxIfg, UCxxRXIFG); } async command void Registers.clrIfgRx() { - CLR_FLAG(UCxxIfg, UCAxRXIFG); + CLR_FLAG(UCxxIfg, UCxxRXIFG); } async command bool Registers.getIfgTx() { - return READ_FLAG(UCxxIfg, UCAxTXIFG); - } - - async command void Registers.setIfgTx() - { - SET_FLAG(UCxxIfg, UCAxTXIFG); - } - - async command void Registers.clrIfgTx() - { - CLR_FLAG(UCxxIfg, UCAxTXIFG); + return READ_FLAG(UCxxIfg, UCxxTXIFG); } }