X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Fchips%2Fmsp430%2Fusci%2FHplMsp430UsciRegP.nc;h=fcd3c10e0b388e6fc72f3acacff8724055df0ca2;hb=3fe8f13e05a2bcbc4a224f5a7b7f0ae45398a9b5;hp=a9994ade7cddbd9305ff0bdbae34c7c609225e4c;hpb=97db9cf16631f784eea3fc7a3ec925f09bc65c08;p=tinyos-2.x.git diff --git a/tos/chips/msp430/usci/HplMsp430UsciRegP.nc b/tos/chips/msp430/usci/HplMsp430UsciRegP.nc index a9994ade..fcd3c10e 100644 --- a/tos/chips/msp430/usci/HplMsp430UsciRegP.nc +++ b/tos/chips/msp430/usci/HplMsp430UsciRegP.nc @@ -10,7 +10,7 @@ * - Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * - Neither the name of the Technische Universität Berlin nor the names + * - Neither the name of the Titanium Mirror, Inc. nor the names * of its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * @@ -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" @@ -185,7 +185,7 @@ implementation } } - /* Doesn't really set the mode, but checks the most for the device and inits + /* Doesn't really set the mode, but checks the mode for the device and inits * the device. */ async command bool Registers.setMode(msp430_usci_mode_t mode) @@ -236,8 +236,38 @@ implementation RENDER_A(Abctl); RENDER_A(Irtctl); RENDER_A(Irrctl); - RENDER_B(I2Coa); - RENDER_B(I2Csa); + + /* RENDER_B(I2Coa); */ + async command volatile uint8_t* Registers.ptrI2Coa() + { + return &UCBxI2Coa; + } + + async command uint16_t Registers.readI2Coa() + { + return UCBxI2Coa; + } + + async command void Registers.assignI2Coa(uint16_t addr) + { + UCBxI2Coa = addr; + } + + /* RENDER_B(I2Csa); */ + async command volatile uint8_t* Registers.ptrI2Csa() + { + return &UCBxI2Csa; + } + + async command uint16_t Registers.readI2Csa() + { + return UCBxI2Csa; + } + + async command void Registers.assignI2Csa(uint16_t addr) + { + UCBxI2Csa = addr; + } /* RENDER(Ie); */ async command bool Registers.getIeRx()