From 7d5e34287c678b015a0f94620fc8626897a5cbda Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 16 Apr 2015 23:52:43 +0100 Subject: stmhal: Allow sending CAN messages with timeout=0. Thanks to Henrik Sölver for this patch. --- docs/library/pyb.CAN.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/library/pyb.CAN.rst b/docs/library/pyb.CAN.rst index 8f417f735..46e6d08cf 100644 --- a/docs/library/pyb.CAN.rst +++ b/docs/library/pyb.CAN.rst @@ -126,7 +126,7 @@ Methods Return value: buffer of data bytes. -.. method:: can.send(send, addr, \*, timeout=5000) +.. method:: can.send(send, addr, \*, timeout=0) Send a message on the bus: @@ -134,6 +134,12 @@ Methods - ``addr`` is the address to send to - ``timeout`` is the timeout in milliseconds to wait for the send. + If timeout is 0 the message is placed in a buffer in one of three hardware + buffers and the method returns immediately. If all three buffers are in use + an exception is thrown. If timeout is not 0, the method waits until the + message is transmitted. If the message can't be transmitted within the + specified time an exception is thrown. + Return value: ``None``. .. method:: can.rxcallback(fifo, fun) -- cgit v1.2.3