Skip to content

Commit 43b8d5e

Browse files
committed
Update I2C and SPI documentation
1 parent e35eb08 commit 43b8d5e

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

shared-bindings/busio/I2C.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@
6060
//| :param int frequency: The clock frequency in Hertz
6161
//| :param int timeout: The maximum clock stretching timeut - (used only for bitbangio.I2C; ignored for busio.I2C)
6262
//|
63+
//| .. note:: On the nRF52840, only one I2C object may be created,
64+
//| except on the Circuit Playground Bluefruit, which allows two,
65+
//| one for the onboard accelerometer, and one for offboard use.
66+
//|
6367
STATIC mp_obj_t busio_i2c_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
6468
busio_i2c_obj_t *self = m_new_obj(busio_i2c_obj_t);
6569
self->base.type = &busio_i2c_type;

shared-bindings/busio/SPI.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,12 @@ STATIC void check_for_deinit(busio_spi_obj_t *self) {
154154
//| within spec for the SAMD21.
155155
//|
156156
//| .. note:: On the nRF52840, these baudrates are available: 125kHz, 250kHz, 1MHz, 2MHz, 4MHz,
157-
//| and 8MHz. 16MHz and 32MHz are also available, but only on the first
158-
//| `busio.SPI` object you create. Two more ``busio.SPI`` objects can be created, but they are restricted
159-
//| to 8MHz maximum. This is a hardware restriction: there is only one high-speed SPI peripheral.
157+
//| and 8MHz.
160158
//| If you pick a a baudrate other than one of these, the nearest lower
161159
//| baudrate will be chosen, with a minimum of 125kHz.
160+
//| Two SPI objects may be created, except on the Circuit Playground Bluefruit,
161+
//| which allows only one (to allow for an additional I2C object).
162+
//|
162163
STATIC mp_obj_t busio_spi_configure(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
163164
enum { ARG_baudrate, ARG_polarity, ARG_phase, ARG_bits };
164165
static const mp_arg_t allowed_args[] = {

0 commit comments

Comments
 (0)