Update to new tree.
[bertos.git] / drv / ser.c
old mode 100755 (executable)
new mode 100644 (file)
index 8c95a9d..10757d0
--- a/drv/ser.c
+++ b/drv/ser.c
@@ -1,9 +1,34 @@
 /**
  * \file
  * <!--
+ * This file is part of BeRTOS.
+ *
+ * Bertos is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * As a special exception, you may use this file as part of a free software
+ * library without restriction.  Specifically, if other files instantiate
+ * templates or use macros or inline functions from this file, or you compile
+ * this file and link it with other files to produce an executable, this
+ * file does not by itself cause the resulting executable to be covered by
+ * the GNU General Public License.  This exception does not however
+ * invalidate any other reasons why the executable file might be covered by
+ * the GNU General Public License.
+ *
  * Copyright 2003, 2004, 2006 Develer S.r.l. (http://www.develer.com/)
  * Copyright 2000 Bernardo Innocenti <bernie@codewiz.org>
- * This file is part of DevLib - See README.devlib for information.
+ *
  * -->
  *
  * \brief Buffered serial I/O driver
@@ -28,6 +53,9 @@
 
 /*#*
  *#* $Log$
+ *#* Revision 1.38  2007/06/21 17:07:21  batt
+ *#* Remove CONFIG_WATCHDOG stuff: watchdog macros expand to nothing when wdt is active.
+ *#*
  *#* Revision 1.37  2007/06/07 14:35:12  batt
  *#* Merge from project_ks.
  *#*
 
 #include "ser.h"
 
-#if CONFIG_WATCHDOG
-       #include "wdt.h"
-#endif
+#include "wdt.h"
 
 #include "ser_p.h"
 #include <mware/formatwr.h>
@@ -209,9 +235,7 @@ int ser_putchar(int c, struct Serial *port)
                /* Attende finche' il buffer e' pieno... */
                do
                {
-#if CONFIG_WATCHDOG
                        wdt_reset();
-#endif
 #if CONFIG_KERNEL && CONFIG_KERN_SCHED
                        /* Give up timeslice to other processes. */
                        proc_switch();
@@ -256,9 +280,7 @@ int ser_getchar(struct Serial *port)
                /* Wait while buffer is empty */
                do
                {
-#if CONFIG_WATCHDOG
                        wdt_reset();
-#endif
 #if CONFIG_KERNEL && CONFIG_KERN_SCHED
                        /* Give up timeslice to other processes. */
                        proc_switch();
@@ -505,9 +527,7 @@ void ser_drain(struct Serial *ser)
                        /* Give up timeslice to other processes. */
                        proc_switch();
                #endif
-               #if CONFIG_WATCHDOG
                        wdt_reset();
-               #endif
        }
 }