This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: how to disable diag_printf output on serial port


diff --git a/devs/serial/generic/16x5x/current/src/ser_16x5x.c b/devs/serial/generic/16x5x/current/src/ser_16x5x.c
--- a/devs/serial/generic/16x5x/current/src/ser_16x5x.c
+++ b/devs/serial/generic/16x5x/current/src/ser_16x5x.c
@@ -537,7 +537,11 @@
 {
     serial_channel *chan = (serial_channel *)data;
     pc_serial_info *ser_chan = (pc_serial_info *)chan->dev_priv;
-    cyg_drv_interrupt_mask(ser_chan->int_num);
+    cyg_uint8 isr, mcr;
+
+    HAL_READ_UINT8(ser_chan->base + REG_mcr, mcr);
+    HAL_WRITE_UINT8(ser_chan->base + REG_mcr, mcr & ~MCR_INT);
+
     cyg_drv_interrupt_acknowledge(ser_chan->int_num);
     return CYG_ISR_CALL_DSR;  // Cause DSR to be run
 }
@@ -549,7 +553,7 @@
     serial_channel *chan = (serial_channel *)data;
     pc_serial_info *ser_chan = (pc_serial_info *)chan->dev_priv;
     cyg_addrword_t base = ser_chan->base;
-    cyg_uint8 _isr;
+    cyg_uint8 _isr, _mcr;
 
     // Check if we have an interrupt pending - note that the interrupt
     // is pending of the low bit of the isr is *0*, not 1.
@@ -653,7 +657,8 @@
         HAL_READ_UINT8(base+REG_isr, _isr);
     } // while
 
-    cyg_drv_interrupt_unmask(ser_chan->int_num);
+    HAL_READ_UINT8(ser_chan->base + REG_mcr, _mcr);
+    HAL_WRITE_UINT8(ser_chan->base + REG_mcr, _mcr | MCR_INT);
 }
 #endif
 


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]