driver/noteram: Support poll threshold

The noteram driver supports setting the poll threshold.

Signed-off-by: yukangzhi <yukangzhi@xiaomi.com>
This commit is contained in:
yukangzhi
2025-03-06 12:25:22 +08:00
committed by Xiang Xiao
parent 890f2e4625
commit 8226e8e8fe
2 changed files with 31 additions and 2 deletions
@@ -237,6 +237,23 @@ Noteram Device (``/dev/note``)
:return: If success, 0 (``OK``) is returned and the given overwriter mode is set as the current settings.
If failed, a negated ``errno`` is returned.
.. c:macro:: FIONREAD
Get the number of unread bytes in the buffer
:argument: A writable pointer to ``unsigned int`` to receive the number of unread bytes.
:return: If success, 0 (``OK``) is returned and the number of unread bytes is stored into the given pointer.
If failed, a negated ``errno`` is returned.
.. c:macro:: PIPEIOC_POLLINTHRD
Set the poll threshold for POLLIN event
:argument: An unsigned int value specifying the threshold in bytes. When the unread data in the buffer is greater than or equal to this value, POLLIN will be notified.
:return: If success, 0 (``OK``) is returned and the threshold is set. If failed, a negated ``errno`` is returned.
Filter control APIs
===================