summaryrefslogtreecommitdiff
path: root/ucoo/intf
diff options
context:
space:
mode:
authorNicolas Schodet2016-09-19 11:36:13 +0200
committerNicolas Schodet2019-10-09 23:05:51 +0200
commiteda5cf5e3ba38eb8eb7c0c3f0110db886bae93b4 (patch)
tree2d7db1bc4da801b9be7405b54bf5a5e0103d61a1 /ucoo/intf
parent01585a368762caa2e5acb077f48f477339f7ed67 (diff)
ucoo/{intf, hal/i2c}: add send/recv with restart
Diffstat (limited to 'ucoo/intf')
-rw-r--r--ucoo/intf/i2c.hh6
1 files changed, 6 insertions, 0 deletions
diff --git a/ucoo/intf/i2c.hh b/ucoo/intf/i2c.hh
index 7d3a624..6fa03e3 100644
--- a/ucoo/intf/i2c.hh
+++ b/ucoo/intf/i2c.hh
@@ -63,6 +63,12 @@ class I2cMaster
///
/// If asynchronous transfer is not supported, this will block.
virtual void recv (uint8_t addr, char *buf, int count) = 0;
+ /// Same as send followed by recv, but using a repeated start. If the
+ /// send phase is not completed fully, STATUS_ERROR is reported, else
+ /// reception phase status is reported.
+ virtual void send_recv (uint8_t addr,
+ const char *send_buf, int send_count,
+ char *recv_buf, int recv_count) = 0;
/// Return last transfer status.
virtual int status () = 0;
/// Wait until transfer is finished and return status.