/**
* \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
/*#*
*#* $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.
+ *#*
+ *#* Revision 1.36 2007/01/29 11:30:29 batt
+ *#* Reimplement ser_clearstatus as a macro.
+ *#*
*#* Revision 1.35 2007/01/27 20:47:12 batt
*#* Add clear status.
*#*
*#*/
#include "ser.h"
+
+#include "wdt.h"
+
#include "ser_p.h"
#include <mware/formatwr.h>
#include <cfg/debug.h>
/* Attende finche' il buffer e' pieno... */
do
{
+ wdt_reset();
#if CONFIG_KERNEL && CONFIG_KERN_SCHED
/* Give up timeslice to other processes. */
proc_switch();
/* Wait while buffer is empty */
do
{
+ wdt_reset();
#if CONFIG_KERNEL && CONFIG_KERN_SCHED
/* Give up timeslice to other processes. */
proc_switch();
port->hw->table->setParity(port->hw, parity);
}
-void ser_clearstatus(struct Serial *port)
-{
- ser_setstatus(port, 0);
-}
-
/**
* Flush both the RX and TX buffers.
/* Give up timeslice to other processes. */
proc_switch();
#endif
+ wdt_reset();
}
}