summaryrefslogtreecommitdiff
path: root/shared-bindings
diff options
context:
space:
mode:
authorLucian Copeland <hierophect@gmail.com>2020-09-30 16:51:19 -0400
committerLucian Copeland <hierophect@gmail.com>2020-09-30 16:51:19 -0400
commitc624c1e8385a24b67e682dfa4a05c8f363b2b8fa (patch)
tree3733cdf9fa79290b15ee75810ed5e342e0a772a0 /shared-bindings
parent128b4a013b83b02953b1cfd7f246bdd30dab5f9a (diff)
parente01e8dd6b9c886c091bdbe735f4a3f63a4fb6859 (diff)
Merge branch 'esp32-update-idf' into esp32-analogin
Diffstat (limited to 'shared-bindings')
-rw-r--r--shared-bindings/busio/I2C.c4
-rw-r--r--shared-bindings/microcontroller/Pin.c6
-rw-r--r--shared-bindings/socketpool/Socket.c1
-rw-r--r--shared-bindings/socketpool/SocketPool.c1
-rw-r--r--shared-bindings/wifi/ScannedNetworks.c1
5 files changed, 7 insertions, 6 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)];
diff --git a/shared-bindings/microcontroller/Pin.c b/shared-bindings/microcontroller/Pin.c
index 1294b78f0..6ba02a0e7 100644
--- a/shared-bindings/microcontroller/Pin.c
+++ b/shared-bindings/microcontroller/Pin.c
@@ -71,7 +71,11 @@ STATIC void mcu_pin_print(const mp_print_t *print, mp_obj_t self_in, mp_print_ki
qstr name;
get_pin_name(self, &package, &module, &name);
- mp_printf(print, "%q.%q.%q", MP_QSTR_microcontroller, MP_QSTR_pin, name);
+ if (package){
+ mp_printf(print, "%q.%q.%q", package, module, name);
+ } else {
+ mp_printf(print, "%q.%q", module , name);
+ }
}
const mp_obj_type_t mcu_pin_type = {
diff --git a/shared-bindings/socketpool/Socket.c b/shared-bindings/socketpool/Socket.c
index e1b1e6967..de05b8eb4 100644
--- a/shared-bindings/socketpool/Socket.c
+++ b/shared-bindings/socketpool/Socket.c
@@ -36,7 +36,6 @@
#include "py/runtime.h"
#include "py/mperrno.h"
-#include "esp_log.h"
static const char* TAG = "socket binding";
//| class Socket:
diff --git a/shared-bindings/socketpool/SocketPool.c b/shared-bindings/socketpool/SocketPool.c
index 0eeebd691..9f56e8c7e 100644
--- a/shared-bindings/socketpool/SocketPool.c
+++ b/shared-bindings/socketpool/SocketPool.c
@@ -37,7 +37,6 @@
#include "shared-bindings/socketpool/Socket.h"
#include "shared-bindings/socketpool/SocketPool.h"
-#include "esp_log.h"
static const char* TAG = "socketpool binding";
//| class SocketPool:
diff --git a/shared-bindings/wifi/ScannedNetworks.c b/shared-bindings/wifi/ScannedNetworks.c
index c927d7282..d04f0f92a 100644
--- a/shared-bindings/wifi/ScannedNetworks.c
+++ b/shared-bindings/wifi/ScannedNetworks.c
@@ -32,7 +32,6 @@
#include "py/runtime.h"
#include "shared-bindings/wifi/ScannedNetworks.h"
-#include "esp_log.h"
static const char *TAG = "cp iternext";
//| class ScannedNetworks: