diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2018-04-12 14:33:15 -0700 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-04-17 09:21:10 +0200 |
commit | cebb36c9337691754a8d60d60da9731766cf19d2 (patch) | |
tree | 7d262d116859656a94d8e558091788f16d79100f /include | |
parent | c2ee90fb9ed90c3612301e2b86c05cfb3c008fde (diff) | |
download | barebox-cebb36c9337691754a8d60d60da9731766cf19d2.tar.gz barebox-cebb36c9337691754a8d60d60da9731766cf19d2.tar.xz |
serdev: Add trivial blocking read function
Add example implementation of a trivial blocking read function as a
part of Barebox's serdev API.
NOTE: This code has not been tested against real devices, so use it at
your own risk.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/serdev.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/serdev.h b/include/serdev.h index efc735fedf..f5d34f5276 100644 --- a/include/serdev.h +++ b/include/serdev.h @@ -33,4 +33,12 @@ int serdev_device_open(struct serdev_device *); unsigned int serdev_device_set_baudrate(struct serdev_device *, unsigned int); int serdev_device_write(struct serdev_device *, const unsigned char *, size_t, unsigned long); + +/* + * The following two functions are not a part of original Linux API + */ +int serdev_device_reader_open(struct serdev_device *, size_t); +int serdev_device_read(struct serdev_device *, unsigned char *, + size_t, unsigned long); + #endif |