michallenc commented on code in PR #17283:
URL: https://github.com/apache/nuttx/pull/17283#discussion_r2498714646


##########
Documentation/components/drivers/character/can.rst:
##########
@@ -34,8 +34,12 @@ is used to store the timestamp of the CAN message.
 **Usage Note**: When reading from the CAN driver multiple messages
 may be returned, depending on (1) the size the returned can
 messages, and (2) the size of the buffer provided to receive CAN
-messages. *Never assume that a single message will be returned*...
+messages. *Do not assume that a single message will be returned*...
 if you do this, *you will lose CAN data* under conditions where
-your read buffer can hold more than one small message. Below is an
-example about how you should think of the CAN read operation:
+your read buffer can hold more than one small message. This
+behavior can be controlled by using
+``ioctl(fd, CANIOC_SET_IWATERMARK, &(size_t)0)`` that limits the

Review Comment:
   @acassis it's true CAN documentation is trash, but I wouldn't force @Cynerd 
to fix it here. We should rewrite CAN docs completely to add frame structures, 
all ioctls and so on. Similar to ADC or PWM docs. But that's a different task 
to do. I have it in my TODO list for some time, but didn't have time for it yet.
   
   Btw, the ioctl rename is only in comment, so no breaking change if I look at 
it correctly.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to