提交 38fa8aff 编写于 作者: W Wolfram Sang

Documentation: i2c: slave: describe buffer problems a bit better

Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
上级 85946abc
...@@ -173,13 +173,14 @@ During development of this API, the question of using buffers instead of just ...@@ -173,13 +173,14 @@ During development of this API, the question of using buffers instead of just
bytes came up. Such an extension might be possible, usefulness is unclear at bytes came up. Such an extension might be possible, usefulness is unclear at
this time of writing. Some points to keep in mind when using buffers: this time of writing. Some points to keep in mind when using buffers:
* Buffers should be opt-in and slave drivers will always have to support * Buffers should be opt-in and backend drivers will always have to support
byte-based transactions as the ultimate fallback because this is how the byte-based transactions as the ultimate fallback anyhow because this is how
majority of HW works. the majority of HW works.
* For backends simulating hardware registers, buffers are not helpful because * For backends simulating hardware registers, buffers are largely not helpful
on writes an action should be immediately triggered. For reads, the data in because after each byte written an action should be immediately triggered.
the buffer might get stale. For reads, the data kept in the buffer might get stale if the backend just
updated a register because of internal processing.
* A master can send STOP at any time. For partially transferred buffers, this * A master can send STOP at any time. For partially transferred buffers, this
means additional code to handle this exception. Such code tends to be means additional code to handle this exception. Such code tends to be
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册