uint8_t I2Coa_addr, /* B devices only */
uint8_t I2Csa_addr, /* B devices only */
uint8_t Ie_addr,
- uint8_t Ifg_addr
+ uint8_t Ifg_addr,
+ uint8_t UCAxRXIFG, /* We rely on xIE and xIFG at same bit positions */
+ uint8_t UCAxTXIFG,
) @safe() {
provides interface HplMsp430UsciReg as Registers;
}
command bool Registers.setMode(msp430_usci_mode_t mode)
{
if (mode == UCSYNC_UART && IS_USCI_Bx)
- return false;
+ return FALSE;
if (mode == UCI2C && IS_USCI_Ax)
- return false;
+ return FALSE;
SET_FLAG(UCxxCtl0, UCSYNC)
}
RENDER_B(I2Cie);
RENDER(Stat);
+ /* RENDER(Rxbuf); */
command uint8_t* Registers.ptrRxbuf()
{
return UCxxRXBuf;
return UCxxRXBuf;
}
+ /* RENDER(Txbuf); */
command uint8_t* Registers.ptrTxbuf()
{
return UCxxTXBuf;
RENDER_A(Irrctl);
RENDER_B(I2Coa);
RENDER_B(I2Csa);
- RENDER(Ie);
- RENDER(Ifg);
+
+ /* RENDER(Ie); */
+ command bool getIeRx()
+ {
+ return READ_FLAG(UCxxIe, UCAxRXIFG);
+ }
+
+ command void setIeRx()
+ {
+ return SET_FLAG(UCxxIe, UCAxRXIFG);
+ }
+
+ command void clrIeRx()
+ {
+ return CLR_FLAG(UCxxIe, UCAxRXIFG);
+ }
+
+ command bool getIeTx()
+ {
+ return READ_FLAG(UCxxIe, UCAxTXIFG);
+ }
+
+ command void setIeTx()
+ {
+ return SET_FLAG(UCxxIe, UCAxTXIFG);
+ }
+
+ command void clrIeTx()
+ {
+ return CLR_FLAG(UCxxIe, UCAxTXIFG);
+ }
+
+ /* RENDER(Ifg); */
+ command bool getIeRx()
+ {
+ return READ_FLAG(UCxxIfg, UCAxRXIFG);
+ }
+
+ command void setIfgRx()
+ {
+ return SET_FLAG(UCxxIfg, UCAxRXIFG);
+ }
+
+ command void clrIfgRx()
+ {
+ return CLR_FLAG(UCxxIfg, UCAxRXIFG);
+ }
+
+ command bool getIfgTx()
+ {
+ return READ_FLAG(UCxxIfg, UCAxTXIFG);
+ }
+
+ command void setIfgTx()
+ {
+ return SET_FLAG(UCxxIfg, UCAxTXIFG);
+ }
+
+ command void clrIfgTx()
+ {
+ return CLR_FLAG(UCxxIfg, UCAxTXIFG);
+ }
+
}