[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/pxa27x/uart HalPXA27xSerialP.nc, 1.1.2.4, 1.1.2.5 HalPXA27xSerialPacket.nc, 1.1.2.2, 1.1.2.3

Philip Buonadonna philipb at users.sourceforge.net
Mon Jul 17 11:42:04 PDT 2006


Update of /cvsroot/tinyos/tinyos-2.x/tos/chips/pxa27x/uart
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv31405/uart

Modified Files:
      Tag: tinyos-2_0_devel-BRANCH
	HalPXA27xSerialP.nc HalPXA27xSerialPacket.nc 
Log Message:
Modified serial components to spec compliance.

Index: HalPXA27xSerialP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/pxa27x/uart/HalPXA27xSerialP.nc,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -C2 -d -r1.1.2.4 -r1.1.2.5
*** HalPXA27xSerialP.nc	14 Jul 2006 16:27:41 -0000	1.1.2.4
--- HalPXA27xSerialP.nc	17 Jul 2006 18:42:01 -0000	1.1.2.5
***************
*** 100,126 ****
    command error_t Init.init() {
      error_t error = SUCCESS;
- #if 0
-     uint32_t uiDivisor;
-     if (defaultRate == 0) {
-       return EINVAL;
-     }
- 
-     uiDivisor = 921600/defaultRate;
-     // Check for invalid baud rate divisor value.
-     // XXX - Eventually could use '0' to imply auto rate detection
-     if ((uiDivisor & 0xFFFF0000) || (uiDivisor == 0)) {
-       return EINVAL;
-     }
- 
-     atomic {
-       call UARTInit.init();    
-       call UART.setDLL((uiDivisor & 0xFF));
-       call UART.setDLH(((uiDivisor >> 8) & 0xFF));
-       call UART.setLCR(LCR_WLS(3));
-       call UART.setMCR(MCR_OUT2);
-       //call UART.setIER(IER_RAVIE | IER_TIE | IER_UUE);
-       call UART.setFCR(FCR_TRFIFOE);
-     }
- #endif
  
      atomic {
--- 100,103 ----
***************
*** 225,237 ****
    
    async event void RxDMA.interruptDMA() {
      call RxDMA.setDCMD(0);
      call RxDMA.setDCSR(DCSR_EORINT | DCSR_ENDINTR | DCSR_STARTINTR | DCSR_BUSERRINTR);
!     signal HalPXA27xSerialPacket.receiveDone(rxCurrentBuf, lenCurrent, SUCCESS);
    }
  
    async event void TxDMA.interruptDMA() {
      call TxDMA.setDCMD(0);
      call TxDMA.setDCSR(DCSR_EORINT | DCSR_ENDINTR | DCSR_STARTINTR | DCSR_BUSERRINTR);
!     signal HalPXA27xSerialPacket.sendDone(txCurrentBuf, lenCurrent, SUCCESS);
    }
  
--- 202,224 ----
    
    async event void RxDMA.interruptDMA() {
+     uint8_t *pBuf;
      call RxDMA.setDCMD(0);
      call RxDMA.setDCSR(DCSR_EORINT | DCSR_ENDINTR | DCSR_STARTINTR | DCSR_BUSERRINTR);
!     pBuf = signal HalPXA27xSerialPacket.receiveDone(rxCurrentBuf, lenCurrent, SUCCESS);
!     if (pBuf) {
!       call HalPXA27xSerialPacket.receive(pBuf,lenCurrent,0);
!     }
!     return;
    }
  
    async event void TxDMA.interruptDMA() {
+     uint8_t *pBuf;
      call TxDMA.setDCMD(0);
      call TxDMA.setDCSR(DCSR_EORINT | DCSR_ENDINTR | DCSR_STARTINTR | DCSR_BUSERRINTR);
!     pBuf = signal HalPXA27xSerialPacket.sendDone(txCurrentBuf, lenCurrent, SUCCESS);
!     if (pBuf) {
!       call HalPXA27xSerialPacket.send(pBuf,lenCurrent);
!     }
!     return;
    }
  

Index: HalPXA27xSerialPacket.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/pxa27x/uart/Attic/HalPXA27xSerialPacket.nc,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -d -r1.1.2.2 -r1.1.2.3
*** HalPXA27xSerialPacket.nc	14 Jul 2006 16:27:41 -0000	1.1.2.2
--- HalPXA27xSerialPacket.nc	17 Jul 2006 18:42:01 -0000	1.1.2.3
***************
*** 57,61 ****
     *
     * @return buf A pointer to a new buffer of equal length
!    * as in the original <code>senc</code> call that is to be transmitted (chained
     * send). Set to NULL to end further transmissions.
     */
--- 57,61 ----
     *
     * @return buf A pointer to a new buffer of equal length
!    * as in the original <code>send</code> call that is to be transmitted (chained
     * send). Set to NULL to end further transmissions.
     */



More information about the Tinyos-2-commits mailing list