diff options
| author | Damien George <damien.p.george@gmail.com> | 2018-03-16 18:28:35 +1100 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2018-03-16 18:28:35 +1100 |
| commit | a25e6c6b650acf3af742920c1d3a024054c986cb (patch) | |
| tree | efcc17316c7238761b32ed1f907ef29eddcfbe9c /docs | |
| parent | d7e67fb1b40c40ba24e3a17e73e5f1b5b96f3914 (diff) | |
stm32/can: Add CAN.info() method to retrieve error and tx/rx buf info.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/library/pyb.CAN.rst | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/docs/library/pyb.CAN.rst b/docs/library/pyb.CAN.rst index 484a00f36..e1ce90d60 100644 --- a/docs/library/pyb.CAN.rst +++ b/docs/library/pyb.CAN.rst @@ -113,6 +113,28 @@ Methods - ``CAN.BUS_OFF`` -- the controller is on but not participating in bus activity (TEC overflowed beyond 255). +.. method:: CAN.info([list]) + + Get information about the controller's error states and TX and RX buffers. + If *list* is provided then it should be a list object with at least 8 entries, + which will be filled in with the information. Otherwise a new list will be + created and filled in. In both cases the return value of the method is the + populated list. + + The values in the list are: + + - TEC value + - REC value + - number of times the controller enterted the Error Warning state (wrapped + around to 0 after 65535) + - number of times the controller enterted the Error Passive state (wrapped + around to 0 after 65535) + - number of times the controller enterted the Bus Off state (wrapped + around to 0 after 65535) + - number of pending TX messages + - number of pending RX messages on fifo 0 + - number of pending RX messages on fifo 1 + .. method:: CAN.setfilter(bank, mode, fifo, params, \*, rtr) Configure a filter bank: |
