diff options
| author | Damien George <damien.p.george@gmail.com> | 2015-04-16 23:52:43 +0100 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2015-04-16 23:52:43 +0100 |
| commit | 7d5e34287c678b015a0f94620fc8626897a5cbda (patch) | |
| tree | dd1198fd2670ac5b63e38a654588c25d69315efa /docs/library/pyb.CAN.rst | |
| parent | 4c459213499b289a1710aa0e6d3fb80c4889cc1f (diff) | |
stmhal: Allow sending CAN messages with timeout=0.
Thanks to Henrik Sölver for this patch.
Diffstat (limited to 'docs/library/pyb.CAN.rst')
| -rw-r--r-- | docs/library/pyb.CAN.rst | 8 |
1 files changed, 7 insertions, 1 deletions
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) |
