Beispiel #1
0
 /** Sets certain bits of the command register on/off */
 protected final void setCommandBits(int mask, boolean on) {
   int cmd = io.inPortWord(base + USBCMD);
   if (on) {
     cmd |= mask;
   } else {
     cmd &= ~mask;
   }
   io.outPortWord(base + USBCMD, cmd);
 }
Beispiel #2
0
 /** Sets certain bits of the port1 status and control register on/off */
 protected final void setPortSCBits(int port, int mask, boolean on) {
   int sc = io.inPortWord(base + USBPORTSC1 + (port << 1));
   sc &= 0xFFF5;
   if (on) {
     sc |= mask;
   } else {
     sc &= ~mask;
   }
   io.outPortWord(base + USBPORTSC1 + (port << 1), sc);
 }
Beispiel #3
0
 /**
  * Writes a word to the data register
  *
  * @param dataWord
  */
 public final void setDataReg(int dataWord) {
   cmdBlock.outPortWord(cmdBlockStart + RW16_DATA_OFFSET, dataWord);
 }
Beispiel #4
0
 /** Sets the interrupt enable register */
 protected final void setInterruptEnable(int mask) {
   io.outPortWord(base + USBINTR, mask);
 }
Beispiel #5
0
 /** Clear the status register */
 protected final void clearStatus(int clearMask) {
   io.outPortWord(base + USBSTS, clearMask);
 }
Beispiel #6
0
 /** Sets the command register */
 protected final void setCommand(int command) {
   io.outPortWord(base + USBCMD, command);
 }
Beispiel #7
0
 /** Sets all bits of the port1 status and control register */
 protected final void setPortSC(int port, int value) {
   io.outPortWord(base + USBPORTSC1 + (port << 1), value);
 }
Beispiel #8
0
 /** Sets the frame number register */
 protected final void setFrameNumber(int frnum) {
   io.outPortWord(base + USBFRNUM, frnum);
 }