OpenCores
URL https://opencores.org/ocsvn/oms8051mini/oms8051mini/trunk

Subversion Repositories oms8051mini

[/] [oms8051mini/] [trunk/] [verif/] [sw/] [C/] [uart_lb.c] - Diff between revs 7 and 11

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 7 Rev 11
Line 10... Line 10...
 
 
char cErrCnt;
char cErrCnt;
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
 
 
__xdata __at (0x9000) unsigned char uart_reg0;
__xdata __at (0x9000) unsigned char uart_reg0;
__xdata __at (0x9008) unsigned char uart_reg2;
__xdata __at (0x9001) unsigned char uart_reg1;
__xdata __at (0x900C) unsigned char uart_reg3;
__xdata __at (0x9002) unsigned char uart_reg2;
__xdata __at (0x9010) unsigned char uart_tdata;
__xdata __at (0x9003) unsigned char uart_reg3;
__xdata __at (0x9014) unsigned char uart_rdata;
__xdata __at (0x9004) unsigned char uart_reg4;
 
__xdata __at (0x9005) unsigned char uart_tdata;
 
__xdata __at (0x9006) unsigned char uart_rdata;
__xdata unsigned long *rx_des_base;
__xdata unsigned long *rx_des_base;
__xdata unsigned long *tx_des_base;
__xdata unsigned long *tx_des_base;
 
 
void main() {
void main() {
 
 
Line 28... Line 30...
     [1]   = 1 - Rx Enable
     [1]   = 1 - Rx Enable
     [0]   = 1 - Tx Enable
     [0]   = 1 - Tx Enable
    **/
    **/
    uart_reg0 = 0x7;
    uart_reg0 = 0x7;
    uart_reg2 = 0x0; // Baud Clock
    uart_reg2 = 0x0; // Baud Clock
 
    uart_reg3 = 0x0; // Baud Clock
    while(1) {
    while(1) {
       if((uart_reg3 & 0x2) == 0) { // Check the Rx Fifo  Counter
       if((uart_reg4 & 0x2) == 0) { // Check the Rx Fifo  Counter
          // Read the Receive FIFO
          // Read the Receive FIFO
          uart_tdata = uart_rdata;
          uart_tdata = uart_rdata;
          cFrameCnt  = cFrameCnt+1;
          cFrameCnt  = cFrameCnt+1;
         }
         }
    }
    }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.