projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Import into DevLib.
[bertos.git]
/
drv
/
ser.c
diff --git
a/drv/ser.c
b/drv/ser.c
index 268e739b73a1ab90067e34eacf05ddc5e7e0f9a1..59ab1fea388e72114593093af0ef92739b3c4eff 100755
(executable)
--- a/
drv/ser.c
+++ b/
drv/ser.c
@@
-28,6
+28,12
@@
/*#*
*#* $Log$
/*#*
*#* $Log$
+ *#* Revision 1.25 2005/04/11 19:10:27 bernie
+ *#* Include top-level headers from cfg/ subdir.
+ *#*
+ *#* Revision 1.24 2005/01/21 20:13:15 aleph
+ *#* Fix drain at ser_close()
+ *#*
*#* Revision 1.23 2005/01/14 00:47:07 aleph
*#* ser_drain(): Wait for hw transmission complete.
*#*
*#* Revision 1.23 2005/01/14 00:47:07 aleph
*#* ser_drain(): Wait for hw transmission complete.
*#*
@@
-99,9
+105,9
@@
#include "ser.h"
#include "ser_p.h"
#include <mware/formatwr.h>
#include "ser.h"
#include "ser_p.h"
#include <mware/formatwr.h>
-#include <debug.h>
+#include <
cfg/
debug.h>
#include <hw.h>
#include <hw.h>
-#include <config.h>
+#include <c
fg/c
onfig.h>
/*
* Sanity check for config parameters required by this module.
/*
* Sanity check for config parameters required by this module.
@@
-507,8
+513,13
@@
void ser_close(struct Serial *port)
// Wait until we finish sending everything
ser_drain(port);
// Wait until we finish sending everything
ser_drain(port);
- ser_purge(port);
port->hw->table->cleanup(port->hw);
DB(port->hw = NULL;)
port->hw->table->cleanup(port->hw);
DB(port->hw = NULL;)
+
+ /*
+ * We purge the FIFO buffer only after the low-level cleanup, so that
+ * we are sure that there are no more interrupts.
+ */
+ ser_purge(port);
}
}