correct docstring
This commit is contained in:
parent
635fcadb59
commit
1eb0587917
@ -115,7 +115,7 @@ STATIC const mp_obj_property_t canio_message_id_obj = {
|
|||||||
//| data: bytes
|
//| data: bytes
|
||||||
//| """The content of the message, or dummy content in the case of an rtr.
|
//| """The content of the message, or dummy content in the case of an rtr.
|
||||||
//|
|
//|
|
||||||
//| Assigning to data sets the bytes to zero"""
|
//| Assigning to data also sets the length."""
|
||||||
//|
|
//|
|
||||||
STATIC mp_obj_t canio_message_data_get(const mp_obj_t self_in) {
|
STATIC mp_obj_t canio_message_data_get(const mp_obj_t self_in) {
|
||||||
canio_message_obj_t *self = self_in;
|
canio_message_obj_t *self = self_in;
|
||||||
@ -145,7 +145,9 @@ STATIC const mp_obj_property_t canio_message_data_obj = {
|
|||||||
|
|
||||||
|
|
||||||
//| size: int
|
//| size: int
|
||||||
//| """The length of the message, or the length of the requested data in the case of an rtr"""
|
//| """The length of the message, or the length of the requested data in the case of an rtr
|
||||||
|
//|
|
||||||
|
//| Assigning to the length sets all the data bytes to zero"""
|
||||||
//|
|
//|
|
||||||
STATIC mp_obj_t canio_message_size_get(const mp_obj_t self_in) {
|
STATIC mp_obj_t canio_message_size_get(const mp_obj_t self_in) {
|
||||||
canio_message_obj_t *self = self_in;
|
canio_message_obj_t *self = self_in;
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
//| The `_canio` module contains low level classes to support the CAN bus
|
//| The `_canio` module contains low level classes to support the CAN bus
|
||||||
//| protocol.
|
//| protocol.
|
||||||
//|
|
//|
|
||||||
//| All classes change hardware state and should be deinitialized when they
|
//| CAN and Listener classes change hardware state and should be deinitialized when they
|
||||||
//| are no longer needed if the program continues after use. To do so, either
|
//| are no longer needed if the program continues after use. To do so, either
|
||||||
//| call :py:meth:`!deinit` or use a context manager. See
|
//| call :py:meth:`!deinit` or use a context manager. See
|
||||||
//| :ref:`lifetime-and-contextmanagers` for more info.
|
//| :ref:`lifetime-and-contextmanagers` for more info.
|
||||||
@ -39,12 +39,13 @@
|
|||||||
//| import _canio
|
//| import _canio
|
||||||
//| from board import *
|
//| from board import *
|
||||||
//|
|
//|
|
||||||
//| can = _canio.BUS(board.CANRX, board.CANTX)
|
//| can = _canio.CAN(board.CAN_RX, board.CAN_TX, baudrate=1000000)
|
||||||
//| can.write(408, b"adafruit")
|
//| message = _canio.Message(id=0x0408, data="adafruit"
|
||||||
|
//| can.write(message))
|
||||||
//| can.deinit()
|
//| can.deinit()
|
||||||
//|
|
//|
|
||||||
//| This example will write the data 'adafruit' onto the CAN bus to any
|
//| This example will write the data 'adafruit' onto the CAN bus to any
|
||||||
//| device listening for message id 408."""
|
//| device listening for message id 0x0408."""
|
||||||
//|
|
//|
|
||||||
|
|
||||||
#include "py/obj.h"
|
#include "py/obj.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user