implemented slip_arch_writeb() function

This commit is contained in:
fros4943 2009-04-23 09:02:06 +00:00
parent 11879f210c
commit 9bd3d07510

View File

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: rs232.c,v 1.3 2009/03/26 16:23:48 fros4943 Exp $
* $Id: rs232.c,v 1.4 2009/04/23 09:02:06 fros4943 Exp $
*/
#include "lib/sensors.h"
@ -68,6 +68,12 @@ rs232_print(char *message)
printf("%s", message);
}
/*-----------------------------------------------------------------------------------*/
void
slip_arch_writeb(unsigned char c)
{
simlog_char(c);
}
/*-----------------------------------------------------------------------------------*/
static void
doInterfaceActionsBeforeTick(void)
{
@ -83,19 +89,19 @@ doInterfaceActionsBeforeTick(void)
return;
}
/* Notify rs232 handler */
/* Notify specified rs232 handler */
if(input_handler != NULL) {
for (i=0; i < simSerialReceivingLength; i++) {
input_handler(simSerialReceivingData[i]);
}
} else {
/* Notify serial process */
for (i=0; i < simSerialReceivingLength; i++) {
serial_line_input_byte(simSerialReceivingData[i]);
}
serial_line_input_byte(0x0a);
}
/* Notify serial process */
for (i=0; i < simSerialReceivingLength; i++) {
serial_line_input_byte(simSerialReceivingData[i]);
}
serial_line_input_byte(0x0a);
simSerialReceivingLength = 0;
simSerialReceivingFlag = 0;
}