From 2ab0582c7625884a261a3f718274545f61f2a6e8 Mon Sep 17 00:00:00 2001 From: stefanct Date: Mon, 1 Apr 2013 00:45:45 +0000 Subject: Introduce serialport_write_nonblock(). It seems useful to have a generic and platform-independent method to read and write to a serial port without blocking. This is the write part. This allows to get rid of the explicit temporary disabling of blocking I/O in serprog's sp_synchronize(). Signed-off-by: Stefan Tauner Acked-by: Stefan Tauner git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1662 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- programmer.h | 1 + 1 file changed, 1 insertion(+) (limited to 'programmer.h') diff --git a/programmer.h b/programmer.h index c36b452..a22bdd2 100644 --- a/programmer.h +++ b/programmer.h @@ -660,6 +660,7 @@ extern fdtype sp_fd; /* expose serialport_shutdown as it's currently used by buspirate */ int serialport_shutdown(void *data); int serialport_write(unsigned char *buf, unsigned int writecnt); +int serialport_write_nonblock(unsigned char *buf, unsigned int writecnt, unsigned int timeout, unsigned int *really_wrote); int serialport_read(unsigned char *buf, unsigned int readcnt); int serialport_read_nonblock(unsigned char *c, unsigned int readcnt, unsigned int timeout, unsigned int *really_read); -- cgit v1.2.1