summaryrefslogtreecommitdiff
path: root/shared-bindings
diff options
context:
space:
mode:
authorScott Shawcroft <scott@tannewt.org>2020-09-25 11:07:22 -0700
committerScott Shawcroft <scott@tannewt.org>2020-09-25 11:07:22 -0700
commitb9d68bc5a6b7b63f52da6c7034d379d6de51be7e (patch)
tree0c326d78ac2aeb3b8946bca836030741f195a152 /shared-bindings
parentdd86cb00adb2ecb1e0cdf256d9a4e0f96a0c6de1 (diff)
Change I2C default to 100khz
Greater that 100khz is technically out of the original spec. Background here: https://github.com/adafruit/Adafruit_CircuitPython_CLUE/issues/36
Diffstat (limited to 'shared-bindings')
-rw-r--r--shared-bindings/busio/I2C.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/shared-bindings/busio/I2C.c b/shared-bindings/busio/I2C.c
index 157e779fd..8b456dbd3 100644
--- a/shared-bindings/busio/I2C.c
+++ b/shared-bindings/busio/I2C.c
@@ -39,7 +39,7 @@
//| class I2C:
//| """Two wire serial protocol"""
//|
-//| def __init__(self, scl: microcontroller.Pin, sda: microcontroller.Pin, *, frequency: int = 400000, timeout: int = 255) -> None:
+//| def __init__(self, scl: microcontroller.Pin, sda: microcontroller.Pin, *, frequency: int = 100000, timeout: int = 255) -> None:
//|
//| """I2C is a two-wire protocol for communicating between devices. At the
//| physical level it consists of 2 wires: SCL and SDA, the clock and data
@@ -70,7 +70,7 @@ STATIC mp_obj_t busio_i2c_make_new(const mp_obj_type_t *type, size_t n_args, con
static const mp_arg_t allowed_args[] = {
{ MP_QSTR_scl, MP_ARG_REQUIRED | MP_ARG_OBJ },
{ MP_QSTR_sda, MP_ARG_REQUIRED | MP_ARG_OBJ },
- { MP_QSTR_frequency, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 400000} },
+ { MP_QSTR_frequency, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 100000} },
{ MP_QSTR_timeout, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 255} },
};
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];