[prev in list] [next in list] [prev in thread] [next in thread]
List: ecos-devel
Subject: redboot set_comm_baud_rate question
From: Jani Monoses <jani () iv ! ro>
Date: 2004-01-23 15:01:27
Message-ID: 20040123170127.0a0ff5ca.jani () iv ! ro
[Download RAW message or body]
Hi
I just want to make sure is the code below intended to be a retry
of setting of the baudrate if the first attempt fails or a conditional
setting of it if it's already at the requested value in which case it
should have been a GETBAUD operation instead of the first SETBAUD.
thanks
Jani
static int
set_comm_baud_rate(hal_virtual_comm_table_t *chan, int rate)
{
int current_rate;
current_rate = CYGACC_COMM_IF_CONTROL(*chan, __COMMCTL_SETBAUD, rate);
if (rate != current_rate)
return CYGACC_COMM_IF_CONTROL(*chan, __COMMCTL_SETBAUD, rate);
return 0;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic