projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adjust for DevLib.
[bertos.git]
/
drv
/
ser.c
diff --git
a/drv/ser.c
b/drv/ser.c
index d88b0425689d69ffe3ae77aae1210c16052ba0ef..ca2b35925975e1093c2d47917152b71745ef44bc 100755
(executable)
--- a/
drv/ser.c
+++ b/
drv/ser.c
@@
-16,9
+16,9
@@
* 38400bps on a 16MHz 80196.
*
* MODULE CONFIGURATION
* 38400bps on a 16MHz 80196.
*
* MODULE CONFIGURATION
- *
\li \c CONFIG_SER_HWHANDSHAKE define this preprocessor symbol to enable
- *
support for RTS/CTS handshake. Support is incomplete/untested
- *
for 80196
.
+ *
+ *
\li \c CONFIG_SER_HWHANDSHAKE - set to 1 to enable RTS/CTS handshake.
+ *
Support is incomplete/untested
.
* \li \c CONFIG_SER_TXTIMEOUT - Enable software serial transmission timeouts
*
*
* \li \c CONFIG_SER_TXTIMEOUT - Enable software serial transmission timeouts
*
*
@@
-28,6
+28,12
@@
/*
* $Log$
/*
* $Log$
+ * Revision 1.10 2004/08/10 06:29:50 bernie
+ * Rename timer_gettick() to timer_ticks().
+ *
+ * Revision 1.9 2004/08/08 06:06:20 bernie
+ * Use new-style CONFIG_ idiom; Fix module-wide documentation.
+ *
* Revision 1.8 2004/07/29 22:57:09 bernie
* ser_drain(): New function; Make Serial::is_open a debug-only feature; Switch to new-style CONFIG_* macros.
*
* Revision 1.8 2004/07/29 22:57:09 bernie
* ser_drain(): New function; Make Serial::is_open a debug-only feature; Switch to new-style CONFIG_* macros.
*
@@
-87,18
+93,18
@@
int ser_putchar(int c, struct Serial *port)
if (fifo_isfull_locked(&port->txfifo))
{
#if CONFIG_SER_TXTIMEOUT != -1
if (fifo_isfull_locked(&port->txfifo))
{
#if CONFIG_SER_TXTIMEOUT != -1
- time_t start_time = timer_
gettick
();
+ time_t start_time = timer_
ticks
();
#endif
/* Attende finche' il buffer e' pieno... */
do
{
#endif
/* Attende finche' il buffer e' pieno... */
do
{
-#if
def
CONFIG_KERN_SCHED
+#if
defined(CONFIG_KERN_SCHED) &&
CONFIG_KERN_SCHED
/* Give up timeslice to other processes. */
proc_switch();
#endif
#if CONFIG_SER_TXTIMEOUT != -1
/* Give up timeslice to other processes. */
proc_switch();
#endif
#if CONFIG_SER_TXTIMEOUT != -1
- if (timer_
gettick
() - start_time >= port->txtimeout)
+ if (timer_
ticks
() - start_time >= port->txtimeout)
{
port->status |= SERRF_TXTIMEOUT;
return EOF;
{
port->status |= SERRF_TXTIMEOUT;
return EOF;
@@
-134,7
+140,7
@@
int ser_getchar(struct Serial *port)
if (fifo_isempty_locked(&port->rxfifo))
{
#if CONFIG_SER_RXTIMEOUT != -1
if (fifo_isempty_locked(&port->rxfifo))
{
#if CONFIG_SER_RXTIMEOUT != -1
- time_t start_time = timer_
gettick
();
+ time_t start_time = timer_
ticks
();
#endif
/* Wait while buffer is empty */
do
#endif
/* Wait while buffer is empty */
do
@@
-144,7
+150,7
@@
int ser_getchar(struct Serial *port)
proc_switch();
#endif
#if CONFIG_SER_RXTIMEOUT != -1
proc_switch();
#endif
#if CONFIG_SER_RXTIMEOUT != -1
- if (timer_
gettick
() - start_time >= port->rxtimeout)
+ if (timer_
ticks
() - start_time >= port->rxtimeout)
{
port->status |= SERRF_RXTIMEOUT;
return EOF;
{
port->status |= SERRF_RXTIMEOUT;
return EOF;