From 04ffd0dca0db404028da8ef2eb43f82b6e1b24ab Mon Sep 17 00:00:00 2001 From: "Ryan T. Hamilton" Date: Sat, 19 Sep 2020 13:38:04 -0700 Subject: [PATCH 001/145] Add gateway, subnet, and rssi info for current connected AP ap_rssi is a bound method, which I'm not keen on, but it works --- ports/esp32s2/common-hal/wifi/Radio.c | 38 +++++++++++++++++++++++ shared-bindings/wifi/Radio.c | 44 +++++++++++++++++++++++++++ shared-bindings/wifi/Radio.h | 3 ++ 3 files changed, 85 insertions(+) diff --git a/ports/esp32s2/common-hal/wifi/Radio.c b/ports/esp32s2/common-hal/wifi/Radio.c index a0b8b6adc5..4b2e7b64ee 100644 --- a/ports/esp32s2/common-hal/wifi/Radio.c +++ b/ports/esp32s2/common-hal/wifi/Radio.c @@ -147,6 +147,44 @@ wifi_radio_error_t common_hal_wifi_radio_connect(wifi_radio_obj_t *self, uint8_t return WIFI_RADIO_ERROR_NONE; } +mp_obj_t common_hal_wifi_radio_get_ap_rssi(wifi_radio_obj_t *self) { + if (!esp_netif_is_netif_up(self->netif)) { + return mp_const_none; + } + // Make sure the interface is in STA mode + wifi_mode_t if_mode; + esp_wifi_get_mode(&if_mode); + if (if_mode != WIFI_MODE_STA){ + return mp_const_none; + } + + wifi_ap_record_t ap_info; + esp_wifi_sta_get_ap_info(&ap_info); + + mp_obj_t rssi; + rssi = MP_OBJ_NEW_SMALL_INT(ap_info.rssi); + + return rssi; +} + +mp_obj_t common_hal_wifi_radio_get_ipv4_gateway(wifi_radio_obj_t *self) { + if (!esp_netif_is_netif_up(self->netif)) { + return mp_const_none; + } + esp_netif_ip_info_t ip_info; + esp_netif_get_ip_info(self->netif, &ip_info); + return common_hal_ipaddress_new_ipv4address(ip_info.gw.addr); +} + +mp_obj_t common_hal_wifi_radio_get_ipv4_subnet(wifi_radio_obj_t *self) { + if (!esp_netif_is_netif_up(self->netif)) { + return mp_const_none; + } + esp_netif_ip_info_t ip_info; + esp_netif_get_ip_info(self->netif, &ip_info); + return common_hal_ipaddress_new_ipv4address(ip_info.netmask.addr); +} + mp_obj_t common_hal_wifi_radio_get_ipv4_address(wifi_radio_obj_t *self) { if (!esp_netif_is_netif_up(self->netif)) { return mp_const_none; diff --git a/shared-bindings/wifi/Radio.c b/shared-bindings/wifi/Radio.c index 928f21da90..6f1935191d 100644 --- a/shared-bindings/wifi/Radio.c +++ b/shared-bindings/wifi/Radio.c @@ -163,6 +163,47 @@ STATIC mp_obj_t wifi_radio_connect(size_t n_args, const mp_obj_t *pos_args, mp_m } STATIC MP_DEFINE_CONST_FUN_OBJ_KW(wifi_radio_connect_obj, 1, wifi_radio_connect); +//| ap_rssi: int +//| """RSSI of the currently connected AP. Returns none if not connected""" +//| +STATIC mp_obj_t wifi_radio_get_ap_rssi(mp_obj_t self) { + return common_hal_wifi_radio_get_ap_rssi(self); + +} +MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ap_rssi_obj, wifi_radio_get_ap_rssi); + +//| ipv4_gateway: Optional[ipaddress.IPv4Address] +//| """IP v4 Address of the gateway when connected to an access point. None otherwise.""" +//| +STATIC mp_obj_t wifi_radio_get_ipv4_gateway(mp_obj_t self) { + return common_hal_wifi_radio_get_ipv4_gateway(self); + +} +MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ipv4_gateway_obj, wifi_radio_get_ipv4_gateway); + +const mp_obj_property_t wifi_radio_ipv4_gateway_obj = { + .base.type = &mp_type_property, + .proxy = { (mp_obj_t)&wifi_radio_get_ipv4_gateway_obj, + (mp_obj_t)&mp_const_none_obj, + (mp_obj_t)&mp_const_none_obj }, +}; + +//| ipv4_subnet: Optional[ipaddress.IPv4Address] +//| """IP v4 Address of the subnet when connected to an access point. None otherwise.""" +//| +STATIC mp_obj_t wifi_radio_get_ipv4_subnet(mp_obj_t self) { + return common_hal_wifi_radio_get_ipv4_subnet(self); + +} +MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ipv4_subnet_obj, wifi_radio_get_ipv4_subnet); + +const mp_obj_property_t wifi_radio_ipv4_subnet_obj = { + .base.type = &mp_type_property, + .proxy = { (mp_obj_t)&wifi_radio_get_ipv4_subnet_obj, + (mp_obj_t)&mp_const_none_obj, + (mp_obj_t)&mp_const_none_obj }, +}; + //| ipv4_address: Optional[ipaddress.IPv4Address] //| """IP v4 Address of the radio when connected to an access point. None otherwise.""" //| @@ -219,6 +260,9 @@ STATIC const mp_rom_map_elem_t wifi_radio_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_connect), MP_ROM_PTR(&wifi_radio_connect_obj) }, // { MP_ROM_QSTR(MP_QSTR_connect_to_enterprise), MP_ROM_PTR(&wifi_radio_connect_to_enterprise_obj) }, + { MP_ROM_QSTR(MP_QSTR_ap_rssi), MP_ROM_PTR(&wifi_radio_get_ap_rssi_obj) }, + { MP_ROM_QSTR(MP_QSTR_ipv4_gateway), MP_ROM_PTR(&wifi_radio_ipv4_gateway_obj) }, + { MP_ROM_QSTR(MP_QSTR_ipv4_subnet), MP_ROM_PTR(&wifi_radio_ipv4_subnet_obj) }, { MP_ROM_QSTR(MP_QSTR_ipv4_address), MP_ROM_PTR(&wifi_radio_ipv4_address_obj) }, // { MP_ROM_QSTR(MP_QSTR_access_point_active), MP_ROM_PTR(&wifi_radio_access_point_active_obj) }, diff --git a/shared-bindings/wifi/Radio.h b/shared-bindings/wifi/Radio.h index b5341d51c9..3c8ecbebd1 100644 --- a/shared-bindings/wifi/Radio.h +++ b/shared-bindings/wifi/Radio.h @@ -53,6 +53,9 @@ extern void common_hal_wifi_radio_stop_scanning_networks(wifi_radio_obj_t *self) extern wifi_radio_error_t common_hal_wifi_radio_connect(wifi_radio_obj_t *self, uint8_t* ssid, size_t ssid_len, uint8_t* password, size_t password_len, uint8_t channel, mp_float_t timeout, uint8_t* bssid, size_t bssid_len); +extern mp_obj_t common_hal_wifi_radio_get_ap_rssi(wifi_radio_obj_t *self); +extern mp_obj_t common_hal_wifi_radio_get_ipv4_gateway(wifi_radio_obj_t *self); +extern mp_obj_t common_hal_wifi_radio_get_ipv4_subnet(wifi_radio_obj_t *self); extern mp_obj_t common_hal_wifi_radio_get_ipv4_address(wifi_radio_obj_t *self); extern mp_int_t common_hal_wifi_radio_ping(wifi_radio_obj_t *self, mp_obj_t ip_address, mp_float_t timeout); From bc8863a3c788c7a44c164e35c71a7ec83cf29823 Mon Sep 17 00:00:00 2001 From: "Ryan T. Hamilton" Date: Sat, 19 Sep 2020 21:04:07 -0700 Subject: [PATCH 002/145] Simplify now that I have it working still need to figure out the bound method business --- ports/esp32s2/common-hal/wifi/Radio.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ports/esp32s2/common-hal/wifi/Radio.c b/ports/esp32s2/common-hal/wifi/Radio.c index 4b2e7b64ee..5bc69eab40 100644 --- a/ports/esp32s2/common-hal/wifi/Radio.c +++ b/ports/esp32s2/common-hal/wifi/Radio.c @@ -151,6 +151,7 @@ mp_obj_t common_hal_wifi_radio_get_ap_rssi(wifi_radio_obj_t *self) { if (!esp_netif_is_netif_up(self->netif)) { return mp_const_none; } + // Make sure the interface is in STA mode wifi_mode_t if_mode; esp_wifi_get_mode(&if_mode); @@ -161,10 +162,7 @@ mp_obj_t common_hal_wifi_radio_get_ap_rssi(wifi_radio_obj_t *self) { wifi_ap_record_t ap_info; esp_wifi_sta_get_ap_info(&ap_info); - mp_obj_t rssi; - rssi = MP_OBJ_NEW_SMALL_INT(ap_info.rssi); - - return rssi; + return MP_OBJ_NEW_SMALL_INT(ap_info.rssi); } mp_obj_t common_hal_wifi_radio_get_ipv4_gateway(wifi_radio_obj_t *self) { From 2fa269ccbc981c00eaf4f0bf6d7f5eaa52db4d08 Mon Sep 17 00:00:00 2001 From: "Ryan T. Hamilton" Date: Mon, 21 Sep 2020 20:56:03 -0700 Subject: [PATCH 003/145] Additional error handling --- ports/esp32s2/common-hal/wifi/Radio.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ports/esp32s2/common-hal/wifi/Radio.c b/ports/esp32s2/common-hal/wifi/Radio.c index 5bc69eab40..44f0fe2cf1 100644 --- a/ports/esp32s2/common-hal/wifi/Radio.c +++ b/ports/esp32s2/common-hal/wifi/Radio.c @@ -160,9 +160,15 @@ mp_obj_t common_hal_wifi_radio_get_ap_rssi(wifi_radio_obj_t *self) { } wifi_ap_record_t ap_info; - esp_wifi_sta_get_ap_info(&ap_info); - - return MP_OBJ_NEW_SMALL_INT(ap_info.rssi); + // From esp_wifi.h, the possible return values (typos theirs): + // ESP_OK: succeed + // ESP_ERR_WIFI_CONN: The station interface don't initialized + // ESP_ERR_WIFI_NOT_CONNECT: The station is in disconnect status + if (esp_wifi_sta_get_ap_info(&ap_info) != ESP_OK){ + return mp_const_none; + } else { + return mp_obj_new_int(ap_info.rssi); + } } mp_obj_t common_hal_wifi_radio_get_ipv4_gateway(wifi_radio_obj_t *self) { From a77966a73640a8699d116e0f484199338c4477e9 Mon Sep 17 00:00:00 2001 From: "Ryan T. Hamilton" Date: Mon, 21 Sep 2020 21:36:46 -0700 Subject: [PATCH 004/145] Try to reuse/share existing objects --- ports/esp32s2/common-hal/wifi/Radio.c | 24 +++++++++--------------- ports/esp32s2/common-hal/wifi/Radio.h | 2 ++ 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/ports/esp32s2/common-hal/wifi/Radio.c b/ports/esp32s2/common-hal/wifi/Radio.c index 44f0fe2cf1..ab61778595 100644 --- a/ports/esp32s2/common-hal/wifi/Radio.c +++ b/ports/esp32s2/common-hal/wifi/Radio.c @@ -153,21 +153,18 @@ mp_obj_t common_hal_wifi_radio_get_ap_rssi(wifi_radio_obj_t *self) { } // Make sure the interface is in STA mode - wifi_mode_t if_mode; - esp_wifi_get_mode(&if_mode); - if (if_mode != WIFI_MODE_STA){ + if (self->sta_mode){ return mp_const_none; } - wifi_ap_record_t ap_info; // From esp_wifi.h, the possible return values (typos theirs): // ESP_OK: succeed // ESP_ERR_WIFI_CONN: The station interface don't initialized // ESP_ERR_WIFI_NOT_CONNECT: The station is in disconnect status - if (esp_wifi_sta_get_ap_info(&ap_info) != ESP_OK){ + if (esp_wifi_sta_get_ap_info(&self->ap_info) != ESP_OK){ return mp_const_none; } else { - return mp_obj_new_int(ap_info.rssi); + return mp_obj_new_int(self->ap_info.rssi); } } @@ -175,27 +172,24 @@ mp_obj_t common_hal_wifi_radio_get_ipv4_gateway(wifi_radio_obj_t *self) { if (!esp_netif_is_netif_up(self->netif)) { return mp_const_none; } - esp_netif_ip_info_t ip_info; - esp_netif_get_ip_info(self->netif, &ip_info); - return common_hal_ipaddress_new_ipv4address(ip_info.gw.addr); + esp_netif_get_ip_info(self->netif, &self->ip_info); + return common_hal_ipaddress_new_ipv4address(self->ip_info.gw.addr); } mp_obj_t common_hal_wifi_radio_get_ipv4_subnet(wifi_radio_obj_t *self) { if (!esp_netif_is_netif_up(self->netif)) { return mp_const_none; } - esp_netif_ip_info_t ip_info; - esp_netif_get_ip_info(self->netif, &ip_info); - return common_hal_ipaddress_new_ipv4address(ip_info.netmask.addr); + esp_netif_get_ip_info(self->netif, &self->ip_info); + return common_hal_ipaddress_new_ipv4address(self->ip_info.netmask.addr); } mp_obj_t common_hal_wifi_radio_get_ipv4_address(wifi_radio_obj_t *self) { if (!esp_netif_is_netif_up(self->netif)) { return mp_const_none; } - esp_netif_ip_info_t ip_info; - esp_netif_get_ip_info(self->netif, &ip_info); - return common_hal_ipaddress_new_ipv4address(ip_info.ip.addr); + esp_netif_get_ip_info(self->netif, &self->ip_info); + return common_hal_ipaddress_new_ipv4address(self->ip_info.ip.addr); } mp_int_t common_hal_wifi_radio_ping(wifi_radio_obj_t *self, mp_obj_t ip_address, mp_float_t timeout) { diff --git a/ports/esp32s2/common-hal/wifi/Radio.h b/ports/esp32s2/common-hal/wifi/Radio.h index 205aef1761..ddcd9dc0d0 100644 --- a/ports/esp32s2/common-hal/wifi/Radio.h +++ b/ports/esp32s2/common-hal/wifi/Radio.h @@ -46,6 +46,8 @@ typedef struct { StaticEventGroup_t event_group; EventGroupHandle_t event_group_handle; wifi_config_t sta_config; + wifi_ap_record_t ap_info; + esp_netif_ip_info_t ip_info; esp_netif_t *netif; bool started; bool ap_mode; From deefeecb454931a1476be0f852b78dfea0975d92 Mon Sep 17 00:00:00 2001 From: "Ryan T. Hamilton" Date: Sat, 26 Sep 2020 14:27:42 -0700 Subject: [PATCH 005/145] Fix ap_rssi bound_method Forgot to make it a property! --- shared-bindings/wifi/Radio.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/shared-bindings/wifi/Radio.c b/shared-bindings/wifi/Radio.c index 6f1935191d..6c4e6a4f65 100644 --- a/shared-bindings/wifi/Radio.c +++ b/shared-bindings/wifi/Radio.c @@ -172,6 +172,13 @@ STATIC mp_obj_t wifi_radio_get_ap_rssi(mp_obj_t self) { } MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ap_rssi_obj, wifi_radio_get_ap_rssi); +const mp_obj_property_t wifi_radio_ap_rssi_obj = { + .base.type = &mp_type_property, + .proxy = { (mp_obj_t)&wifi_radio_get_ap_rssi_obj, + (mp_obj_t)&mp_const_none_obj, + (mp_obj_t)&mp_const_none_obj }, +}; + //| ipv4_gateway: Optional[ipaddress.IPv4Address] //| """IP v4 Address of the gateway when connected to an access point. None otherwise.""" //| @@ -260,7 +267,7 @@ STATIC const mp_rom_map_elem_t wifi_radio_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_connect), MP_ROM_PTR(&wifi_radio_connect_obj) }, // { MP_ROM_QSTR(MP_QSTR_connect_to_enterprise), MP_ROM_PTR(&wifi_radio_connect_to_enterprise_obj) }, - { MP_ROM_QSTR(MP_QSTR_ap_rssi), MP_ROM_PTR(&wifi_radio_get_ap_rssi_obj) }, + { MP_ROM_QSTR(MP_QSTR_ap_rssi), MP_ROM_PTR(&wifi_radio_ap_rssi_obj) }, { MP_ROM_QSTR(MP_QSTR_ipv4_gateway), MP_ROM_PTR(&wifi_radio_ipv4_gateway_obj) }, { MP_ROM_QSTR(MP_QSTR_ipv4_subnet), MP_ROM_PTR(&wifi_radio_ipv4_subnet_obj) }, { MP_ROM_QSTR(MP_QSTR_ipv4_address), MP_ROM_PTR(&wifi_radio_ipv4_address_obj) }, From 66d55738c1315b223d3e5ed6bc710f8b1e443836 Mon Sep 17 00:00:00 2001 From: "Ryan T. Hamilton" Date: Mon, 28 Sep 2020 16:49:20 -0700 Subject: [PATCH 006/145] Enable DNS info --- ports/esp32s2/common-hal/wifi/Radio.c | 14 ++++++++++++++ ports/esp32s2/common-hal/wifi/Radio.h | 1 + shared-bindings/wifi/Radio.c | 17 +++++++++++++++++ shared-bindings/wifi/Radio.h | 1 + 4 files changed, 33 insertions(+) diff --git a/ports/esp32s2/common-hal/wifi/Radio.c b/ports/esp32s2/common-hal/wifi/Radio.c index ab61778595..0184793a1a 100644 --- a/ports/esp32s2/common-hal/wifi/Radio.c +++ b/ports/esp32s2/common-hal/wifi/Radio.c @@ -192,6 +192,20 @@ mp_obj_t common_hal_wifi_radio_get_ipv4_address(wifi_radio_obj_t *self) { return common_hal_ipaddress_new_ipv4address(self->ip_info.ip.addr); } +mp_obj_t common_hal_wifi_radio_get_ipv4_dns(wifi_radio_obj_t *self) { + if (!esp_netif_is_netif_up(self->netif)) { + return mp_const_none; + } + + esp_netif_get_dns_info(self->netif, ESP_NETIF_DNS_MAIN, &self->dns_info); + + // dns_info is of type esp_netif_dns_info_t, which is just ever so slightly + // different than esp_netif_ip_info_t used for + // common_hal_wifi_radio_get_ipv4_address (includes both ipv4 and 6), + // so some extra jumping is required to get to the actual address + return common_hal_ipaddress_new_ipv4address(self->dns_info.ip.u_addr.ip4.addr); +} + mp_int_t common_hal_wifi_radio_ping(wifi_radio_obj_t *self, mp_obj_t ip_address, mp_float_t timeout) { esp_ping_config_t ping_config = ESP_PING_DEFAULT_CONFIG(); ipaddress_ipaddress_to_esp_idf(ip_address, &ping_config.target_addr); diff --git a/ports/esp32s2/common-hal/wifi/Radio.h b/ports/esp32s2/common-hal/wifi/Radio.h index ddcd9dc0d0..7c0cb996d7 100644 --- a/ports/esp32s2/common-hal/wifi/Radio.h +++ b/ports/esp32s2/common-hal/wifi/Radio.h @@ -48,6 +48,7 @@ typedef struct { wifi_config_t sta_config; wifi_ap_record_t ap_info; esp_netif_ip_info_t ip_info; + esp_netif_dns_info_t dns_info; esp_netif_t *netif; bool started; bool ap_mode; diff --git a/shared-bindings/wifi/Radio.c b/shared-bindings/wifi/Radio.c index 6c4e6a4f65..8c556aafe6 100644 --- a/shared-bindings/wifi/Radio.c +++ b/shared-bindings/wifi/Radio.c @@ -227,6 +227,22 @@ const mp_obj_property_t wifi_radio_ipv4_address_obj = { (mp_obj_t)&mp_const_none_obj }, }; +//| ipv4_dns: Optional[ipaddress.IPv4Address] +//| """IP v4 Address of the DNS server in use when connected to an access point. None otherwise.""" +//| +STATIC mp_obj_t wifi_radio_get_ipv4_dns(mp_obj_t self) { + return common_hal_wifi_radio_get_ipv4_dns(self); + +} +MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ipv4_dns_obj, wifi_radio_get_ipv4_dns); + +const mp_obj_property_t wifi_radio_ipv4_dns_obj = { + .base.type = &mp_type_property, + .proxy = { (mp_obj_t)&wifi_radio_get_ipv4_dns_obj, + (mp_obj_t)&mp_const_none_obj, + (mp_obj_t)&mp_const_none_obj }, +}; + //| def ping(self, ip, *, timeout: float = 0.5) -> float: //| """Ping an IP to test connectivity. Returns echo time in seconds. //| Returns None when it times out.""" @@ -268,6 +284,7 @@ STATIC const mp_rom_map_elem_t wifi_radio_locals_dict_table[] = { // { MP_ROM_QSTR(MP_QSTR_connect_to_enterprise), MP_ROM_PTR(&wifi_radio_connect_to_enterprise_obj) }, { MP_ROM_QSTR(MP_QSTR_ap_rssi), MP_ROM_PTR(&wifi_radio_ap_rssi_obj) }, + { MP_ROM_QSTR(MP_QSTR_ipv4_dns), MP_ROM_PTR(&wifi_radio_ipv4_dns_obj) }, { MP_ROM_QSTR(MP_QSTR_ipv4_gateway), MP_ROM_PTR(&wifi_radio_ipv4_gateway_obj) }, { MP_ROM_QSTR(MP_QSTR_ipv4_subnet), MP_ROM_PTR(&wifi_radio_ipv4_subnet_obj) }, { MP_ROM_QSTR(MP_QSTR_ipv4_address), MP_ROM_PTR(&wifi_radio_ipv4_address_obj) }, diff --git a/shared-bindings/wifi/Radio.h b/shared-bindings/wifi/Radio.h index 3c8ecbebd1..fd0807a86e 100644 --- a/shared-bindings/wifi/Radio.h +++ b/shared-bindings/wifi/Radio.h @@ -54,6 +54,7 @@ extern void common_hal_wifi_radio_stop_scanning_networks(wifi_radio_obj_t *self) extern wifi_radio_error_t common_hal_wifi_radio_connect(wifi_radio_obj_t *self, uint8_t* ssid, size_t ssid_len, uint8_t* password, size_t password_len, uint8_t channel, mp_float_t timeout, uint8_t* bssid, size_t bssid_len); extern mp_obj_t common_hal_wifi_radio_get_ap_rssi(wifi_radio_obj_t *self); +extern mp_obj_t common_hal_wifi_radio_get_ipv4_dns(wifi_radio_obj_t *self); extern mp_obj_t common_hal_wifi_radio_get_ipv4_gateway(wifi_radio_obj_t *self); extern mp_obj_t common_hal_wifi_radio_get_ipv4_subnet(wifi_radio_obj_t *self); extern mp_obj_t common_hal_wifi_radio_get_ipv4_address(wifi_radio_obj_t *self); From 2a4a244245e3e03bfb89dcc49e56e83b71291bb2 Mon Sep 17 00:00:00 2001 From: "Ryan T. Hamilton" Date: Mon, 28 Sep 2020 17:25:09 -0700 Subject: [PATCH 007/145] Add ap_ssid and ap_bssid --- ports/esp32s2/common-hal/wifi/Radio.c | 39 +++++++++++++++++++++++++-- shared-bindings/wifi/Radio.c | 34 +++++++++++++++++++++++ shared-bindings/wifi/Radio.h | 2 ++ 3 files changed, 73 insertions(+), 2 deletions(-) diff --git a/ports/esp32s2/common-hal/wifi/Radio.c b/ports/esp32s2/common-hal/wifi/Radio.c index 0184793a1a..019e8316c1 100644 --- a/ports/esp32s2/common-hal/wifi/Radio.c +++ b/ports/esp32s2/common-hal/wifi/Radio.c @@ -38,6 +38,8 @@ #include "esp-idf/components/esp_wifi/include/esp_wifi.h" #include "esp-idf/components/lwip/include/apps/ping/ping_sock.h" +#define MAC_ADDRESS_LENGTH 6 + static void start_station(wifi_radio_obj_t *self) { if (self->sta_mode) { return; @@ -73,8 +75,6 @@ void common_hal_wifi_radio_set_enabled(wifi_radio_obj_t *self, bool enabled) { } } -#define MAC_ADDRESS_LENGTH 6 - mp_obj_t common_hal_wifi_radio_get_mac_address(wifi_radio_obj_t *self) { uint8_t mac[MAC_ADDRESS_LENGTH]; esp_wifi_get_mac(ESP_IF_WIFI_STA, mac); @@ -168,6 +168,41 @@ mp_obj_t common_hal_wifi_radio_get_ap_rssi(wifi_radio_obj_t *self) { } } +mp_obj_t common_hal_wifi_radio_get_ap_ssid(wifi_radio_obj_t *self) { + if (!esp_netif_is_netif_up(self->netif)) { + return mp_const_none; + } + + // Make sure the interface is in STA mode + if (self->sta_mode){ + return mp_const_none; + } + + if (esp_wifi_sta_get_ap_info(&self->ap_info) != ESP_OK){ + return mp_const_none; + } else { + const char* cstr = (const char*) self->ap_info.ssid; + return mp_obj_new_str(cstr, strlen(cstr)); + } +} + +mp_obj_t common_hal_wifi_radio_get_ap_bssid(wifi_radio_obj_t *self) { + if (!esp_netif_is_netif_up(self->netif)) { + return mp_const_none; + } + + // Make sure the interface is in STA mode + if (self->sta_mode){ + return mp_const_none; + } + + if (esp_wifi_sta_get_ap_info(&self->ap_info) != ESP_OK){ + return mp_const_none; + } else { + return mp_obj_new_bytes(self->ap_info.bssid, MAC_ADDRESS_LENGTH); + } +} + mp_obj_t common_hal_wifi_radio_get_ipv4_gateway(wifi_radio_obj_t *self) { if (!esp_netif_is_netif_up(self->netif)) { return mp_const_none; diff --git a/shared-bindings/wifi/Radio.c b/shared-bindings/wifi/Radio.c index 8c556aafe6..96abadf6ff 100644 --- a/shared-bindings/wifi/Radio.c +++ b/shared-bindings/wifi/Radio.c @@ -179,6 +179,38 @@ const mp_obj_property_t wifi_radio_ap_rssi_obj = { (mp_obj_t)&mp_const_none_obj }, }; +//| ap_ssid: int +//| """SSID of the currently connected AP. Returns none if not connected""" +//| +STATIC mp_obj_t wifi_radio_get_ap_ssid(mp_obj_t self) { + return common_hal_wifi_radio_get_ap_ssid(self); + +} +MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ap_ssid_obj, wifi_radio_get_ap_ssid); + +const mp_obj_property_t wifi_radio_ap_ssid_obj = { + .base.type = &mp_type_property, + .proxy = { (mp_obj_t)&wifi_radio_get_ap_ssid_obj, + (mp_obj_t)&mp_const_none_obj, + (mp_obj_t)&mp_const_none_obj }, +}; + +//| ap_bssid: int +//| """BSSID (usually MAC) of the currently connected AP. Returns none if not connected""" +//| +STATIC mp_obj_t wifi_radio_get_ap_bssid(mp_obj_t self) { + return common_hal_wifi_radio_get_ap_bssid(self); + +} +MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ap_bssid_obj, wifi_radio_get_ap_bssid); + +const mp_obj_property_t wifi_radio_ap_bssid_obj = { + .base.type = &mp_type_property, + .proxy = { (mp_obj_t)&wifi_radio_get_ap_bssid_obj, + (mp_obj_t)&mp_const_none_obj, + (mp_obj_t)&mp_const_none_obj }, +}; + //| ipv4_gateway: Optional[ipaddress.IPv4Address] //| """IP v4 Address of the gateway when connected to an access point. None otherwise.""" //| @@ -284,6 +316,8 @@ STATIC const mp_rom_map_elem_t wifi_radio_locals_dict_table[] = { // { MP_ROM_QSTR(MP_QSTR_connect_to_enterprise), MP_ROM_PTR(&wifi_radio_connect_to_enterprise_obj) }, { MP_ROM_QSTR(MP_QSTR_ap_rssi), MP_ROM_PTR(&wifi_radio_ap_rssi_obj) }, + { MP_ROM_QSTR(MP_QSTR_ap_ssid), MP_ROM_PTR(&wifi_radio_ap_ssid_obj) }, + { MP_ROM_QSTR(MP_QSTR_ap_bssid), MP_ROM_PTR(&wifi_radio_ap_bssid_obj) }, { MP_ROM_QSTR(MP_QSTR_ipv4_dns), MP_ROM_PTR(&wifi_radio_ipv4_dns_obj) }, { MP_ROM_QSTR(MP_QSTR_ipv4_gateway), MP_ROM_PTR(&wifi_radio_ipv4_gateway_obj) }, { MP_ROM_QSTR(MP_QSTR_ipv4_subnet), MP_ROM_PTR(&wifi_radio_ipv4_subnet_obj) }, diff --git a/shared-bindings/wifi/Radio.h b/shared-bindings/wifi/Radio.h index fd0807a86e..bf30ac3405 100644 --- a/shared-bindings/wifi/Radio.h +++ b/shared-bindings/wifi/Radio.h @@ -54,6 +54,8 @@ extern void common_hal_wifi_radio_stop_scanning_networks(wifi_radio_obj_t *self) extern wifi_radio_error_t common_hal_wifi_radio_connect(wifi_radio_obj_t *self, uint8_t* ssid, size_t ssid_len, uint8_t* password, size_t password_len, uint8_t channel, mp_float_t timeout, uint8_t* bssid, size_t bssid_len); extern mp_obj_t common_hal_wifi_radio_get_ap_rssi(wifi_radio_obj_t *self); +extern mp_obj_t common_hal_wifi_radio_get_ap_ssid(wifi_radio_obj_t *self); +extern mp_obj_t common_hal_wifi_radio_get_ap_bssid(wifi_radio_obj_t *self); extern mp_obj_t common_hal_wifi_radio_get_ipv4_dns(wifi_radio_obj_t *self); extern mp_obj_t common_hal_wifi_radio_get_ipv4_gateway(wifi_radio_obj_t *self); extern mp_obj_t common_hal_wifi_radio_get_ipv4_subnet(wifi_radio_obj_t *self); From d6d02c67d2bcacaa02499930aabd76365797b108 Mon Sep 17 00:00:00 2001 From: Christian Walther Date: Mon, 28 Sep 2020 22:34:02 +0200 Subject: [PATCH 008/145] Fix inconsistent supervisor heap. When allocations were freed in a different order from the reverse of how they were allocated (leaving holes), the heap would get into an inconsistent state, eventually resulting in crashes. free_memory() relies on having allocations in order, but allocate_memory() did not guarantee that: It reused the first allocation with a NULL ptr without ensuring that it was between low_address and high_address. When it belongs to a hole in the allocated memory, such an allocation is not really free for reuse, because free_memory() still needs its length. Instead, explicitly mark allocations available for reuse with a special (invalid) value in the length field. Only allocations that lie between low_address and high_address are marked that way. --- supervisor/shared/memory.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/supervisor/shared/memory.c b/supervisor/shared/memory.c index 8ae8a16997..56c617b9cf 100755 --- a/supervisor/shared/memory.c +++ b/supervisor/shared/memory.c @@ -33,6 +33,10 @@ #define CIRCUITPY_SUPERVISOR_ALLOC_COUNT (12) +// Using a zero length to mark an unused allocation makes the code a bit shorter (but makes it +// impossible to support zero-length allocations). +#define FREE 0 + static supervisor_allocation allocations[CIRCUITPY_SUPERVISOR_ALLOC_COUNT]; // We use uint32_t* to ensure word (4 byte) alignment. uint32_t* low_address; @@ -61,19 +65,23 @@ void free_memory(supervisor_allocation* allocation) { } if (allocation->ptr == high_address) { high_address += allocation->length / 4; + allocation->length = FREE; for (index++; index < CIRCUITPY_SUPERVISOR_ALLOC_COUNT; index++) { if (allocations[index].ptr != NULL) { break; } high_address += allocations[index].length / 4; + allocations[index].length = FREE; } } else if (allocation->ptr + allocation->length / 4 == low_address) { low_address = allocation->ptr; + allocation->length = FREE; for (index--; index >= 0; index--) { if (allocations[index].ptr != NULL) { break; } low_address -= allocations[index].length / 4; + allocations[index].length = FREE; } } else { // Freed memory isn't in the middle so skip updating bounds. The memory will be added to the @@ -99,7 +107,7 @@ supervisor_allocation* allocate_remaining_memory(void) { } supervisor_allocation* allocate_memory(uint32_t length, bool high) { - if ((high_address - low_address) * 4 < (int32_t) length || length % 4 != 0) { + if (length == 0 || (high_address - low_address) * 4 < (int32_t) length || length % 4 != 0) { return NULL; } uint8_t index = 0; @@ -109,7 +117,7 @@ supervisor_allocation* allocate_memory(uint32_t length, bool high) { direction = -1; } for (; index < CIRCUITPY_SUPERVISOR_ALLOC_COUNT; index += direction) { - if (allocations[index].ptr == NULL) { + if (allocations[index].length == FREE) { break; } } From 5bdb8c45dd2700941ab75661b773680bdd46aaf1 Mon Sep 17 00:00:00 2001 From: Christian Walther Date: Tue, 29 Sep 2020 22:21:29 +0200 Subject: [PATCH 009/145] Allow allocate_memory() to reuse holes when matching exactly. This requires recovering the pointer of the allocation, which could be done by adding up neighbor lengths, but the simpler way is to stop NULLing it out in the first place and instead mark an allocation as freed by the client by setting the lowest bit of the length (which is always zero in a valid length). --- supervisor/shared/memory.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/supervisor/shared/memory.c b/supervisor/shared/memory.c index 56c617b9cf..fdb4e06fbb 100755 --- a/supervisor/shared/memory.c +++ b/supervisor/shared/memory.c @@ -37,6 +37,10 @@ // impossible to support zero-length allocations). #define FREE 0 +// The lowest two bits of a valid length are always zero, so we can use them to mark an allocation +// as freed by the client but not yet reclaimed into the FREE middle. +#define HOLE 1 + static supervisor_allocation allocations[CIRCUITPY_SUPERVISOR_ALLOC_COUNT]; // We use uint32_t* to ensure word (4 byte) alignment. uint32_t* low_address; @@ -67,9 +71,10 @@ void free_memory(supervisor_allocation* allocation) { high_address += allocation->length / 4; allocation->length = FREE; for (index++; index < CIRCUITPY_SUPERVISOR_ALLOC_COUNT; index++) { - if (allocations[index].ptr != NULL) { + if (!(allocations[index].length & HOLE)) { break; } + // Division automatically shifts out the HOLE bit. high_address += allocations[index].length / 4; allocations[index].length = FREE; } @@ -77,7 +82,7 @@ void free_memory(supervisor_allocation* allocation) { low_address = allocation->ptr; allocation->length = FREE; for (index--; index >= 0; index--) { - if (allocations[index].ptr != NULL) { + if (!(allocations[index].length & HOLE)) { break; } low_address -= allocations[index].length / 4; @@ -85,9 +90,10 @@ void free_memory(supervisor_allocation* allocation) { } } else { // Freed memory isn't in the middle so skip updating bounds. The memory will be added to the - // middle when the memory to the inside is freed. + // middle when the memory to the inside is freed. We still need its length, but setting + // only the lowest bit is nondestructive. + allocation->length |= HOLE; } - allocation->ptr = NULL; } supervisor_allocation* allocation_from_ptr(void *ptr) { @@ -107,7 +113,7 @@ supervisor_allocation* allocate_remaining_memory(void) { } supervisor_allocation* allocate_memory(uint32_t length, bool high) { - if (length == 0 || (high_address - low_address) * 4 < (int32_t) length || length % 4 != 0) { + if (length == 0 || length % 4 != 0) { return NULL; } uint8_t index = 0; @@ -116,15 +122,21 @@ supervisor_allocation* allocate_memory(uint32_t length, bool high) { index = CIRCUITPY_SUPERVISOR_ALLOC_COUNT - 1; direction = -1; } + supervisor_allocation* alloc; for (; index < CIRCUITPY_SUPERVISOR_ALLOC_COUNT; index += direction) { - if (allocations[index].length == FREE) { + alloc = &allocations[index]; + if (alloc->length == FREE) { break; } + // If a hole matches in length exactly, we can reuse it. + if (alloc->length == (length | HOLE)) { + alloc->length = length; + return alloc; + } } - if (index >= CIRCUITPY_SUPERVISOR_ALLOC_COUNT) { + if (index >= CIRCUITPY_SUPERVISOR_ALLOC_COUNT || (high_address - low_address) * 4 < (int32_t) length) { return NULL; } - supervisor_allocation* alloc = &allocations[index]; if (high) { high_address -= length / 4; alloc->ptr = high_address; From be8092f4d32d06488df88294a9dc4bb809411c5e Mon Sep 17 00:00:00 2001 From: Christian Walther Date: Fri, 2 Oct 2020 23:07:07 +0200 Subject: [PATCH 010/145] When there is not enough free space, but a matching hole on the other side, use it. --- supervisor/shared/memory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/supervisor/shared/memory.c b/supervisor/shared/memory.c index fdb4e06fbb..0f96ae2734 100755 --- a/supervisor/shared/memory.c +++ b/supervisor/shared/memory.c @@ -125,7 +125,7 @@ supervisor_allocation* allocate_memory(uint32_t length, bool high) { supervisor_allocation* alloc; for (; index < CIRCUITPY_SUPERVISOR_ALLOC_COUNT; index += direction) { alloc = &allocations[index]; - if (alloc->length == FREE) { + if (alloc->length == FREE && (high_address - low_address) * 4 >= (int32_t) length) { break; } // If a hole matches in length exactly, we can reuse it. @@ -134,7 +134,7 @@ supervisor_allocation* allocate_memory(uint32_t length, bool high) { return alloc; } } - if (index >= CIRCUITPY_SUPERVISOR_ALLOC_COUNT || (high_address - low_address) * 4 < (int32_t) length) { + if (index >= CIRCUITPY_SUPERVISOR_ALLOC_COUNT) { return NULL; } if (high) { From 2b2003f3e70a1e829bdd1ccffb1ed5bf933696dd Mon Sep 17 00:00:00 2001 From: askpatricw <4002194+askpatrickw@users.noreply.github.com> Date: Thu, 8 Oct 2020 22:46:10 -0700 Subject: [PATCH 011/145] Set default hostname --- ports/esp32s2/boards/adafruit_metro_esp32s2/sdkconfig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ports/esp32s2/boards/adafruit_metro_esp32s2/sdkconfig b/ports/esp32s2/boards/adafruit_metro_esp32s2/sdkconfig index 9d8bbde967..80b9a2cf8e 100644 --- a/ports/esp32s2/boards/adafruit_metro_esp32s2/sdkconfig +++ b/ports/esp32s2/boards/adafruit_metro_esp32s2/sdkconfig @@ -31,3 +31,9 @@ CONFIG_SPIRAM_USE_MEMMAP=y CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set # end of SPI RAM config + +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="Metro-ESP32S2" +# end of LWIP From b9e308c248ec953ebd2fc8c16c03b2cc06cfafc5 Mon Sep 17 00:00:00 2001 From: Targett363 Date: Sat, 10 Oct 2020 21:11:06 +0100 Subject: [PATCH 012/145] Adding Wroom and Wrover board files --- .../boards/targett_module_clip_wroom/board.c | 51 +++++++++++++++++++ .../targett_module_clip_wroom/mpconfigboard.h | 40 +++++++++++++++ .../mpconfigboard.mk | 17 +++++++ .../boards/targett_module_clip_wroom/pins.c | 48 +++++++++++++++++ .../targett_module_clip_wroom/sdkconfig | 0 .../boards/targett_module_clip_wrover/board.c | 47 +++++++++++++++++ .../mpconfigboard.h | 38 ++++++++++++++ .../mpconfigboard.mk | 17 +++++++ .../boards/targett_module_clip_wrover/pins.c | 48 +++++++++++++++++ .../targett_module_clip_wrover/sdkconfig | 33 ++++++++++++ 10 files changed, 339 insertions(+) create mode 100644 ports/esp32s2/boards/targett_module_clip_wroom/board.c create mode 100644 ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h create mode 100644 ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.mk create mode 100644 ports/esp32s2/boards/targett_module_clip_wroom/pins.c create mode 100644 ports/esp32s2/boards/targett_module_clip_wroom/sdkconfig create mode 100644 ports/esp32s2/boards/targett_module_clip_wrover/board.c create mode 100644 ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h create mode 100644 ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.mk create mode 100644 ports/esp32s2/boards/targett_module_clip_wrover/pins.c create mode 100644 ports/esp32s2/boards/targett_module_clip_wrover/sdkconfig diff --git a/ports/esp32s2/boards/targett_module_clip_wroom/board.c b/ports/esp32s2/boards/targett_module_clip_wroom/board.c new file mode 100644 index 0000000000..7f5de0e0dd --- /dev/null +++ b/ports/esp32s2/boards/targett_module_clip_wroom/board.c @@ -0,0 +1,51 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "boards/board.h" +#include "mpconfigboard.h" +#include "shared-bindings/microcontroller/Pin.h" + +void board_init(void) { + // USB + common_hal_never_reset_pin(&pin_GPIO19); + common_hal_never_reset_pin(&pin_GPIO20); + + // Debug UART + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); + + // Crystal + common_hal_never_reset_pin(&pin_GPIO15); + common_hal_never_reset_pin(&pin_GPIO16); +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} diff --git a/ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h b/ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h new file mode 100644 index 0000000000..6cf69138e7 --- /dev/null +++ b/ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h @@ -0,0 +1,40 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +//Micropython setup + +//Essentially the same as the Saola board but without the neopixel + +#define MICROPY_HW_BOARD_NAME "Targett Module Clip w/Wroom" +#define MICROPY_HW_MCU_NAME "ESP32S2" + +//#define MICROPY_HW_NEOPIXEL (&pin_GPIO18) + +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) + +#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") + +#define AUTORESET_DELAY_MS 500 diff --git a/ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.mk b/ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.mk new file mode 100644 index 0000000000..71793344e9 --- /dev/null +++ b/ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.mk @@ -0,0 +1,17 @@ +USB_VID = 0x239A +USB_PID = 0x80A8 +USB_PRODUCT = "Targett Module Clip w/WROOM" +USB_MANUFACTURER = "Targett" + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = MPZ + +# The default queue depth of 16 overflows on release builds, +# so increase it to 32. +CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 + +CIRCUITPY_ESP_FLASH_MODE=dio +CIRCUITPY_ESP_FLASH_FREQ=40m +CIRCUITPY_ESP_FLASH_SIZE=4MB + +CIRCUITPY_MODULE=wroom diff --git a/ports/esp32s2/boards/targett_module_clip_wroom/pins.c b/ports/esp32s2/boards/targett_module_clip_wroom/pins.c new file mode 100644 index 0000000000..99db096457 --- /dev/null +++ b/ports/esp32s2/boards/targett_module_clip_wroom/pins.c @@ -0,0 +1,48 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, + + + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_IO19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_IO26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_IO33), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_IO34), MP_ROM_PTR(&pin_GPIO34) }, + { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_IO40), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_IO44), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) }, + { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) }, + + //{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO18) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/esp32s2/boards/targett_module_clip_wroom/sdkconfig b/ports/esp32s2/boards/targett_module_clip_wroom/sdkconfig new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ports/esp32s2/boards/targett_module_clip_wrover/board.c b/ports/esp32s2/boards/targett_module_clip_wrover/board.c new file mode 100644 index 0000000000..9f708874bf --- /dev/null +++ b/ports/esp32s2/boards/targett_module_clip_wrover/board.c @@ -0,0 +1,47 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "boards/board.h" +#include "mpconfigboard.h" +#include "shared-bindings/microcontroller/Pin.h" + +void board_init(void) { + // USB + common_hal_never_reset_pin(&pin_GPIO19); + common_hal_never_reset_pin(&pin_GPIO20); + + // Debug UART + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} diff --git a/ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h b/ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h new file mode 100644 index 0000000000..9615228910 --- /dev/null +++ b/ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h @@ -0,0 +1,38 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +//Micropython setup + +#define MICROPY_HW_BOARD_NAME "Saola 1 w/Wrover" +#define MICROPY_HW_MCU_NAME "ESP32S2" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO18) + +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) + +#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") + +#define AUTORESET_DELAY_MS 500 diff --git a/ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.mk b/ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.mk new file mode 100644 index 0000000000..d5ff1c5ac8 --- /dev/null +++ b/ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.mk @@ -0,0 +1,17 @@ +USB_VID = 0x239A +USB_PID = 0x80A6 +USB_PRODUCT = "Saola 1 w/WROVER" +USB_MANUFACTURER = "Espressif" + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = MPZ + +# The default queue depth of 16 overflows on release builds, +# so increase it to 32. +CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 + +CIRCUITPY_ESP_FLASH_MODE=dio +CIRCUITPY_ESP_FLASH_FREQ=40m +CIRCUITPY_ESP_FLASH_SIZE=4MB + +CIRCUITPY_MODULE=wrover diff --git a/ports/esp32s2/boards/targett_module_clip_wrover/pins.c b/ports/esp32s2/boards/targett_module_clip_wrover/pins.c new file mode 100644 index 0000000000..0562d9331f --- /dev/null +++ b/ports/esp32s2/boards/targett_module_clip_wrover/pins.c @@ -0,0 +1,48 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, + + + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_IO19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_IO26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_IO33), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_IO34), MP_ROM_PTR(&pin_GPIO34) }, + { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_IO40), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_IO44), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) }, + { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO18) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/esp32s2/boards/targett_module_clip_wrover/sdkconfig b/ports/esp32s2/boards/targett_module_clip_wrover/sdkconfig new file mode 100644 index 0000000000..9d8bbde967 --- /dev/null +++ b/ports/esp32s2/boards/targett_module_clip_wrover/sdkconfig @@ -0,0 +1,33 @@ +CONFIG_ESP32S2_SPIRAM_SUPPORT=y + +# +# SPI RAM config +# +# CONFIG_SPIRAM_TYPE_AUTO is not set +CONFIG_SPIRAM_TYPE_ESPPSRAM16=y +# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set +CONFIG_SPIRAM_SIZE=2097152 + +# +# PSRAM clock and cs IO for ESP32S2 +# +CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_DEFAULT_PSRAM_CS_IO=26 +# end of PSRAM clock and cs IO for ESP32S2 + +# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set +# CONFIG_SPIRAM_RODATA is not set +# CONFIG_SPIRAM_SPEED_80M is not set +CONFIG_SPIRAM_SPEED_40M=y +# CONFIG_SPIRAM_SPEED_26M is not set +# CONFIG_SPIRAM_SPEED_20M is not set +CONFIG_SPIRAM=y +CONFIG_SPIRAM_BOOT_INIT=y +# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set +CONFIG_SPIRAM_USE_MEMMAP=y +# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set +# CONFIG_SPIRAM_USE_MALLOC is not set +CONFIG_SPIRAM_MEMTEST=y +# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# end of SPI RAM config From f38e868e90fb467cf0f910e4990ffacba07abefb Mon Sep 17 00:00:00 2001 From: Targett363 Date: Sat, 10 Oct 2020 21:28:26 +0100 Subject: [PATCH 013/145] Actually adding Wrover board files this time --- ports/esp32s2/boards/espressif_saola_1_wrover/board.c | 4 ++++ .../esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h | 6 ++++-- .../boards/espressif_saola_1_wrover/mpconfigboard.mk | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ports/esp32s2/boards/espressif_saola_1_wrover/board.c b/ports/esp32s2/boards/espressif_saola_1_wrover/board.c index 9f708874bf..83dcb920a8 100644 --- a/ports/esp32s2/boards/espressif_saola_1_wrover/board.c +++ b/ports/esp32s2/boards/espressif_saola_1_wrover/board.c @@ -36,6 +36,10 @@ void board_init(void) { // Debug UART common_hal_never_reset_pin(&pin_GPIO43); common_hal_never_reset_pin(&pin_GPIO44); + + //Crystal + common_hal_never_reset_pin(&pin_GPIO15); + common_hal_never_reset_pin(&pin_GPIO16); } bool board_requests_safe_mode(void) { diff --git a/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h b/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h index 9615228910..3c74d27fa4 100644 --- a/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h +++ b/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h @@ -26,10 +26,12 @@ //Micropython setup -#define MICROPY_HW_BOARD_NAME "Saola 1 w/Wrover" +//Same setup as the Saola board but with no Neopixel on board + +#define MICROPY_HW_BOARD_NAME "Targett Module Clip w/Wrover" #define MICROPY_HW_MCU_NAME "ESP32S2" -#define MICROPY_HW_NEOPIXEL (&pin_GPIO18) +//#define MICROPY_HW_NEOPIXEL (&pin_GPIO18) #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) diff --git a/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.mk b/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.mk index d5ff1c5ac8..4b70f4a686 100644 --- a/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.mk +++ b/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.mk @@ -1,7 +1,7 @@ USB_VID = 0x239A USB_PID = 0x80A6 -USB_PRODUCT = "Saola 1 w/WROVER" -USB_MANUFACTURER = "Espressif" +USB_PRODUCT = "Targett Module Clip w/WROVER" +USB_MANUFACTURER = "Targett" INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = MPZ From 74954286f09b2fc861db759232569520552f7cd8 Mon Sep 17 00:00:00 2001 From: Targett363 Date: Sat, 10 Oct 2020 21:44:14 +0100 Subject: [PATCH 014/145] Putting the Saola Wrover files back and adding my Wrover board files this time --- ports/esp32s2/boards/espressif_saola_1_wrover/board.c | 4 ---- .../esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h | 6 ++---- .../boards/espressif_saola_1_wrover/mpconfigboard.mk | 4 ++-- ports/esp32s2/boards/targett_module_clip_wrover/board.c | 4 ++++ .../boards/targett_module_clip_wrover/mpconfigboard.h | 6 ++++-- .../boards/targett_module_clip_wrover/mpconfigboard.mk | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ports/esp32s2/boards/espressif_saola_1_wrover/board.c b/ports/esp32s2/boards/espressif_saola_1_wrover/board.c index 83dcb920a8..9f708874bf 100644 --- a/ports/esp32s2/boards/espressif_saola_1_wrover/board.c +++ b/ports/esp32s2/boards/espressif_saola_1_wrover/board.c @@ -36,10 +36,6 @@ void board_init(void) { // Debug UART common_hal_never_reset_pin(&pin_GPIO43); common_hal_never_reset_pin(&pin_GPIO44); - - //Crystal - common_hal_never_reset_pin(&pin_GPIO15); - common_hal_never_reset_pin(&pin_GPIO16); } bool board_requests_safe_mode(void) { diff --git a/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h b/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h index 3c74d27fa4..9615228910 100644 --- a/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h +++ b/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h @@ -26,12 +26,10 @@ //Micropython setup -//Same setup as the Saola board but with no Neopixel on board - -#define MICROPY_HW_BOARD_NAME "Targett Module Clip w/Wrover" +#define MICROPY_HW_BOARD_NAME "Saola 1 w/Wrover" #define MICROPY_HW_MCU_NAME "ESP32S2" -//#define MICROPY_HW_NEOPIXEL (&pin_GPIO18) +#define MICROPY_HW_NEOPIXEL (&pin_GPIO18) #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) diff --git a/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.mk b/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.mk index 4b70f4a686..d5ff1c5ac8 100644 --- a/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.mk +++ b/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.mk @@ -1,7 +1,7 @@ USB_VID = 0x239A USB_PID = 0x80A6 -USB_PRODUCT = "Targett Module Clip w/WROVER" -USB_MANUFACTURER = "Targett" +USB_PRODUCT = "Saola 1 w/WROVER" +USB_MANUFACTURER = "Espressif" INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = MPZ diff --git a/ports/esp32s2/boards/targett_module_clip_wrover/board.c b/ports/esp32s2/boards/targett_module_clip_wrover/board.c index 9f708874bf..83dcb920a8 100644 --- a/ports/esp32s2/boards/targett_module_clip_wrover/board.c +++ b/ports/esp32s2/boards/targett_module_clip_wrover/board.c @@ -36,6 +36,10 @@ void board_init(void) { // Debug UART common_hal_never_reset_pin(&pin_GPIO43); common_hal_never_reset_pin(&pin_GPIO44); + + //Crystal + common_hal_never_reset_pin(&pin_GPIO15); + common_hal_never_reset_pin(&pin_GPIO16); } bool board_requests_safe_mode(void) { diff --git a/ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h b/ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h index 9615228910..3c74d27fa4 100644 --- a/ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h +++ b/ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h @@ -26,10 +26,12 @@ //Micropython setup -#define MICROPY_HW_BOARD_NAME "Saola 1 w/Wrover" +//Same setup as the Saola board but with no Neopixel on board + +#define MICROPY_HW_BOARD_NAME "Targett Module Clip w/Wrover" #define MICROPY_HW_MCU_NAME "ESP32S2" -#define MICROPY_HW_NEOPIXEL (&pin_GPIO18) +//#define MICROPY_HW_NEOPIXEL (&pin_GPIO18) #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) diff --git a/ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.mk b/ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.mk index d5ff1c5ac8..4b70f4a686 100644 --- a/ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.mk +++ b/ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.mk @@ -1,7 +1,7 @@ USB_VID = 0x239A USB_PID = 0x80A6 -USB_PRODUCT = "Saola 1 w/WROVER" -USB_MANUFACTURER = "Espressif" +USB_PRODUCT = "Targett Module Clip w/WROVER" +USB_MANUFACTURER = "Targett" INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = MPZ From cd935346ec8afe93a89d3a858acad1da77245916 Mon Sep 17 00:00:00 2001 From: Targett363 Date: Sat, 10 Oct 2020 22:11:44 +0100 Subject: [PATCH 015/145] Updating the build.yml to include both Module Clip boards --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eaecd2fa4d..af006756e1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -422,6 +422,8 @@ jobs: - "espressif_saola_1_wrover" - "microdev_micro_s2" - "muselab_nanoesp32_s2" + - "targett_module_clip_wrooom" + - "targett_module_clip_wrover" - "unexpectedmaker_feathers2" - "unexpectedmaker_feathers2_prerelease" From ead0d51fd711d38bab8dc7cff8373b6fdd60a180 Mon Sep 17 00:00:00 2001 From: Targett363 Date: Sat, 10 Oct 2020 22:22:01 +0100 Subject: [PATCH 016/145] Commenting out Neopixel in pins.c --- ports/esp32s2/boards/targett_module_clip_wrover/pins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/esp32s2/boards/targett_module_clip_wrover/pins.c b/ports/esp32s2/boards/targett_module_clip_wrover/pins.c index 0562d9331f..99db096457 100644 --- a/ports/esp32s2/boards/targett_module_clip_wrover/pins.c +++ b/ports/esp32s2/boards/targett_module_clip_wrover/pins.c @@ -43,6 +43,6 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) }, { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) }, - { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO18) }, + //{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO18) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); From 2aee2b7dc7c11eaf44603e726683a66bf47f0ec5 Mon Sep 17 00:00:00 2001 From: Targett363 Date: Sat, 10 Oct 2020 22:33:52 +0100 Subject: [PATCH 017/145] Corecting spelling mistake in build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index af006756e1..4802335b55 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -422,7 +422,7 @@ jobs: - "espressif_saola_1_wrover" - "microdev_micro_s2" - "muselab_nanoesp32_s2" - - "targett_module_clip_wrooom" + - "targett_module_clip_wroom" - "targett_module_clip_wrover" - "unexpectedmaker_feathers2" - "unexpectedmaker_feathers2_prerelease" From 5721cf0710202294476c83500394a8dbd1c20d5b Mon Sep 17 00:00:00 2001 From: Targett363 Date: Sat, 10 Oct 2020 22:42:24 +0100 Subject: [PATCH 018/145] tidying up board names --- ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.mk | 2 +- .../esp32s2/boards/targett_module_clip_wrover/mpconfigboard.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.mk b/ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.mk index 71793344e9..580caa71b6 100644 --- a/ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.mk +++ b/ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.mk @@ -1,6 +1,6 @@ USB_VID = 0x239A USB_PID = 0x80A8 -USB_PRODUCT = "Targett Module Clip w/WROOM" +USB_PRODUCT = "Targett Module Clip w/Wroom" USB_MANUFACTURER = "Targett" INTERNAL_FLASH_FILESYSTEM = 1 diff --git a/ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.mk b/ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.mk index 4b70f4a686..6832d21018 100644 --- a/ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.mk +++ b/ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.mk @@ -1,6 +1,6 @@ USB_VID = 0x239A USB_PID = 0x80A6 -USB_PRODUCT = "Targett Module Clip w/WROVER" +USB_PRODUCT = "Targett Module Clip w/Wrover" USB_MANUFACTURER = "Targett" INTERNAL_FLASH_FILESYSTEM = 1 From 60deb321d1801ad86c9dfcfc09fd4c69eec1ef06 Mon Sep 17 00:00:00 2001 From: Targett363 Date: Sat, 10 Oct 2020 23:55:05 +0100 Subject: [PATCH 019/145] adding USB PID VID --- .../esp32s2/boards/targett_module_clip_wroom/mpconfigboard.mk | 4 ++-- .../boards/targett_module_clip_wrover/mpconfigboard.mk | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.mk b/ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.mk index 580caa71b6..e307d7d623 100644 --- a/ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.mk +++ b/ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.mk @@ -1,5 +1,5 @@ -USB_VID = 0x239A -USB_PID = 0x80A8 +USB_VID = 0x1209 +USB_PID = 0x0011 USB_PRODUCT = "Targett Module Clip w/Wroom" USB_MANUFACTURER = "Targett" diff --git a/ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.mk b/ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.mk index 6832d21018..aff5ffd6cf 100644 --- a/ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.mk +++ b/ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.mk @@ -1,5 +1,5 @@ -USB_VID = 0x239A -USB_PID = 0x80A6 +USB_VID = 0x1209 +USB_PID = 0x0012 USB_PRODUCT = "Targett Module Clip w/Wrover" USB_MANUFACTURER = "Targett" From 57b44928a38b5a2328e0fd4fe8f2baee11062229 Mon Sep 17 00:00:00 2001 From: Jensen Date: Thu, 8 Oct 2020 21:40:55 -0500 Subject: [PATCH 020/145] displayio: Pass transparent_color to ColorConverter Signed-off-by: Jensen --- shared-bindings/displayio/ColorConverter.c | 5 ++++- shared-bindings/displayio/ColorConverter.h | 2 +- shared-module/displayio/ColorConverter.c | 12 +++++++++++- shared-module/displayio/ColorConverter.h | 1 + 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/shared-bindings/displayio/ColorConverter.c b/shared-bindings/displayio/ColorConverter.c index a2b6699efc..d2cbcfc732 100644 --- a/shared-bindings/displayio/ColorConverter.c +++ b/shared-bindings/displayio/ColorConverter.c @@ -43,6 +43,7 @@ //| """Create a ColorConverter object to convert color formats. Only supports RGB888 to RGB565 //| currently. //| :param bool dither: Adds random noise to dither the output image""" +//| :param bool transparent_color: Sets one color in the colorset to transparent""" //| ... //| @@ -50,9 +51,11 @@ //| STATIC mp_obj_t displayio_colorconverter_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_dither}; + enum { ARG_transparent_color }; static const mp_arg_t allowed_args[] = { { MP_QSTR_dither, MP_ARG_KW_ONLY | MP_ARG_BOOL, {.u_bool = false} }, + { MP_QSTR_transparent_color, MP_ARG_KW_ONLY | MP_ARG_INT, {.uint32_t = 0} }, }; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); @@ -60,7 +63,7 @@ STATIC mp_obj_t displayio_colorconverter_make_new(const mp_obj_type_t *type, siz displayio_colorconverter_t *self = m_new_obj(displayio_colorconverter_t); self->base.type = &displayio_colorconverter_type; - common_hal_displayio_colorconverter_construct(self, args[ARG_dither].u_bool); + common_hal_displayio_colorconverter_construct(self, args[ARG_dither].u_bool, args[ARG_transparent_color].uint32_t); return MP_OBJ_FROM_PTR(self); } diff --git a/shared-bindings/displayio/ColorConverter.h b/shared-bindings/displayio/ColorConverter.h index d550d81be5..146ad80bdd 100644 --- a/shared-bindings/displayio/ColorConverter.h +++ b/shared-bindings/displayio/ColorConverter.h @@ -33,7 +33,7 @@ extern const mp_obj_type_t displayio_colorconverter_type; -void common_hal_displayio_colorconverter_construct(displayio_colorconverter_t* self, bool dither); +void common_hal_displayio_colorconverter_construct(displayio_colorconverter_t* self, bool dither, uint32_t transparent_color); void common_hal_displayio_colorconverter_convert(displayio_colorconverter_t *colorconverter, const _displayio_colorspace_t* colorspace, uint32_t input_color, uint32_t* output_color); void common_hal_displayio_colorconverter_set_dither(displayio_colorconverter_t* self, bool dither); diff --git a/shared-module/displayio/ColorConverter.c b/shared-module/displayio/ColorConverter.c index c2c3214aae..c23286d041 100644 --- a/shared-module/displayio/ColorConverter.c +++ b/shared-module/displayio/ColorConverter.c @@ -39,8 +39,9 @@ uint32_t displayio_colorconverter_dither_noise_2(uint32_t x, uint32_t y) { return displayio_colorconverter_dither_noise_1(x + y * 0xFFFF); } -void common_hal_displayio_colorconverter_construct(displayio_colorconverter_t* self, bool dither) { +void common_hal_displayio_colorconverter_construct(displayio_colorconverter_t* self, bool dither, uint32_t transparent_color) { self->dither = dither; + self->transparent_color = transparent_color; } uint16_t displayio_colorconverter_compute_rgb565(uint32_t color_rgb888) { @@ -161,6 +162,9 @@ void displayio_colorconverter_convert(displayio_colorconverter_t *self, const _d } output_color->pixel = packed; output_color->opaque = true; + if (self->transparent_color == pixel) { + output_color->opaque = false; + } return; } else if (colorspace->tricolor) { uint8_t luma = displayio_colorconverter_compute_luma(pixel); @@ -170,6 +174,9 @@ void displayio_colorconverter_convert(displayio_colorconverter_t *self, const _d output_color->pixel = 0; } output_color->opaque = true; + if (self->transparent_color == pixel) { + output_color->opaque = false; + } return; } uint8_t pixel_hue = displayio_colorconverter_compute_hue(pixel); @@ -179,6 +186,9 @@ void displayio_colorconverter_convert(displayio_colorconverter_t *self, const _d uint8_t luma = displayio_colorconverter_compute_luma(pixel); output_color->pixel = luma >> (8 - colorspace->depth); output_color->opaque = true; + if (self->transparent_color == pixel) { + output_color->opaque = false; + } return; } output_color->opaque = false; diff --git a/shared-module/displayio/ColorConverter.h b/shared-module/displayio/ColorConverter.h index 10b1604a49..b402625ef7 100644 --- a/shared-module/displayio/ColorConverter.h +++ b/shared-module/displayio/ColorConverter.h @@ -36,6 +36,7 @@ typedef struct { mp_obj_base_t base; bool dither; + uint32_t transparent_color; } displayio_colorconverter_t; bool displayio_colorconverter_needs_refresh(displayio_colorconverter_t *self); From b359e2945ac9914c31afc7e692a4f46a837a854d Mon Sep 17 00:00:00 2001 From: Jensen Date: Sun, 11 Oct 2020 13:18:09 -0500 Subject: [PATCH 021/145] displayio: Add make_transparent and make_opaque to ColorConvertor --- shared-bindings/displayio/ColorConverter.c | 7 ++---- shared-bindings/displayio/ColorConverter.h | 5 +++- shared-module/displayio/ColorConverter.c | 29 ++++++++++++++-------- 3 files changed, 24 insertions(+), 17 deletions(-) diff --git a/shared-bindings/displayio/ColorConverter.c b/shared-bindings/displayio/ColorConverter.c index d2cbcfc732..c02dfdb6d2 100644 --- a/shared-bindings/displayio/ColorConverter.c +++ b/shared-bindings/displayio/ColorConverter.c @@ -43,7 +43,6 @@ //| """Create a ColorConverter object to convert color formats. Only supports RGB888 to RGB565 //| currently. //| :param bool dither: Adds random noise to dither the output image""" -//| :param bool transparent_color: Sets one color in the colorset to transparent""" //| ... //| @@ -51,11 +50,9 @@ //| STATIC mp_obj_t displayio_colorconverter_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_dither}; - enum { ARG_transparent_color }; static const mp_arg_t allowed_args[] = { - { MP_QSTR_dither, MP_ARG_KW_ONLY | MP_ARG_BOOL, {.u_bool = false} }, - { MP_QSTR_transparent_color, MP_ARG_KW_ONLY | MP_ARG_INT, {.uint32_t = 0} }, + { MP_QSTR_dither, MP_ARG_KW_ONLY | MP_ARG_BOOL, {.u_bool = false} } }; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); @@ -63,7 +60,7 @@ STATIC mp_obj_t displayio_colorconverter_make_new(const mp_obj_type_t *type, siz displayio_colorconverter_t *self = m_new_obj(displayio_colorconverter_t); self->base.type = &displayio_colorconverter_type; - common_hal_displayio_colorconverter_construct(self, args[ARG_dither].u_bool, args[ARG_transparent_color].uint32_t); + common_hal_displayio_colorconverter_construct(self, args[ARG_dither].u_bool); return MP_OBJ_FROM_PTR(self); } diff --git a/shared-bindings/displayio/ColorConverter.h b/shared-bindings/displayio/ColorConverter.h index 146ad80bdd..441f7c7aee 100644 --- a/shared-bindings/displayio/ColorConverter.h +++ b/shared-bindings/displayio/ColorConverter.h @@ -33,10 +33,13 @@ extern const mp_obj_type_t displayio_colorconverter_type; -void common_hal_displayio_colorconverter_construct(displayio_colorconverter_t* self, bool dither, uint32_t transparent_color); +void common_hal_displayio_colorconverter_construct(displayio_colorconverter_t* self, bool dither); void common_hal_displayio_colorconverter_convert(displayio_colorconverter_t *colorconverter, const _displayio_colorspace_t* colorspace, uint32_t input_color, uint32_t* output_color); void common_hal_displayio_colorconverter_set_dither(displayio_colorconverter_t* self, bool dither); bool common_hal_displayio_colorconverter_get_dither(displayio_colorconverter_t* self); +void common_hal_displayio_colorconverter_make_transparent(displayio_colorconverter_t* self, uint32_t transparent_color); +void common_hal_displayio_colorconverter_make_opaque(displayio_colorconverter_t* self, uint32_t transparent_color); + #endif // MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYIO_COLORCONVERTER_H diff --git a/shared-module/displayio/ColorConverter.c b/shared-module/displayio/ColorConverter.c index c23286d041..0a1a7dc06b 100644 --- a/shared-module/displayio/ColorConverter.c +++ b/shared-module/displayio/ColorConverter.c @@ -39,9 +39,8 @@ uint32_t displayio_colorconverter_dither_noise_2(uint32_t x, uint32_t y) { return displayio_colorconverter_dither_noise_1(x + y * 0xFFFF); } -void common_hal_displayio_colorconverter_construct(displayio_colorconverter_t* self, bool dither, uint32_t transparent_color) { +void common_hal_displayio_colorconverter_construct(displayio_colorconverter_t* self, bool dither) { self->dither = dither; - self->transparent_color = transparent_color; } uint16_t displayio_colorconverter_compute_rgb565(uint32_t color_rgb888) { @@ -129,9 +128,26 @@ bool common_hal_displayio_colorconverter_get_dither(displayio_colorconverter_t* return self->dither; } +void common_hal_displayio_colorconverter_make_transparent(displayio_colorconverter_t* self, uint32_t transparent_color) { + self->transparent_color = transparent_color; + // TODO: Does this require refreshing like the other modules? +} + +void common_hal_displayio_colorconverter_make_opaque(displayio_colorconverter_t* self, uint32_t transparent_color) { + if (self->transparent_color == transparent_color) { + m_del(uint8_t, self, transparent_color); + } + // TODO: Does this require refreshing like the other modules? +} + void displayio_colorconverter_convert(displayio_colorconverter_t *self, const _displayio_colorspace_t* colorspace, const displayio_input_pixel_t *input_pixel, displayio_output_pixel_t *output_color) { uint32_t pixel = input_pixel->pixel; + if (self->transparent_color == pixel) { + output_color->opaque = false; + return; + } + if (self->dither){ uint8_t randr = (displayio_colorconverter_dither_noise_2(input_pixel->tile_x,input_pixel->tile_y)); uint8_t randg = (displayio_colorconverter_dither_noise_2(input_pixel->tile_x+33,input_pixel->tile_y)); @@ -162,9 +178,6 @@ void displayio_colorconverter_convert(displayio_colorconverter_t *self, const _d } output_color->pixel = packed; output_color->opaque = true; - if (self->transparent_color == pixel) { - output_color->opaque = false; - } return; } else if (colorspace->tricolor) { uint8_t luma = displayio_colorconverter_compute_luma(pixel); @@ -174,9 +187,6 @@ void displayio_colorconverter_convert(displayio_colorconverter_t *self, const _d output_color->pixel = 0; } output_color->opaque = true; - if (self->transparent_color == pixel) { - output_color->opaque = false; - } return; } uint8_t pixel_hue = displayio_colorconverter_compute_hue(pixel); @@ -186,9 +196,6 @@ void displayio_colorconverter_convert(displayio_colorconverter_t *self, const _d uint8_t luma = displayio_colorconverter_compute_luma(pixel); output_color->pixel = luma >> (8 - colorspace->depth); output_color->opaque = true; - if (self->transparent_color == pixel) { - output_color->opaque = false; - } return; } output_color->opaque = false; From 337019626a8cd0632cd2a6f6bae4ae09ae26cf16 Mon Sep 17 00:00:00 2001 From: Jensen Date: Sun, 11 Oct 2020 17:29:16 -0500 Subject: [PATCH 022/145] displayio: Add make_transparent to ColorConverter --- locale/circuitpython.pot | 24 ++++++++++++++-- shared-bindings/displayio/ColorConverter.c | 32 ++++++++++++++++++++++ shared-module/displayio/ColorConverter.c | 12 +++++--- 3 files changed, 61 insertions(+), 7 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index c4951f78f9..081e2df9fa 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-09-29 20:14-0500\n" +"POT-Creation-Date: 2020-10-12 20:47-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -285,6 +285,7 @@ msgid "All I2C peripherals are in use" msgstr "" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "" @@ -892,6 +893,7 @@ msgid "File exists" msgstr "" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "" @@ -928,7 +930,8 @@ msgid "Group full" msgstr "" #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c -#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/sdioio/SDCard.c +#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c +#: ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware busy, try alternative pins" msgstr "" @@ -998,7 +1001,8 @@ msgid "Invalid %q pin" msgstr "" #: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/UART.c ports/stm/common-hal/sdioio/SDCard.c +#: ports/stm/common-hal/busio/UART.c ports/stm/common-hal/canio/CAN.c +#: ports/stm/common-hal/sdioio/SDCard.c msgid "Invalid %q pin selection" msgstr "" @@ -3144,6 +3148,7 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" +#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h @@ -3151,6 +3156,7 @@ msgstr "" #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h msgid "pressing boot button at start up.\n" msgstr "" @@ -3388,6 +3394,18 @@ msgstr "" msgid "too many values to unpack (expected %d)" msgstr "" +#: shared-bindings/displayio/ColorConverter.c +msgid "transparent_color should be an int" +msgstr "" + +#: shared-module/displayio/ColorConverter.c +msgid "transparent_color value is already set" +msgstr "" + +#: shared-module/displayio/ColorConverter.c +msgid "transparent_color value is not transparent" +msgstr "" + #: extmod/ulab/code/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "" diff --git a/shared-bindings/displayio/ColorConverter.c b/shared-bindings/displayio/ColorConverter.c index c02dfdb6d2..a041bbe597 100644 --- a/shared-bindings/displayio/ColorConverter.c +++ b/shared-bindings/displayio/ColorConverter.c @@ -110,9 +110,41 @@ const mp_obj_property_t displayio_colorconverter_dither_obj = { (mp_obj_t)&mp_const_none_obj}, }; +//| def make_transparent(self, pixel: int) -> None: +//| """Sets a pixel to not opaque.""" +//| +STATIC mp_obj_t displayio_colorconverter_make_transparent(mp_obj_t self_in, mp_obj_t transparent_color_obj) { + displayio_colorconverter_t *self = MP_OBJ_TO_PTR(self_in); + + mp_int_t transparent_color; + if (!mp_obj_get_int_maybe(transparent_color_obj, &transparent_color)) { + mp_raise_ValueError(translate("transparent_color should be an int")); + } + common_hal_displayio_colorconverter_make_transparent(self, transparent_color); + return mp_const_none; +} +MP_DEFINE_CONST_FUN_OBJ_2(displayio_colorconverter_make_transparent_obj, displayio_colorconverter_make_transparent); + +//| def make_opaque(self, pixel: int) -> None: +//| """Sets a pixel to opaque.""" +//| +STATIC mp_obj_t displayio_colorconverter_make_opaque(mp_obj_t self_in, mp_obj_t transparent_color_obj) { + displayio_colorconverter_t *self = MP_OBJ_TO_PTR(self_in); + + mp_int_t transparent_color; + if (!mp_obj_get_int_maybe(transparent_color_obj, &transparent_color)) { + mp_raise_ValueError(translate("transparent_color should be an int")); + } + common_hal_displayio_colorconverter_make_opaque(self, transparent_color); + return mp_const_none; +} +MP_DEFINE_CONST_FUN_OBJ_2(displayio_colorconverter_make_opaque_obj, displayio_colorconverter_make_opaque); + STATIC const mp_rom_map_elem_t displayio_colorconverter_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_convert), MP_ROM_PTR(&displayio_colorconverter_convert_obj) }, { MP_ROM_QSTR(MP_QSTR_dither), MP_ROM_PTR(&displayio_colorconverter_dither_obj) }, + { MP_ROM_QSTR(MP_QSTR_make_transparent), MP_ROM_PTR(&displayio_colorconverter_make_transparent_obj) }, + { MP_ROM_QSTR(MP_QSTR_make_opaque), MP_ROM_PTR(&displayio_colorconverter_make_opaque_obj) }, }; STATIC MP_DEFINE_CONST_DICT(displayio_colorconverter_locals_dict, displayio_colorconverter_locals_dict_table); diff --git a/shared-module/displayio/ColorConverter.c b/shared-module/displayio/ColorConverter.c index 0a1a7dc06b..fef71cdf5e 100644 --- a/shared-module/displayio/ColorConverter.c +++ b/shared-module/displayio/ColorConverter.c @@ -27,6 +27,7 @@ #include "shared-bindings/displayio/ColorConverter.h" #include "py/misc.h" +#include "py/runtime.h" uint32_t displayio_colorconverter_dither_noise_1 (uint32_t n) { @@ -129,15 +130,18 @@ bool common_hal_displayio_colorconverter_get_dither(displayio_colorconverter_t* } void common_hal_displayio_colorconverter_make_transparent(displayio_colorconverter_t* self, uint32_t transparent_color) { + if (self->transparent_color) { + mp_raise_RuntimeError(translate("transparent_color value is already set")); + } self->transparent_color = transparent_color; - // TODO: Does this require refreshing like the other modules? } void common_hal_displayio_colorconverter_make_opaque(displayio_colorconverter_t* self, uint32_t transparent_color) { - if (self->transparent_color == transparent_color) { - m_del(uint8_t, self, transparent_color); + if (self->transparent_color != transparent_color) { + mp_raise_RuntimeError(translate("transparent_color value is not transparent")); } - // TODO: Does this require refreshing like the other modules? + // 0x1000000 will never equal a valid color + self->transparent_color = 0x1000000; } void displayio_colorconverter_convert(displayio_colorconverter_t *self, const _displayio_colorspace_t* colorspace, const displayio_input_pixel_t *input_pixel, displayio_output_pixel_t *output_color) { From ceb531086ed2e5d1e2ee1f1439820a5145fd981e Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Tue, 13 Oct 2020 14:22:02 +0530 Subject: [PATCH 023/145] Add method to set custom hostname --- locale/circuitpython.pot | 8 +++++-- .../boards/microdev_micro_s2/sdkconfig | 5 +++++ ports/esp32s2/common-hal/wifi/Radio.c | 4 ++++ shared-bindings/wifi/Radio.c | 22 +++++++++++++++++++ shared-bindings/wifi/Radio.h | 3 ++- 5 files changed, 39 insertions(+), 3 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index fc564feeaf..76681d2094 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-10 23:49-0700\n" +"POT-Creation-Date: 2020-10-12 14:16+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -947,6 +947,10 @@ msgstr "" msgid "Hardware in use, try alternative pins" msgstr "" +#: shared-bindings/wifi/Radio.c +msgid "Hostname must be between 1 and 63 characters" +msgstr "" + #: extmod/vfs_posix_file.c py/objstringio.c msgid "I/O operation on closed file" msgstr "" @@ -1026,6 +1030,7 @@ msgstr "" msgid "Invalid BSSID" msgstr "" +#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "" @@ -1237,7 +1242,6 @@ msgid "No CCCD for this Characteristic" msgstr "" #: ports/atmel-samd/common-hal/analogio/AnalogOut.c -#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "No DAC on chip" msgstr "" diff --git a/ports/esp32s2/boards/microdev_micro_s2/sdkconfig b/ports/esp32s2/boards/microdev_micro_s2/sdkconfig index 67ac6d2f37..4b8cc5cc36 100644 --- a/ports/esp32s2/boards/microdev_micro_s2/sdkconfig +++ b/ports/esp32s2/boards/microdev_micro_s2/sdkconfig @@ -32,3 +32,8 @@ CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set # end of SPI RAM config +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="microS2" +# end of LWIP diff --git a/ports/esp32s2/common-hal/wifi/Radio.c b/ports/esp32s2/common-hal/wifi/Radio.c index b62ad611b6..61d63e1f28 100644 --- a/ports/esp32s2/common-hal/wifi/Radio.c +++ b/ports/esp32s2/common-hal/wifi/Radio.c @@ -104,6 +104,10 @@ void common_hal_wifi_radio_stop_scanning_networks(wifi_radio_obj_t *self) { self->current_scan = NULL; } +void common_hal_wifi_radio_set_hostname(wifi_radio_obj_t *self, const char *hostname) { + esp_netif_set_hostname(self->netif, hostname); +} + wifi_radio_error_t common_hal_wifi_radio_connect(wifi_radio_obj_t *self, uint8_t* ssid, size_t ssid_len, uint8_t* password, size_t password_len, uint8_t channel, mp_float_t timeout, uint8_t* bssid, size_t bssid_len) { // check enabled start_station(self); diff --git a/shared-bindings/wifi/Radio.c b/shared-bindings/wifi/Radio.c index 928f21da90..9c774e1412 100644 --- a/shared-bindings/wifi/Radio.c +++ b/shared-bindings/wifi/Radio.c @@ -102,6 +102,26 @@ STATIC mp_obj_t wifi_radio_stop_scanning_networks(mp_obj_t self_in) { } STATIC MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_stop_scanning_networks_obj, wifi_radio_stop_scanning_networks); +//| def set_hostname(self, hostname: ReadableBuffer) -> None: +//| """Sets hostname for wifi interface. When the hostname is altered after interface started/connected +//| the changes would only be reflected once the interface restarts/reconnects.""" +//| ... +//| +STATIC mp_obj_t wifi_radio_set_hostname(mp_obj_t self_in, mp_obj_t hostname_in) { + mp_buffer_info_t hostname; + mp_get_buffer_raise(hostname_in, &hostname, MP_BUFFER_READ); + + if (hostname.len < 1 || hostname.len > 63) { + mp_raise_ValueError(translate("Hostname must be between 1 and 63 characters")); + } + + wifi_radio_obj_t *self = MP_OBJ_TO_PTR(self_in); + common_hal_wifi_radio_set_hostname(self, hostname.buf); + + return mp_const_none; +} +MP_DEFINE_CONST_FUN_OBJ_2(wifi_radio_set_hostname_obj, wifi_radio_set_hostname); + //| def connect(self, ssid: ReadableBuffer, password: ReadableBuffer = b"", *, channel: Optional[int] = 0, timeout: Optional[float] = None) -> bool: //| """Connects to the given ssid and waits for an ip address. Reconnections are handled //| automatically once one connection succeeds.""" @@ -216,6 +236,8 @@ STATIC const mp_rom_map_elem_t wifi_radio_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_start_scanning_networks), MP_ROM_PTR(&wifi_radio_start_scanning_networks_obj) }, { MP_ROM_QSTR(MP_QSTR_stop_scanning_networks), MP_ROM_PTR(&wifi_radio_stop_scanning_networks_obj) }, + { MP_ROM_QSTR(MP_QSTR_set_hostname), MP_ROM_PTR(&wifi_radio_set_hostname_obj) }, + { MP_ROM_QSTR(MP_QSTR_connect), MP_ROM_PTR(&wifi_radio_connect_obj) }, // { MP_ROM_QSTR(MP_QSTR_connect_to_enterprise), MP_ROM_PTR(&wifi_radio_connect_to_enterprise_obj) }, diff --git a/shared-bindings/wifi/Radio.h b/shared-bindings/wifi/Radio.h index b5341d51c9..4226ae2a96 100644 --- a/shared-bindings/wifi/Radio.h +++ b/shared-bindings/wifi/Radio.h @@ -35,7 +35,6 @@ const mp_obj_type_t wifi_radio_type; - typedef enum { WIFI_RADIO_ERROR_NONE, WIFI_RADIO_ERROR_UNKNOWN, @@ -46,6 +45,8 @@ typedef enum { extern bool common_hal_wifi_radio_get_enabled(wifi_radio_obj_t *self); extern void common_hal_wifi_radio_set_enabled(wifi_radio_obj_t *self, bool enabled); +extern void common_hal_wifi_radio_set_hostname(wifi_radio_obj_t *self, const char *hostname); + extern mp_obj_t common_hal_wifi_radio_get_mac_address(wifi_radio_obj_t *self); extern mp_obj_t common_hal_wifi_radio_start_scanning_networks(wifi_radio_obj_t *self); From 18fbff4f57e0c0b25ecaa3e1064c71b7a09f320b Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Wed, 14 Oct 2020 11:11:59 +0530 Subject: [PATCH 024/145] Update wifi hostname method --- ports/esp32s2/common-hal/wifi/Radio.c | 9 +++++++++ shared-bindings/wifi/Radio.c | 23 +++++++++++++++++------ shared-bindings/wifi/Radio.h | 1 + 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/ports/esp32s2/common-hal/wifi/Radio.c b/ports/esp32s2/common-hal/wifi/Radio.c index 61d63e1f28..5e349c09d1 100644 --- a/ports/esp32s2/common-hal/wifi/Radio.c +++ b/ports/esp32s2/common-hal/wifi/Radio.c @@ -104,6 +104,15 @@ void common_hal_wifi_radio_stop_scanning_networks(wifi_radio_obj_t *self) { self->current_scan = NULL; } +mp_obj_t common_hal_wifi_radio_get_hostname(wifi_radio_obj_t *self) { + const char *hostname = NULL; + esp_netif_get_hostname(self->netif, &hostname); + if (hostname == NULL) { + return mp_const_none; + } + return mp_obj_new_str(hostname, strlen(hostname)); +} + void common_hal_wifi_radio_set_hostname(wifi_radio_obj_t *self, const char *hostname) { esp_netif_set_hostname(self->netif, hostname); } diff --git a/shared-bindings/wifi/Radio.c b/shared-bindings/wifi/Radio.c index 9c774e1412..481294463a 100644 --- a/shared-bindings/wifi/Radio.c +++ b/shared-bindings/wifi/Radio.c @@ -50,7 +50,6 @@ //| STATIC mp_obj_t wifi_radio_get_enabled(mp_obj_t self) { return mp_obj_new_bool(common_hal_wifi_radio_get_enabled(self)); - } MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_enabled_obj, wifi_radio_get_enabled); @@ -102,11 +101,16 @@ STATIC mp_obj_t wifi_radio_stop_scanning_networks(mp_obj_t self_in) { } STATIC MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_stop_scanning_networks_obj, wifi_radio_stop_scanning_networks); -//| def set_hostname(self, hostname: ReadableBuffer) -> None: -//| """Sets hostname for wifi interface. When the hostname is altered after interface started/connected -//| the changes would only be reflected once the interface restarts/reconnects.""" -//| ... +//| hostname: ReadableBuffer +//| """Hostname for wifi interface. When the hostname is altered after interface started/connected +//| the changes would only be reflected once the interface restarts/reconnects.""" //| +STATIC mp_obj_t wifi_radio_get_hostname(mp_obj_t self_in) { + wifi_radio_obj_t *self = MP_OBJ_TO_PTR(self_in); + return common_hal_wifi_radio_get_hostname(self); +} +MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_hostname_obj, wifi_radio_get_hostname); + STATIC mp_obj_t wifi_radio_set_hostname(mp_obj_t self_in, mp_obj_t hostname_in) { mp_buffer_info_t hostname; mp_get_buffer_raise(hostname_in, &hostname, MP_BUFFER_READ); @@ -122,6 +126,13 @@ STATIC mp_obj_t wifi_radio_set_hostname(mp_obj_t self_in, mp_obj_t hostname_in) } MP_DEFINE_CONST_FUN_OBJ_2(wifi_radio_set_hostname_obj, wifi_radio_set_hostname); +const mp_obj_property_t wifi_radio_hostname_obj = { + .base.type = &mp_type_property, + .proxy = {(mp_obj_t)&wifi_radio_get_hostname_obj, + (mp_obj_t)&wifi_radio_set_hostname_obj, + (mp_obj_t)&mp_const_none_obj}, +}; + //| def connect(self, ssid: ReadableBuffer, password: ReadableBuffer = b"", *, channel: Optional[int] = 0, timeout: Optional[float] = None) -> bool: //| """Connects to the given ssid and waits for an ip address. Reconnections are handled //| automatically once one connection succeeds.""" @@ -236,7 +247,7 @@ STATIC const mp_rom_map_elem_t wifi_radio_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_start_scanning_networks), MP_ROM_PTR(&wifi_radio_start_scanning_networks_obj) }, { MP_ROM_QSTR(MP_QSTR_stop_scanning_networks), MP_ROM_PTR(&wifi_radio_stop_scanning_networks_obj) }, - { MP_ROM_QSTR(MP_QSTR_set_hostname), MP_ROM_PTR(&wifi_radio_set_hostname_obj) }, + { MP_ROM_QSTR(MP_QSTR_hostname), MP_ROM_PTR(&wifi_radio_hostname_obj) }, { MP_ROM_QSTR(MP_QSTR_connect), MP_ROM_PTR(&wifi_radio_connect_obj) }, // { MP_ROM_QSTR(MP_QSTR_connect_to_enterprise), MP_ROM_PTR(&wifi_radio_connect_to_enterprise_obj) }, diff --git a/shared-bindings/wifi/Radio.h b/shared-bindings/wifi/Radio.h index 4226ae2a96..a6a6161542 100644 --- a/shared-bindings/wifi/Radio.h +++ b/shared-bindings/wifi/Radio.h @@ -45,6 +45,7 @@ typedef enum { extern bool common_hal_wifi_radio_get_enabled(wifi_radio_obj_t *self); extern void common_hal_wifi_radio_set_enabled(wifi_radio_obj_t *self, bool enabled); +extern mp_obj_t common_hal_wifi_radio_get_hostname(wifi_radio_obj_t *self); extern void common_hal_wifi_radio_set_hostname(wifi_radio_obj_t *self, const char *hostname); extern mp_obj_t common_hal_wifi_radio_get_mac_address(wifi_radio_obj_t *self); From 2517e4b486563724771074da88bc7fd6eda02532 Mon Sep 17 00:00:00 2001 From: Jensen Date: Wed, 14 Oct 2020 21:51:22 -0500 Subject: [PATCH 025/145] displayio: ColorConverter handle if opaque color is black --- shared-bindings/displayio/ColorConverter.c | 15 +++++---------- shared-bindings/displayio/ColorConverter.h | 2 +- shared-module/displayio/ColorConverter.c | 9 +++------ 3 files changed, 9 insertions(+), 17 deletions(-) diff --git a/shared-bindings/displayio/ColorConverter.c b/shared-bindings/displayio/ColorConverter.c index a041bbe597..40550af82f 100644 --- a/shared-bindings/displayio/ColorConverter.c +++ b/shared-bindings/displayio/ColorConverter.c @@ -117,7 +117,7 @@ STATIC mp_obj_t displayio_colorconverter_make_transparent(mp_obj_t self_in, mp_o displayio_colorconverter_t *self = MP_OBJ_TO_PTR(self_in); mp_int_t transparent_color; - if (!mp_obj_get_int_maybe(transparent_color_obj, &transparent_color)) { + if (!mp_obj_get_int(&transparent_color)) { mp_raise_ValueError(translate("transparent_color should be an int")); } common_hal_displayio_colorconverter_make_transparent(self, transparent_color); @@ -125,20 +125,15 @@ STATIC mp_obj_t displayio_colorconverter_make_transparent(mp_obj_t self_in, mp_o } MP_DEFINE_CONST_FUN_OBJ_2(displayio_colorconverter_make_transparent_obj, displayio_colorconverter_make_transparent); -//| def make_opaque(self, pixel: int) -> None: +//| def make_opaque(self) -> None: //| """Sets a pixel to opaque.""" //| -STATIC mp_obj_t displayio_colorconverter_make_opaque(mp_obj_t self_in, mp_obj_t transparent_color_obj) { +STATIC mp_obj_t displayio_colorconverter_make_opaque(mp_obj_t self_in) { displayio_colorconverter_t *self = MP_OBJ_TO_PTR(self_in); - - mp_int_t transparent_color; - if (!mp_obj_get_int_maybe(transparent_color_obj, &transparent_color)) { - mp_raise_ValueError(translate("transparent_color should be an int")); - } - common_hal_displayio_colorconverter_make_opaque(self, transparent_color); + common_hal_displayio_colorconverter_make_opaque(self); return mp_const_none; } -MP_DEFINE_CONST_FUN_OBJ_2(displayio_colorconverter_make_opaque_obj, displayio_colorconverter_make_opaque); +MP_DEFINE_CONST_FUN_OBJ_1(displayio_colorconverter_make_opaque_obj, displayio_colorconverter_make_opaque); STATIC const mp_rom_map_elem_t displayio_colorconverter_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_convert), MP_ROM_PTR(&displayio_colorconverter_convert_obj) }, diff --git a/shared-bindings/displayio/ColorConverter.h b/shared-bindings/displayio/ColorConverter.h index 441f7c7aee..e4ddd1972d 100644 --- a/shared-bindings/displayio/ColorConverter.h +++ b/shared-bindings/displayio/ColorConverter.h @@ -40,6 +40,6 @@ void common_hal_displayio_colorconverter_set_dither(displayio_colorconverter_t* bool common_hal_displayio_colorconverter_get_dither(displayio_colorconverter_t* self); void common_hal_displayio_colorconverter_make_transparent(displayio_colorconverter_t* self, uint32_t transparent_color); -void common_hal_displayio_colorconverter_make_opaque(displayio_colorconverter_t* self, uint32_t transparent_color); +void common_hal_displayio_colorconverter_make_opaque(displayio_colorconverter_t* self); #endif // MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYIO_COLORCONVERTER_H diff --git a/shared-module/displayio/ColorConverter.c b/shared-module/displayio/ColorConverter.c index fef71cdf5e..4089b2265e 100644 --- a/shared-module/displayio/ColorConverter.c +++ b/shared-module/displayio/ColorConverter.c @@ -130,16 +130,13 @@ bool common_hal_displayio_colorconverter_get_dither(displayio_colorconverter_t* } void common_hal_displayio_colorconverter_make_transparent(displayio_colorconverter_t* self, uint32_t transparent_color) { - if (self->transparent_color) { - mp_raise_RuntimeError(translate("transparent_color value is already set")); + if (self->transparent_color >= 0x1000000) { + mp_raise_RuntimeError(translate("Only one color can be transparent at a time")); } self->transparent_color = transparent_color; } -void common_hal_displayio_colorconverter_make_opaque(displayio_colorconverter_t* self, uint32_t transparent_color) { - if (self->transparent_color != transparent_color) { - mp_raise_RuntimeError(translate("transparent_color value is not transparent")); - } +void common_hal_displayio_colorconverter_make_opaque(displayio_colorconverter_t* self) { // 0x1000000 will never equal a valid color self->transparent_color = 0x1000000; } From cb0a4abc9592378eb185bd04facf8db0b416a2fe Mon Sep 17 00:00:00 2001 From: Jensen Date: Wed, 14 Oct 2020 22:22:48 -0500 Subject: [PATCH 026/145] displayio: new translation strings --- locale/circuitpython.pot | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index ea29676b79..c4b40d3617 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-12 20:47-0500\n" +"POT-Creation-Date: 2020-10-14 22:22-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1026,6 +1026,7 @@ msgstr "" msgid "Invalid BSSID" msgstr "" +#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "" @@ -1237,7 +1238,6 @@ msgid "No CCCD for this Characteristic" msgstr "" #: ports/atmel-samd/common-hal/analogio/AnalogOut.c -#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "No DAC on chip" msgstr "" @@ -1400,6 +1400,10 @@ msgid "" "%d bpp given" msgstr "" +#: shared-module/displayio/ColorConverter.c +msgid "Only one color can be transparent at a time" +msgstr "" + #: shared-bindings/ipaddress/__init__.c msgid "Only raw int supported for ip" msgstr "" @@ -3408,14 +3412,6 @@ msgstr "" msgid "transparent_color should be an int" msgstr "" -#: shared-module/displayio/ColorConverter.c -msgid "transparent_color value is already set" -msgstr "" - -#: shared-module/displayio/ColorConverter.c -msgid "transparent_color value is not transparent" -msgstr "" - #: extmod/ulab/code/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "" From b02a5bcbd5eb96111ba30c49780677573fe1a66d Mon Sep 17 00:00:00 2001 From: Jensen Date: Wed, 14 Oct 2020 23:05:19 -0500 Subject: [PATCH 027/145] displayio: Remove verbose error --- shared-bindings/displayio/ColorConverter.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/shared-bindings/displayio/ColorConverter.c b/shared-bindings/displayio/ColorConverter.c index 40550af82f..4e41ceff15 100644 --- a/shared-bindings/displayio/ColorConverter.c +++ b/shared-bindings/displayio/ColorConverter.c @@ -116,10 +116,7 @@ const mp_obj_property_t displayio_colorconverter_dither_obj = { STATIC mp_obj_t displayio_colorconverter_make_transparent(mp_obj_t self_in, mp_obj_t transparent_color_obj) { displayio_colorconverter_t *self = MP_OBJ_TO_PTR(self_in); - mp_int_t transparent_color; - if (!mp_obj_get_int(&transparent_color)) { - mp_raise_ValueError(translate("transparent_color should be an int")); - } + mp_int_t transparent_color = mp_obj_get_int(&transparent_color); common_hal_displayio_colorconverter_make_transparent(self, transparent_color); return mp_const_none; } From 26fd2c62238bb2fad5c0b727e279157f3f6c02cb Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Thu, 15 Oct 2020 16:08:01 +0530 Subject: [PATCH 028/145] Add hostname validation --- locale/circuitpython.pot | 8 ++++++-- shared-bindings/wifi/Radio.c | 17 +++++++++++++---- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 76681d2094..cf92b0584a 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-12 14:16+0530\n" +"POT-Creation-Date: 2020-10-15 16:06+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -948,7 +948,7 @@ msgid "Hardware in use, try alternative pins" msgstr "" #: shared-bindings/wifi/Radio.c -msgid "Hostname must be between 1 and 63 characters" +msgid "Hostname must be between 1 and 253 characters" msgstr "" #: extmod/vfs_posix_file.c py/objstringio.c @@ -2732,6 +2732,10 @@ msgstr "" msgid "invalid format specifier" msgstr "" +#: shared-bindings/wifi/Radio.c +msgid "invalid hostname" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid key" msgstr "" diff --git a/shared-bindings/wifi/Radio.c b/shared-bindings/wifi/Radio.c index 481294463a..b548d66f6a 100644 --- a/shared-bindings/wifi/Radio.c +++ b/shared-bindings/wifi/Radio.c @@ -24,11 +24,13 @@ * THE SOFTWARE. */ +#include "shared-bindings/wifi/__init__.h" + +#include #include -#include "py/objproperty.h" #include "py/runtime.h" -#include "shared-bindings/wifi/__init__.h" +#include "py/objproperty.h" //| class Radio: //| """Native wifi radio. @@ -115,10 +117,17 @@ STATIC mp_obj_t wifi_radio_set_hostname(mp_obj_t self_in, mp_obj_t hostname_in) mp_buffer_info_t hostname; mp_get_buffer_raise(hostname_in, &hostname, MP_BUFFER_READ); - if (hostname.len < 1 || hostname.len > 63) { - mp_raise_ValueError(translate("Hostname must be between 1 and 63 characters")); + if (hostname.len < 1 || hostname.len > 253) { + mp_raise_ValueError(translate("Hostname must be between 1 and 253 characters")); } + regex_t regex; //validate hostname according to RFC 1123 + regcomp(®ex,"^(([a-z0-9]|[a-z0-9][a-z0-9\\-]{0,61}[a-z0-9])\\.)*([a-z0-9]|[a-z0-9][a-z0-9\\-]{0,61}[a-z0-9])$", REG_EXTENDED | REG_ICASE | REG_NOSUB); + if (regexec(®ex, hostname.buf, 0, NULL, 0)) { + mp_raise_ValueError(translate("invalid hostname")); + } + regfree(®ex); + wifi_radio_obj_t *self = MP_OBJ_TO_PTR(self_in); common_hal_wifi_radio_set_hostname(self, hostname.buf); From 97fae546595753b4d7c19344f5ed4d4a233a127c Mon Sep 17 00:00:00 2001 From: Enrique Casado Date: Thu, 15 Oct 2020 12:39:14 +0200 Subject: [PATCH 029/145] Add DynOSSAT-EDU boards --- .github/workflows/build.yml | 2 + .../boards/dynossat_edu_eps/board.c | 38 ++++++++++++++++ .../boards/dynossat_edu_eps/mpconfigboard.h | 40 +++++++++++++++++ .../boards/dynossat_edu_eps/mpconfigboard.mk | 23 ++++++++++ .../atmel-samd/boards/dynossat_edu_eps/pins.c | 32 ++++++++++++++ .../boards/dynossat_edu_obc/board.c | 38 ++++++++++++++++ .../boards/dynossat_edu_obc/mpconfigboard.h | 44 +++++++++++++++++++ .../boards/dynossat_edu_obc/mpconfigboard.mk | 15 +++++++ .../atmel-samd/boards/dynossat_edu_obc/pins.c | 40 +++++++++++++++++ 9 files changed, 272 insertions(+) create mode 100644 ports/atmel-samd/boards/dynossat_edu_eps/board.c create mode 100644 ports/atmel-samd/boards/dynossat_edu_eps/mpconfigboard.h create mode 100644 ports/atmel-samd/boards/dynossat_edu_eps/mpconfigboard.mk create mode 100644 ports/atmel-samd/boards/dynossat_edu_eps/pins.c create mode 100644 ports/atmel-samd/boards/dynossat_edu_obc/board.c create mode 100644 ports/atmel-samd/boards/dynossat_edu_obc/mpconfigboard.h create mode 100644 ports/atmel-samd/boards/dynossat_edu_obc/mpconfigboard.mk create mode 100644 ports/atmel-samd/boards/dynossat_edu_obc/pins.c diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0edc8c023d..b3455cb537 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -198,6 +198,8 @@ jobs: - "datum_imu" - "datum_light" - "datum_weather" + - "dynossat_edu_eps" + - "dynossat_edu_obc" - "electronut_labs_blip" - "electronut_labs_papyr" - "escornabot_makech" diff --git a/ports/atmel-samd/boards/dynossat_edu_eps/board.c b/ports/atmel-samd/boards/dynossat_edu_eps/board.c new file mode 100644 index 0000000000..c8e20206a1 --- /dev/null +++ b/ports/atmel-samd/boards/dynossat_edu_eps/board.c @@ -0,0 +1,38 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "boards/board.h" + +void board_init(void) +{ +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} diff --git a/ports/atmel-samd/boards/dynossat_edu_eps/mpconfigboard.h b/ports/atmel-samd/boards/dynossat_edu_eps/mpconfigboard.h new file mode 100644 index 0000000000..ef4fa8f997 --- /dev/null +++ b/ports/atmel-samd/boards/dynossat_edu_eps/mpconfigboard.h @@ -0,0 +1,40 @@ +#define MICROPY_HW_BOARD_NAME "DynOSSAT-EDU-EPS" +#define MICROPY_HW_MCU_NAME "samd21g18" + +#define MICROPY_HW_NEOPIXEL (&pin_PA06) + +#define SPI_FLASH_MOSI_PIN &pin_PA22 +#define SPI_FLASH_MISO_PIN &pin_PA21 +#define SPI_FLASH_SCK_PIN &pin_PA23 +#define SPI_FLASH_CS_PIN &pin_PA20 + +// These are pins not to reset. +#define MICROPY_PORT_A ( 0 ) +#define MICROPY_PORT_B ( 0 ) +#define MICROPY_PORT_C ( 0 ) + +#define BOARD_HAS_CRYSTAL 1 + +#define DEFAULT_I2C_BUS_SCL (&pin_PA09) +#define DEFAULT_I2C_BUS_SDA (&pin_PA08) + +#define DEFAULT_SPI_BUS_SCK (&pin_PB11) +#define DEFAULT_SPI_BUS_MOSI (&pin_PA12) +#define DEFAULT_SPI_BUS_MISO (&pin_PB10) + +#define DEFAULT_UART_BUS_RX (&pin_PA17) +#define DEFAULT_UART_BUS_TX (&pin_PA16) + +// USB is always used internally so skip the pin objects for it. +#define IGNORE_PIN_PA24 1 +#define IGNORE_PIN_PA25 1 +#define IGNORE_PIN_PA03 1 +#define IGNORE_PIN_PA13 1 +#define IGNORE_PIN_PA14 1 +#define IGNORE_PIN_PA15 1 +#define IGNORE_PIN_PA18 1 +#define IGNORE_PIN_PA27 1 +#define IGNORE_PIN_PA28 1 +#define IGNORE_PIN_PB08 1 +#define IGNORE_PIN_PB22 1 +#define IGNORE_PIN_PB23 1 diff --git a/ports/atmel-samd/boards/dynossat_edu_eps/mpconfigboard.mk b/ports/atmel-samd/boards/dynossat_edu_eps/mpconfigboard.mk new file mode 100644 index 0000000000..a1005e09da --- /dev/null +++ b/ports/atmel-samd/boards/dynossat_edu_eps/mpconfigboard.mk @@ -0,0 +1,23 @@ +USB_VID = 0 +USB_PID = 0 + +USB_PRODUCT = "DynOSSAT-EDU EPS v1.0" +USB_MANUFACTURER = "Blackhand Dynamics SL" + +CHIP_VARIANT = SAMD21G18A +CHIP_FAMILY = samd21 + +SPI_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICE_COUNT = 1 +EXTERNAL_FLASH_DEVICES = "GD25Q32C" +LONGINT_IMPL = MPZ + +CIRCUITPY_BITBANGIO = 0 +CIRCUITPY_FREQUENCYIO = 0 +CIRCUITPY_COUNTIO = 0 +CIRCUITPY_I2CPERIPHERAL = 0 +CIRCUITPY_VECTORIO = 0 + +CFLAGS_INLINE_LIMIT = 60 + +SUPEROPT_GC = 0 diff --git a/ports/atmel-samd/boards/dynossat_edu_eps/pins.c b/ports/atmel-samd/boards/dynossat_edu_eps/pins.c new file mode 100644 index 0000000000..a910311d4a --- /dev/null +++ b/ports/atmel-samd/boards/dynossat_edu_eps/pins.c @@ -0,0 +1,32 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PB11) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA12) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PB10) }, + { MP_ROM_QSTR(MP_QSTR_D30), MP_ROM_PTR(&pin_PA30) }, + { MP_ROM_QSTR(MP_QSTR_D31), MP_ROM_PTR(&pin_PA31) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA07) }, + { MP_ROM_QSTR(MP_QSTR_OVTEMP), MP_ROM_PTR(&pin_PA07) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA16) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA08) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA09) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA11) }, + { MP_ROM_QSTR(MP_QSTR_SAT_RESET), MP_ROM_PTR(&pin_PA11) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA10) }, + { MP_ROM_QSTR(MP_QSTR_SAT_PWR_ENABLE), MP_ROM_PTR(&pin_PA10) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA19) }, + { MP_ROM_QSTR(MP_QSTR_INT_IMU_OBC), MP_ROM_PTR(&pin_PA19) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PB03) }, + { MP_ROM_QSTR(MP_QSTR_PWRMON_SDA), MP_ROM_PTR(&pin_PA04) }, + { MP_ROM_QSTR(MP_QSTR_PWRMON_SCL), MP_ROM_PTR(&pin_PA05) }, + { MP_ROM_QSTR(MP_QSTR_PWRMON_ALERT), MP_ROM_PTR(&pin_PB03) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA06) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA06) }, + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_I2C_MONITOR), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/atmel-samd/boards/dynossat_edu_obc/board.c b/ports/atmel-samd/boards/dynossat_edu_obc/board.c new file mode 100644 index 0000000000..c8e20206a1 --- /dev/null +++ b/ports/atmel-samd/boards/dynossat_edu_obc/board.c @@ -0,0 +1,38 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "boards/board.h" + +void board_init(void) +{ +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} diff --git a/ports/atmel-samd/boards/dynossat_edu_obc/mpconfigboard.h b/ports/atmel-samd/boards/dynossat_edu_obc/mpconfigboard.h new file mode 100644 index 0000000000..d7df8db74d --- /dev/null +++ b/ports/atmel-samd/boards/dynossat_edu_obc/mpconfigboard.h @@ -0,0 +1,44 @@ +#define MICROPY_HW_BOARD_NAME "DynOSSAT-EDU-OBC" +#define MICROPY_HW_MCU_NAME "samd51j20" + +#define MICROPY_HW_NEOPIXEL (&pin_PA08) + +#define SPI_FLASH_MOSI_PIN &pin_PA16 +#define SPI_FLASH_MISO_PIN &pin_PA18 +#define SPI_FLASH_SCK_PIN &pin_PA17 +#define SPI_FLASH_CS_PIN &pin_PA19 + +// These are pins not to reset. +#define MICROPY_PORT_A ( PORT_PA16 | PORT_PA17 | PORT_PA18 | PORT_PA19 ) +#define MICROPY_PORT_B ( 0 ) +#define MICROPY_PORT_C ( 0 ) +#define MICROPY_PORT_D ( 0 ) + +#define BOARD_HAS_CRYSTAL 1 + +#define DEFAULT_I2C_BUS_SCL (&pin_PB13) +#define DEFAULT_I2C_BUS_SDA (&pin_PB12) + +#define DEFAULT_SPI_BUS_SCK (&pin_PB03) +#define DEFAULT_SPI_BUS_MOSI (&pin_PB02) +#define DEFAULT_SPI_BUS_MISO (&pin_PB01) + +#define DEFAULT_UART_BUS_RX (&pin_PA23) +#define DEFAULT_UART_BUS_TX (&pin_PA22) + +// USB is always used internally so skip the pin objects for it. +#define IGNORE_PIN_PA24 1 +#define IGNORE_PIN_PA25 1 +#define IGNORE_PIN_PA02 1 +#define IGNORE_PIN_PA13 1 +#define IGNORE_PIN_PA14 1 +#define IGNORE_PIN_PA20 1 +#define IGNORE_PIN_PA21 1 +#define IGNORE_PIN_PA27 1 +#define IGNORE_PIN_PB00 1 +#define IGNORE_PIN_PB04 1 +#define IGNORE_PIN_PB05 1 +#define IGNORE_PIN_PB16 1 +#define IGNORE_PIN_PB17 1 +#define IGNORE_PIN_PB23 1 +#define IGNORE_PIN_PB31 1 diff --git a/ports/atmel-samd/boards/dynossat_edu_obc/mpconfigboard.mk b/ports/atmel-samd/boards/dynossat_edu_obc/mpconfigboard.mk new file mode 100644 index 0000000000..d5c626d130 --- /dev/null +++ b/ports/atmel-samd/boards/dynossat_edu_obc/mpconfigboard.mk @@ -0,0 +1,15 @@ +USB_VID = 0 +USB_PID = 0 +USB_PRODUCT = "DynOSSAT-EDU OBC v1.0" +USB_MANUFACTURER = "Blackhand Dynamics SL" + +CHIP_VARIANT = SAMD51J20A +CHIP_FAMILY = samd51 + +SPI_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICE_COUNT = 1 +EXTERNAL_FLASH_DEVICES = GD25Q32C +LONGINT_IMPL = MPZ + +CFLAGS_INLINE_LIMIT = 60 +SUPEROPT_GC = 0 diff --git a/ports/atmel-samd/boards/dynossat_edu_obc/pins.c b/ports/atmel-samd/boards/dynossat_edu_obc/pins.c new file mode 100644 index 0000000000..a560360f7d --- /dev/null +++ b/ports/atmel-samd/boards/dynossat_edu_obc/pins.c @@ -0,0 +1,40 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA07) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA06) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA05) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA04) }, + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PB09) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PB08) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PB03) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB02) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PB01) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PB15) }, + { MP_ROM_QSTR(MP_QSTR_D30), MP_ROM_PTR(&pin_PA22) }, + { MP_ROM_QSTR(MP_QSTR_D31), MP_ROM_PTR(&pin_PA23) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA23) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PB14) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA22) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PB12) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PB13) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PB11) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PB10) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA11) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PA10) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA09) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PB07) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PB06) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PB30) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA08) }, + { MP_ROM_QSTR(MP_QSTR_D32), MP_ROM_PTR(&pin_PA30) }, + { MP_ROM_QSTR(MP_QSTR_D33), MP_ROM_PTR(&pin_PA31) }, + { MP_ROM_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_PB22) }, + { MP_ROM_QSTR(MP_QSTR_INT_IMU), MP_ROM_PTR(&pin_PA12) }, + { MP_ROM_QSTR(MP_QSTR_SAT_POWER), MP_ROM_PTR(&pin_PA15) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA08) }, + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); From 82b49afe43494bb1d05bd7786a4f75a0288bf695 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Thu, 15 Oct 2020 11:15:48 -0400 Subject: [PATCH 030/145] enable CIRCUITPY_BLEIO_HCI on non-nRF boards where it will fit --- .../boards/metro_m4_airlift_lite/mpconfigboard.mk | 4 ---- ports/atmel-samd/mpconfigport.mk | 3 +++ ports/nrf/mpconfigport.mk | 3 +++ py/circuitpy_mpconfig.mk | 10 +++++----- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.mk b/ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.mk index e999629c32..4895cda77b 100644 --- a/ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.mk +++ b/ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.mk @@ -6,10 +6,6 @@ USB_MANUFACTURER = "Adafruit Industries LLC" CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 -# Support _bleio via the on-board ESP32 module. -CIRCUITPY_BLEIO = 1 -CIRCUITPY_BLEIO_HCI = 1 - QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 3 EXTERNAL_FLASH_DEVICES = "S25FL116K, S25FL216K, GD25Q16C" diff --git a/ports/atmel-samd/mpconfigport.mk b/ports/atmel-samd/mpconfigport.mk index a16daf4b00..1929e146d3 100644 --- a/ports/atmel-samd/mpconfigport.mk +++ b/ports/atmel-samd/mpconfigport.mk @@ -37,6 +37,9 @@ ifndef CIRCUITPY_TOUCHIO_USE_NATIVE CIRCUITPY_TOUCHIO_USE_NATIVE = 1 endif +# No room for HCI _bleio on SAMD21. +CIRCUITPY_BLEIO_HCI = 0 + CIRCUITPY_SDCARDIO ?= 0 # Not enough RAM for framebuffers diff --git a/ports/nrf/mpconfigport.mk b/ports/nrf/mpconfigport.mk index ed689545d0..9560064fbc 100644 --- a/ports/nrf/mpconfigport.mk +++ b/ports/nrf/mpconfigport.mk @@ -23,6 +23,9 @@ CIRCUITPY_AUDIOCORE ?= 1 CIRCUITPY_AUDIOMIXER ?= 1 CIRCUITPY_AUDIOPWMIO ?= 1 +# Native BLEIO is not compatible with HCI _bleio. +CIRCUITPY_BLEIO_HCI = 0 + CIRCUITPY_BLEIO ?= 1 # No I2CPeripheral implementation diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index 91850448db..a6aabec33d 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -79,14 +79,14 @@ CFLAGS += -DCIRCUITPY_AUDIOMP3=$(CIRCUITPY_AUDIOMP3) CIRCUITPY_BITBANGIO ?= $(CIRCUITPY_FULL_BUILD) CFLAGS += -DCIRCUITPY_BITBANGIO=$(CIRCUITPY_BITBANGIO) -# Explicitly enabled for boards that support _bleio. -CIRCUITPY_BLEIO ?= 0 -CFLAGS += -DCIRCUITPY_BLEIO=$(CIRCUITPY_BLEIO) - # _bleio can be supported on most any board via HCI -CIRCUITPY_BLEIO_HCI ?= 0 +CIRCUITPY_BLEIO_HCI ?= $(CIRCUITPY_FULL_BUILD) CFLAGS += -DCIRCUITPY_BLEIO_HCI=$(CIRCUITPY_BLEIO_HCI) +# Explicitly enabled for boards that support _bleio. +CIRCUITPY_BLEIO ?= $(CIRCUITPY_BLEIO_HCI) +CFLAGS += -DCIRCUITPY_BLEIO=$(CIRCUITPY_BLEIO) + CIRCUITPY_BOARD ?= 1 CFLAGS += -DCIRCUITPY_BOARD=$(CIRCUITPY_BOARD) From f36336e17114d91bb85bf67665bd3adde409e14d Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 15 Oct 2020 18:06:57 +0000 Subject: [PATCH 031/145] Translated using Weblate (French) Currently translated at 92.1% (767 of 832 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fr/ --- locale/fr.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/locale/fr.po b/locale/fr.po index 500f0a091d..15f4c32f23 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-10-10 23:49-0700\n" -"PO-Revision-Date: 2020-10-12 21:00+0000\n" -"Last-Translator: Noel Gaetan \n" +"PO-Revision-Date: 2020-10-15 18:07+0000\n" +"Last-Translator: Jeff Epler \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" @@ -46,7 +46,7 @@ msgstr " Fichier \"%q\", ligne %d" #: main.c msgid " output:\n" -msgstr " sortie :\n" +msgstr " sortie :\n" #: py/objstr.c #, c-format From 9a2ab36fa53c622b249b872a6ee47943385c9f36 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 15 Oct 2020 18:13:02 +0000 Subject: [PATCH 032/145] Translated using Weblate (French) Currently translated at 92.1% (767 of 832 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fr/ --- locale/fr.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/locale/fr.po b/locale/fr.po index 15f4c32f23..0e7cd1df33 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-10-10 23:49-0700\n" -"PO-Revision-Date: 2020-10-15 18:07+0000\n" +"PO-Revision-Date: 2020-10-15 18:17+0000\n" "Last-Translator: Jeff Epler \n" "Language: fr\n" "MIME-Version: 1.0\n" @@ -532,7 +532,7 @@ msgstr "Impossible de définir CCCD sur une caractéristique locale" #: shared-bindings/_bleio/Adapter.c msgid "Cannot create a new Adapter; use _bleio.adapter;" msgstr "" -"Un nouveau Adapter ne peut être créé ; Adapter; utilisez _bleio.adapter;" +"Un nouveau Adapter ne peut être créé ; Adapter; utilisez _bleio.adapter;" #: shared-bindings/displayio/Bitmap.c #: shared-bindings/memorymonitor/AllocationSize.c @@ -3613,7 +3613,7 @@ msgstr "caractère de format '%c' (0x%x) non supporté à l'index %d" #: py/runtime.c msgid "unsupported type for %q: '%q'" -msgstr "type non supporté pour %q : '%q'" +msgstr "type non supporté pour %q : '%q'" #: py/runtime.c msgid "unsupported type for operator" From 6bfb6afacab099f0892735dce2bdcccffcfa6782 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Thu, 15 Oct 2020 20:17:16 +0200 Subject: [PATCH 033/145] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ --- locale/ID.po | 12 ++++++++++-- locale/cs.po | 12 ++++++++++-- locale/de_DE.po | 12 ++++++++++-- locale/el.po | 12 ++++++++++-- locale/es.po | 12 ++++++++++-- locale/fil.po | 12 ++++++++++-- locale/fr.po | 12 ++++++++++-- locale/hi.po | 12 ++++++++++-- locale/it_IT.po | 12 ++++++++++-- locale/ja.po | 12 ++++++++++-- locale/ko.po | 12 ++++++++++-- locale/nl.po | 12 ++++++++++-- locale/pl.po | 12 ++++++++++-- locale/pt_BR.po | 12 ++++++++++-- locale/sv.po | 12 ++++++++++-- locale/zh_Latn_pinyin.po | 12 ++++++++++-- 16 files changed, 160 insertions(+), 32 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index 61af353825..f35afea66d 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-10 23:49-0700\n" +"POT-Creation-Date: 2020-10-15 16:06+0530\n" "PO-Revision-Date: 2020-10-10 23:51+0000\n" "Last-Translator: oon arfiandwi \n" "Language-Team: LANGUAGE \n" @@ -966,6 +966,10 @@ msgstr "Perangkat keras sibuk, coba pin alternatif" msgid "Hardware in use, try alternative pins" msgstr "Perangkat keras sedang digunakan, coba pin alternatif" +#: shared-bindings/wifi/Radio.c +msgid "Hostname must be between 1 and 253 characters" +msgstr "" + #: extmod/vfs_posix_file.c py/objstringio.c msgid "I/O operation on closed file" msgstr "operasi I/O pada file tertutup" @@ -1047,6 +1051,7 @@ msgstr "File BMP tidak valid" msgid "Invalid BSSID" msgstr "" +#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "Pin DAC yang diberikan tidak valid" @@ -1258,7 +1263,6 @@ msgid "No CCCD for this Characteristic" msgstr "Tidak ada CCCD untuk Karakteristik ini" #: ports/atmel-samd/common-hal/analogio/AnalogOut.c -#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "No DAC on chip" msgstr "Tidak ada DAC (Digital Analog Converter) di dalam chip" @@ -2775,6 +2779,10 @@ msgstr "format tidak valid" msgid "invalid format specifier" msgstr "" +#: shared-bindings/wifi/Radio.c +msgid "invalid hostname" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid key" msgstr "key tidak valid" diff --git a/locale/cs.po b/locale/cs.po index 6c5e871637..d7caa43ea1 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-10 23:49-0700\n" +"POT-Creation-Date: 2020-10-15 16:06+0530\n" "PO-Revision-Date: 2020-05-24 03:22+0000\n" "Last-Translator: dronecz \n" "Language-Team: LANGUAGE \n" @@ -951,6 +951,10 @@ msgstr "" msgid "Hardware in use, try alternative pins" msgstr "" +#: shared-bindings/wifi/Radio.c +msgid "Hostname must be between 1 and 253 characters" +msgstr "" + #: extmod/vfs_posix_file.c py/objstringio.c msgid "I/O operation on closed file" msgstr "" @@ -1030,6 +1034,7 @@ msgstr "" msgid "Invalid BSSID" msgstr "" +#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "" @@ -1241,7 +1246,6 @@ msgid "No CCCD for this Characteristic" msgstr "" #: ports/atmel-samd/common-hal/analogio/AnalogOut.c -#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "No DAC on chip" msgstr "" @@ -2732,6 +2736,10 @@ msgstr "" msgid "invalid format specifier" msgstr "" +#: shared-bindings/wifi/Radio.c +msgid "invalid hostname" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid key" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index 5633ae9c08..89969e8748 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-10 23:49-0700\n" +"POT-Creation-Date: 2020-10-15 16:06+0530\n" "PO-Revision-Date: 2020-06-16 18:24+0000\n" "Last-Translator: Andreas Buchen \n" "Language: de_DE\n" @@ -966,6 +966,10 @@ msgstr "Hardware beschäftigt, versuchen Sie alternative Pins" msgid "Hardware in use, try alternative pins" msgstr "Hardware in benutzung, probiere alternative Pins" +#: shared-bindings/wifi/Radio.c +msgid "Hostname must be between 1 and 253 characters" +msgstr "" + #: extmod/vfs_posix_file.c py/objstringio.c msgid "I/O operation on closed file" msgstr "Lese/Schreibe-operation an geschlossener Datei" @@ -1047,6 +1051,7 @@ msgstr "Ungültige BMP-Datei" msgid "Invalid BSSID" msgstr "" +#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "Ungültiger DAC-Pin angegeben" @@ -1260,7 +1265,6 @@ msgid "No CCCD for this Characteristic" msgstr "Kein CCCD für diese Charakteristik" #: ports/atmel-samd/common-hal/analogio/AnalogOut.c -#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "No DAC on chip" msgstr "Kein DAC im Chip vorhanden" @@ -2803,6 +2807,10 @@ msgstr "ungültiges Format" msgid "invalid format specifier" msgstr "ungültiger Formatbezeichner" +#: shared-bindings/wifi/Radio.c +msgid "invalid hostname" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid key" msgstr "ungültiger Schlüssel" diff --git a/locale/el.po b/locale/el.po index 4202f6ae06..42b083e3c9 100644 --- a/locale/el.po +++ b/locale/el.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-10 23:49-0700\n" +"POT-Creation-Date: 2020-10-15 16:06+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -946,6 +946,10 @@ msgstr "" msgid "Hardware in use, try alternative pins" msgstr "" +#: shared-bindings/wifi/Radio.c +msgid "Hostname must be between 1 and 253 characters" +msgstr "" + #: extmod/vfs_posix_file.c py/objstringio.c msgid "I/O operation on closed file" msgstr "" @@ -1025,6 +1029,7 @@ msgstr "" msgid "Invalid BSSID" msgstr "" +#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "" @@ -1236,7 +1241,6 @@ msgid "No CCCD for this Characteristic" msgstr "" #: ports/atmel-samd/common-hal/analogio/AnalogOut.c -#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "No DAC on chip" msgstr "" @@ -2727,6 +2731,10 @@ msgstr "" msgid "invalid format specifier" msgstr "" +#: shared-bindings/wifi/Radio.c +msgid "invalid hostname" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid key" msgstr "" diff --git a/locale/es.po b/locale/es.po index 1b006e1d1e..16254aa5e7 100644 --- a/locale/es.po +++ b/locale/es.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-10 23:49-0700\n" +"POT-Creation-Date: 2020-10-15 16:06+0530\n" "PO-Revision-Date: 2020-10-09 17:19+0000\n" "Last-Translator: dherrada \n" "Language-Team: \n" @@ -967,6 +967,10 @@ msgstr "Hardware ocupado, pruebe pines alternativos" msgid "Hardware in use, try alternative pins" msgstr "Hardware en uso, pruebe pines alternativos" +#: shared-bindings/wifi/Radio.c +msgid "Hostname must be between 1 and 253 characters" +msgstr "" + #: extmod/vfs_posix_file.c py/objstringio.c msgid "I/O operation on closed file" msgstr "Operación I/O en archivo cerrado" @@ -1048,6 +1052,7 @@ msgstr "Archivo BMP inválido" msgid "Invalid BSSID" msgstr "BSSID inválido" +#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "Pin suministrado inválido para DAC" @@ -1259,7 +1264,6 @@ msgid "No CCCD for this Characteristic" msgstr "No hay CCCD para esta característica" #: ports/atmel-samd/common-hal/analogio/AnalogOut.c -#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "No DAC on chip" msgstr "El chip no tiene DAC" @@ -2797,6 +2801,10 @@ msgstr "formato inválido" msgid "invalid format specifier" msgstr "especificador de formato inválido" +#: shared-bindings/wifi/Radio.c +msgid "invalid hostname" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid key" msgstr "llave inválida" diff --git a/locale/fil.po b/locale/fil.po index f71a0a757a..ecda65cb21 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-10 23:49-0700\n" +"POT-Creation-Date: 2020-10-15 16:06+0530\n" "PO-Revision-Date: 2018-12-20 22:15-0800\n" "Last-Translator: Timothy \n" "Language-Team: fil\n" @@ -959,6 +959,10 @@ msgstr "" msgid "Hardware in use, try alternative pins" msgstr "" +#: shared-bindings/wifi/Radio.c +msgid "Hostname must be between 1 and 253 characters" +msgstr "" + #: extmod/vfs_posix_file.c py/objstringio.c msgid "I/O operation on closed file" msgstr "I/O operasyon sa saradong file" @@ -1040,6 +1044,7 @@ msgstr "Mali ang BMP file" msgid "Invalid BSSID" msgstr "" +#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "" @@ -1251,7 +1256,6 @@ msgid "No CCCD for this Characteristic" msgstr "" #: ports/atmel-samd/common-hal/analogio/AnalogOut.c -#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "No DAC on chip" msgstr "Walang DAC sa chip" @@ -2772,6 +2776,10 @@ msgstr "hindi wastong pag-format" msgid "invalid format specifier" msgstr "mali ang format specifier" +#: shared-bindings/wifi/Radio.c +msgid "invalid hostname" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid key" msgstr "mali ang key" diff --git a/locale/fr.po b/locale/fr.po index 0e7cd1df33..482fd28097 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-10 23:49-0700\n" +"POT-Creation-Date: 2020-10-15 16:06+0530\n" "PO-Revision-Date: 2020-10-15 18:17+0000\n" "Last-Translator: Jeff Epler \n" "Language: fr\n" @@ -972,6 +972,10 @@ msgstr "Matériel occupé, essayez d'autres broches" msgid "Hardware in use, try alternative pins" msgstr "Matériel utilisé, essayez d'autres broches" +#: shared-bindings/wifi/Radio.c +msgid "Hostname must be between 1 and 253 characters" +msgstr "" + #: extmod/vfs_posix_file.c py/objstringio.c msgid "I/O operation on closed file" msgstr "opération d'E/S sur un fichier fermé" @@ -1053,6 +1057,7 @@ msgstr "Fichier BMP invalide" msgid "Invalid BSSID" msgstr "BSSID Invalide" +#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "Broche DAC non valide fournie" @@ -1264,7 +1269,6 @@ msgid "No CCCD for this Characteristic" msgstr "Pas de CCCD pour cette caractéristique" #: ports/atmel-samd/common-hal/analogio/AnalogOut.c -#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "No DAC on chip" msgstr "Pas de DAC sur la puce" @@ -2812,6 +2816,10 @@ msgstr "format invalide" msgid "invalid format specifier" msgstr "spécification de format invalide" +#: shared-bindings/wifi/Radio.c +msgid "invalid hostname" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid key" msgstr "clé invalide" diff --git a/locale/hi.po b/locale/hi.po index 79b9e5105a..88c795a7ce 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-10 23:49-0700\n" +"POT-Creation-Date: 2020-10-15 16:06+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -946,6 +946,10 @@ msgstr "" msgid "Hardware in use, try alternative pins" msgstr "" +#: shared-bindings/wifi/Radio.c +msgid "Hostname must be between 1 and 253 characters" +msgstr "" + #: extmod/vfs_posix_file.c py/objstringio.c msgid "I/O operation on closed file" msgstr "" @@ -1025,6 +1029,7 @@ msgstr "" msgid "Invalid BSSID" msgstr "" +#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "" @@ -1236,7 +1241,6 @@ msgid "No CCCD for this Characteristic" msgstr "" #: ports/atmel-samd/common-hal/analogio/AnalogOut.c -#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "No DAC on chip" msgstr "" @@ -2727,6 +2731,10 @@ msgstr "" msgid "invalid format specifier" msgstr "" +#: shared-bindings/wifi/Radio.c +msgid "invalid hostname" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid key" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index ef86aa78ac..1650a5bdbd 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-10 23:49-0700\n" +"POT-Creation-Date: 2020-10-15 16:06+0530\n" "PO-Revision-Date: 2018-10-02 16:27+0200\n" "Last-Translator: Enrico Paganin \n" "Language-Team: \n" @@ -959,6 +959,10 @@ msgstr "" msgid "Hardware in use, try alternative pins" msgstr "" +#: shared-bindings/wifi/Radio.c +msgid "Hostname must be between 1 and 253 characters" +msgstr "" + #: extmod/vfs_posix_file.c py/objstringio.c msgid "I/O operation on closed file" msgstr "operazione I/O su file chiuso" @@ -1040,6 +1044,7 @@ msgstr "File BMP non valido" msgid "Invalid BSSID" msgstr "" +#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "" @@ -1255,7 +1260,6 @@ msgid "No CCCD for this Characteristic" msgstr "" #: ports/atmel-samd/common-hal/analogio/AnalogOut.c -#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "No DAC on chip" msgstr "Nessun DAC sul chip" @@ -2773,6 +2777,10 @@ msgstr "formato non valido" msgid "invalid format specifier" msgstr "specificatore di formato non valido" +#: shared-bindings/wifi/Radio.c +msgid "invalid hostname" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid key" msgstr "chiave non valida" diff --git a/locale/ja.po b/locale/ja.po index 283149eee4..01900d9a8f 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-10 23:49-0700\n" +"POT-Creation-Date: 2020-10-15 16:06+0530\n" "PO-Revision-Date: 2020-09-25 18:20+0000\n" "Last-Translator: Taku Fukada \n" "Language-Team: none\n" @@ -959,6 +959,10 @@ msgstr "ハードウェアビジー。代替のピンを試してください" msgid "Hardware in use, try alternative pins" msgstr "ハードウェア使用中。代わりのピンを試してください" +#: shared-bindings/wifi/Radio.c +msgid "Hostname must be between 1 and 253 characters" +msgstr "" + #: extmod/vfs_posix_file.c py/objstringio.c msgid "I/O operation on closed file" msgstr "閉じられたファイルへのI/O操作" @@ -1040,6 +1044,7 @@ msgstr "不正なBMPファイル" msgid "Invalid BSSID" msgstr "" +#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "不正なDACピンが与えられました" @@ -1251,7 +1256,6 @@ msgid "No CCCD for this Characteristic" msgstr "" #: ports/atmel-samd/common-hal/analogio/AnalogOut.c -#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "No DAC on chip" msgstr "チップにDACがありません" @@ -2757,6 +2761,10 @@ msgstr "" msgid "invalid format specifier" msgstr "" +#: shared-bindings/wifi/Radio.c +msgid "invalid hostname" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid key" msgstr "不正な鍵" diff --git a/locale/ko.po b/locale/ko.po index 48ecb77372..a9bc60f781 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-10 23:49-0700\n" +"POT-Creation-Date: 2020-10-15 16:06+0530\n" "PO-Revision-Date: 2020-10-05 12:12+0000\n" "Last-Translator: Michal Čihař \n" "Language-Team: LANGUAGE \n" @@ -951,6 +951,10 @@ msgstr "" msgid "Hardware in use, try alternative pins" msgstr "" +#: shared-bindings/wifi/Radio.c +msgid "Hostname must be between 1 and 253 characters" +msgstr "" + #: extmod/vfs_posix_file.c py/objstringio.c msgid "I/O operation on closed file" msgstr "" @@ -1030,6 +1034,7 @@ msgstr "" msgid "Invalid BSSID" msgstr "" +#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "" @@ -1241,7 +1246,6 @@ msgid "No CCCD for this Characteristic" msgstr "" #: ports/atmel-samd/common-hal/analogio/AnalogOut.c -#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "No DAC on chip" msgstr "" @@ -2733,6 +2737,10 @@ msgstr "형식가 유효하지 않습니다" msgid "invalid format specifier" msgstr "형식 지정자(format specifier)가 유효하지 않습니다" +#: shared-bindings/wifi/Radio.c +msgid "invalid hostname" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid key" msgstr "키가 유효하지 않습니다" diff --git a/locale/nl.po b/locale/nl.po index c979b5dce6..edcaefb832 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-10 23:49-0700\n" +"POT-Creation-Date: 2020-10-15 16:06+0530\n" "PO-Revision-Date: 2020-09-09 16:05+0000\n" "Last-Translator: Jelle Jager \n" "Language-Team: none\n" @@ -961,6 +961,10 @@ msgstr "Hardware bezig, probeer alternatieve pinnen" msgid "Hardware in use, try alternative pins" msgstr "Hardware in gebruik, probeer alternatieve pinnen" +#: shared-bindings/wifi/Radio.c +msgid "Hostname must be between 1 and 253 characters" +msgstr "" + #: extmod/vfs_posix_file.c py/objstringio.c msgid "I/O operation on closed file" msgstr "I/O actie op gesloten bestand" @@ -1042,6 +1046,7 @@ msgstr "Ongeldig BMP bestand" msgid "Invalid BSSID" msgstr "" +#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "Ongeldige DAC pin opgegeven" @@ -1253,7 +1258,6 @@ msgid "No CCCD for this Characteristic" msgstr "Geen CCCD voor deze Characteristic" #: ports/atmel-samd/common-hal/analogio/AnalogOut.c -#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "No DAC on chip" msgstr "Geen DAC op de chip" @@ -2784,6 +2788,10 @@ msgstr "ongeldig formaat" msgid "invalid format specifier" msgstr "ongeldige formaatspecificatie" +#: shared-bindings/wifi/Radio.c +msgid "invalid hostname" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid key" msgstr "ongeldige sleutel" diff --git a/locale/pl.po b/locale/pl.po index 50d519f6aa..b79fcc606b 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-10 23:49-0700\n" +"POT-Creation-Date: 2020-10-15 16:06+0530\n" "PO-Revision-Date: 2020-09-29 01:39+0000\n" "Last-Translator: Maciej Stankiewicz \n" "Language-Team: pl\n" @@ -959,6 +959,10 @@ msgstr "Sprzęt zajęty, wypróbuj alternatywne piny" msgid "Hardware in use, try alternative pins" msgstr "Sprzęt w użyciu, wypróbuj alternatywne piny" +#: shared-bindings/wifi/Radio.c +msgid "Hostname must be between 1 and 253 characters" +msgstr "" + #: extmod/vfs_posix_file.c py/objstringio.c msgid "I/O operation on closed file" msgstr "Operacja I/O na zamkniętym pliku" @@ -1040,6 +1044,7 @@ msgstr "Zły BMP" msgid "Invalid BSSID" msgstr "" +#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "" @@ -1252,7 +1257,6 @@ msgid "No CCCD for this Characteristic" msgstr "" #: ports/atmel-samd/common-hal/analogio/AnalogOut.c -#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "No DAC on chip" msgstr "Brak DAC" @@ -2750,6 +2754,10 @@ msgstr "zły format" msgid "invalid format specifier" msgstr "zła specyfikacja formatu" +#: shared-bindings/wifi/Radio.c +msgid "invalid hostname" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid key" msgstr "zły klucz" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index a8e1633898..a402cb07aa 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-10 23:49-0700\n" +"POT-Creation-Date: 2020-10-15 16:06+0530\n" "PO-Revision-Date: 2020-10-13 17:11+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" @@ -970,6 +970,10 @@ msgstr "O hardware está ocupado, tente os pinos alternativos" msgid "Hardware in use, try alternative pins" msgstr "O hardware está em uso, tente os pinos alternativos" +#: shared-bindings/wifi/Radio.c +msgid "Hostname must be between 1 and 253 characters" +msgstr "" + #: extmod/vfs_posix_file.c py/objstringio.c msgid "I/O operation on closed file" msgstr "Operação I/O no arquivo fechado" @@ -1051,6 +1055,7 @@ msgstr "Arquivo BMP inválido" msgid "Invalid BSSID" msgstr "BSSID Inválido" +#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "O pino DAC informado é inválido" @@ -1262,7 +1267,6 @@ msgid "No CCCD for this Characteristic" msgstr "Não há nenhum CCCD para esta característica" #: ports/atmel-samd/common-hal/analogio/AnalogOut.c -#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "No DAC on chip" msgstr "Nenhum DAC no chip" @@ -2808,6 +2812,10 @@ msgstr "formato inválido" msgid "invalid format specifier" msgstr "o especificador do formato é inválido" +#: shared-bindings/wifi/Radio.c +msgid "invalid hostname" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid key" msgstr "chave inválida" diff --git a/locale/sv.po b/locale/sv.po index 11e15e79e6..f3bf71558a 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-10 23:49-0700\n" +"POT-Creation-Date: 2020-10-15 16:06+0530\n" "PO-Revision-Date: 2020-10-14 18:12+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" @@ -959,6 +959,10 @@ msgstr "Hårdvaran är upptagen, prova alternativa pinnar" msgid "Hardware in use, try alternative pins" msgstr "Hårdvaran används redan, prova alternativa pinnar" +#: shared-bindings/wifi/Radio.c +msgid "Hostname must be between 1 and 253 characters" +msgstr "" + #: extmod/vfs_posix_file.c py/objstringio.c msgid "I/O operation on closed file" msgstr "I/O-operation på stängd fil" @@ -1040,6 +1044,7 @@ msgstr "Ogiltig BMP-fil" msgid "Invalid BSSID" msgstr "Ogiltig BSSID" +#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "Ogiltig DAC-pinne angiven" @@ -1252,7 +1257,6 @@ msgid "No CCCD for this Characteristic" msgstr "Ingen CCCD för denna karaktäristik" #: ports/atmel-samd/common-hal/analogio/AnalogOut.c -#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "No DAC on chip" msgstr "Ingen DAC på chipet" @@ -2781,6 +2785,10 @@ msgstr "ogiltigt format" msgid "invalid format specifier" msgstr "ogiltig formatspecificerare" +#: shared-bindings/wifi/Radio.c +msgid "invalid hostname" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid key" msgstr "ogiltig nyckel" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index b9adc10dfe..bf7b3c636a 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: circuitpython-cn\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-10 23:49-0700\n" +"POT-Creation-Date: 2020-10-15 16:06+0530\n" "PO-Revision-Date: 2020-10-13 17:11+0000\n" "Last-Translator: hexthat \n" "Language-Team: Chinese Hanyu Pinyin\n" @@ -957,6 +957,10 @@ msgstr "Yìngjiàn máng, qǐng chángshì qítā zhēnjiǎo" msgid "Hardware in use, try alternative pins" msgstr "Shǐyòng de yìngjiàn, qǐng chángshì qítā yǐn jiǎo" +#: shared-bindings/wifi/Radio.c +msgid "Hostname must be between 1 and 253 characters" +msgstr "" + #: extmod/vfs_posix_file.c py/objstringio.c msgid "I/O operation on closed file" msgstr "Wénjiàn shàng de I/ O cāozuò" @@ -1038,6 +1042,7 @@ msgstr "Wúxiào de BMP wénjiàn" msgid "Invalid BSSID" msgstr "Wúxiào de BSSID" +#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "Invalid DAC pin supplied" msgstr "Tí gōng liǎo wúxiào de DAC yǐn jiǎo" @@ -1249,7 +1254,6 @@ msgid "No CCCD for this Characteristic" msgstr "Zhège tèzhēng méiyǒu CCCD" #: ports/atmel-samd/common-hal/analogio/AnalogOut.c -#: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "No DAC on chip" msgstr "Méiyǒu DAC zài xīnpiàn shàng de" @@ -2773,6 +2777,10 @@ msgstr "wúxiào géshì" msgid "invalid format specifier" msgstr "wúxiào de géshì biāozhù" +#: shared-bindings/wifi/Radio.c +msgid "invalid hostname" +msgstr "" + #: extmod/modussl_axtls.c msgid "invalid key" msgstr "wúxiào de mì yào" From f51e75c1d216de5ce0c4cdb985756d9cf2b73f4c Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Thu, 15 Oct 2020 15:24:24 -0400 Subject: [PATCH 034/145] cxd56 needed more precise include for __packed; needed SRC_C += on some ports --- devices/ble_hci/common-hal/_bleio/Adapter.c | 1 - .../common-hal/_bleio/hci_include/att_internal.h | 2 +- devices/ble_hci/common-hal/_bleio/hci_include/hci.h | 4 +++- mpy-cross/mpy-cross.mk | 2 +- .../atmel-samd/boards/kicksat-sprite/mpconfigboard.mk | 10 +++++----- ports/cxd56/Makefile | 2 +- ports/mimxrt10xx/Makefile | 2 +- ports/unix/Makefile | 2 +- 8 files changed, 13 insertions(+), 12 deletions(-) diff --git a/devices/ble_hci/common-hal/_bleio/Adapter.c b/devices/ble_hci/common-hal/_bleio/Adapter.c index 559b586de3..753a886486 100644 --- a/devices/ble_hci/common-hal/_bleio/Adapter.c +++ b/devices/ble_hci/common-hal/_bleio/Adapter.c @@ -45,7 +45,6 @@ #include "shared-bindings/_bleio/Address.h" #include "shared-bindings/_bleio/Characteristic.h" #include "shared-bindings/_bleio/Service.h" -#include "shared-bindings/nvm/ByteArray.h" #include "shared-bindings/_bleio/Connection.h" #include "shared-bindings/_bleio/ScanEntry.h" #include "shared-bindings/time/__init__.h" diff --git a/devices/ble_hci/common-hal/_bleio/hci_include/att_internal.h b/devices/ble_hci/common-hal/_bleio/hci_include/att_internal.h index 1c75275daa..d6a4cb79c7 100644 --- a/devices/ble_hci/common-hal/_bleio/hci_include/att_internal.h +++ b/devices/ble_hci/common-hal/_bleio/hci_include/att_internal.h @@ -11,7 +11,7 @@ #include // for __packed -#include +#include #define BT_EATT_PSM 0x27 #define BT_ATT_DEFAULT_LE_MTU 23 diff --git a/devices/ble_hci/common-hal/_bleio/hci_include/hci.h b/devices/ble_hci/common-hal/_bleio/hci_include/hci.h index 6c3a2b5bd0..b6c5ee34bb 100644 --- a/devices/ble_hci/common-hal/_bleio/hci_include/hci.h +++ b/devices/ble_hci/common-hal/_bleio/hci_include/hci.h @@ -12,7 +12,9 @@ #define ZEPHYR_INCLUDE_BLUETOOTH_HCI_H_ #include -#include +// for __packed +#include + #include "addr.h" #define BIT(n) (1UL << (n)) diff --git a/mpy-cross/mpy-cross.mk b/mpy-cross/mpy-cross.mk index b4c8e34a2e..629054af9e 100644 --- a/mpy-cross/mpy-cross.mk +++ b/mpy-cross/mpy-cross.mk @@ -66,7 +66,7 @@ LDFLAGS += -static -static-libgcc -static-libstdc++ endif # source files -SRC_C = \ +SRC_C += \ main.c \ gccollect.c \ supervisor/stub/safe_mode.c \ diff --git a/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk b/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk index 18cef738e8..2492651516 100644 --- a/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk +++ b/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk @@ -11,12 +11,12 @@ LONGINT_IMPL = MPZ # Not needed. CIRCUITPY_AUDIOBUSIO = 0 -CIRCUITPY_FRAMEBUFFERIO = 0 -CIRCUITPY_DISPLAYIO = 0 -CIRCUITPY_RGBMATRIX = 0 -CIRCUITPY_PS2IO = 0 CIRCUITPY_AUDIOMP3 = 0 - +CIRCUITPY_BLEIO_HCI = 0 +CIRCUITPY_DISPLAYIO = 0 +CIRCUITPY_FRAMEBUFFERIO = 0 +CIRCUITPY_PS2IO = 0 +CIRCUITPY_RGBMATRIX = 0 CIRCUITPY_ULAB = 0 # Override optimization to keep binary small diff --git a/ports/cxd56/Makefile b/ports/cxd56/Makefile index 7e145f5e2d..5201f0db56 100644 --- a/ports/cxd56/Makefile +++ b/ports/cxd56/Makefile @@ -162,7 +162,7 @@ SRC_SHARED_MODULE_EXPANDED = $(addprefix shared-bindings/, $(SRC_SHARED_MODULE)) SRC_S = supervisor/cpu.s -SRC_C = \ +SRC_C += \ background.c \ fatfs_port.c \ mphalport.c \ diff --git a/ports/mimxrt10xx/Makefile b/ports/mimxrt10xx/Makefile index 12c9bde4f5..a17e5f7030 100644 --- a/ports/mimxrt10xx/Makefile +++ b/ports/mimxrt10xx/Makefile @@ -147,7 +147,7 @@ SRC_SDK := \ SRC_SDK := $(addprefix sdk/devices/$(CHIP_FAMILY)/, $(SRC_SDK)) -SRC_C = \ +SRC_C += \ background.c \ boards/$(BOARD)/board.c \ boards/$(BOARD)/flash_config.c \ diff --git a/ports/unix/Makefile b/ports/unix/Makefile index 5d4b168fe9..4bfb13c6a2 100644 --- a/ports/unix/Makefile +++ b/ports/unix/Makefile @@ -134,7 +134,7 @@ SRC_MOD += modjni.c endif # source files -SRC_C = \ +SRC_C += \ main.c \ gccollect.c \ unix_mphal.c \ From 45a3bd1c042dd27eacf78cdcf116f97a7839eee0 Mon Sep 17 00:00:00 2001 From: Seon Rozenblum Date: Wed, 14 Oct 2020 19:18:38 +1100 Subject: [PATCH 035/145] Added default LWIP hostnames to FeatherS2 boards --- ports/esp32s2/boards/unexpectedmaker_feathers2/sdkconfig | 5 +++++ .../boards/unexpectedmaker_feathers2_prerelease/sdkconfig | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2/sdkconfig b/ports/esp32s2/boards/unexpectedmaker_feathers2/sdkconfig index 67ac6d2f37..c9d44460c5 100644 --- a/ports/esp32s2/boards/unexpectedmaker_feathers2/sdkconfig +++ b/ports/esp32s2/boards/unexpectedmaker_feathers2/sdkconfig @@ -32,3 +32,8 @@ CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set # end of SPI RAM config +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="UMFeatherS2" +# end of LWIP diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/sdkconfig b/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/sdkconfig index b73c4a8c20..00e0bb2566 100644 --- a/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/sdkconfig +++ b/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/sdkconfig @@ -33,3 +33,9 @@ CONFIG_SPIRAM_USE_MEMMAP=y CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set # end of SPI RAM config + +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="UMFeatherS2" +# end of LWIP From 88d07ef35b686ffd66487de81564396aac0818b8 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 13 Oct 2020 16:57:09 -0500 Subject: [PATCH 036/145] displayio: further ensure just one start_terminal call @cwalther determined that for boards with 2 displays (monster m4sk), start_terminal would be called for each one, leaking supervisor heap entries. Determine, by comparing addresses, whether the display being acted on is the first display (number zero) and do (or do not) call start_terminal. stop_terminal can safely be called multiple times, so there's no need to guard against calling it more than once. Slight behavioral change: The terminal size would follow the displays[0] size, not the displays[1] size --- shared-module/displayio/Display.c | 6 ++++-- shared-module/displayio/display_core.c | 5 ++++- shared-module/framebufferio/FramebufferDisplay.c | 6 ++++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/shared-module/displayio/Display.c b/shared-module/displayio/Display.c index 499c00ffbb..7c8c9280b5 100644 --- a/shared-module/displayio/Display.c +++ b/shared-module/displayio/Display.c @@ -347,8 +347,10 @@ void common_hal_displayio_display_set_rotation(displayio_display_obj_t* self, in self->core.height = tmp; } displayio_display_core_set_rotation(&self->core, rotation); - supervisor_stop_terminal(); - supervisor_start_terminal(self->core.width, self->core.height); + if (self == &displays[0].display) { + supervisor_stop_terminal(); + supervisor_start_terminal(self->core.width, self->core.height); + } if (self->core.current_group != NULL) { displayio_group_update_transform(self->core.current_group, &self->core.transform); } diff --git a/shared-module/displayio/display_core.c b/shared-module/displayio/display_core.c index 60a8ef2133..411f9f3736 100644 --- a/shared-module/displayio/display_core.c +++ b/shared-module/displayio/display_core.c @@ -85,7 +85,10 @@ void displayio_display_core_construct(displayio_display_core_t* self, self->bus = bus; - supervisor_start_terminal(width, height); + // (offsetof core is equal in all display types) + if (self == &displays[0].display.core) { + supervisor_start_terminal(width, height); + } self->width = width; self->height = height; diff --git a/shared-module/framebufferio/FramebufferDisplay.c b/shared-module/framebufferio/FramebufferDisplay.c index 6b506c7faf..03e121c914 100644 --- a/shared-module/framebufferio/FramebufferDisplay.c +++ b/shared-module/framebufferio/FramebufferDisplay.c @@ -280,8 +280,10 @@ void common_hal_framebufferio_framebufferdisplay_set_rotation(framebufferio_fram self->core.height = tmp; } displayio_display_core_set_rotation(&self->core, rotation); - supervisor_stop_terminal(); - supervisor_start_terminal(self->core.width, self->core.height); + if (self == &displays[0].framebuffer_display) { + supervisor_stop_terminal(); + supervisor_start_terminal(self->core.width, self->core.height); + } if (self->core.current_group != NULL) { displayio_group_update_transform(self->core.current_group, &self->core.transform); } From 1d05ad6b22bedc52c5a1b9e44e806aa09fafd16c Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Thu, 15 Oct 2020 16:34:19 -0400 Subject: [PATCH 037/145] no _bleio for litex; ESP32S2 defines BIT() already --- devices/ble_hci/common-hal/_bleio/hci_include/hci.h | 3 +++ ports/litex/mpconfigport.mk | 1 + 2 files changed, 4 insertions(+) diff --git a/devices/ble_hci/common-hal/_bleio/hci_include/hci.h b/devices/ble_hci/common-hal/_bleio/hci_include/hci.h index b6c5ee34bb..5213edbf0f 100644 --- a/devices/ble_hci/common-hal/_bleio/hci_include/hci.h +++ b/devices/ble_hci/common-hal/_bleio/hci_include/hci.h @@ -17,7 +17,10 @@ #include "addr.h" +// ESP32S2 build environment defines this already. +#ifndef BIT #define BIT(n) (1UL << (n)) +#endif /* Special own address types for LL privacy (used in adv & scan parameters) */ #define BT_HCI_OWN_ADDR_RPA_OR_PUBLIC 0x02 diff --git a/ports/litex/mpconfigport.mk b/ports/litex/mpconfigport.mk index 427e9ea841..485a75fde0 100644 --- a/ports/litex/mpconfigport.mk +++ b/ports/litex/mpconfigport.mk @@ -16,6 +16,7 @@ CIRCUITPY_ANALOGIO = 0 CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_AUDIOIO = 0 CIRCUITPY_BITBANGIO = 0 +CIRCUITPY_BLEIO_HCI = 0 CIRCUITPY_BOARD = 0 CIRCUITPY_BUSIO = 0 CIRCUITPY_COUNTIO = 0 From 12ed3fc72f6eb81fd193258e757efdcf633c4c1d Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Thu, 15 Oct 2020 18:48:28 -0400 Subject: [PATCH 038/145] disable on winterbloom_sol and thunderpack --- ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk | 2 +- ports/stm/boards/thunderpack/mpconfigboard.mk | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk b/ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk index 9217cdf23d..fcefaee9b8 100644 --- a/ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk +++ b/ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.mk @@ -18,7 +18,7 @@ LONGINT_IMPL = MPZ # Disable modules that are unusable on this special-purpose board. CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_AUDIOIO = 0 -CIRCUITPY_BLEIO = 0 +CIRCUITPY_BLEIO_HCI = 0 CIRCUITPY_DISPLAYIO = 0 CIRCUITPY_FRAMEBUFFERIO = 0 CIRCUITPY_GAMEPAD = 0 diff --git a/ports/stm/boards/thunderpack/mpconfigboard.mk b/ports/stm/boards/thunderpack/mpconfigboard.mk index bb50f87108..d303582e0e 100644 --- a/ports/stm/boards/thunderpack/mpconfigboard.mk +++ b/ports/stm/boards/thunderpack/mpconfigboard.mk @@ -7,6 +7,7 @@ INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = NONE CIRCUITPY_NVM = 1 +CIRCUITPY_BLEIO_HCI = 0 MCU_SERIES = F4 MCU_VARIANT = STM32F411xE From fa75231ae321ea95007804ac01a39dcbd09ecd75 Mon Sep 17 00:00:00 2001 From: gamblor21 Date: Thu, 15 Oct 2020 18:46:42 -0500 Subject: [PATCH 039/145] Added max size check to recv_into --- shared-bindings/socketpool/Socket.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shared-bindings/socketpool/Socket.c b/shared-bindings/socketpool/Socket.c index de05b8eb4b..f4a1e636af 100644 --- a/shared-bindings/socketpool/Socket.c +++ b/shared-bindings/socketpool/Socket.c @@ -260,6 +260,9 @@ STATIC mp_obj_t socketpool_socket_recv_into(size_t n_args, const mp_obj_t *args) mp_int_t len = bufinfo.len; if (n_args == 3) { mp_int_t given_len = mp_obj_get_int(args[2]); + if (given_len > len) { + mp_raise_ValueError(translate("buffer too small for requested bytes")); + } if (given_len > 0 && given_len < len) { len = given_len; } From b336039aab03bd9f609bad0c211981961b6685d2 Mon Sep 17 00:00:00 2001 From: "Ryan T. Hamilton" Date: Thu, 15 Oct 2020 23:18:30 -0700 Subject: [PATCH 040/145] Disable the long way and return an ap_info object still needs work and cleanup --- ports/esp32s2/common-hal/wifi/Radio.c | 83 +++++++++++++++++---------- ports/esp32s2/common-hal/wifi/Radio.h | 2 + shared-bindings/wifi/Radio.c | 73 ++++++++++++++--------- shared-bindings/wifi/Radio.h | 5 +- 4 files changed, 104 insertions(+), 59 deletions(-) diff --git a/ports/esp32s2/common-hal/wifi/Radio.c b/ports/esp32s2/common-hal/wifi/Radio.c index 13bcccc809..b1f9e67e05 100644 --- a/ports/esp32s2/common-hal/wifi/Radio.c +++ b/ports/esp32s2/common-hal/wifi/Radio.c @@ -25,6 +25,7 @@ */ #include "shared-bindings/wifi/Radio.h" +#include "shared-bindings/wifi/Network.h" #include @@ -149,6 +150,30 @@ wifi_radio_error_t common_hal_wifi_radio_connect(wifi_radio_obj_t *self, uint8_t return WIFI_RADIO_ERROR_NONE; } +mp_obj_t common_hal_wifi_radio_get_ap_info(wifi_radio_obj_t *self) { + if (!esp_netif_is_netif_up(self->netif)) { + return mp_const_none; + } + + // Make sure the interface is in STA mode + if (self->sta_mode){ + return mp_const_none; + } + + wifi_network_obj_t *apnet = m_new_obj(wifi_network_obj_t); + apnet->base.type = &wifi_network_type; + // From esp_wifi.h, the possible return values (typos theirs): + // ESP_OK: succeed + // ESP_ERR_WIFI_CONN: The station interface don't initialized + // ESP_ERR_WIFI_NOT_CONNECT: The station is in disconnect status + if (esp_wifi_sta_get_ap_info(&self->apnet.record) != ESP_OK){ + return mp_const_none; + } else { + memcpy(&apnet->record, &self->apnet.record, sizeof(wifi_ap_record_t)); + return MP_OBJ_FROM_PTR(apnet); + } +} + mp_obj_t common_hal_wifi_radio_get_ap_rssi(wifi_radio_obj_t *self) { if (!esp_netif_is_netif_up(self->netif)) { return mp_const_none; @@ -170,40 +195,40 @@ mp_obj_t common_hal_wifi_radio_get_ap_rssi(wifi_radio_obj_t *self) { } } -mp_obj_t common_hal_wifi_radio_get_ap_ssid(wifi_radio_obj_t *self) { - if (!esp_netif_is_netif_up(self->netif)) { - return mp_const_none; - } +// mp_obj_t common_hal_wifi_radio_get_ap_ssid(wifi_radio_obj_t *self) { +// if (!esp_netif_is_netif_up(self->netif)) { +// return mp_const_none; +// } - // Make sure the interface is in STA mode - if (self->sta_mode){ - return mp_const_none; - } +// // Make sure the interface is in STA mode +// if (self->sta_mode){ +// return mp_const_none; +// } - if (esp_wifi_sta_get_ap_info(&self->ap_info) != ESP_OK){ - return mp_const_none; - } else { - const char* cstr = (const char*) self->ap_info.ssid; - return mp_obj_new_str(cstr, strlen(cstr)); - } -} +// if (esp_wifi_sta_get_ap_info(&self->ap_info) != ESP_OK){ +// return mp_const_none; +// } else { +// const char* cstr = (const char*) self->ap_info.ssid; +// return mp_obj_new_str(cstr, strlen(cstr)); +// } +// } -mp_obj_t common_hal_wifi_radio_get_ap_bssid(wifi_radio_obj_t *self) { - if (!esp_netif_is_netif_up(self->netif)) { - return mp_const_none; - } +// mp_obj_t common_hal_wifi_radio_get_ap_bssid(wifi_radio_obj_t *self) { +// if (!esp_netif_is_netif_up(self->netif)) { +// return mp_const_none; +// } - // Make sure the interface is in STA mode - if (self->sta_mode){ - return mp_const_none; - } +// // Make sure the interface is in STA mode +// if (self->sta_mode){ +// return mp_const_none; +// } - if (esp_wifi_sta_get_ap_info(&self->ap_info) != ESP_OK){ - return mp_const_none; - } else { - return mp_obj_new_bytes(self->ap_info.bssid, MAC_ADDRESS_LENGTH); - } -} +// if (esp_wifi_sta_get_ap_info(&self->ap_info) != ESP_OK){ +// return mp_const_none; +// } else { +// return mp_obj_new_bytes(self->ap_info.bssid, MAC_ADDRESS_LENGTH); +// } +// } mp_obj_t common_hal_wifi_radio_get_ipv4_gateway(wifi_radio_obj_t *self) { if (!esp_netif_is_netif_up(self->netif)) { diff --git a/ports/esp32s2/common-hal/wifi/Radio.h b/ports/esp32s2/common-hal/wifi/Radio.h index 272c3a62e9..f441096f7d 100644 --- a/ports/esp32s2/common-hal/wifi/Radio.h +++ b/ports/esp32s2/common-hal/wifi/Radio.h @@ -32,6 +32,7 @@ #include "components/esp_event/include/esp_event.h" #include "shared-bindings/wifi/ScannedNetworks.h" +#include "shared-bindings/wifi/Network.h" // Event bits for the Radio event group. #define WIFI_SCAN_DONE_BIT BIT0 @@ -47,6 +48,7 @@ typedef struct { EventGroupHandle_t event_group_handle; wifi_config_t sta_config; wifi_ap_record_t ap_info; + wifi_network_obj_t apnet; esp_netif_ip_info_t ip_info; esp_netif_dns_info_t dns_info; esp_netif_t *netif; diff --git a/shared-bindings/wifi/Radio.c b/shared-bindings/wifi/Radio.c index 96abadf6ff..d755327694 100644 --- a/shared-bindings/wifi/Radio.c +++ b/shared-bindings/wifi/Radio.c @@ -179,37 +179,37 @@ const mp_obj_property_t wifi_radio_ap_rssi_obj = { (mp_obj_t)&mp_const_none_obj }, }; -//| ap_ssid: int -//| """SSID of the currently connected AP. Returns none if not connected""" -//| -STATIC mp_obj_t wifi_radio_get_ap_ssid(mp_obj_t self) { - return common_hal_wifi_radio_get_ap_ssid(self); +// //| ap_ssid: int +// //| """SSID of the currently connected AP. Returns none if not connected""" +// //| +// STATIC mp_obj_t wifi_radio_get_ap_ssid(mp_obj_t self) { +// return common_hal_wifi_radio_get_ap_ssid(self); -} -MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ap_ssid_obj, wifi_radio_get_ap_ssid); +// } +// MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ap_ssid_obj, wifi_radio_get_ap_ssid); -const mp_obj_property_t wifi_radio_ap_ssid_obj = { - .base.type = &mp_type_property, - .proxy = { (mp_obj_t)&wifi_radio_get_ap_ssid_obj, - (mp_obj_t)&mp_const_none_obj, - (mp_obj_t)&mp_const_none_obj }, -}; +// const mp_obj_property_t wifi_radio_ap_ssid_obj = { +// .base.type = &mp_type_property, +// .proxy = { (mp_obj_t)&wifi_radio_get_ap_ssid_obj, +// (mp_obj_t)&mp_const_none_obj, +// (mp_obj_t)&mp_const_none_obj }, +// }; -//| ap_bssid: int -//| """BSSID (usually MAC) of the currently connected AP. Returns none if not connected""" -//| -STATIC mp_obj_t wifi_radio_get_ap_bssid(mp_obj_t self) { - return common_hal_wifi_radio_get_ap_bssid(self); +// //| ap_bssid: int +// //| """BSSID (usually MAC) of the currently connected AP. Returns none if not connected""" +// //| +// STATIC mp_obj_t wifi_radio_get_ap_bssid(mp_obj_t self) { +// return common_hal_wifi_radio_get_ap_bssid(self); -} -MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ap_bssid_obj, wifi_radio_get_ap_bssid); +// } +// MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ap_bssid_obj, wifi_radio_get_ap_bssid); -const mp_obj_property_t wifi_radio_ap_bssid_obj = { - .base.type = &mp_type_property, - .proxy = { (mp_obj_t)&wifi_radio_get_ap_bssid_obj, - (mp_obj_t)&mp_const_none_obj, - (mp_obj_t)&mp_const_none_obj }, -}; +// const mp_obj_property_t wifi_radio_ap_bssid_obj = { +// .base.type = &mp_type_property, +// .proxy = { (mp_obj_t)&wifi_radio_get_ap_bssid_obj, +// (mp_obj_t)&mp_const_none_obj, +// (mp_obj_t)&mp_const_none_obj }, +// }; //| ipv4_gateway: Optional[ipaddress.IPv4Address] //| """IP v4 Address of the gateway when connected to an access point. None otherwise.""" @@ -275,6 +275,22 @@ const mp_obj_property_t wifi_radio_ipv4_dns_obj = { (mp_obj_t)&mp_const_none_obj }, }; +//| ap_info: Optional[Network] +//| """None otherwise.""" +//| +STATIC mp_obj_t wifi_radio_get_ap_info(mp_obj_t self) { + return common_hal_wifi_radio_get_ap_info(self); + +} +MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ap_info_obj, wifi_radio_get_ap_info); + +const mp_obj_property_t wifi_radio_ap_info_obj = { + .base.type = &mp_type_property, + .proxy = { (mp_obj_t)&wifi_radio_get_ap_info_obj, + (mp_obj_t)&mp_const_none_obj, + (mp_obj_t)&mp_const_none_obj }, +}; + //| def ping(self, ip, *, timeout: float = 0.5) -> float: //| """Ping an IP to test connectivity. Returns echo time in seconds. //| Returns None when it times out.""" @@ -315,9 +331,10 @@ STATIC const mp_rom_map_elem_t wifi_radio_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_connect), MP_ROM_PTR(&wifi_radio_connect_obj) }, // { MP_ROM_QSTR(MP_QSTR_connect_to_enterprise), MP_ROM_PTR(&wifi_radio_connect_to_enterprise_obj) }, + { MP_ROM_QSTR(MP_QSTR_ap_info), MP_ROM_PTR(&wifi_radio_ap_info_obj) }, { MP_ROM_QSTR(MP_QSTR_ap_rssi), MP_ROM_PTR(&wifi_radio_ap_rssi_obj) }, - { MP_ROM_QSTR(MP_QSTR_ap_ssid), MP_ROM_PTR(&wifi_radio_ap_ssid_obj) }, - { MP_ROM_QSTR(MP_QSTR_ap_bssid), MP_ROM_PTR(&wifi_radio_ap_bssid_obj) }, + // { MP_ROM_QSTR(MP_QSTR_ap_ssid), MP_ROM_PTR(&wifi_radio_ap_ssid_obj) }, + // { MP_ROM_QSTR(MP_QSTR_ap_bssid), MP_ROM_PTR(&wifi_radio_ap_bssid_obj) }, { MP_ROM_QSTR(MP_QSTR_ipv4_dns), MP_ROM_PTR(&wifi_radio_ipv4_dns_obj) }, { MP_ROM_QSTR(MP_QSTR_ipv4_gateway), MP_ROM_PTR(&wifi_radio_ipv4_gateway_obj) }, { MP_ROM_QSTR(MP_QSTR_ipv4_subnet), MP_ROM_PTR(&wifi_radio_ipv4_subnet_obj) }, diff --git a/shared-bindings/wifi/Radio.h b/shared-bindings/wifi/Radio.h index bf30ac3405..6dca40c56b 100644 --- a/shared-bindings/wifi/Radio.h +++ b/shared-bindings/wifi/Radio.h @@ -53,9 +53,10 @@ extern void common_hal_wifi_radio_stop_scanning_networks(wifi_radio_obj_t *self) extern wifi_radio_error_t common_hal_wifi_radio_connect(wifi_radio_obj_t *self, uint8_t* ssid, size_t ssid_len, uint8_t* password, size_t password_len, uint8_t channel, mp_float_t timeout, uint8_t* bssid, size_t bssid_len); +extern mp_obj_t common_hal_wifi_radio_get_ap_info(wifi_radio_obj_t *self); extern mp_obj_t common_hal_wifi_radio_get_ap_rssi(wifi_radio_obj_t *self); -extern mp_obj_t common_hal_wifi_radio_get_ap_ssid(wifi_radio_obj_t *self); -extern mp_obj_t common_hal_wifi_radio_get_ap_bssid(wifi_radio_obj_t *self); +// extern mp_obj_t common_hal_wifi_radio_get_ap_ssid(wifi_radio_obj_t *self); +// extern mp_obj_t common_hal_wifi_radio_get_ap_bssid(wifi_radio_obj_t *self); extern mp_obj_t common_hal_wifi_radio_get_ipv4_dns(wifi_radio_obj_t *self); extern mp_obj_t common_hal_wifi_radio_get_ipv4_gateway(wifi_radio_obj_t *self); extern mp_obj_t common_hal_wifi_radio_get_ipv4_subnet(wifi_radio_obj_t *self); From 9d840aab0b81db61e185eeac5d8359489ff36320 Mon Sep 17 00:00:00 2001 From: "Ryan T. Hamilton" Date: Thu, 15 Oct 2020 23:45:11 -0700 Subject: [PATCH 041/145] Cleaned up and now testing --- ports/esp32s2/common-hal/wifi/Radio.c | 66 ++------------------------- ports/esp32s2/common-hal/wifi/Radio.h | 3 +- shared-bindings/wifi/Radio.c | 53 +-------------------- shared-bindings/wifi/Radio.h | 3 -- 4 files changed, 7 insertions(+), 118 deletions(-) diff --git a/ports/esp32s2/common-hal/wifi/Radio.c b/ports/esp32s2/common-hal/wifi/Radio.c index b1f9e67e05..6203a151bd 100644 --- a/ports/esp32s2/common-hal/wifi/Radio.c +++ b/ports/esp32s2/common-hal/wifi/Radio.c @@ -160,76 +160,20 @@ mp_obj_t common_hal_wifi_radio_get_ap_info(wifi_radio_obj_t *self) { return mp_const_none; } - wifi_network_obj_t *apnet = m_new_obj(wifi_network_obj_t); - apnet->base.type = &wifi_network_type; + wifi_network_obj_t *ap_info = m_new_obj(wifi_network_obj_t); + ap_info->base.type = &wifi_network_type; // From esp_wifi.h, the possible return values (typos theirs): // ESP_OK: succeed // ESP_ERR_WIFI_CONN: The station interface don't initialized // ESP_ERR_WIFI_NOT_CONNECT: The station is in disconnect status - if (esp_wifi_sta_get_ap_info(&self->apnet.record) != ESP_OK){ + if (esp_wifi_sta_get_ap_info(&self->ap_info.record) != ESP_OK){ return mp_const_none; } else { - memcpy(&apnet->record, &self->apnet.record, sizeof(wifi_ap_record_t)); - return MP_OBJ_FROM_PTR(apnet); + memcpy(&ap_info->record, &self->ap_info.record, sizeof(wifi_ap_record_t)); + return MP_OBJ_FROM_PTR(ap_info); } } -mp_obj_t common_hal_wifi_radio_get_ap_rssi(wifi_radio_obj_t *self) { - if (!esp_netif_is_netif_up(self->netif)) { - return mp_const_none; - } - - // Make sure the interface is in STA mode - if (self->sta_mode){ - return mp_const_none; - } - - // From esp_wifi.h, the possible return values (typos theirs): - // ESP_OK: succeed - // ESP_ERR_WIFI_CONN: The station interface don't initialized - // ESP_ERR_WIFI_NOT_CONNECT: The station is in disconnect status - if (esp_wifi_sta_get_ap_info(&self->ap_info) != ESP_OK){ - return mp_const_none; - } else { - return mp_obj_new_int(self->ap_info.rssi); - } -} - -// mp_obj_t common_hal_wifi_radio_get_ap_ssid(wifi_radio_obj_t *self) { -// if (!esp_netif_is_netif_up(self->netif)) { -// return mp_const_none; -// } - -// // Make sure the interface is in STA mode -// if (self->sta_mode){ -// return mp_const_none; -// } - -// if (esp_wifi_sta_get_ap_info(&self->ap_info) != ESP_OK){ -// return mp_const_none; -// } else { -// const char* cstr = (const char*) self->ap_info.ssid; -// return mp_obj_new_str(cstr, strlen(cstr)); -// } -// } - -// mp_obj_t common_hal_wifi_radio_get_ap_bssid(wifi_radio_obj_t *self) { -// if (!esp_netif_is_netif_up(self->netif)) { -// return mp_const_none; -// } - -// // Make sure the interface is in STA mode -// if (self->sta_mode){ -// return mp_const_none; -// } - -// if (esp_wifi_sta_get_ap_info(&self->ap_info) != ESP_OK){ -// return mp_const_none; -// } else { -// return mp_obj_new_bytes(self->ap_info.bssid, MAC_ADDRESS_LENGTH); -// } -// } - mp_obj_t common_hal_wifi_radio_get_ipv4_gateway(wifi_radio_obj_t *self) { if (!esp_netif_is_netif_up(self->netif)) { return mp_const_none; diff --git a/ports/esp32s2/common-hal/wifi/Radio.h b/ports/esp32s2/common-hal/wifi/Radio.h index f441096f7d..c7f484eafd 100644 --- a/ports/esp32s2/common-hal/wifi/Radio.h +++ b/ports/esp32s2/common-hal/wifi/Radio.h @@ -47,8 +47,7 @@ typedef struct { StaticEventGroup_t event_group; EventGroupHandle_t event_group_handle; wifi_config_t sta_config; - wifi_ap_record_t ap_info; - wifi_network_obj_t apnet; + wifi_network_obj_t ap_info; esp_netif_ip_info_t ip_info; esp_netif_dns_info_t dns_info; esp_netif_t *netif; diff --git a/shared-bindings/wifi/Radio.c b/shared-bindings/wifi/Radio.c index d755327694..4503310095 100644 --- a/shared-bindings/wifi/Radio.c +++ b/shared-bindings/wifi/Radio.c @@ -163,54 +163,6 @@ STATIC mp_obj_t wifi_radio_connect(size_t n_args, const mp_obj_t *pos_args, mp_m } STATIC MP_DEFINE_CONST_FUN_OBJ_KW(wifi_radio_connect_obj, 1, wifi_radio_connect); -//| ap_rssi: int -//| """RSSI of the currently connected AP. Returns none if not connected""" -//| -STATIC mp_obj_t wifi_radio_get_ap_rssi(mp_obj_t self) { - return common_hal_wifi_radio_get_ap_rssi(self); - -} -MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ap_rssi_obj, wifi_radio_get_ap_rssi); - -const mp_obj_property_t wifi_radio_ap_rssi_obj = { - .base.type = &mp_type_property, - .proxy = { (mp_obj_t)&wifi_radio_get_ap_rssi_obj, - (mp_obj_t)&mp_const_none_obj, - (mp_obj_t)&mp_const_none_obj }, -}; - -// //| ap_ssid: int -// //| """SSID of the currently connected AP. Returns none if not connected""" -// //| -// STATIC mp_obj_t wifi_radio_get_ap_ssid(mp_obj_t self) { -// return common_hal_wifi_radio_get_ap_ssid(self); - -// } -// MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ap_ssid_obj, wifi_radio_get_ap_ssid); - -// const mp_obj_property_t wifi_radio_ap_ssid_obj = { -// .base.type = &mp_type_property, -// .proxy = { (mp_obj_t)&wifi_radio_get_ap_ssid_obj, -// (mp_obj_t)&mp_const_none_obj, -// (mp_obj_t)&mp_const_none_obj }, -// }; - -// //| ap_bssid: int -// //| """BSSID (usually MAC) of the currently connected AP. Returns none if not connected""" -// //| -// STATIC mp_obj_t wifi_radio_get_ap_bssid(mp_obj_t self) { -// return common_hal_wifi_radio_get_ap_bssid(self); - -// } -// MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_get_ap_bssid_obj, wifi_radio_get_ap_bssid); - -// const mp_obj_property_t wifi_radio_ap_bssid_obj = { -// .base.type = &mp_type_property, -// .proxy = { (mp_obj_t)&wifi_radio_get_ap_bssid_obj, -// (mp_obj_t)&mp_const_none_obj, -// (mp_obj_t)&mp_const_none_obj }, -// }; - //| ipv4_gateway: Optional[ipaddress.IPv4Address] //| """IP v4 Address of the gateway when connected to an access point. None otherwise.""" //| @@ -276,7 +228,7 @@ const mp_obj_property_t wifi_radio_ipv4_dns_obj = { }; //| ap_info: Optional[Network] -//| """None otherwise.""" +//| """Network object containing BSSID, SSID, channel, and RSSI when connected to an access point. None otherwise.""" //| STATIC mp_obj_t wifi_radio_get_ap_info(mp_obj_t self) { return common_hal_wifi_radio_get_ap_info(self); @@ -332,9 +284,6 @@ STATIC const mp_rom_map_elem_t wifi_radio_locals_dict_table[] = { // { MP_ROM_QSTR(MP_QSTR_connect_to_enterprise), MP_ROM_PTR(&wifi_radio_connect_to_enterprise_obj) }, { MP_ROM_QSTR(MP_QSTR_ap_info), MP_ROM_PTR(&wifi_radio_ap_info_obj) }, - { MP_ROM_QSTR(MP_QSTR_ap_rssi), MP_ROM_PTR(&wifi_radio_ap_rssi_obj) }, - // { MP_ROM_QSTR(MP_QSTR_ap_ssid), MP_ROM_PTR(&wifi_radio_ap_ssid_obj) }, - // { MP_ROM_QSTR(MP_QSTR_ap_bssid), MP_ROM_PTR(&wifi_radio_ap_bssid_obj) }, { MP_ROM_QSTR(MP_QSTR_ipv4_dns), MP_ROM_PTR(&wifi_radio_ipv4_dns_obj) }, { MP_ROM_QSTR(MP_QSTR_ipv4_gateway), MP_ROM_PTR(&wifi_radio_ipv4_gateway_obj) }, { MP_ROM_QSTR(MP_QSTR_ipv4_subnet), MP_ROM_PTR(&wifi_radio_ipv4_subnet_obj) }, diff --git a/shared-bindings/wifi/Radio.h b/shared-bindings/wifi/Radio.h index 6dca40c56b..38cc933372 100644 --- a/shared-bindings/wifi/Radio.h +++ b/shared-bindings/wifi/Radio.h @@ -54,9 +54,6 @@ extern void common_hal_wifi_radio_stop_scanning_networks(wifi_radio_obj_t *self) extern wifi_radio_error_t common_hal_wifi_radio_connect(wifi_radio_obj_t *self, uint8_t* ssid, size_t ssid_len, uint8_t* password, size_t password_len, uint8_t channel, mp_float_t timeout, uint8_t* bssid, size_t bssid_len); extern mp_obj_t common_hal_wifi_radio_get_ap_info(wifi_radio_obj_t *self); -extern mp_obj_t common_hal_wifi_radio_get_ap_rssi(wifi_radio_obj_t *self); -// extern mp_obj_t common_hal_wifi_radio_get_ap_ssid(wifi_radio_obj_t *self); -// extern mp_obj_t common_hal_wifi_radio_get_ap_bssid(wifi_radio_obj_t *self); extern mp_obj_t common_hal_wifi_radio_get_ipv4_dns(wifi_radio_obj_t *self); extern mp_obj_t common_hal_wifi_radio_get_ipv4_gateway(wifi_radio_obj_t *self); extern mp_obj_t common_hal_wifi_radio_get_ipv4_subnet(wifi_radio_obj_t *self); From 6631c8d393df83db3b9348b18e04c3580811c1bc Mon Sep 17 00:00:00 2001 From: Enrique Casado Date: Fri, 16 Oct 2020 13:52:46 +0200 Subject: [PATCH 042/145] Add USB VID&PID --- .../boards/dynossat_edu_eps/mpconfigboard.mk | 8 ++++---- .../boards/dynossat_edu_obc/mpconfigboard.mk | 11 ++++++----- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/ports/atmel-samd/boards/dynossat_edu_eps/mpconfigboard.mk b/ports/atmel-samd/boards/dynossat_edu_eps/mpconfigboard.mk index a1005e09da..3c0cc07bea 100644 --- a/ports/atmel-samd/boards/dynossat_edu_eps/mpconfigboard.mk +++ b/ports/atmel-samd/boards/dynossat_edu_eps/mpconfigboard.mk @@ -1,8 +1,8 @@ -USB_VID = 0 -USB_PID = 0 +USB_VID = 0x04D8 +USB_PID = 0xEAD1 -USB_PRODUCT = "DynOSSAT-EDU EPS v1.0" -USB_MANUFACTURER = "Blackhand Dynamics SL" +USB_PRODUCT = "DynOSSAT-EDU-EPS-v1.0" +USB_MANUFACTURER = "BH Dynamics" CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 diff --git a/ports/atmel-samd/boards/dynossat_edu_obc/mpconfigboard.mk b/ports/atmel-samd/boards/dynossat_edu_obc/mpconfigboard.mk index d5c626d130..360940cf18 100644 --- a/ports/atmel-samd/boards/dynossat_edu_obc/mpconfigboard.mk +++ b/ports/atmel-samd/boards/dynossat_edu_obc/mpconfigboard.mk @@ -1,14 +1,15 @@ -USB_VID = 0 -USB_PID = 0 -USB_PRODUCT = "DynOSSAT-EDU OBC v1.0" -USB_MANUFACTURER = "Blackhand Dynamics SL" +USB_VID = 0x04D8 +USB_PID = 0xEAD2 + +USB_PRODUCT = "DynOSSAT-EDU-OBC-v1.0" +USB_MANUFACTURER = "BH Dynamics" CHIP_VARIANT = SAMD51J20A CHIP_FAMILY = samd51 SPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 1 -EXTERNAL_FLASH_DEVICES = GD25Q32C +EXTERNAL_FLASH_DEVICES = "GD25Q32C" LONGINT_IMPL = MPZ CFLAGS_INLINE_LIMIT = 60 From fdb5ce477e4d68947ebb7661c9c6f551b5f100e5 Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Fri, 16 Oct 2020 01:25:44 +0000 Subject: [PATCH 043/145] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (834 of 834 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/ --- locale/pt_BR.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/pt_BR.po b/locale/pt_BR.po index a402cb07aa..240a56104e 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-10-15 16:06+0530\n" -"PO-Revision-Date: 2020-10-13 17:11+0000\n" +"PO-Revision-Date: 2020-10-16 17:01+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.3-dev\n" +"X-Generator: Weblate 4.3.1-dev\n" #: main.c msgid "" @@ -972,7 +972,7 @@ msgstr "O hardware está em uso, tente os pinos alternativos" #: shared-bindings/wifi/Radio.c msgid "Hostname must be between 1 and 253 characters" -msgstr "" +msgstr "O nome do host deve ter entre 1 e 253 caracteres" #: extmod/vfs_posix_file.c py/objstringio.c msgid "I/O operation on closed file" @@ -2814,7 +2814,7 @@ msgstr "o especificador do formato é inválido" #: shared-bindings/wifi/Radio.c msgid "invalid hostname" -msgstr "" +msgstr "o nome do host é inválido" #: extmod/modussl_axtls.c msgid "invalid key" From 645382d51d37a40312118eebc11da75639913fce Mon Sep 17 00:00:00 2001 From: gamblor21 Date: Fri, 16 Oct 2020 14:21:00 -0500 Subject: [PATCH 044/145] Updated translation --- locale/circuitpython.pot | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index c4951f78f9..035eb105fb 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-09-29 20:14-0500\n" +"POT-Creation-Date: 2020-10-16 13:56-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -285,6 +285,7 @@ msgid "All I2C peripherals are in use" msgstr "" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "" @@ -892,6 +893,7 @@ msgid "File exists" msgstr "" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "" @@ -928,7 +930,8 @@ msgid "Group full" msgstr "" #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c -#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/sdioio/SDCard.c +#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c +#: ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware busy, try alternative pins" msgstr "" @@ -998,7 +1001,8 @@ msgid "Invalid %q pin" msgstr "" #: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c -#: ports/stm/common-hal/busio/UART.c ports/stm/common-hal/sdioio/SDCard.c +#: ports/stm/common-hal/busio/UART.c ports/stm/common-hal/canio/CAN.c +#: ports/stm/common-hal/sdioio/SDCard.c msgid "Invalid %q pin selection" msgstr "" @@ -2089,6 +2093,10 @@ msgstr "" msgid "buffer too small" msgstr "" +#: shared-bindings/socketpool/Socket.c +msgid "buffer too small for requested bytes" +msgstr "" + #: shared-bindings/_pew/PewPew.c msgid "buttons must be digitalio.DigitalInOut" msgstr "" @@ -3144,6 +3152,7 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" +#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h #: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h #: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h #: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h @@ -3151,6 +3160,7 @@ msgstr "" #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h msgid "pressing boot button at start up.\n" msgstr "" From de328c3be97891ecd7cb6a3daff9ce7d7faf7e76 Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Sat, 17 Oct 2020 02:22:15 +0530 Subject: [PATCH 045/145] Update port status in readme --- README.rst | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/README.rst b/README.rst index 347b8b8c6b..99a35d6da1 100644 --- a/README.rst +++ b/README.rst @@ -95,7 +95,7 @@ Differences from `MicroPython `__ CircuitPython: - Supports native USB on all boards, allowing file editing without special tools. -- Supports only SAMD21, SAMD51, nRF52840, CXD56, STM32F4 and i.MX RT ports. +- Support status for ports is different. - Floats (aka decimals) are enabled for all builds. - Error messages are translated into 10+ languages. - Does not support concurrency within Python (including interrupts and threading). Some concurrency @@ -137,8 +137,8 @@ Behavior API ~~~ -- Unified hardware APIs. Documented - `on ReadTheDocs `_. +- Unified hardware APIs. Documented on + `ReadTheDocs `_. - API docs are rST within the C files in ``shared-bindings``. - No ``machine`` API. @@ -201,14 +201,27 @@ Ports Ports include the code unique to a microcontroller line and also variations based on the board. -- ``atmel-samd`` Support for SAMD21 and SAMD51 based boards. -- ``nrf`` Support for the nRF52840 based boards. -- ``unix`` Support for UNIX. Only used for automated testing. +================ ============================================================ +Supported Support status +================ ============================================================ +atmel-samd ``SAMD21`` stable | ``SAMD51`` stable +cxd56 stable +esp32s2 beta +litex alpha +mimxrt10xx alpha +nrf stable +stm ``F4`` stable | ``others`` beta +unix alpha +================ ============================================================ + +- ``stable`` Highly unlikely to have bugs or missing functionality. +- ``beta`` Being actively improved but may be missing functionality and have bugs. +- ``alpha`` Will have bugs and missing functionality. The remaining port directories not listed above are in the repo to maintain compatibility with the `MicroPython `__ parent project. -`back to top <#circuitpython>`__ +`Back to Top <#circuitpython>`__ .. |Build Status| image:: https://github.com/adafruit/circuitpython/workflows/Build%20CI/badge.svg :target: https://github.com/adafruit/circuitpython/actions?query=branch%3Amain From 74c07a4bdcc942e57668f1a2181e00d1213864a7 Mon Sep 17 00:00:00 2001 From: Jensen Date: Fri, 16 Oct 2020 19:48:41 -0500 Subject: [PATCH 046/145] displayio: Add in opaque pixel option for future --- locale/circuitpython.pot | 6 +----- shared-bindings/displayio/ColorConverter.c | 8 +++++--- shared-bindings/displayio/ColorConverter.h | 2 +- shared-module/displayio/ColorConverter.c | 4 +++- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index c4b40d3617..35143e04e6 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-14 22:22-0500\n" +"POT-Creation-Date: 2020-10-16 19:50-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -3408,10 +3408,6 @@ msgstr "" msgid "too many values to unpack (expected %d)" msgstr "" -#: shared-bindings/displayio/ColorConverter.c -msgid "transparent_color should be an int" -msgstr "" - #: extmod/ulab/code/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "" diff --git a/shared-bindings/displayio/ColorConverter.c b/shared-bindings/displayio/ColorConverter.c index 4e41ceff15..e47a961a50 100644 --- a/shared-bindings/displayio/ColorConverter.c +++ b/shared-bindings/displayio/ColorConverter.c @@ -125,12 +125,14 @@ MP_DEFINE_CONST_FUN_OBJ_2(displayio_colorconverter_make_transparent_obj, display //| def make_opaque(self) -> None: //| """Sets a pixel to opaque.""" //| -STATIC mp_obj_t displayio_colorconverter_make_opaque(mp_obj_t self_in) { +STATIC mp_obj_t displayio_colorconverter_make_opaque(mp_obj_t self_in, mp_obj_t transparent_color_obj) { displayio_colorconverter_t *self = MP_OBJ_TO_PTR(self_in); - common_hal_displayio_colorconverter_make_opaque(self); + + mp_int_t transparent_color = mp_obj_get_int(&transparent_color); + common_hal_displayio_colorconverter_make_opaque(self, transparent_color); return mp_const_none; } -MP_DEFINE_CONST_FUN_OBJ_1(displayio_colorconverter_make_opaque_obj, displayio_colorconverter_make_opaque); +MP_DEFINE_CONST_FUN_OBJ_2(displayio_colorconverter_make_opaque_obj, displayio_colorconverter_make_opaque); STATIC const mp_rom_map_elem_t displayio_colorconverter_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_convert), MP_ROM_PTR(&displayio_colorconverter_convert_obj) }, diff --git a/shared-bindings/displayio/ColorConverter.h b/shared-bindings/displayio/ColorConverter.h index e4ddd1972d..441f7c7aee 100644 --- a/shared-bindings/displayio/ColorConverter.h +++ b/shared-bindings/displayio/ColorConverter.h @@ -40,6 +40,6 @@ void common_hal_displayio_colorconverter_set_dither(displayio_colorconverter_t* bool common_hal_displayio_colorconverter_get_dither(displayio_colorconverter_t* self); void common_hal_displayio_colorconverter_make_transparent(displayio_colorconverter_t* self, uint32_t transparent_color); -void common_hal_displayio_colorconverter_make_opaque(displayio_colorconverter_t* self); +void common_hal_displayio_colorconverter_make_opaque(displayio_colorconverter_t* self, uint32_t transparent_color); #endif // MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYIO_COLORCONVERTER_H diff --git a/shared-module/displayio/ColorConverter.c b/shared-module/displayio/ColorConverter.c index 4089b2265e..d1a4f16a97 100644 --- a/shared-module/displayio/ColorConverter.c +++ b/shared-module/displayio/ColorConverter.c @@ -136,7 +136,9 @@ void common_hal_displayio_colorconverter_make_transparent(displayio_colorconvert self->transparent_color = transparent_color; } -void common_hal_displayio_colorconverter_make_opaque(displayio_colorconverter_t* self) { +void common_hal_displayio_colorconverter_make_opaque(displayio_colorconverter_t* self, uint32_t transparent_color) { + (void) transparent_color; + // 0x1000000 will never equal a valid color self->transparent_color = 0x1000000; } From fc3f2a3f7f670f28d1a57eb61dfbf065463c906a Mon Sep 17 00:00:00 2001 From: Jensen Date: Fri, 16 Oct 2020 20:05:39 -0500 Subject: [PATCH 047/145] displayio: Remove trailing whitespace --- shared-module/displayio/ColorConverter.c | 1 - 1 file changed, 1 deletion(-) diff --git a/shared-module/displayio/ColorConverter.c b/shared-module/displayio/ColorConverter.c index d1a4f16a97..dc64da03da 100644 --- a/shared-module/displayio/ColorConverter.c +++ b/shared-module/displayio/ColorConverter.c @@ -138,7 +138,6 @@ void common_hal_displayio_colorconverter_make_transparent(displayio_colorconvert void common_hal_displayio_colorconverter_make_opaque(displayio_colorconverter_t* self, uint32_t transparent_color) { (void) transparent_color; - // 0x1000000 will never equal a valid color self->transparent_color = 0x1000000; } From 1efcb975abe2ce8fc4e2f6e8875da54c86f238e5 Mon Sep 17 00:00:00 2001 From: Alvaro Figueroa Date: Fri, 16 Oct 2020 21:08:52 +0000 Subject: [PATCH 048/145] Translated using Weblate (Spanish) Currently translated at 100.0% (834 of 834 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/es/ --- locale/es.po | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/locale/es.po b/locale/es.po index 16254aa5e7..db20dea120 100644 --- a/locale/es.po +++ b/locale/es.po @@ -8,15 +8,15 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-10-15 16:06+0530\n" -"PO-Revision-Date: 2020-10-09 17:19+0000\n" -"Last-Translator: dherrada \n" +"PO-Revision-Date: 2020-10-17 02:31+0000\n" +"Last-Translator: Alvaro Figueroa \n" "Language-Team: \n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.3-dev\n" +"X-Generator: Weblate 4.3.1-dev\n" #: main.c msgid "" @@ -255,7 +255,7 @@ msgstr "'return' fuera de una función" #: py/compile.c msgid "'yield from' inside async function" -msgstr "" +msgstr "'yield from' dentro función asincrónica" #: py/compile.c msgid "'yield' outside function" @@ -284,7 +284,7 @@ msgstr "El canal EXTINT ya está siendo utilizado" #: ports/esp32s2/common-hal/analogio/AnalogIn.c msgid "ADC2 is being used by WiFi" -msgstr "" +msgstr "ADC2 está siendo usado por WiFi" #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, c-format @@ -969,7 +969,7 @@ msgstr "Hardware en uso, pruebe pines alternativos" #: shared-bindings/wifi/Radio.c msgid "Hostname must be between 1 and 253 characters" -msgstr "" +msgstr "Hostname debe ser entre 1 y 253 caracteres" #: extmod/vfs_posix_file.c py/objstringio.c msgid "I/O operation on closed file" @@ -2803,7 +2803,7 @@ msgstr "especificador de formato inválido" #: shared-bindings/wifi/Radio.c msgid "invalid hostname" -msgstr "" +msgstr "hostname inválido" #: extmod/modussl_axtls.c msgid "invalid key" @@ -3522,7 +3522,7 @@ msgstr "objeto de tipo '%q' no tiene atributo '%q'" #: py/objgenerator.c msgid "type object 'generator' has no attribute '__await__'" -msgstr "" +msgstr "objeto tipo 'generator' no tiene un atributo '__await__'" #: py/objtype.c msgid "type takes 1 or 3 arguments" From 1e7e5eb1ff43ee57fa2dd5f2def8fcdae7e60683 Mon Sep 17 00:00:00 2001 From: hexthat Date: Fri, 16 Oct 2020 19:10:09 +0000 Subject: [PATCH 049/145] Translated using Weblate (Chinese (Pinyin)) Currently translated at 100.0% (834 of 834 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/ --- locale/zh_Latn_pinyin.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index bf7b3c636a..365b1e498f 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: circuitpython-cn\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-10-15 16:06+0530\n" -"PO-Revision-Date: 2020-10-13 17:11+0000\n" +"PO-Revision-Date: 2020-10-17 02:31+0000\n" "Last-Translator: hexthat \n" "Language-Team: Chinese Hanyu Pinyin\n" "Language: zh_Latn_pinyin\n" @@ -15,7 +15,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.3-dev\n" +"X-Generator: Weblate 4.3.1-dev\n" #: main.c msgid "" @@ -959,7 +959,7 @@ msgstr "Shǐyòng de yìngjiàn, qǐng chángshì qítā yǐn jiǎo" #: shared-bindings/wifi/Radio.c msgid "Hostname must be between 1 and 253 characters" -msgstr "" +msgstr "zhǔ jī míng bì xū jiè yú 1 hé 253 gè zì fú zhī jiān" #: extmod/vfs_posix_file.c py/objstringio.c msgid "I/O operation on closed file" @@ -2779,7 +2779,7 @@ msgstr "wúxiào de géshì biāozhù" #: shared-bindings/wifi/Radio.c msgid "invalid hostname" -msgstr "" +msgstr "wú xiào zhǔ jī míng" #: extmod/modussl_axtls.c msgid "invalid key" From 76f1db7a8795f2594db6b6d0d6f38a48a2cfd8af Mon Sep 17 00:00:00 2001 From: "Ryan T. Hamilton" Date: Sat, 17 Oct 2020 00:23:31 -0700 Subject: [PATCH 050/145] Set sta_mode flag for actual use/checking --- ports/esp32s2/common-hal/wifi/Radio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ports/esp32s2/common-hal/wifi/Radio.c b/ports/esp32s2/common-hal/wifi/Radio.c index 6203a151bd..80afc5eaad 100644 --- a/ports/esp32s2/common-hal/wifi/Radio.c +++ b/ports/esp32s2/common-hal/wifi/Radio.c @@ -53,6 +53,8 @@ static void start_station(wifi_radio_obj_t *self) { } esp_wifi_set_mode(next_mode); + self->sta_mode = 1; + esp_wifi_set_config(WIFI_MODE_STA, &self->sta_config); } @@ -156,7 +158,7 @@ mp_obj_t common_hal_wifi_radio_get_ap_info(wifi_radio_obj_t *self) { } // Make sure the interface is in STA mode - if (self->sta_mode){ + if (!self->sta_mode){ return mp_const_none; } From dc10e968149f50fbc88158bcb3f78380667abb40 Mon Sep 17 00:00:00 2001 From: Noel Gaetan Date: Sat, 17 Oct 2020 16:54:13 +0200 Subject: [PATCH 051/145] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 29db397932..15b4cfc892 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,7 +6,7 @@ SPDX-License-Identifier: MIT # Contributing Please note that this project is released with a -[Contributor Code of Conduct](https://github.com/adafruit/circuitpython/blob/main/CODE_OF_CONDUCT.md). +[Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms. Participation covers any forum used to converse about CircuitPython including unofficial and official spaces. Failure to do so will result in corrective actions such as time out or ban from the project. From 7cf776d39e9c9e4694b65b636f456630b462958c Mon Sep 17 00:00:00 2001 From: Noel Gaetan Date: Sat, 17 Oct 2020 17:11:17 +0200 Subject: [PATCH 052/145] Update CONTRIBUTING.md test fix url 404 --- CONTRIBUTING.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 15b4cfc892..c94e8db8c6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,6 +4,8 @@ SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://g SPDX-License-Identifier: MIT --> + + # Contributing Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). From a71885c3915298922cbc8934620d14193dc5d4f4 Mon Sep 17 00:00:00 2001 From: Noel Gaetan Date: Sat, 17 Oct 2020 10:35:34 +0000 Subject: [PATCH 053/145] Translated using Weblate (French) Currently translated at 100.0% (834 of 834 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fr/ --- locale/fr.po | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/locale/fr.po b/locale/fr.po index 482fd28097..e4af75891f 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-10-15 16:06+0530\n" -"PO-Revision-Date: 2020-10-15 18:17+0000\n" -"Last-Translator: Jeff Epler \n" +"PO-Revision-Date: 2020-10-17 15:35+0000\n" +"Last-Translator: Noel Gaetan \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.3-dev\n" +"X-Generator: Weblate 4.3.1-dev\n" #: main.c msgid "" @@ -23,7 +23,7 @@ msgid "" "Code done running. Waiting for reload.\n" msgstr "" "\n" -"Fin d'éxecution du code. En attente de recharge.\n" +"Fin d'exécution du code. En attente de rechargement.\n" #: supervisor/shared/safe_mode.c msgid "" @@ -122,39 +122,39 @@ msgstr "'%q' argument requis" #: py/runtime.c msgid "'%q' object cannot assign attribute '%q'" -msgstr "object '%q' ne peut assigner l'attribut '%q'" +msgstr "l'objet '%q' ne peut avoir l'attribut '%q'" #: py/proto.c msgid "'%q' object does not support '%q'" -msgstr "object '%q' ne supporte pas '%q'" +msgstr "l'objet '%q' ne supporte pas '%q'" #: py/obj.c msgid "'%q' object does not support item assignment" -msgstr "objet '%q' ne supporte pas l'assignement d'objets" +msgstr "l'objet '%q' ne supporte pas l'assignement d'objets" #: py/obj.c msgid "'%q' object does not support item deletion" -msgstr "object '%q' ne supported pas la suppression d'objet" +msgstr "l'objet '%q' ne supporte pas la suppression d'objet" #: py/runtime.c msgid "'%q' object has no attribute '%q'" -msgstr "object '%q' n'as pas d'attribut '%q'" +msgstr "l'objet '%q' n'as pas d'attribut '%q'" #: py/runtime.c msgid "'%q' object is not an iterator" -msgstr "object '%q' n'est pas un itérateur" +msgstr "l'objet '%q' n'est pas un itérateur" #: py/objtype.c py/runtime.c msgid "'%q' object is not callable" -msgstr "object '%q' ne peut pas être appelé" +msgstr "l'objet '%q' ne peut pas être appelé" #: py/runtime.c msgid "'%q' object is not iterable" -msgstr "objet '%q' n'est pas iterable" +msgstr "l'objet '%q' n'est pas itérable" #: py/obj.c msgid "'%q' object is not subscriptable" -msgstr "objet '%q' n'est pas souscriptable" +msgstr "l'objet '%q' n'est pas souscriptable" #: py/emitinlinethumb.c py/emitinlinextensa.c #, c-format @@ -169,7 +169,7 @@ msgstr "'%s' attend un registre" #: py/emitinlinethumb.c #, c-format msgid "'%s' expects a special register" -msgstr "'%s' attend un registre special" +msgstr "'%s' attend un registre spécial" #: py/emitinlinethumb.c #, c-format From c85a845ff4d1edc8c001b0138fbddd6f1ff1d3a6 Mon Sep 17 00:00:00 2001 From: Antonin ENFRUN Date: Sat, 17 Oct 2020 09:33:07 +0000 Subject: [PATCH 054/145] Translated using Weblate (French) Currently translated at 100.0% (834 of 834 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fr/ --- locale/fr.po | 136 +++++++++++++++++++++++++++------------------------ 1 file changed, 71 insertions(+), 65 deletions(-) diff --git a/locale/fr.po b/locale/fr.po index e4af75891f..a8a382c709 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -9,7 +9,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-10-15 16:06+0530\n" "PO-Revision-Date: 2020-10-17 15:35+0000\n" -"Last-Translator: Noel Gaetan \n" +"Last-Translator: Antonin ENFRUN \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" @@ -256,7 +256,7 @@ msgstr "'return' en dehors d'une fonction" #: py/compile.c msgid "'yield from' inside async function" -msgstr "" +msgstr "'yield from' dans une fonction async" #: py/compile.c msgid "'yield' outside function" @@ -346,7 +346,7 @@ msgstr "S'annonce déjà." #: ports/atmel-samd/common-hal/canio/Listener.c msgid "Already have all-matches listener" -msgstr "" +msgstr "Il y a déjà un auditeur all-matches" #: shared-module/memorymonitor/AllocationAlarm.c #: shared-module/memorymonitor/AllocationSize.c @@ -355,7 +355,7 @@ msgstr "Déjà en cours d'exécution" #: ports/esp32s2/common-hal/wifi/Radio.c msgid "Already scanning for wifi networks" -msgstr "" +msgstr "Déjà à la recherche des réseaux wifi" #: ports/cxd56/common-hal/analogio/AnalogIn.c msgid "AnalogIn not supported on given pin" @@ -706,11 +706,11 @@ msgstr "Impossible de redémarrer PWM" #: ports/esp32s2/common-hal/neopixel_write/__init__.c msgid "Could not retrieve clock" -msgstr "" +msgstr "Impossible d’obtenir l’horloge" #: shared-bindings/_bleio/Adapter.c msgid "Could not set address" -msgstr "" +msgstr "Impossible de définir l’adresse" #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Could not start PWM" @@ -862,7 +862,7 @@ msgstr "La FFT est définie pour les ndarrays uniquement" #: ports/esp32s2/common-hal/socketpool/Socket.c msgid "Failed SSL handshake" -msgstr "" +msgstr "Échec du handshake SSL" #: shared-bindings/ps2io/Ps2.c msgid "Failed sending command." @@ -889,11 +889,11 @@ msgstr "Echec de l'allocation de %d octets du tampon RX" #: ports/esp32s2/common-hal/wifi/__init__.c msgid "Failed to allocate Wifi memory" -msgstr "" +msgstr "Impossible d’allouer la mémoire pour Wifi" #: ports/esp32s2/common-hal/wifi/ScannedNetworks.c msgid "Failed to allocate wifi scan memory" -msgstr "" +msgstr "Impossible d'allouer la mémoire pour le scan wifi" #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Failed to connect: internal error" @@ -927,16 +927,16 @@ msgstr "Le fichier existe" #: ports/atmel-samd/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" -msgstr "" +msgstr "Filtre trop complexe" #: ports/cxd56/common-hal/camera/Camera.c msgid "Format not supported" -msgstr "" +msgstr "Format non supporté" #: shared-module/framebufferio/FramebufferDisplay.c #, c-format msgid "Framebuffer requires %d bytes" -msgstr "" +msgstr "Le framebuffer nécessite %d octets" #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "Frequency captured is above capability. Capture Paused." @@ -974,7 +974,7 @@ msgstr "Matériel utilisé, essayez d'autres broches" #: shared-bindings/wifi/Radio.c msgid "Hostname must be between 1 and 253 characters" -msgstr "" +msgstr "Hostname doit faire entre 1 et 253 caractères" #: extmod/vfs_posix_file.c py/objstringio.c msgid "I/O operation on closed file" @@ -1007,7 +1007,7 @@ msgstr "Taille de tampon incorrecte" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c msgid "Input taking too long" -msgstr "" +msgstr "L'entrée prend trop de temps" #: ports/esp32s2/common-hal/neopixel_write/__init__.c py/moduerrno.c msgid "Input/output error" @@ -1043,7 +1043,7 @@ msgstr "Broche invalide pour '%q'" #: ports/stm/common-hal/busio/UART.c ports/stm/common-hal/canio/CAN.c #: ports/stm/common-hal/sdioio/SDCard.c msgid "Invalid %q pin selection" -msgstr "" +msgstr "Sélection de pin %q invalide" #: ports/stm/common-hal/analogio/AnalogIn.c msgid "Invalid ADC Unit value" @@ -1391,11 +1391,11 @@ msgstr "Ne joue pas" #: main.c msgid "Not running saved code.\n" -msgstr "" +msgstr "N'exécute pas le code sauvegardé.\n" #: shared-bindings/_bleio/__init__.c msgid "Not settable" -msgstr "" +msgstr "Non réglable" #: shared-bindings/util.c msgid "" @@ -1414,11 +1414,11 @@ msgstr "Uniquement 8 ou 16 bit mono avec " #: ports/esp32s2/common-hal/socketpool/SocketPool.c msgid "Only IPv4 SOCK_STREAM sockets supported" -msgstr "" +msgstr "Seules les sockets IPv4 SOCK_STREAM sont prises en charge" #: ports/esp32s2/common-hal/wifi/__init__.c msgid "Only IPv4 addresses supported" -msgstr "" +msgstr "Seules les adresses IPv4 sont prises en charge" #: shared-module/displayio/OnDiskBitmap.c #, c-format @@ -1439,11 +1439,11 @@ msgstr "" #: shared-bindings/ipaddress/__init__.c msgid "Only raw int supported for ip" -msgstr "" +msgstr "IP n'accepte que les entiers bruts" #: ports/esp32s2/common-hal/socketpool/SocketPool.c msgid "Out of sockets" -msgstr "" +msgstr "Plus de sockets" #: shared-bindings/audiobusio/PDMIn.c msgid "Oversample must be multiple of 8." @@ -1518,6 +1518,8 @@ msgid "" "Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " "instead" msgstr "" +"Ce portage n'accepte pas de PWM carrier. Précisez plutôt pin, frequency et " +"duty cycle" #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c @@ -1527,6 +1529,8 @@ msgid "" "Port does not accept pins or frequency. Construct and pass a PWMOut Carrier " "instead" msgstr "" +"Ce portage n'accepte pas pins ou frequency. Construisez et passez un PWMOut " +"Carrier à la place" #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" @@ -1590,7 +1594,7 @@ msgstr "Rafraîchissez trop tôt" #: shared-bindings/canio/RemoteTransmissionRequest.c msgid "RemoteTransmissionRequests limited to 8 bytes" -msgstr "" +msgstr "RemoteTransmissionRequests limité à 8 octets" #: shared-bindings/aesio/aes.c msgid "Requested AES mode is unsupported" @@ -1606,7 +1610,7 @@ msgstr "L'entrée de ligne 'Row' doit être un digitalio.DigitalInOut" #: main.c msgid "Running in safe mode! " -msgstr "" +msgstr "Tourne en mode sécurisé " #: shared-module/sdcardio/SDCard.c msgid "SD card CSD format not supported" @@ -1620,12 +1624,12 @@ msgstr "SDA ou SCL a besoin d'une résistance de tirage ('pull up')" #: ports/stm/common-hal/sdioio/SDCard.c #, c-format msgid "SDIO GetCardInfo Error %d" -msgstr "" +msgstr "SDIO GetCardInfo erreur %d" #: ports/stm/common-hal/sdioio/SDCard.c #, c-format msgid "SDIO Init Error %d" -msgstr "" +msgstr "SDIO Init erreur %d" #: ports/stm/common-hal/busio/SPI.c msgid "SPI Init Error" @@ -1663,11 +1667,11 @@ msgstr "Sérialiseur en cours d'utilisation" #: shared-bindings/ssl/SSLContext.c msgid "Server side context cannot have hostname" -msgstr "" +msgstr "Un contexte niveau serveur ne peut avoir de hostname" #: ports/cxd56/common-hal/camera/Camera.c msgid "Size not supported" -msgstr "" +msgstr "Taille non prise en charge" #: shared-bindings/nvm/ByteArray.c msgid "Slice and value different lengths." @@ -1682,7 +1686,7 @@ msgstr "Tranches non supportées" #: ports/esp32s2/common-hal/socketpool/SocketPool.c msgid "SocketPool can only be used with wifi.radio" -msgstr "" +msgstr "SocketPool ne s'utilise qu'avec wifi.radio" #: shared-bindings/aesio/aes.c msgid "Source and destination buffers must be the same length" @@ -1730,7 +1734,7 @@ msgstr "" #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" -msgstr "" +msgstr "La taille de rgb_pins doit être 6, 12, 18, 24 ou 30" #: supervisor/shared/safe_mode.c msgid "" @@ -1785,6 +1789,8 @@ msgstr "Le délai est trop long : le délai maximal est de %d secondes" msgid "" "Timer was reserved for internal use - declare PWM pins earlier in the program" msgstr "" +"Timer est reservé pour un usage interne - déclarez la broche PWM plus tôt " +"dans le programme" #: supervisor/shared/safe_mode.c msgid "To exit, please reset the board without " @@ -1865,7 +1871,7 @@ msgstr "Impossible d'allouer des tampons pour une conversion signée" #: ports/esp32s2/common-hal/busio/I2C.c msgid "Unable to create lock" -msgstr "" +msgstr "Impossible de créer un verrou" #: shared-module/displayio/I2CDisplay.c #, c-format @@ -1896,11 +1902,11 @@ msgstr "Type inattendu pour l'uuid nrfx" #: ports/esp32s2/common-hal/socketpool/Socket.c #, c-format msgid "Unhandled ESP TLS error %d %d %x %d" -msgstr "" +msgstr "Erreur ESP TLS non gérée %d %d %x %d" #: shared-bindings/wifi/Radio.c msgid "Unknown failure" -msgstr "" +msgstr "Echec inconnu" #: ports/nrf/common-hal/_bleio/__init__.c #, c-format @@ -2020,7 +2026,7 @@ msgstr "" #: shared-bindings/wifi/Radio.c msgid "WiFi password must be between 8 and 63 characters" -msgstr "" +msgstr "Le mot de passe WiFi doit faire entre 8 et 63 caractères" #: ports/nrf/common-hal/_bleio/PacketBuffer.c msgid "Writes not supported on Characteristic" @@ -2040,7 +2046,7 @@ msgstr "__init__() doit retourner None" #: py/objtype.c msgid "__init__() should return None, not '%q'" -msgstr "" +msgstr "__init__() doit retourner None, pas '%q'" #: py/objobject.c msgid "__new__ arg must be a user-type" @@ -2085,7 +2091,7 @@ msgstr "l'argument est d'un mauvais type" #: extmod/ulab/code/linalg/linalg.c msgid "argument must be ndarray" -msgstr "" +msgstr "l'argument doit être un ndarray" #: py/argcheck.c shared-bindings/_stage/__init__.c #: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c @@ -2192,7 +2198,7 @@ msgstr "octets > 8 bits non supporté" #: py/objarray.c msgid "bytes length not a multiple of item size" -msgstr "" +msgstr "bytes length n'est pas un multiple de la taille d'un élément" #: py/objstr.c msgid "bytes value out of range" @@ -2234,7 +2240,7 @@ msgstr "ne peut pas assigner à une expression" #: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c #: shared-module/_pixelbuf/PixelBuf.c msgid "can't convert %q to %q" -msgstr "" +msgstr "impossible de convertir %q en %q" #: py/objstr.c msgid "can't convert '%q' object to %q implicitly" @@ -2242,7 +2248,7 @@ msgstr "impossible de convertir l'objet '%q' en '%q' implicitement" #: py/obj.c msgid "can't convert to %q" -msgstr "" +msgstr "impossible de convertir en %q" #: py/objstr.c msgid "can't convert to str implicitly" @@ -2520,11 +2526,11 @@ msgstr "les exceptions doivent dériver de 'BaseException'" #: shared-bindings/canio/CAN.c msgid "expected '%q' but got '%q'" -msgstr "" +msgstr "'%q' était attendu, mais reçu '%q'" #: shared-bindings/canio/CAN.c msgid "expected '%q' or '%q' but got '%q'" -msgstr "" +msgstr "'%q' ou '%q' était attendu, mais reçu '%q'" #: py/objstr.c msgid "expected ':' after format specifier" @@ -2741,7 +2747,7 @@ msgstr "les valeurs initiales doivent être itérables" #: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c msgid "initial_value length is wrong" -msgstr "" +msgstr "la longueur de initial_value est incorrecte" #: py/compile.c msgid "inline assembler must be a function" @@ -2818,7 +2824,7 @@ msgstr "spécification de format invalide" #: shared-bindings/wifi/Radio.c msgid "invalid hostname" -msgstr "" +msgstr "hostname incorrect" #: extmod/modussl_axtls.c msgid "invalid key" @@ -2945,7 +2951,7 @@ msgstr "max_length doit être 0-%d lorsque fixed_length est %s" #: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c msgid "max_length must be > 0" -msgstr "" +msgstr "max_length doit être > 0" #: py/runtime.c msgid "maximum recursion depth exceeded" @@ -3098,7 +3104,7 @@ msgstr "le nombre de points doit être d'au moins 2" #: py/obj.c msgid "object '%q' is not a tuple or list" -msgstr "" +msgstr "l'objet '%q' n'est pas un tuple ou une list" #: py/obj.c msgid "object does not support item assignment" @@ -3134,7 +3140,7 @@ msgstr "objet non itérable" #: py/obj.c msgid "object of type '%q' has no len()" -msgstr "" +msgstr "len() indéfinie pour un objet de type '%q'" #: py/obj.c msgid "object with buffer protocol required" @@ -3187,11 +3193,11 @@ msgstr "" #: shared-bindings/displayio/Bitmap.c msgid "out of range of source" -msgstr "" +msgstr "dépassement des bornes de source" #: shared-bindings/displayio/Bitmap.c msgid "out of range of target" -msgstr "" +msgstr "dépassement des bornes de target" #: py/objint_mpz.c msgid "overflow converting long int to machine word" @@ -3200,7 +3206,7 @@ msgstr "dépassement de capacité en convertissant un entier long en mot machine #: py/modstruct.c #, c-format msgid "pack expected %d items for packing (got %d)" -msgstr "" +msgstr "pack attend %d element(s) (%d reçu)" #: shared-bindings/_stage/Layer.c shared-bindings/_stage/Text.c msgid "palette must be 32 bytes long" @@ -3249,7 +3255,7 @@ msgstr "'pop' d'une entrée PulseIn vide" #: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c #: shared-bindings/ps2io/Ps2.c msgid "pop from empty %q" -msgstr "" +msgstr "pop sur %q vide" #: py/objint_mpz.c msgid "pow() 3rd argument cannot be 0" @@ -3269,7 +3275,7 @@ msgstr "pow() avec 3 arguments nécessite des entiers" #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h msgid "pressing boot button at start up.\n" -msgstr "" +msgstr "bouton boot appuyé lors du démarrage.\n" #: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h #: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h @@ -3277,7 +3283,7 @@ msgstr "" #: ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h #: ports/atmel-samd/boards/meowmeow/mpconfigboard.h msgid "pressing both buttons at start up.\n" -msgstr "" +msgstr "les deux boutons appuyés lors du démarrage.\n" #: extmod/modutimeq.c msgid "queue overflow" @@ -3372,7 +3378,7 @@ msgstr "la longueur de sleep ne doit pas être négative" #: extmod/ulab/code/ndarray.c msgid "slice step can't be zero" -msgstr "" +msgstr "le pas 'step' de la tranche ne peut être zéro" #: py/objslice.c py/sequence.c msgid "slice step cannot be zero" @@ -3392,19 +3398,19 @@ msgstr "l'argument de «sort» doit être un ndarray" #: extmod/ulab/code/filter/filter.c msgid "sos array must be of shape (n_section, 6)" -msgstr "" +msgstr "le tableau sos doit être de forme (n_section, 6)" #: extmod/ulab/code/filter/filter.c msgid "sos[:, 3] should be all ones" -msgstr "" +msgstr "sos[:, 3] doivent tous être à un" #: extmod/ulab/code/filter/filter.c msgid "sosfilt requires iterable arguments" -msgstr "" +msgstr "sosfilt nécessite des argument itératifs" #: shared-bindings/displayio/Bitmap.c msgid "source palette too large" -msgstr "" +msgstr "la palette source est trop grande" #: py/objstr.c msgid "start/end indices" @@ -3432,7 +3438,7 @@ msgstr "opération de flux non supportée" #: py/objstrunicode.c msgid "string indices must be integers, not %q" -msgstr "" +msgstr "les indices d'une chaîne doivent être des entiers, pas %q" #: py/stream.c msgid "string not supported; use bytes or bytearray" @@ -3485,11 +3491,11 @@ msgstr "'timeout' doit être >= 0.0" #: shared-module/sdcardio/SDCard.c msgid "timeout waiting for v1 card" -msgstr "" +msgstr "Délai d’expiration dépassé en attendant une carte v1" #: shared-module/sdcardio/SDCard.c msgid "timeout waiting for v2 card" -msgstr "" +msgstr "Délai d’expiration dépassé en attendant une carte v2" #: shared-bindings/time/__init__.c msgid "timestamp out of range for platform time_t" @@ -3510,7 +3516,7 @@ msgstr "trop de valeur à dégrouper (%d attendues)" #: extmod/ulab/code/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" -msgstr "" +msgstr "trapz n'est défini que pour des tableaux 1D de longueur égale" #: extmod/ulab/code/linalg/linalg.c msgid "tuple index out of range" @@ -3540,7 +3546,7 @@ msgstr "l'objet de type '%q' n'a pas d'attribut '%q'" #: py/objgenerator.c msgid "type object 'generator' has no attribute '__await__'" -msgstr "" +msgstr "le type 'generator' n'a pas d'attribut '__await__'" #: py/objtype.c msgid "type takes 1 or 3 arguments" @@ -3650,7 +3656,7 @@ msgstr "watchdog timeout doit être supérieur à 0" #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" -msgstr "" +msgstr "width doit être plus grand que zero" #: shared-bindings/_bleio/Adapter.c msgid "window must be <= interval" @@ -3702,15 +3708,15 @@ msgstr "'step' nul" #: extmod/ulab/code/filter/filter.c msgid "zi must be an ndarray" -msgstr "" +msgstr "zi doit être ndarray" #: extmod/ulab/code/filter/filter.c msgid "zi must be of float type" -msgstr "" +msgstr "zi doit être de type float" #: extmod/ulab/code/filter/filter.c msgid "zi must be of shape (n_section, 2)" -msgstr "" +msgstr "zi doit être de forme (n_section, 2)" #~ msgid "Must provide SCK pin" #~ msgstr "Vous devez fournir un code PIN SCK" From 396979a67e538da087136ce01dbc4c7a670bf60e Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 11 Oct 2020 21:01:12 -0500 Subject: [PATCH 055/145] atmel-samd: parallelize lto linking This decreases the link time, especially on desktop machines with many CPU cores. However, it does come at a slight cost in binary size, making the flash section about 200 bytes bigger for circuitplayground_express. Before, linking build-circuitplayground_express/firmware.elf takes 8.8s elapsed time, leaving 3128 bytes free in flash. After, linking build-circuitplayground_express/firmware.elf takes 2.8s elapsed time, leaving 2924 bytes free in flash. (-6 seconds, -204 bytes free) If necessary, we can make this per-board or even per-translation to squeeze full builds. --- ports/atmel-samd/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ports/atmel-samd/Makefile b/ports/atmel-samd/Makefile index 1ee21679d8..2593377eb5 100644 --- a/ports/atmel-samd/Makefile +++ b/ports/atmel-samd/Makefile @@ -121,7 +121,7 @@ $(echo PERIPHERALS_CHIP_FAMILY=$(PERIPHERALS_CHIP_FAMILY)) ifeq ($(DEBUG), 1) CFLAGS += -ggdb3 -Og # You may want to disable -flto if it interferes with debugging. - CFLAGS += -flto -flto-partition=none + CFLAGS += -flto # You may want to enable these flags to make setting breakpoints easier. # CFLAGS += -fno-inline -fno-ipa-sra ifeq ($(CHIP_FAMILY), samd21) @@ -144,7 +144,7 @@ else CFLAGS += -finline-limit=$(CFLAGS_INLINE_LIMIT) endif - CFLAGS += -flto -flto-partition=none + CFLAGS += -flto ifeq ($(CIRCUITPY_FULL_BUILD),0) CFLAGS += --param inline-unit-growth=15 --param max-inline-insns-auto=20 @@ -197,6 +197,7 @@ endif LDFLAGS = $(CFLAGS) -nostartfiles -Wl,-nostdlib -Wl,-T,$(GENERATED_LD_FILE) -Wl,-Map=$@.map -Wl,-cref -Wl,-gc-sections -specs=nano.specs +LDFLAGS += -flto=$(shell nproc) LIBS := -lgcc -lc # Use toolchain libm if we're not using our own. From aa3c890ead4a006f273d6188a0a9fa2a19550458 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 12 Oct 2020 12:48:47 -0500 Subject: [PATCH 056/145] samd: pin: Fix 'undefined reference to pin_PA30' .. when PA30 is IGNOREd --- ports/atmel-samd/common-hal/microcontroller/Pin.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/atmel-samd/common-hal/microcontroller/Pin.c b/ports/atmel-samd/common-hal/microcontroller/Pin.c index bec9dc1e26..7dd87a3b2c 100644 --- a/ports/atmel-samd/common-hal/microcontroller/Pin.c +++ b/ports/atmel-samd/common-hal/microcontroller/Pin.c @@ -223,9 +223,11 @@ bool common_hal_mcu_pin_is_free(const mcu_pin_obj_t* pin) { #ifdef MICROPY_HW_NEOPIXEL if (pin == MICROPY_HW_NEOPIXEL) { // Special case for Metro M0 where the NeoPixel is also SWCLK +#ifndef IGNORE_PIN_PA30 if (MICROPY_HW_NEOPIXEL == &pin_PA30 && DSU->STATUSB.bit.DBGPRES == 1) { return false; } +#endif return !neopixel_in_use; } #endif From 4b9fc5de537a166963264cc23eb56f6aea22edde Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 12 Oct 2020 15:46:31 -0500 Subject: [PATCH 057/145] samd: update peripherals submodule this is possible now that the undefined reference to pin_PA30 has been resolved. --- ports/atmel-samd/peripherals | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/atmel-samd/peripherals b/ports/atmel-samd/peripherals index a7e39c4d01..710954269a 160000 --- a/ports/atmel-samd/peripherals +++ b/ports/atmel-samd/peripherals @@ -1 +1 @@ -Subproject commit a7e39c4d01aa5916015beecb021777617e77b0ad +Subproject commit 710954269a34d1b0c5534965f31689a09cf1d197 From eb0b023dee5e6688ead7d875084086a6eea3ce89 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 13 Oct 2020 14:42:30 -0500 Subject: [PATCH 058/145] samd: extend IGNORE_PIN_foo to all sam e5x/e5x pins --- .../common-hal/microcontroller/__init__.c | 77 +++++++++---------- 1 file changed, 38 insertions(+), 39 deletions(-) diff --git a/ports/atmel-samd/common-hal/microcontroller/__init__.c b/ports/atmel-samd/common-hal/microcontroller/__init__.c index 09212a0d12..50a1ec038e 100644 --- a/ports/atmel-samd/common-hal/microcontroller/__init__.c +++ b/ports/atmel-samd/common-hal/microcontroller/__init__.c @@ -275,120 +275,119 @@ STATIC const mp_rom_map_elem_t mcu_pin_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_PB31), MP_ROM_PTR(&pin_PB31) }, #endif -// These are SAMD51 specific so we assume we want them in RAM -#if defined(PIN_PC00) +#if defined(PIN_PC00) && !defined(IGNORE_PIN_PC00) { MP_ROM_QSTR(MP_QSTR_PC00), MP_ROM_PTR(&pin_PC00) }, #endif -#if defined(PIN_PC01) +#if defined(PIN_PC01) && !defined(IGNORE_PIN_PC01) { MP_ROM_QSTR(MP_QSTR_PC01), MP_ROM_PTR(&pin_PC01) }, #endif -#if defined(PIN_PC02) +#if defined(PIN_PC02) && !defined(IGNORE_PIN_PC02) { MP_ROM_QSTR(MP_QSTR_PC02), MP_ROM_PTR(&pin_PC02) }, #endif -#if defined(PIN_PC03) +#if defined(PIN_PC03) && !defined(IGNORE_PIN_PC03) { MP_ROM_QSTR(MP_QSTR_PC03), MP_ROM_PTR(&pin_PC03) }, #endif -#if defined(PIN_PC04) +#if defined(PIN_PC04) && !defined(IGNORE_PIN_PC04) { MP_ROM_QSTR(MP_QSTR_PC04), MP_ROM_PTR(&pin_PC04) }, #endif -#if defined(PIN_PC05) +#if defined(PIN_PC05) && !defined(IGNORE_PIN_PC05) { MP_ROM_QSTR(MP_QSTR_PC05), MP_ROM_PTR(&pin_PC05) }, #endif -#if defined(PIN_PC06) +#if defined(PIN_PC06) && !defined(IGNORE_PIN_PC06) { MP_ROM_QSTR(MP_QSTR_PC06), MP_ROM_PTR(&pin_PC06) }, #endif -#if defined(PIN_PC07) +#if defined(PIN_PC07) && !defined(IGNORE_PIN_PC07) { MP_ROM_QSTR(MP_QSTR_PC07), MP_ROM_PTR(&pin_PC07) }, #endif -#if defined(PIN_PC10) +#if defined(PIN_PC10) && !defined(IGNORE_PIN_PC10) { MP_ROM_QSTR(MP_QSTR_PC10), MP_ROM_PTR(&pin_PC10) }, #endif -#if defined(PIN_PC11) +#if defined(PIN_PC11) && !defined(IGNORE_PIN_PC11) { MP_ROM_QSTR(MP_QSTR_PC11), MP_ROM_PTR(&pin_PC11) }, #endif -#if defined(PIN_PC12) +#if defined(PIN_PC12) && !defined(IGNORE_PIN_PC12) { MP_ROM_QSTR(MP_QSTR_PC12), MP_ROM_PTR(&pin_PC12) }, #endif -#if defined(PIN_PC13) +#if defined(PIN_PC13) && !defined(IGNORE_PIN_PC13) { MP_ROM_QSTR(MP_QSTR_PC13), MP_ROM_PTR(&pin_PC13) }, #endif -#if defined(PIN_PC14) +#if defined(PIN_PC14) && !defined(IGNORE_PIN_PC14) { MP_ROM_QSTR(MP_QSTR_PC14), MP_ROM_PTR(&pin_PC14) }, #endif -#if defined(PIN_PC15) +#if defined(PIN_PC15) && !defined(IGNORE_PIN_PC15) { MP_ROM_QSTR(MP_QSTR_PC15), MP_ROM_PTR(&pin_PC15) }, #endif -#if defined(PIN_PC16) +#if defined(PIN_PC16) && !defined(IGNORE_PIN_PC16) { MP_ROM_QSTR(MP_QSTR_PC16), MP_ROM_PTR(&pin_PC16) }, #endif -#if defined(PIN_PC17) +#if defined(PIN_PC17) && !defined(IGNORE_PIN_PC17) { MP_ROM_QSTR(MP_QSTR_PC17), MP_ROM_PTR(&pin_PC17) }, #endif -#if defined(PIN_PC18) +#if defined(PIN_PC18) && !defined(IGNORE_PIN_PC18) { MP_ROM_QSTR(MP_QSTR_PC18), MP_ROM_PTR(&pin_PC18) }, #endif -#if defined(PIN_PC19) +#if defined(PIN_PC19) && !defined(IGNORE_PIN_PC19) { MP_ROM_QSTR(MP_QSTR_PC19), MP_ROM_PTR(&pin_PC19) }, #endif -#if defined(PIN_PC20) +#if defined(PIN_PC20) && !defined(IGNORE_PIN_PC20) { MP_ROM_QSTR(MP_QSTR_PC20), MP_ROM_PTR(&pin_PC20) }, #endif -#if defined(PIN_PC21) +#if defined(PIN_PC21) && !defined(IGNORE_PIN_PC21) { MP_ROM_QSTR(MP_QSTR_PC21), MP_ROM_PTR(&pin_PC21) }, #endif -#if defined(PIN_PC22) +#if defined(PIN_PC22) && !defined(IGNORE_PIN_PC22) { MP_ROM_QSTR(MP_QSTR_PC22), MP_ROM_PTR(&pin_PC22) }, #endif -#if defined(PIN_PC23) +#if defined(PIN_PC23) && !defined(IGNORE_PIN_PC23) { MP_ROM_QSTR(MP_QSTR_PC23), MP_ROM_PTR(&pin_PC23) }, #endif -#if defined(PIN_PC24) +#if defined(PIN_PC24) && !defined(IGNORE_PIN_PC24) { MP_ROM_QSTR(MP_QSTR_PC24), MP_ROM_PTR(&pin_PC24) }, #endif -#if defined(PIN_PC25) +#if defined(PIN_PC25) && !defined(IGNORE_PIN_PC25) { MP_ROM_QSTR(MP_QSTR_PC25), MP_ROM_PTR(&pin_PC25) }, #endif -#if defined(PIN_PC26) +#if defined(PIN_PC26) && !defined(IGNORE_PIN_PC26) { MP_ROM_QSTR(MP_QSTR_PC26), MP_ROM_PTR(&pin_PC26) }, #endif -#if defined(PIN_PC27) +#if defined(PIN_PC27) && !defined(IGNORE_PIN_PC27) { MP_ROM_QSTR(MP_QSTR_PC27), MP_ROM_PTR(&pin_PC27) }, #endif -#if defined(PIN_PC28) +#if defined(PIN_PC28) && !defined(IGNORE_PIN_PC28) { MP_ROM_QSTR(MP_QSTR_PC28), MP_ROM_PTR(&pin_PC28) }, #endif -#if defined(PIN_PC30) +#if defined(PIN_PC30) && !defined(IGNORE_PIN_PC30) { MP_ROM_QSTR(MP_QSTR_PC30), MP_ROM_PTR(&pin_PC30) }, #endif -#if defined(PIN_PC31) +#if defined(PIN_PC31) && !defined(IGNORE_PIN_PC31) { MP_ROM_QSTR(MP_QSTR_PC31), MP_ROM_PTR(&pin_PC31) }, #endif -#if defined(PIN_PD00) +#if defined(PIN_PD00) && !defined(IGNORE_PIN_PD00) { MP_ROM_QSTR(MP_QSTR_PD00), MP_ROM_PTR(&pin_PD00) }, #endif -#if defined(PIN_PD01) +#if defined(PIN_PD01) && !defined(IGNORE_PIN_PD01) { MP_ROM_QSTR(MP_QSTR_PD01), MP_ROM_PTR(&pin_PD01) }, #endif -#if defined(PIN_PD08) +#if defined(PIN_PD08) && !defined(IGNORE_PIN_PD08) { MP_ROM_QSTR(MP_QSTR_PD08), MP_ROM_PTR(&pin_PD08) }, #endif -#if defined(PIN_PD09) +#if defined(PIN_PD09) && !defined(IGNORE_PIN_PD09) { MP_ROM_QSTR(MP_QSTR_PD09), MP_ROM_PTR(&pin_PD09) }, #endif -#if defined(PIN_PD10) +#if defined(PIN_PD10) && !defined(IGNORE_PIN_PD10) { MP_ROM_QSTR(MP_QSTR_PD10), MP_ROM_PTR(&pin_PD10) }, #endif -#if defined(PIN_PD11) +#if defined(PIN_PD11) && !defined(IGNORE_PIN_PD11) { MP_ROM_QSTR(MP_QSTR_PD11), MP_ROM_PTR(&pin_PD11) }, #endif -#if defined(PIN_PD12) +#if defined(PIN_PD12) && !defined(IGNORE_PIN_PD12) { MP_ROM_QSTR(MP_QSTR_PD12), MP_ROM_PTR(&pin_PD12) }, #endif -#if defined(PIN_PD20) +#if defined(PIN_PD20) && !defined(IGNORE_PIN_PD20) { MP_ROM_QSTR(MP_QSTR_PD20), MP_ROM_PTR(&pin_PD20) }, #endif -#if defined(PIN_PD21) +#if defined(PIN_PD21) && !defined(IGNORE_PIN_PD21) { MP_ROM_QSTR(MP_QSTR_PD21), MP_ROM_PTR(&pin_PD21) }, #endif }; From 194d99f58856c3c0a3d838f99e823a6d0181063c Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sat, 17 Oct 2020 19:07:15 -0500 Subject: [PATCH 059/145] sparkfun_lumidrive: Can't IGNORE pins that are default bus pins The SDA, SCL, and MISO pins were ignored. This error was not diagnosed before now. --- ports/atmel-samd/boards/sparkfun_lumidrive/mpconfigboard.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/ports/atmel-samd/boards/sparkfun_lumidrive/mpconfigboard.h b/ports/atmel-samd/boards/sparkfun_lumidrive/mpconfigboard.h index d184945f35..80f37429fa 100755 --- a/ports/atmel-samd/boards/sparkfun_lumidrive/mpconfigboard.h +++ b/ports/atmel-samd/boards/sparkfun_lumidrive/mpconfigboard.h @@ -35,9 +35,6 @@ #define IGNORE_PIN_PA12 1 #define IGNORE_PIN_PA15 1 #define IGNORE_PIN_PA16 1 -#define IGNORE_PIN_PA21 1 -#define IGNORE_PIN_PA22 1 -#define IGNORE_PIN_PA23 1 #define IGNORE_PIN_PA27 1 #define IGNORE_PIN_PA28 1 From fb768dfc14ab3b98905927f984a080e551513ea8 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sat, 17 Oct 2020 19:08:32 -0500 Subject: [PATCH 060/145] samd: AnalogOut: Better handle boards which IGNOREd analog pins --- .../common-hal/analogio/AnalogOut.c | 45 ++++++++++++------- 1 file changed, 29 insertions(+), 16 deletions(-) diff --git a/ports/atmel-samd/common-hal/analogio/AnalogOut.c b/ports/atmel-samd/common-hal/analogio/AnalogOut.c index fac4c6bfcb..1565b0a8f4 100644 --- a/ports/atmel-samd/common-hal/analogio/AnalogOut.c +++ b/ports/atmel-samd/common-hal/analogio/AnalogOut.c @@ -44,26 +44,36 @@ #include "hpl/pm/hpl_pm_base.h" #endif +#define HAVE_ANALOGOUT ( \ + (defined(PIN_PA02) && !defined(IGNORE_PA02)) || \ + (defined(SAM_D5X_E5X) && defined(PIN_PA05) && !defined(IGNORE_PA05)) \ +) + void common_hal_analogio_analogout_construct(analogio_analogout_obj_t* self, const mcu_pin_obj_t *pin) { - #if defined(SAMD21) && !defined(PIN_PA02) + #if !HAVE_ANALOGOUT mp_raise_NotImplementedError(translate("No DAC on chip")); #else - if (pin->number != PIN_PA02 - #ifdef SAM_D5X_E5X - && pin->number != PIN_PA05 + + int channel = -1; + + #if defined(PIN_PA02) && !defined(IGNORE_PIN_PA02) + if (pin->number != PIN_PA02) { + channel = 0; + } #endif - ) { + #if defined(PIN_PA05) && defined(PIN_PA05) && !defined(IGNORE_PIN_PA05) + if (pin->number != PIN_PA05) { + channel = 1; + } + #endif + + if(channel == -1) { mp_raise_ValueError(translate("AnalogOut not supported on given pin")); return; } - self->channel = 0; - #ifdef SAM_D5X_E5X - if (pin->number == PIN_PA05) { - self->channel = 1; - } - #endif + self->channel = channel; #ifdef SAM_D5X_E5X hri_mclk_set_APBDMASK_DAC_bit(MCLK); @@ -105,11 +115,15 @@ void common_hal_analogio_analogout_construct(analogio_analogout_obj_t* self, } bool common_hal_analogio_analogout_deinited(analogio_analogout_obj_t *self) { + #if !HAVE_ANALOGOUT + return false; + #else return self->deinited; + #endif } void common_hal_analogio_analogout_deinit(analogio_analogout_obj_t *self) { - #if (defined(SAMD21) && defined(PIN_PA02)) || defined(SAM_D5X_E5X) + #if HAVE_ANALOGOUT if (common_hal_analogio_analogout_deinited(self)) { return; } @@ -130,12 +144,11 @@ void common_hal_analogio_analogout_deinit(analogio_analogout_obj_t *self) { void common_hal_analogio_analogout_set_value(analogio_analogout_obj_t *self, uint16_t value) { - #if defined(SAMD21) && !defined(PIN_PA02) - return; - #endif + #if HAVE_ANALOGOUT // Input is 16 bit so make sure and set LEFTADJ to 1 so it takes the top // bits. This is currently done in asf4_conf/*/hpl_dac_config.h. dac_sync_write(&self->descriptor, self->channel, &value, 1); + #endif } void analogout_reset(void) { @@ -143,7 +156,7 @@ void analogout_reset(void) { // if it was enabled, so do that instead if AudioOut is enabled. #if CIRCUITPY_AUDIOIO audioout_reset(); -#else +#elif HAVE_ANALOGOUT #ifdef SAMD21 while (DAC->STATUS.reg & DAC_STATUS_SYNCBUSY) {} #endif From cc411f47eb009dab7a20f3a220cc569b7e310116 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sat, 17 Oct 2020 19:10:22 -0500 Subject: [PATCH 061/145] samd: Update peripherals submodule (https://github.com/adafruit/samd-peripherals/pull/37) --- ports/atmel-samd/peripherals | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/atmel-samd/peripherals b/ports/atmel-samd/peripherals index 710954269a..a7e39c4d01 160000 --- a/ports/atmel-samd/peripherals +++ b/ports/atmel-samd/peripherals @@ -1 +1 @@ -Subproject commit 710954269a34d1b0c5534965f31689a09cf1d197 +Subproject commit a7e39c4d01aa5916015beecb021777617e77b0ad From 852c57c6614011ec63b4bb99a12e53790a0b38cd Mon Sep 17 00:00:00 2001 From: Senuros Date: Sun, 18 Oct 2020 03:40:02 +0200 Subject: [PATCH 062/145] Adding some more german translations --- locale/de_DE.po | 52 +++++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/locale/de_DE.po b/locale/de_DE.po index 89969e8748..6529715660 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -149,7 +149,7 @@ msgstr "" #: py/obj.c msgid "'%q' object is not subscriptable" -msgstr "" +msgstr "'%q' Objekt hat keine '__getitem__'-Methode (not subscriptable)" #: py/emitinlinethumb.c py/emitinlinextensa.c #, c-format @@ -1986,14 +1986,16 @@ msgstr "WatchDogTimer läuft aktuell nicht" #: shared-bindings/watchdog/WatchDogTimer.c msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" msgstr "" +"WatchDogTimer.mode kann nicht geändert werden, nachdem " +"er auf WatchDogMode.RESET gesetzt wurde" #: shared-bindings/watchdog/WatchDogTimer.c msgid "WatchDogTimer.timeout must be greater than 0" -msgstr "" +msgstr "WatchDogTimer.timeout muss größer als 0 sein" #: supervisor/shared/safe_mode.c msgid "Watchdog timer expired." -msgstr "" +msgstr "Watchdog timer abgelaufen " #: py/builtinhelp.c #, c-format @@ -2013,11 +2015,11 @@ msgstr "" #: shared-bindings/wifi/Radio.c msgid "WiFi password must be between 8 and 63 characters" -msgstr "" +msgstr "WiFi Passwort muss zwischen 8 und 63 Zeichen lang sein" #: ports/nrf/common-hal/_bleio/PacketBuffer.c msgid "Writes not supported on Characteristic" -msgstr "Schreiben nicht unterstüzt für die Characteristic" +msgstr "Schreiben nicht unterstüzt für diese Charakteristik" #: supervisor/shared/safe_mode.c msgid "You are in safe mode: something unanticipated happened.\n" @@ -2035,7 +2037,7 @@ msgstr "__init__() sollte None zurückgeben" #: py/objtype.c msgid "__init__() should return None, not '%q'" -msgstr "" +msgstr "__init__() sollte None zurückgeben, nicht '%q'" #: py/objobject.c msgid "__new__ arg must be a user-type" @@ -2080,12 +2082,12 @@ msgstr "Argument hat falschen Typ" #: extmod/ulab/code/linalg/linalg.c msgid "argument must be ndarray" -msgstr "" +msgstr "Argument muss ein ndarray sein" #: py/argcheck.c shared-bindings/_stage/__init__.c #: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c msgid "argument num/types mismatch" -msgstr "Anzahl/Type der Argumente passen nicht" +msgstr "Anzahl/Typen der Argumente passen nicht" #: py/runtime.c msgid "argument should be a '%q' not a '%q'" @@ -2187,7 +2189,7 @@ msgstr "bytes mit mehr als 8 bits werden nicht unterstützt" #: py/objarray.c msgid "bytes length not a multiple of item size" -msgstr "" +msgstr "Byte-Länge ist kein vielfaches der Item-Größe" #: py/objstr.c msgid "bytes value out of range" @@ -2230,7 +2232,7 @@ msgstr "kann keinem Ausdruck zuweisen" #: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c #: shared-module/_pixelbuf/PixelBuf.c msgid "can't convert %q to %q" -msgstr "" +msgstr "kann %q nicht zu %q konvertieren" #: py/objstr.c msgid "can't convert '%q' object to %q implicitly" @@ -2238,7 +2240,7 @@ msgstr "Kann '%q' Objekt nicht implizit nach %q konvertieren" #: py/obj.c msgid "can't convert to %q" -msgstr "" +msgstr "kann nicht zu %q konvertieren" #: py/objstr.c msgid "can't convert to str implicitly" @@ -2292,7 +2294,7 @@ msgstr "" #: shared-module/sdcardio/SDCard.c msgid "can't set 512 block size" -msgstr "" +msgstr "Kann Blockgröße von 512 nicht setzen" #: py/objnamedtuple.c msgid "can't set attribute" @@ -2728,11 +2730,11 @@ msgstr "Indizes müssen Integer, Slices oder Boolesche Listen sein" #: extmod/ulab/code/approx/approx.c msgid "initial values must be iterable" -msgstr "" +msgstr "Ausgangswerte müssen iterierbar sein" #: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c msgid "initial_value length is wrong" -msgstr "" +msgstr "Länge von initial_value ist falsch" #: py/compile.c msgid "inline assembler must be a function" @@ -3126,7 +3128,7 @@ msgstr "Objekt nicht iterierbar" #: py/obj.c msgid "object of type '%q' has no len()" -msgstr "" +msgstr "Object vom Typ '%q' hat kein len()" #: py/obj.c msgid "object with buffer protocol required" @@ -3180,11 +3182,11 @@ msgstr "" #: shared-bindings/displayio/Bitmap.c msgid "out of range of source" -msgstr "" +msgstr "Außerhalb des Bereichs der Quelle" #: shared-bindings/displayio/Bitmap.c msgid "out of range of target" -msgstr "" +msgstr "Außerhalb des Bereichs des Ziels" #: py/objint_mpz.c msgid "overflow converting long int to machine word" @@ -3396,7 +3398,7 @@ msgstr "" #: shared-bindings/displayio/Bitmap.c msgid "source palette too large" -msgstr "" +msgstr "Quell-Palette zu groß" #: py/objstr.c msgid "start/end indices" @@ -3424,7 +3426,7 @@ msgstr "stream operation ist nicht unterstützt" #: py/objstrunicode.c msgid "string indices must be integers, not %q" -msgstr "" +msgstr "String Indizes müssen Integer sein, nicht %q" #: py/stream.c msgid "string not supported; use bytes or bytearray" @@ -3465,7 +3467,7 @@ msgstr "time.struct_time() nimmt eine 9-Sequenz an" #: ports/nrf/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" -msgstr "" +msgstr "Das Zeitlimit hat den maximal zulässigen Wert überschritten" #: shared-bindings/busio/UART.c msgid "timeout must be 0.0-100.0 seconds" @@ -3477,11 +3479,11 @@ msgstr "timeout muss >= 0.0 sein" #: shared-module/sdcardio/SDCard.c msgid "timeout waiting for v1 card" -msgstr "" +msgstr "Zeitlimit beim warten auf v1 Karte" #: shared-module/sdcardio/SDCard.c msgid "timeout waiting for v2 card" -msgstr "" +msgstr "Zeitlimit beim warten auf v2 Karte" #: shared-bindings/time/__init__.c msgid "timestamp out of range for platform time_t" @@ -3532,7 +3534,7 @@ msgstr "Typ vom Objekt '%q' hat kein Attribut '%q'" #: py/objgenerator.c msgid "type object 'generator' has no attribute '__await__'" -msgstr "" +msgstr "Das Typ-Objekt 'generator' hat kein Attribut '__await__'" #: py/objtype.c msgid "type takes 1 or 3 arguments" @@ -3577,7 +3579,7 @@ msgstr "unbekannter Konvertierungs specifier %c" #: py/objstr.c msgid "unknown format code '%c' for object of type '%q'" -msgstr "" +msgstr "Unbekannter Formatcode '%c' für Objekt vom Typ '%q'" #: py/compile.c msgid "unknown type" @@ -3638,7 +3640,7 @@ msgstr "value_count muss größer als 0 sein" #: extmod/ulab/code/linalg/linalg.c msgid "vectors must have same lengths" -msgstr "" +msgstr "Vektoren müssen die selbe Länge haben" #: shared-bindings/watchdog/WatchDogTimer.c msgid "watchdog timeout must be greater than 0" From d6805c0dd40e142654fd45e4d6d43af08871a2c8 Mon Sep 17 00:00:00 2001 From: askpatricw <4002194+askpatrickw@users.noreply.github.com> Date: Sun, 18 Oct 2020 17:15:59 -0700 Subject: [PATCH 063/145] SDA and SCL were flipped --- .../boards/unexpectedmaker_feathers2_prerelease/pins.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/pins.c b/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/pins.c index 967f5e8d97..a1036f8506 100644 --- a/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/pins.c +++ b/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/pins.c @@ -46,11 +46,11 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO43) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, - { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO38) }, { MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) }, { MP_ROM_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_GPIO38) }, - { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO33) }, { MP_ROM_QSTR(MP_QSTR_IO33), MP_ROM_PTR(&pin_GPIO33) }, { MP_ROM_QSTR(MP_QSTR_D20), MP_ROM_PTR(&pin_GPIO33) }, From d2dada869cc3ab85c7ed5b81d9928d6b8dd3282b Mon Sep 17 00:00:00 2001 From: Jensen Kuras Date: Mon, 19 Oct 2020 17:27:01 -0500 Subject: [PATCH 064/145] displayio: Update docs for ColorConverter's make_opaque Co-authored-by: Scott Shawcroft --- shared-bindings/displayio/ColorConverter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/displayio/ColorConverter.c b/shared-bindings/displayio/ColorConverter.c index e47a961a50..0e6e9bfd94 100644 --- a/shared-bindings/displayio/ColorConverter.c +++ b/shared-bindings/displayio/ColorConverter.c @@ -122,7 +122,7 @@ STATIC mp_obj_t displayio_colorconverter_make_transparent(mp_obj_t self_in, mp_o } MP_DEFINE_CONST_FUN_OBJ_2(displayio_colorconverter_make_transparent_obj, displayio_colorconverter_make_transparent); -//| def make_opaque(self) -> None: +//| def make_opaque(self, pixel: int) -> None: //| """Sets a pixel to opaque.""" //| STATIC mp_obj_t displayio_colorconverter_make_opaque(mp_obj_t self_in, mp_obj_t transparent_color_obj) { From eb139c9babeda44a7e613602f8aa86d6207cb994 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 19 Oct 2020 17:41:16 -0700 Subject: [PATCH 065/145] Correct pins to not reset. They must have the PORT_ prefix otherwise they mask the wrong pins. Fixes #3552 --- ports/atmel-samd/boards/matrixportal_m4/mpconfigboard.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/atmel-samd/boards/matrixportal_m4/mpconfigboard.h b/ports/atmel-samd/boards/matrixportal_m4/mpconfigboard.h index cbca94e030..475752afb3 100644 --- a/ports/atmel-samd/boards/matrixportal_m4/mpconfigboard.h +++ b/ports/atmel-samd/boards/matrixportal_m4/mpconfigboard.h @@ -9,7 +9,7 @@ // These are pins not to reset. // QSPI Data pins, PA23 is NeoPixel -#define MICROPY_PORT_A (PORT_PA08 | PORT_PA09 | PORT_PA10 | PORT_PA11 | PA23) +#define MICROPY_PORT_A (PORT_PA08 | PORT_PA09 | PORT_PA10 | PORT_PA11 | PORT_PA23) // QSPI CS, QSPI SCK #define MICROPY_PORT_B (PORT_PB10 | PORT_PB11) #define MICROPY_PORT_C (0) From 13387121fe653c3380e4248abc2db69687cc27cf Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Tue, 20 Oct 2020 09:23:45 +0530 Subject: [PATCH 066/145] Update readme --- README.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/README.rst b/README.rst index 99a35d6da1..d21e8d8d3c 100644 --- a/README.rst +++ b/README.rst @@ -95,7 +95,6 @@ Differences from `MicroPython `__ CircuitPython: - Supports native USB on all boards, allowing file editing without special tools. -- Support status for ports is different. - Floats (aka decimals) are enabled for all builds. - Error messages are translated into 10+ languages. - Does not support concurrency within Python (including interrupts and threading). Some concurrency From a2fce305d6b9407ad6af4e6d4721c47fc9e264d4 Mon Sep 17 00:00:00 2001 From: Targett363 Date: Tue, 20 Oct 2020 10:42:14 +0100 Subject: [PATCH 067/145] Replacing placeholder PIDs with correct PIDs --- ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.mk | 2 +- .../esp32s2/boards/targett_module_clip_wrover/mpconfigboard.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.mk b/ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.mk index e307d7d623..f88cb75d25 100644 --- a/ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.mk +++ b/ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.mk @@ -1,5 +1,5 @@ USB_VID = 0x1209 -USB_PID = 0x0011 +USB_PID = 0x3252 USB_PRODUCT = "Targett Module Clip w/Wroom" USB_MANUFACTURER = "Targett" diff --git a/ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.mk b/ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.mk index aff5ffd6cf..e2dc155846 100644 --- a/ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.mk +++ b/ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.mk @@ -1,5 +1,5 @@ USB_VID = 0x1209 -USB_PID = 0x0012 +USB_PID = 0x3253 USB_PRODUCT = "Targett Module Clip w/Wrover" USB_MANUFACTURER = "Targett" From 543073b1986cf34530fd07644fbbe392075bf7cf Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 20 Oct 2020 08:13:11 -0500 Subject: [PATCH 068/145] zh_Latn_pinyin: Use ASCII alternatives to fullwidth chars --- locale/zh_Latn_pinyin.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 365b1e498f..892b9ac58b 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -3277,7 +3277,7 @@ msgstr "yòubiān bìxū shì ndarray huò biāoliàng" #: py/objstr.c msgid "rsplit(None,n)" -msgstr "Rchāifēn(wú ,N)" +msgstr "Rchāifēn(wú,N)" #: shared-bindings/audiocore/RawSample.c msgid "" From 1eab0692b50f05f6b8194897386cda7720634fe6 Mon Sep 17 00:00:00 2001 From: Christian Walther Date: Tue, 20 Oct 2020 16:37:24 +0200 Subject: [PATCH 069/145] Fix missing `nproc` on macOS. 396979a breaks building on macOS: `nproc` is a Linux thing, use a cross-platform alternative. --- ports/atmel-samd/Makefile | 2 +- py/mkenv.mk | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ports/atmel-samd/Makefile b/ports/atmel-samd/Makefile index 2593377eb5..111f12b4ec 100644 --- a/ports/atmel-samd/Makefile +++ b/ports/atmel-samd/Makefile @@ -197,7 +197,7 @@ endif LDFLAGS = $(CFLAGS) -nostartfiles -Wl,-nostdlib -Wl,-T,$(GENERATED_LD_FILE) -Wl,-Map=$@.map -Wl,-cref -Wl,-gc-sections -specs=nano.specs -LDFLAGS += -flto=$(shell nproc) +LDFLAGS += -flto=$(shell $(NPROC)) LIBS := -lgcc -lc # Use toolchain libm if we're not using our own. diff --git a/py/mkenv.mk b/py/mkenv.mk index b76dd60f85..cb678e8e78 100644 --- a/py/mkenv.mk +++ b/py/mkenv.mk @@ -55,6 +55,8 @@ PYTHON3 ?= python3 RM = rm RSYNC = rsync SED = sed +# Linux has 'nproc', macOS has 'sysctl -n hw.logicalcpu', this is cross-platform +NPROC = $(PYTHON) -c 'import multiprocessing as mp; print(mp.cpu_count())' AS = $(CROSS_COMPILE)as CC = $(CROSS_COMPILE)gcc From 8beb36c240d162bfb3f12dceb46d409eee26722d Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 20 Oct 2020 09:24:03 -0700 Subject: [PATCH 070/145] Use one lto partition This leads to smaller code size at the expense of slower linking. We can turn partitioning back on with GCC10 because it produces smaller code. --- ports/atmel-samd/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/atmel-samd/Makefile b/ports/atmel-samd/Makefile index 2593377eb5..817cc9e3b5 100644 --- a/ports/atmel-samd/Makefile +++ b/ports/atmel-samd/Makefile @@ -121,7 +121,7 @@ $(echo PERIPHERALS_CHIP_FAMILY=$(PERIPHERALS_CHIP_FAMILY)) ifeq ($(DEBUG), 1) CFLAGS += -ggdb3 -Og # You may want to disable -flto if it interferes with debugging. - CFLAGS += -flto + CFLAGS += -flto -flto-partition=none # You may want to enable these flags to make setting breakpoints easier. # CFLAGS += -fno-inline -fno-ipa-sra ifeq ($(CHIP_FAMILY), samd21) @@ -144,7 +144,7 @@ else CFLAGS += -finline-limit=$(CFLAGS_INLINE_LIMIT) endif - CFLAGS += -flto + CFLAGS += -flto -flto-partition=none ifeq ($(CIRCUITPY_FULL_BUILD),0) CFLAGS += --param inline-unit-growth=15 --param max-inline-insns-auto=20 From 599bacb0b4f4654ad0fbc9844d8cc9365d2ee26e Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 20 Oct 2020 10:06:26 -0500 Subject: [PATCH 071/145] build.yml: Fix building mpy-cross-mac Recently, the macos-10.15 image was updated with a non-brew version of awscli. This made our CI script, which does a `brew install awscli` fail: ``` Error: The `brew link` step did not complete successfully The formula built, but is not symlinked into /usr/local Could not symlink bin/aws Target /usr/local/bin/aws already exists. You may want to remove it: rm '/usr/local/bin/aws' ``` --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b3455cb537..447961f85f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -131,7 +131,7 @@ jobs: run: echo "$GITHUB_CONTEXT" - name: Install dependencies run: | - brew install gettext awscli + brew install gettext echo >>$GITHUB_PATH /usr/local/opt/gettext/bin - name: Versions run: | From c58b0adf64a99916a3b360d62dee3b2964f3876b Mon Sep 17 00:00:00 2001 From: "Ryan T. Hamilton" Date: Tue, 20 Oct 2020 14:49:57 -0700 Subject: [PATCH 072/145] Reset sta_mode and ap_mode flags --- ports/esp32s2/common-hal/wifi/__init__.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ports/esp32s2/common-hal/wifi/__init__.c b/ports/esp32s2/common-hal/wifi/__init__.c index 5c8d2e9526..65186e9b17 100644 --- a/ports/esp32s2/common-hal/wifi/__init__.c +++ b/ports/esp32s2/common-hal/wifi/__init__.c @@ -100,6 +100,13 @@ void common_hal_wifi_init(void) { wifi_radio_obj_t* self = &common_hal_wifi_radio_obj; self->netif = esp_netif_create_default_wifi_sta(); + // Even though we just called esp_netif_create_default_wifi_sta, + // station mode isn't actually set until esp_wifi_set_mode() + // is called and the configuration is loaded via esp_wifi_set_config(). + // Set both convienence flags to false so it's not forgotten. + self->sta_mode = 0; + self->ap_mode = 0; + self->event_group_handle = xEventGroupCreateStatic(&self->event_group); ESP_ERROR_CHECK(esp_event_handler_instance_register(WIFI_EVENT, ESP_EVENT_ANY_ID, From e202da4dadeadfe22d30251d99c5247f024bd746 Mon Sep 17 00:00:00 2001 From: "Ryan T. Hamilton" Date: Tue, 20 Oct 2020 15:14:35 -0700 Subject: [PATCH 073/145] Change comment wording --- ports/esp32s2/common-hal/wifi/__init__.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/esp32s2/common-hal/wifi/__init__.c b/ports/esp32s2/common-hal/wifi/__init__.c index 65186e9b17..833ef0623f 100644 --- a/ports/esp32s2/common-hal/wifi/__init__.c +++ b/ports/esp32s2/common-hal/wifi/__init__.c @@ -101,7 +101,7 @@ void common_hal_wifi_init(void) { self->netif = esp_netif_create_default_wifi_sta(); // Even though we just called esp_netif_create_default_wifi_sta, - // station mode isn't actually set until esp_wifi_set_mode() + // station mode isn't actually ready for use until esp_wifi_set_mode() // is called and the configuration is loaded via esp_wifi_set_config(). // Set both convienence flags to false so it's not forgotten. self->sta_mode = 0; From ea6ef8b1423c653a461371e1bc105b6ff75d88b5 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Tue, 20 Oct 2020 00:40:50 +0200 Subject: [PATCH 074/145] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ --- locale/ID.po | 6 +++++- locale/cs.po | 6 +++++- locale/de_DE.po | 10 +++++++--- locale/el.po | 6 +++++- locale/es.po | 6 +++++- locale/fil.po | 6 +++++- locale/fr.po | 6 +++++- locale/hi.po | 6 +++++- locale/it_IT.po | 6 +++++- locale/ja.po | 6 +++++- locale/ko.po | 6 +++++- locale/nl.po | 6 +++++- locale/pl.po | 6 +++++- locale/pt_BR.po | 6 +++++- locale/sv.po | 6 +++++- locale/zh_Latn_pinyin.po | 6 +++++- 16 files changed, 82 insertions(+), 18 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index f35afea66d..ef090afec7 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-15 16:06+0530\n" +"POT-Creation-Date: 2020-10-16 13:56-0500\n" "PO-Revision-Date: 2020-10-10 23:51+0000\n" "Last-Translator: oon arfiandwi \n" "Language-Team: LANGUAGE \n" @@ -2154,6 +2154,10 @@ msgstr "" msgid "buffer too small" msgstr "" +#: shared-bindings/socketpool/Socket.c +msgid "buffer too small for requested bytes" +msgstr "" + #: shared-bindings/_pew/PewPew.c msgid "buttons must be digitalio.DigitalInOut" msgstr "" diff --git a/locale/cs.po b/locale/cs.po index d7caa43ea1..f86f0fcfdd 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-15 16:06+0530\n" +"POT-Creation-Date: 2020-10-16 13:56-0500\n" "PO-Revision-Date: 2020-05-24 03:22+0000\n" "Last-Translator: dronecz \n" "Language-Team: LANGUAGE \n" @@ -2111,6 +2111,10 @@ msgstr "" msgid "buffer too small" msgstr "" +#: shared-bindings/socketpool/Socket.c +msgid "buffer too small for requested bytes" +msgstr "" + #: shared-bindings/_pew/PewPew.c msgid "buttons must be digitalio.DigitalInOut" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index 6529715660..d400f0a761 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-15 16:06+0530\n" +"POT-Creation-Date: 2020-10-16 13:56-0500\n" "PO-Revision-Date: 2020-06-16 18:24+0000\n" "Last-Translator: Andreas Buchen \n" "Language: de_DE\n" @@ -1986,8 +1986,8 @@ msgstr "WatchDogTimer läuft aktuell nicht" #: shared-bindings/watchdog/WatchDogTimer.c msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" msgstr "" -"WatchDogTimer.mode kann nicht geändert werden, nachdem " -"er auf WatchDogMode.RESET gesetzt wurde" +"WatchDogTimer.mode kann nicht geändert werden, nachdem er auf WatchDogMode." +"RESET gesetzt wurde" #: shared-bindings/watchdog/WatchDogTimer.c msgid "WatchDogTimer.timeout must be greater than 0" @@ -2170,6 +2170,10 @@ msgstr "Puffersegmente müssen gleich lang sein" msgid "buffer too small" msgstr "Der Puffer ist zu klein" +#: shared-bindings/socketpool/Socket.c +msgid "buffer too small for requested bytes" +msgstr "" + #: shared-bindings/_pew/PewPew.c msgid "buttons must be digitalio.DigitalInOut" msgstr "Tasten müssen digitalio.DigitalInOut sein" diff --git a/locale/el.po b/locale/el.po index 42b083e3c9..676c54c7bc 100644 --- a/locale/el.po +++ b/locale/el.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-15 16:06+0530\n" +"POT-Creation-Date: 2020-10-16 13:56-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -2106,6 +2106,10 @@ msgstr "" msgid "buffer too small" msgstr "" +#: shared-bindings/socketpool/Socket.c +msgid "buffer too small for requested bytes" +msgstr "" + #: shared-bindings/_pew/PewPew.c msgid "buttons must be digitalio.DigitalInOut" msgstr "" diff --git a/locale/es.po b/locale/es.po index db20dea120..50c3620d69 100644 --- a/locale/es.po +++ b/locale/es.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-15 16:06+0530\n" +"POT-Creation-Date: 2020-10-16 13:56-0500\n" "PO-Revision-Date: 2020-10-17 02:31+0000\n" "Last-Translator: Alvaro Figueroa \n" "Language-Team: \n" @@ -2169,6 +2169,10 @@ msgstr "Las secciones del buffer necesitan tener longitud igual" msgid "buffer too small" msgstr "buffer demasiado pequeño" +#: shared-bindings/socketpool/Socket.c +msgid "buffer too small for requested bytes" +msgstr "" + #: shared-bindings/_pew/PewPew.c msgid "buttons must be digitalio.DigitalInOut" msgstr "los botones necesitan ser digitalio.DigitalInOut" diff --git a/locale/fil.po b/locale/fil.po index ecda65cb21..f90f5bbed7 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-15 16:06+0530\n" +"POT-Creation-Date: 2020-10-16 13:56-0500\n" "PO-Revision-Date: 2018-12-20 22:15-0800\n" "Last-Translator: Timothy \n" "Language-Team: fil\n" @@ -2139,6 +2139,10 @@ msgstr "aarehas na haba dapat ang buffer slices" msgid "buffer too small" msgstr "masyadong maliit ang buffer" +#: shared-bindings/socketpool/Socket.c +msgid "buffer too small for requested bytes" +msgstr "" + #: shared-bindings/_pew/PewPew.c msgid "buttons must be digitalio.DigitalInOut" msgstr "" diff --git a/locale/fr.po b/locale/fr.po index a8a382c709..d1e8b268d6 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-15 16:06+0530\n" +"POT-Creation-Date: 2020-10-16 13:56-0500\n" "PO-Revision-Date: 2020-10-17 15:35+0000\n" "Last-Translator: Antonin ENFRUN \n" "Language: fr\n" @@ -2179,6 +2179,10 @@ msgstr "les tranches de tampon doivent être de longueurs égales" msgid "buffer too small" msgstr "tampon trop petit" +#: shared-bindings/socketpool/Socket.c +msgid "buffer too small for requested bytes" +msgstr "" + #: shared-bindings/_pew/PewPew.c msgid "buttons must be digitalio.DigitalInOut" msgstr "les boutons doivent être des digitalio.DigitalInOut" diff --git a/locale/hi.po b/locale/hi.po index 88c795a7ce..485ce63988 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-15 16:06+0530\n" +"POT-Creation-Date: 2020-10-16 13:56-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -2106,6 +2106,10 @@ msgstr "" msgid "buffer too small" msgstr "" +#: shared-bindings/socketpool/Socket.c +msgid "buffer too small for requested bytes" +msgstr "" + #: shared-bindings/_pew/PewPew.c msgid "buttons must be digitalio.DigitalInOut" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index 1650a5bdbd..9d299b49b9 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-15 16:06+0530\n" +"POT-Creation-Date: 2020-10-16 13:56-0500\n" "PO-Revision-Date: 2018-10-02 16:27+0200\n" "Last-Translator: Enrico Paganin \n" "Language-Team: \n" @@ -2144,6 +2144,10 @@ msgstr "slice del buffer devono essere della stessa lunghezza" msgid "buffer too small" msgstr "buffer troppo piccolo" +#: shared-bindings/socketpool/Socket.c +msgid "buffer too small for requested bytes" +msgstr "" + #: shared-bindings/_pew/PewPew.c msgid "buttons must be digitalio.DigitalInOut" msgstr "" diff --git a/locale/ja.po b/locale/ja.po index 01900d9a8f..ac883044cb 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-15 16:06+0530\n" +"POT-Creation-Date: 2020-10-16 13:56-0500\n" "PO-Revision-Date: 2020-09-25 18:20+0000\n" "Last-Translator: Taku Fukada \n" "Language-Team: none\n" @@ -2131,6 +2131,10 @@ msgstr "バッファのスライスは同じ長さでなければなりません msgid "buffer too small" msgstr "" +#: shared-bindings/socketpool/Socket.c +msgid "buffer too small for requested bytes" +msgstr "" + #: shared-bindings/_pew/PewPew.c msgid "buttons must be digitalio.DigitalInOut" msgstr "buttonsはdigitalio.DigitalInOutでなければなりません" diff --git a/locale/ko.po b/locale/ko.po index a9bc60f781..dea656591c 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-15 16:06+0530\n" +"POT-Creation-Date: 2020-10-16 13:56-0500\n" "PO-Revision-Date: 2020-10-05 12:12+0000\n" "Last-Translator: Michal Čihař \n" "Language-Team: LANGUAGE \n" @@ -2112,6 +2112,10 @@ msgstr "" msgid "buffer too small" msgstr "" +#: shared-bindings/socketpool/Socket.c +msgid "buffer too small for requested bytes" +msgstr "" + #: shared-bindings/_pew/PewPew.c msgid "buttons must be digitalio.DigitalInOut" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index edcaefb832..ed75cdd8c1 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-15 16:06+0530\n" +"POT-Creation-Date: 2020-10-16 13:56-0500\n" "PO-Revision-Date: 2020-09-09 16:05+0000\n" "Last-Translator: Jelle Jager \n" "Language-Team: none\n" @@ -2158,6 +2158,10 @@ msgstr "buffer slices moeten van gelijke grootte zijn" msgid "buffer too small" msgstr "buffer te klein" +#: shared-bindings/socketpool/Socket.c +msgid "buffer too small for requested bytes" +msgstr "" + #: shared-bindings/_pew/PewPew.c msgid "buttons must be digitalio.DigitalInOut" msgstr "buttons moeten digitalio.DigitalInOut zijn" diff --git a/locale/pl.po b/locale/pl.po index b79fcc606b..ec5fe5a65c 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-15 16:06+0530\n" +"POT-Creation-Date: 2020-10-16 13:56-0500\n" "PO-Revision-Date: 2020-09-29 01:39+0000\n" "Last-Translator: Maciej Stankiewicz \n" "Language-Team: pl\n" @@ -2128,6 +2128,10 @@ msgstr "fragmenty bufora muszą mieć tę samą długość" msgid "buffer too small" msgstr "zbyt mały bufor" +#: shared-bindings/socketpool/Socket.c +msgid "buffer too small for requested bytes" +msgstr "" + #: shared-bindings/_pew/PewPew.c msgid "buttons must be digitalio.DigitalInOut" msgstr "buttons musi być digitalio.DigitalInOut" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 240a56104e..b21b728ead 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-15 16:06+0530\n" +"POT-Creation-Date: 2020-10-16 13:56-0500\n" "PO-Revision-Date: 2020-10-16 17:01+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" @@ -2177,6 +2177,10 @@ msgstr "as fatias do buffer devem ter o mesmo comprimento" msgid "buffer too small" msgstr "o buffer é muito pequeno" +#: shared-bindings/socketpool/Socket.c +msgid "buffer too small for requested bytes" +msgstr "" + #: shared-bindings/_pew/PewPew.c msgid "buttons must be digitalio.DigitalInOut" msgstr "os botões devem ser digitalio.DigitalInOut" diff --git a/locale/sv.po b/locale/sv.po index f3bf71558a..42e8ce2c45 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-15 16:06+0530\n" +"POT-Creation-Date: 2020-10-16 13:56-0500\n" "PO-Revision-Date: 2020-10-14 18:12+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" @@ -2155,6 +2155,10 @@ msgstr "buffertsegmenten måste vara lika långa" msgid "buffer too small" msgstr "buffert för liten" +#: shared-bindings/socketpool/Socket.c +msgid "buffer too small for requested bytes" +msgstr "" + #: shared-bindings/_pew/PewPew.c msgid "buttons must be digitalio.DigitalInOut" msgstr "buttons måste vara digitalio.DigitalInOut" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 892b9ac58b..42c6e39d58 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: circuitpython-cn\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-15 16:06+0530\n" +"POT-Creation-Date: 2020-10-16 13:56-0500\n" "PO-Revision-Date: 2020-10-17 02:31+0000\n" "Last-Translator: hexthat \n" "Language-Team: Chinese Hanyu Pinyin\n" @@ -2147,6 +2147,10 @@ msgstr "huǎnchōng qū qiēpiàn bìxū chángdù xiāngděng" msgid "buffer too small" msgstr "huǎnchōng qū tài xiǎo" +#: shared-bindings/socketpool/Socket.c +msgid "buffer too small for requested bytes" +msgstr "" + #: shared-bindings/_pew/PewPew.c msgid "buttons must be digitalio.DigitalInOut" msgstr "ànniǔ bìxū shì digitalio.DigitalInOut" From c65b0985b897b21129356cad95df75d9698478eb Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Tue, 20 Oct 2020 02:57:36 +0000 Subject: [PATCH 075/145] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (835 of 835 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/ --- locale/pt_BR.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/locale/pt_BR.po b/locale/pt_BR.po index b21b728ead..20e7d68962 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-10-16 13:56-0500\n" -"PO-Revision-Date: 2020-10-16 17:01+0000\n" +"PO-Revision-Date: 2020-10-20 17:13+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.3.1-dev\n" +"X-Generator: Weblate 4.3.1\n" #: main.c msgid "" @@ -2179,7 +2179,7 @@ msgstr "o buffer é muito pequeno" #: shared-bindings/socketpool/Socket.c msgid "buffer too small for requested bytes" -msgstr "" +msgstr "o buffer é pequeno demais para os bytes requisitados" #: shared-bindings/_pew/PewPew.c msgid "buttons must be digitalio.DigitalInOut" From 41d02fd53d39b01deff2d8cc0da83f1407cdf888 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Tue, 20 Oct 2020 19:42:08 +0200 Subject: [PATCH 076/145] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ --- locale/ID.po | 6 +++++- locale/cs.po | 6 +++++- locale/de_DE.po | 6 +++++- locale/el.po | 6 +++++- locale/es.po | 6 +++++- locale/fil.po | 6 +++++- locale/fr.po | 6 +++++- locale/hi.po | 6 +++++- locale/it_IT.po | 6 +++++- locale/ja.po | 6 +++++- locale/ko.po | 6 +++++- locale/nl.po | 6 +++++- locale/pl.po | 6 +++++- locale/pt_BR.po | 6 +++++- locale/sv.po | 6 +++++- locale/zh_Latn_pinyin.po | 6 +++++- 16 files changed, 80 insertions(+), 16 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index ef090afec7..958ff1e6b2 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-16 13:56-0500\n" +"POT-Creation-Date: 2020-10-16 19:50-0500\n" "PO-Revision-Date: 2020-10-10 23:51+0000\n" "Last-Translator: oon arfiandwi \n" "Language-Team: LANGUAGE \n" @@ -1431,6 +1431,10 @@ msgstr "" "Hanya monokrom, 4bpp atau 8bpp yang diindeks, dan 16bpp atau lebih yang " "didukung: %d bpp diberikan" +#: shared-module/displayio/ColorConverter.c +msgid "Only one color can be transparent at a time" +msgstr "" + #: shared-bindings/ipaddress/__init__.c msgid "Only raw int supported for ip" msgstr "" diff --git a/locale/cs.po b/locale/cs.po index f86f0fcfdd..6a3d00d993 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-16 13:56-0500\n" +"POT-Creation-Date: 2020-10-16 19:50-0500\n" "PO-Revision-Date: 2020-05-24 03:22+0000\n" "Last-Translator: dronecz \n" "Language-Team: LANGUAGE \n" @@ -1408,6 +1408,10 @@ msgid "" "%d bpp given" msgstr "" +#: shared-module/displayio/ColorConverter.c +msgid "Only one color can be transparent at a time" +msgstr "" + #: shared-bindings/ipaddress/__init__.c msgid "Only raw int supported for ip" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index d400f0a761..e54b670a90 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-16 13:56-0500\n" +"POT-Creation-Date: 2020-10-16 19:50-0500\n" "PO-Revision-Date: 2020-06-16 18:24+0000\n" "Last-Translator: Andreas Buchen \n" "Language: de_DE\n" @@ -1433,6 +1433,10 @@ msgstr "" "Nur monochrome, indizierte 4bpp oder 8bpp, und 16bpp oder größere BMPs " "unterstützt: %d bpp wurden gegeben" +#: shared-module/displayio/ColorConverter.c +msgid "Only one color can be transparent at a time" +msgstr "" + #: shared-bindings/ipaddress/__init__.c msgid "Only raw int supported for ip" msgstr "" diff --git a/locale/el.po b/locale/el.po index 676c54c7bc..5e55065b30 100644 --- a/locale/el.po +++ b/locale/el.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-16 13:56-0500\n" +"POT-Creation-Date: 2020-10-16 19:50-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -1403,6 +1403,10 @@ msgid "" "%d bpp given" msgstr "" +#: shared-module/displayio/ColorConverter.c +msgid "Only one color can be transparent at a time" +msgstr "" + #: shared-bindings/ipaddress/__init__.c msgid "Only raw int supported for ip" msgstr "" diff --git a/locale/es.po b/locale/es.po index 50c3620d69..8cd5e6c22b 100644 --- a/locale/es.po +++ b/locale/es.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-16 13:56-0500\n" +"POT-Creation-Date: 2020-10-16 19:50-0500\n" "PO-Revision-Date: 2020-10-17 02:31+0000\n" "Last-Translator: Alvaro Figueroa \n" "Language-Team: \n" @@ -1432,6 +1432,10 @@ msgstr "" "Solo se admiten BMP monocromáticos, indexados de 4 bpp u 8 bpp y 16 bpp o " "más: %d bpp proporcionados" +#: shared-module/displayio/ColorConverter.c +msgid "Only one color can be transparent at a time" +msgstr "" + #: shared-bindings/ipaddress/__init__.c msgid "Only raw int supported for ip" msgstr "Solo se aceptan enteros crudos para ip" diff --git a/locale/fil.po b/locale/fil.po index f90f5bbed7..7a91f5c859 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-16 13:56-0500\n" +"POT-Creation-Date: 2020-10-16 19:50-0500\n" "PO-Revision-Date: 2018-12-20 22:15-0800\n" "Last-Translator: Timothy \n" "Language-Team: fil\n" @@ -1421,6 +1421,10 @@ msgid "" "%d bpp given" msgstr "" +#: shared-module/displayio/ColorConverter.c +msgid "Only one color can be transparent at a time" +msgstr "" + #: shared-bindings/ipaddress/__init__.c msgid "Only raw int supported for ip" msgstr "" diff --git a/locale/fr.po b/locale/fr.po index d1e8b268d6..9bfc14428a 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-16 13:56-0500\n" +"POT-Creation-Date: 2020-10-16 19:50-0500\n" "PO-Revision-Date: 2020-10-17 15:35+0000\n" "Last-Translator: Antonin ENFRUN \n" "Language: fr\n" @@ -1437,6 +1437,10 @@ msgstr "" "Prise en charge uniquement des monochromes, 4 bpp ou 8 bpp indexés et 16 bpp " "ou plus : %d bpp fournis" +#: shared-module/displayio/ColorConverter.c +msgid "Only one color can be transparent at a time" +msgstr "" + #: shared-bindings/ipaddress/__init__.c msgid "Only raw int supported for ip" msgstr "IP n'accepte que les entiers bruts" diff --git a/locale/hi.po b/locale/hi.po index 485ce63988..bd6d5395bf 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-16 13:56-0500\n" +"POT-Creation-Date: 2020-10-16 19:50-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -1403,6 +1403,10 @@ msgid "" "%d bpp given" msgstr "" +#: shared-module/displayio/ColorConverter.c +msgid "Only one color can be transparent at a time" +msgstr "" + #: shared-bindings/ipaddress/__init__.c msgid "Only raw int supported for ip" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index 9d299b49b9..9ed3bb1e1c 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-16 13:56-0500\n" +"POT-Creation-Date: 2020-10-16 19:50-0500\n" "PO-Revision-Date: 2018-10-02 16:27+0200\n" "Last-Translator: Enrico Paganin \n" "Language-Team: \n" @@ -1426,6 +1426,10 @@ msgid "" "%d bpp given" msgstr "" +#: shared-module/displayio/ColorConverter.c +msgid "Only one color can be transparent at a time" +msgstr "" + #: shared-bindings/ipaddress/__init__.c msgid "Only raw int supported for ip" msgstr "" diff --git a/locale/ja.po b/locale/ja.po index ac883044cb..8c3751c8e8 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-16 13:56-0500\n" +"POT-Creation-Date: 2020-10-16 19:50-0500\n" "PO-Revision-Date: 2020-09-25 18:20+0000\n" "Last-Translator: Taku Fukada \n" "Language-Team: none\n" @@ -1420,6 +1420,10 @@ msgid "" "%d bpp given" msgstr "" +#: shared-module/displayio/ColorConverter.c +msgid "Only one color can be transparent at a time" +msgstr "" + #: shared-bindings/ipaddress/__init__.c msgid "Only raw int supported for ip" msgstr "" diff --git a/locale/ko.po b/locale/ko.po index dea656591c..9c5750b9f5 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-16 13:56-0500\n" +"POT-Creation-Date: 2020-10-16 19:50-0500\n" "PO-Revision-Date: 2020-10-05 12:12+0000\n" "Last-Translator: Michal Čihař \n" "Language-Team: LANGUAGE \n" @@ -1408,6 +1408,10 @@ msgid "" "%d bpp given" msgstr "" +#: shared-module/displayio/ColorConverter.c +msgid "Only one color can be transparent at a time" +msgstr "" + #: shared-bindings/ipaddress/__init__.c msgid "Only raw int supported for ip" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index ed75cdd8c1..ca7530c0fd 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-16 13:56-0500\n" +"POT-Creation-Date: 2020-10-16 19:50-0500\n" "PO-Revision-Date: 2020-09-09 16:05+0000\n" "Last-Translator: Jelle Jager \n" "Language-Team: none\n" @@ -1426,6 +1426,10 @@ msgstr "" "Alleen monochrome en 4bpp of 8bpp, en 16bpp of grotere geïndiceerde BMP's " "zijn ondersteund: %d bpp is gegeven" +#: shared-module/displayio/ColorConverter.c +msgid "Only one color can be transparent at a time" +msgstr "" + #: shared-bindings/ipaddress/__init__.c msgid "Only raw int supported for ip" msgstr "" diff --git a/locale/pl.po b/locale/pl.po index ec5fe5a65c..f6292a0a3b 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-16 13:56-0500\n" +"POT-Creation-Date: 2020-10-16 19:50-0500\n" "PO-Revision-Date: 2020-09-29 01:39+0000\n" "Last-Translator: Maciej Stankiewicz \n" "Language-Team: pl\n" @@ -1419,6 +1419,10 @@ msgid "" "%d bpp given" msgstr "" +#: shared-module/displayio/ColorConverter.c +msgid "Only one color can be transparent at a time" +msgstr "" + #: shared-bindings/ipaddress/__init__.c msgid "Only raw int supported for ip" msgstr "" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 20e7d68962..94ec881cb5 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-16 13:56-0500\n" +"POT-Creation-Date: 2020-10-16 19:50-0500\n" "PO-Revision-Date: 2020-10-20 17:13+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" @@ -1434,6 +1434,10 @@ msgstr "" "São compatíveis apenas os BMPs monocromáticos, indexados em 4bpp ou 8bpp e " "16bpp ou superior: determinado %d bpp" +#: shared-module/displayio/ColorConverter.c +msgid "Only one color can be transparent at a time" +msgstr "" + #: shared-bindings/ipaddress/__init__.c msgid "Only raw int supported for ip" msgstr "Apenas o int bruto é compatível para o ip" diff --git a/locale/sv.po b/locale/sv.po index 42e8ce2c45..d4be9db170 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-16 13:56-0500\n" +"POT-Creation-Date: 2020-10-16 19:50-0500\n" "PO-Revision-Date: 2020-10-14 18:12+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" @@ -1424,6 +1424,10 @@ msgstr "" "Endast monokrom, indexerad 4 bpp eller 8 bpp och 16 bpp eller högre BMP: er " "stöds: %d bpp angiven" +#: shared-module/displayio/ColorConverter.c +msgid "Only one color can be transparent at a time" +msgstr "" + #: shared-bindings/ipaddress/__init__.c msgid "Only raw int supported for ip" msgstr "Endast raw int stöds för ip" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 42c6e39d58..6ad1c722d5 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: circuitpython-cn\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-16 13:56-0500\n" +"POT-Creation-Date: 2020-10-16 19:50-0500\n" "PO-Revision-Date: 2020-10-17 02:31+0000\n" "Last-Translator: hexthat \n" "Language-Team: Chinese Hanyu Pinyin\n" @@ -1421,6 +1421,10 @@ msgstr "" "Jǐn zhīchí dān sè, suǒyǐn wéi 4bpp huò 8bpp yǐjí 16bpp huò gèng gāo de BMP: " "Gěi chū %d bpp" +#: shared-module/displayio/ColorConverter.c +msgid "Only one color can be transparent at a time" +msgstr "" + #: shared-bindings/ipaddress/__init__.c msgid "Only raw int supported for ip" msgstr "Ip jǐn zhīchí raw int" From 7d1c1c815df859eadbe180f4ca57df9a38bdec75 Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Wed, 21 Oct 2020 04:15:35 +0000 Subject: [PATCH 077/145] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (836 of 836 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/ --- locale/pt_BR.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 94ec881cb5..b80afeb1aa 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-10-16 19:50-0500\n" -"PO-Revision-Date: 2020-10-20 17:13+0000\n" +"PO-Revision-Date: 2020-10-21 19:58+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -1436,7 +1436,7 @@ msgstr "" #: shared-module/displayio/ColorConverter.c msgid "Only one color can be transparent at a time" -msgstr "" +msgstr "Apenas uma cor pode ser transparente de cada vez" #: shared-bindings/ipaddress/__init__.c msgid "Only raw int supported for ip" From ff69ab603d0ccec3b44ce72e5f365a0c91d33b97 Mon Sep 17 00:00:00 2001 From: Jerry Needell Date: Wed, 21 Oct 2020 17:07:30 -0400 Subject: [PATCH 078/145] fix CPB SPI pin definitions --- ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h b/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h index 17b044b145..ef34465dcd 100644 --- a/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h +++ b/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h @@ -59,8 +59,8 @@ #define DEFAULT_I2C_BUS_SCL (&pin_P0_04) #define DEFAULT_I2C_BUS_SDA (&pin_P0_05) -#define DEFAULT_SPI_BUS_SCK (&pin_P0_05) -#define DEFAULT_SPI_BUS_MOSI (&pin_P1_03) +#define DEFAULT_SPI_BUS_SCK (&pin_P0_02) +#define DEFAULT_SPI_BUS_MOSI (&pin_P0_03) #define DEFAULT_SPI_BUS_MISO (&pin_P0_29) #define DEFAULT_UART_BUS_RX (&pin_P0_30) From 05e4172ea0999a03ec8d59b509de1ee0307515e4 Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Wed, 21 Oct 2020 21:51:47 +0000 Subject: [PATCH 079/145] Translated using Weblate (Swedish) Currently translated at 100.0% (836 of 836 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/ --- locale/sv.po | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/locale/sv.po b/locale/sv.po index d4be9db170..22007e11f3 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-10-16 19:50-0500\n" -"PO-Revision-Date: 2020-10-14 18:12+0000\n" +"PO-Revision-Date: 2020-10-22 01:12+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.3-dev\n" +"X-Generator: Weblate 4.3.1\n" #: main.c msgid "" @@ -961,7 +961,7 @@ msgstr "Hårdvaran används redan, prova alternativa pinnar" #: shared-bindings/wifi/Radio.c msgid "Hostname must be between 1 and 253 characters" -msgstr "" +msgstr "Hostname måste vara mellan 1 och 253 tecken" #: extmod/vfs_posix_file.c py/objstringio.c msgid "I/O operation on closed file" @@ -1426,7 +1426,7 @@ msgstr "" #: shared-module/displayio/ColorConverter.c msgid "Only one color can be transparent at a time" -msgstr "" +msgstr "Bara en färg kan vara genomskinlig i taget" #: shared-bindings/ipaddress/__init__.c msgid "Only raw int supported for ip" @@ -2161,7 +2161,7 @@ msgstr "buffert för liten" #: shared-bindings/socketpool/Socket.c msgid "buffer too small for requested bytes" -msgstr "" +msgstr "buffertför liten för begärd längd" #: shared-bindings/_pew/PewPew.c msgid "buttons must be digitalio.DigitalInOut" @@ -2795,7 +2795,7 @@ msgstr "ogiltig formatspecificerare" #: shared-bindings/wifi/Radio.c msgid "invalid hostname" -msgstr "" +msgstr "Ogiltigt värdnamn" #: extmod/modussl_axtls.c msgid "invalid key" From f431f859e74a92099079bd8753c2319566dbf3c7 Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Thu, 22 Oct 2020 21:32:44 +0530 Subject: [PATCH 080/145] Initial support for native touchio --- ports/esp32s2/common-hal/touchio/TouchIn.c | 109 ++++++++++++++++++++ ports/esp32s2/common-hal/touchio/TouchIn.h | 42 ++++++++ ports/esp32s2/common-hal/touchio/__init__.c | 1 + ports/esp32s2/mpconfigport.mk | 4 + ports/esp32s2/peripherals/pins.c | 95 +++++++++-------- ports/esp32s2/peripherals/pins.h | 1 + 6 files changed, 208 insertions(+), 44 deletions(-) create mode 100644 ports/esp32s2/common-hal/touchio/TouchIn.c create mode 100644 ports/esp32s2/common-hal/touchio/TouchIn.h create mode 100644 ports/esp32s2/common-hal/touchio/__init__.c diff --git a/ports/esp32s2/common-hal/touchio/TouchIn.c b/ports/esp32s2/common-hal/touchio/TouchIn.c new file mode 100644 index 0000000000..7d30d1a325 --- /dev/null +++ b/ports/esp32s2/common-hal/touchio/TouchIn.c @@ -0,0 +1,109 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2016 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "shared-bindings/touchio/TouchIn.h" +#include "py/runtime.h" + +#include "driver/touch_pad.h" + +static const touch_pad_t touch_pad[] = { + TOUCH_PAD_NUM1, + TOUCH_PAD_NUM2, + TOUCH_PAD_NUM3, + TOUCH_PAD_NUM4, + TOUCH_PAD_NUM5, + TOUCH_PAD_NUM6, + TOUCH_PAD_NUM7, + TOUCH_PAD_NUM8, + TOUCH_PAD_NUM9, + TOUCH_PAD_NUM10, + TOUCH_PAD_NUM11, + TOUCH_PAD_NUM12, + TOUCH_PAD_NUM13, + TOUCH_PAD_NUM14 +}; + +static uint16_t get_raw_reading(touchio_touchin_obj_t *self) { + uint32_t touch_value; + touch_pad_read_raw_data(touch_pad[self->pin], &touch_value); + return touch_value; +} + +void common_hal_touchio_touchin_construct(touchio_touchin_obj_t* self, + const mcu_pin_obj_t *pin) { + if (!pin->has_touch) { + mp_raise_ValueError(translate("Invalid pin")); + } + claim_pin(pin); + + touch_pad_init(); + touch_pad_config(touch_pad[pin->number]); + + touch_pad_set_fsm_mode(TOUCH_FSM_MODE_TIMER); + touch_pad_fsm_start(); + + // Initial values for pins will vary, depending on what peripherals the pins + // share on-chip. + + // Set a "touched" threshold not too far above the initial value. + // For simple finger touch, the values may vary as much as a factor of two, + // but for touches using fruit or other objects, the difference is much less. + + self->pin = pin->number; + self->threshold = get_raw_reading(self) + 100; +} + +bool common_hal_touchio_touchin_deinited(touchio_touchin_obj_t* self) { + return self->pin == 0xff; +} + +void common_hal_touchio_touchin_deinit(touchio_touchin_obj_t* self) { + if (common_hal_touchio_touchin_deinited(self)) { + return; + } + + //touch_pad_deinit(); + + reset_pin_number(self->pin); + self->pin = 0xff; +} + +bool common_hal_touchio_touchin_get_value(touchio_touchin_obj_t *self) { + uint16_t reading = get_raw_reading(self); + return reading > self->threshold; +} + +uint16_t common_hal_touchio_touchin_get_raw_value(touchio_touchin_obj_t *self) { + return get_raw_reading(self); +} + +uint16_t common_hal_touchio_touchin_get_threshold(touchio_touchin_obj_t *self) { + return self->threshold; +} + +void common_hal_touchio_touchin_set_threshold(touchio_touchin_obj_t *self, uint16_t new_threshold) { + self->threshold = new_threshold; +} diff --git a/ports/esp32s2/common-hal/touchio/TouchIn.h b/ports/esp32s2/common-hal/touchio/TouchIn.h new file mode 100644 index 0000000000..81d80c9dd9 --- /dev/null +++ b/ports/esp32s2/common-hal/touchio/TouchIn.h @@ -0,0 +1,42 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2016 Scott Shawcroft + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef MICROPY_INCLUDED_ESP32S2_COMMON_HAL_TOUCHIO_TOUCHIN_H +#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_TOUCHIO_TOUCHIN_H + +#include "common-hal/microcontroller/Pin.h" + +#include "py/obj.h" + +typedef struct { + mp_obj_base_t base; + uint8_t pin; + uint16_t threshold; +} touchio_touchin_obj_t; + +void touchin_reset(void); + +#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_TOUCHIO_TOUCHIN_H diff --git a/ports/esp32s2/common-hal/touchio/__init__.c b/ports/esp32s2/common-hal/touchio/__init__.c new file mode 100644 index 0000000000..d2290447c9 --- /dev/null +++ b/ports/esp32s2/common-hal/touchio/__init__.c @@ -0,0 +1 @@ +// No touchio module functions. diff --git a/ports/esp32s2/mpconfigport.mk b/ports/esp32s2/mpconfigport.mk index 4e8a7bdef2..60a3a14ca9 100644 --- a/ports/esp32s2/mpconfigport.mk +++ b/ports/esp32s2/mpconfigport.mk @@ -26,4 +26,8 @@ CIRCUITPY_USB_MIDI = 0 CIRCUITPY_WIFI = 1 CIRCUITPY_ESPIDF = 1 +ifndef CIRCUITPY_TOUCHIO_USE_NATIVE +CIRCUITPY_TOUCHIO_USE_NATIVE = 1 +endif + CIRCUITPY_MODULE ?= none diff --git a/ports/esp32s2/peripherals/pins.c b/ports/esp32s2/peripherals/pins.c index 2c8b61c627..e372c84b1d 100755 --- a/ports/esp32s2/peripherals/pins.c +++ b/ports/esp32s2/peripherals/pins.c @@ -29,55 +29,62 @@ #define NO_ADC 0 #define NO_ADC_CHANNEL ADC_CHANNEL_MAX +#define TOUCH \ + .has_touch = true, + +#define NO_TOUCH \ + .has_touch = false, + // This macro is used to simplify pin definition in boards//pins.c -#define PIN(p_name, p_number, p_adc_index, p_adc_channel) \ +#define PIN(p_name, p_number, p_adc_index, p_adc_channel, p_touch_channel) \ const mcu_pin_obj_t pin_## p_name = { \ PIN_PREFIX_VALUES \ .number = p_number, \ .adc_index = p_adc_index, \ .adc_channel = p_adc_channel, \ + p_touch_channel \ } -PIN(GPIO0, 0, NO_ADC, NO_ADC_CHANNEL); -PIN(GPIO1, 1, ADC_UNIT_1, ADC_CHANNEL_0); -PIN(GPIO2, 2, ADC_UNIT_1, ADC_CHANNEL_1); -PIN(GPIO3, 3, ADC_UNIT_1, ADC_CHANNEL_2); -PIN(GPIO4, 4, ADC_UNIT_1, ADC_CHANNEL_3); -PIN(GPIO5, 5, ADC_UNIT_1, ADC_CHANNEL_4); -PIN(GPIO6, 6, ADC_UNIT_1, ADC_CHANNEL_5); -PIN(GPIO7, 7, ADC_UNIT_1, ADC_CHANNEL_6); -PIN(GPIO8, 8, ADC_UNIT_1, ADC_CHANNEL_7); -PIN(GPIO9, 9, ADC_UNIT_1, ADC_CHANNEL_8); -PIN(GPIO10, 10, ADC_UNIT_1, ADC_CHANNEL_9); -PIN(GPIO11, 11, ADC_UNIT_2, ADC_CHANNEL_0); -PIN(GPIO12, 12, ADC_UNIT_2, ADC_CHANNEL_1); -PIN(GPIO13, 13, ADC_UNIT_2, ADC_CHANNEL_2); -PIN(GPIO14, 14, ADC_UNIT_2, ADC_CHANNEL_3); -PIN(GPIO15, 15, ADC_UNIT_2, ADC_CHANNEL_4); -PIN(GPIO16, 16, ADC_UNIT_2, ADC_CHANNEL_5); -PIN(GPIO17, 17, ADC_UNIT_2, ADC_CHANNEL_6); -PIN(GPIO18, 18, ADC_UNIT_2, ADC_CHANNEL_7); -PIN(GPIO19, 19, ADC_UNIT_2, ADC_CHANNEL_8); -PIN(GPIO20, 20, ADC_UNIT_2, ADC_CHANNEL_9); -PIN(GPIO21, 21, NO_ADC, NO_ADC_CHANNEL); -PIN(GPIO26, 26, NO_ADC, NO_ADC_CHANNEL); -PIN(GPIO27, 27, NO_ADC, NO_ADC_CHANNEL); -PIN(GPIO28, 28, NO_ADC, NO_ADC_CHANNEL); -PIN(GPIO29, 29, NO_ADC, NO_ADC_CHANNEL); -PIN(GPIO30, 30, NO_ADC, NO_ADC_CHANNEL); -PIN(GPIO31, 31, NO_ADC, NO_ADC_CHANNEL); -PIN(GPIO32, 32, NO_ADC, NO_ADC_CHANNEL); -PIN(GPIO33, 33, NO_ADC, NO_ADC_CHANNEL); -PIN(GPIO34, 34, NO_ADC, NO_ADC_CHANNEL); -PIN(GPIO35, 35, NO_ADC, NO_ADC_CHANNEL); -PIN(GPIO36, 36, NO_ADC, NO_ADC_CHANNEL); -PIN(GPIO37, 37, NO_ADC, NO_ADC_CHANNEL); -PIN(GPIO38, 38, NO_ADC, NO_ADC_CHANNEL); -PIN(GPIO39, 39, NO_ADC, NO_ADC_CHANNEL); -PIN(GPIO40, 40, NO_ADC, NO_ADC_CHANNEL); -PIN(GPIO41, 41, NO_ADC, NO_ADC_CHANNEL); -PIN(GPIO42, 42, NO_ADC, NO_ADC_CHANNEL); -PIN(GPIO43, 43, NO_ADC, NO_ADC_CHANNEL); -PIN(GPIO44, 44, NO_ADC, NO_ADC_CHANNEL); -PIN(GPIO45, 45, NO_ADC, NO_ADC_CHANNEL); -PIN(GPIO46, 46, NO_ADC, NO_ADC_CHANNEL); +PIN(GPIO0, 0, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); +PIN(GPIO1, 1, ADC_UNIT_1, ADC_CHANNEL_0, TOUCH); +PIN(GPIO2, 2, ADC_UNIT_1, ADC_CHANNEL_1, TOUCH); +PIN(GPIO3, 3, ADC_UNIT_1, ADC_CHANNEL_2, TOUCH); +PIN(GPIO4, 4, ADC_UNIT_1, ADC_CHANNEL_3, TOUCH); +PIN(GPIO5, 5, ADC_UNIT_1, ADC_CHANNEL_4, TOUCH); +PIN(GPIO6, 6, ADC_UNIT_1, ADC_CHANNEL_5, TOUCH); +PIN(GPIO7, 7, ADC_UNIT_1, ADC_CHANNEL_6, TOUCH); +PIN(GPIO8, 8, ADC_UNIT_1, ADC_CHANNEL_7, TOUCH); +PIN(GPIO9, 9, ADC_UNIT_1, ADC_CHANNEL_8, TOUCH); +PIN(GPIO10, 10, ADC_UNIT_1, ADC_CHANNEL_9, TOUCH); +PIN(GPIO11, 11, ADC_UNIT_2, ADC_CHANNEL_0, TOUCH); +PIN(GPIO12, 12, ADC_UNIT_2, ADC_CHANNEL_1, TOUCH); +PIN(GPIO13, 13, ADC_UNIT_2, ADC_CHANNEL_2, TOUCH); +PIN(GPIO14, 14, ADC_UNIT_2, ADC_CHANNEL_3, TOUCH); +PIN(GPIO15, 15, ADC_UNIT_2, ADC_CHANNEL_4, NO_TOUCH); +PIN(GPIO16, 16, ADC_UNIT_2, ADC_CHANNEL_5, NO_TOUCH); +PIN(GPIO17, 17, ADC_UNIT_2, ADC_CHANNEL_6, NO_TOUCH); +PIN(GPIO18, 18, ADC_UNIT_2, ADC_CHANNEL_7, NO_TOUCH); +PIN(GPIO19, 19, ADC_UNIT_2, ADC_CHANNEL_8, NO_TOUCH); +PIN(GPIO20, 20, ADC_UNIT_2, ADC_CHANNEL_9, NO_TOUCH); +PIN(GPIO21, 21, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); +PIN(GPIO26, 26, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); +PIN(GPIO27, 27, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); +PIN(GPIO28, 28, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); +PIN(GPIO29, 29, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); +PIN(GPIO30, 30, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); +PIN(GPIO31, 31, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); +PIN(GPIO32, 32, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); +PIN(GPIO33, 33, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); +PIN(GPIO34, 34, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); +PIN(GPIO35, 35, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); +PIN(GPIO36, 36, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); +PIN(GPIO37, 37, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); +PIN(GPIO38, 38, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); +PIN(GPIO39, 39, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); +PIN(GPIO40, 40, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); +PIN(GPIO41, 41, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); +PIN(GPIO42, 42, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); +PIN(GPIO43, 43, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); +PIN(GPIO44, 44, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); +PIN(GPIO45, 45, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); +PIN(GPIO46, 46, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); diff --git a/ports/esp32s2/peripherals/pins.h b/ports/esp32s2/peripherals/pins.h index 84123a80e6..8be57f320f 100644 --- a/ports/esp32s2/peripherals/pins.h +++ b/ports/esp32s2/peripherals/pins.h @@ -41,6 +41,7 @@ typedef struct { PIN_PREFIX_FIELDS gpio_num_t number; + bool has_touch:1; uint8_t adc_index:2; uint8_t adc_channel:6; } mcu_pin_obj_t; From b520498c733356afdc418bd5a9841c7496a3926e Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 1 Oct 2020 10:30:35 -0500 Subject: [PATCH 081/145] sharpdisplay: Re-use supervisor allocations if possible This is enabled by #3482 I was unable to determine why previously I had added sizeof(void*) to the GC heap allocation, so I removed that code as a mistake. --- .../sharpdisplay/SharpMemoryFramebuffer.c | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/shared-module/sharpdisplay/SharpMemoryFramebuffer.c b/shared-module/sharpdisplay/SharpMemoryFramebuffer.c index c234468283..b199e98d63 100644 --- a/shared-module/sharpdisplay/SharpMemoryFramebuffer.c +++ b/shared-module/sharpdisplay/SharpMemoryFramebuffer.c @@ -34,21 +34,22 @@ #include "shared-module/sharpdisplay/SharpMemoryFramebuffer.h" #include "supervisor/memory.h" +#include "supervisor/shared/safe_mode.h" #define SHARPMEM_BIT_WRITECMD_LSB (0x80) #define SHARPMEM_BIT_VCOM_LSB (0x40) -static inline void *hybrid_alloc(size_t sz) { - if (gc_alloc_possible()) { - return m_malloc(sz + sizeof(void*), true); - } else { - supervisor_allocation *allocation = allocate_memory(align32_size(sz), false); - if (!allocation) { - return NULL; - } +static void *hybrid_alloc(size_t sz) { + supervisor_allocation *allocation = allocate_memory(align32_size(sz), false); + if (allocation) { memset(allocation->ptr, 0, sz); return allocation->ptr; } + if (gc_alloc_possible()) { + return m_malloc(sz, true); + } + reset_into_safe_mode(MEM_MANAGE); + return NULL; // unreached } static inline void hybrid_free(void *ptr_in) { @@ -155,7 +156,8 @@ void common_hal_sharpdisplay_framebuffer_construct(sharpdisplay_framebuffer_obj_ int row_stride = common_hal_sharpdisplay_framebuffer_get_row_stride(self); self->bufinfo.len = row_stride * height + 2; - self->bufinfo.buf = gc_alloc(self->bufinfo.len, false, true); + // re-use a supervisor allocation if possible + self->bufinfo.buf = hybrid_alloc(self->bufinfo.len); uint8_t *data = self->bufinfo.buf; *data++ = SHARPMEM_BIT_WRITECMD_LSB; From 04cf88deae155f99995e510270fd133ed2039f45 Mon Sep 17 00:00:00 2001 From: Antonin ENFRUN Date: Thu, 22 Oct 2020 07:50:31 +0000 Subject: [PATCH 082/145] Translated using Weblate (French) Currently translated at 100.0% (836 of 836 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fr/ --- locale/fr.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/fr.po b/locale/fr.po index 9bfc14428a..cf0ea4fc31 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-10-16 19:50-0500\n" -"PO-Revision-Date: 2020-10-17 15:35+0000\n" +"PO-Revision-Date: 2020-10-22 20:48+0000\n" "Last-Translator: Antonin ENFRUN \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.3.1-dev\n" +"X-Generator: Weblate 4.3.1\n" #: main.c msgid "" @@ -1439,7 +1439,7 @@ msgstr "" #: shared-module/displayio/ColorConverter.c msgid "Only one color can be transparent at a time" -msgstr "" +msgstr "Une seule couleur peut être transparente à la fois" #: shared-bindings/ipaddress/__init__.c msgid "Only raw int supported for ip" @@ -2185,7 +2185,7 @@ msgstr "tampon trop petit" #: shared-bindings/socketpool/Socket.c msgid "buffer too small for requested bytes" -msgstr "" +msgstr "tampon trop petit pour le nombre d'octets demandé" #: shared-bindings/_pew/PewPew.c msgid "buttons must be digitalio.DigitalInOut" From f4f6b082b46ae91ea9647bca5166bb0e6851b452 Mon Sep 17 00:00:00 2001 From: hexthat Date: Thu, 22 Oct 2020 02:52:04 +0000 Subject: [PATCH 083/145] Translated using Weblate (Chinese (Pinyin)) Currently translated at 100.0% (836 of 836 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/ --- locale/zh_Latn_pinyin.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 6ad1c722d5..13d0dfa796 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: circuitpython-cn\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-10-16 19:50-0500\n" -"PO-Revision-Date: 2020-10-17 02:31+0000\n" +"PO-Revision-Date: 2020-10-22 20:48+0000\n" "Last-Translator: hexthat \n" "Language-Team: Chinese Hanyu Pinyin\n" "Language: zh_Latn_pinyin\n" @@ -15,7 +15,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.3.1-dev\n" +"X-Generator: Weblate 4.3.1\n" #: main.c msgid "" @@ -1423,7 +1423,7 @@ msgstr "" #: shared-module/displayio/ColorConverter.c msgid "Only one color can be transparent at a time" -msgstr "" +msgstr "Yīcì zhǐ néng yǒuyī zhǒng yánsè shì tòumíng de" #: shared-bindings/ipaddress/__init__.c msgid "Only raw int supported for ip" @@ -2153,7 +2153,7 @@ msgstr "huǎnchōng qū tài xiǎo" #: shared-bindings/socketpool/Socket.c msgid "buffer too small for requested bytes" -msgstr "" +msgstr "huǎn chōng qū tài xiǎo, duì yú qǐng qiú de zì jié" #: shared-bindings/_pew/PewPew.c msgid "buttons must be digitalio.DigitalInOut" From 73aae6bbcd10abac422199b2f484859f1a4c83fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tino=20Mart=C3=ADnez?= <43123591+tinomtzlpz@users.noreply.github.com> Date: Thu, 22 Oct 2020 16:09:17 -0500 Subject: [PATCH 084/145] Update es.po Fixed typos UARL -> UART --- locale/es.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/locale/es.po b/locale/es.po index 8cd5e6c22b..7b6dac46ea 100644 --- a/locale/es.po +++ b/locale/es.po @@ -1826,15 +1826,15 @@ msgstr "No se pudo encontrar el búfer para UART" #: ports/stm/common-hal/busio/UART.c msgid "UART De-init error" -msgstr "Error de desinicialización de UARL" +msgstr "Error de desinicialización de UART" #: ports/stm/common-hal/busio/UART.c msgid "UART Init Error" -msgstr "Error de inicialización de UARL" +msgstr "Error de inicialización de UART" #: ports/stm/common-hal/busio/UART.c msgid "UART Re-init error" -msgstr "Error de reinicialización de UARL" +msgstr "Error de reinicialización de UART" #: ports/stm/common-hal/busio/UART.c msgid "UART write error" From efd8f1ab888d1b72c4b25972e2e2d54ded3af455 Mon Sep 17 00:00:00 2001 From: Alvaro Figueroa Date: Thu, 22 Oct 2020 22:02:25 +0000 Subject: [PATCH 085/145] Translated using Weblate (Spanish) Currently translated at 100.0% (836 of 836 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/es/ --- locale/es.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/es.po b/locale/es.po index 8cd5e6c22b..b3a4333a80 100644 --- a/locale/es.po +++ b/locale/es.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-10-16 19:50-0500\n" -"PO-Revision-Date: 2020-10-17 02:31+0000\n" +"PO-Revision-Date: 2020-10-22 22:15+0000\n" "Last-Translator: Alvaro Figueroa \n" "Language-Team: \n" "Language: es\n" @@ -16,7 +16,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.3.1-dev\n" +"X-Generator: Weblate 4.3.1\n" #: main.c msgid "" @@ -1434,7 +1434,7 @@ msgstr "" #: shared-module/displayio/ColorConverter.c msgid "Only one color can be transparent at a time" -msgstr "" +msgstr "Solo un color puede ser transparente a la vez" #: shared-bindings/ipaddress/__init__.c msgid "Only raw int supported for ip" @@ -2175,7 +2175,7 @@ msgstr "buffer demasiado pequeño" #: shared-bindings/socketpool/Socket.c msgid "buffer too small for requested bytes" -msgstr "" +msgstr "búfer muy pequeño para los bytes solicitados" #: shared-bindings/_pew/PewPew.c msgid "buttons must be digitalio.DigitalInOut" From ef97ed6ab6938bc9c12987d7584cbc715a0f85bf Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Fri, 23 Oct 2020 13:17:49 +0530 Subject: [PATCH 086/145] Update touchio implementation --- ports/esp32s2/common-hal/touchio/TouchIn.c | 41 ++++------ ports/esp32s2/common-hal/touchio/TouchIn.h | 2 +- ports/esp32s2/peripherals/pins.c | 94 +++++++++++----------- ports/esp32s2/peripherals/pins.h | 3 +- 4 files changed, 62 insertions(+), 78 deletions(-) diff --git a/ports/esp32s2/common-hal/touchio/TouchIn.c b/ports/esp32s2/common-hal/touchio/TouchIn.c index 7d30d1a325..3e3e4b5511 100644 --- a/ports/esp32s2/common-hal/touchio/TouchIn.c +++ b/ports/esp32s2/common-hal/touchio/TouchIn.c @@ -29,42 +29,31 @@ #include "driver/touch_pad.h" -static const touch_pad_t touch_pad[] = { - TOUCH_PAD_NUM1, - TOUCH_PAD_NUM2, - TOUCH_PAD_NUM3, - TOUCH_PAD_NUM4, - TOUCH_PAD_NUM5, - TOUCH_PAD_NUM6, - TOUCH_PAD_NUM7, - TOUCH_PAD_NUM8, - TOUCH_PAD_NUM9, - TOUCH_PAD_NUM10, - TOUCH_PAD_NUM11, - TOUCH_PAD_NUM12, - TOUCH_PAD_NUM13, - TOUCH_PAD_NUM14 -}; - static uint16_t get_raw_reading(touchio_touchin_obj_t *self) { uint32_t touch_value; - touch_pad_read_raw_data(touch_pad[self->pin], &touch_value); + touch_pad_read_raw_data((touch_pad_t)self->pin->touch_channel, &touch_value); + if (touch_value > UINT16_MAX) { + return UINT16_MAX; + } return touch_value; } void common_hal_touchio_touchin_construct(touchio_touchin_obj_t* self, const mcu_pin_obj_t *pin) { - if (!pin->has_touch) { + if (pin->touch_channel == TOUCH_PAD_MAX) { mp_raise_ValueError(translate("Invalid pin")); } claim_pin(pin); touch_pad_init(); - touch_pad_config(touch_pad[pin->number]); + touch_pad_config((touch_pad_t)pin->touch_channel); touch_pad_set_fsm_mode(TOUCH_FSM_MODE_TIMER); touch_pad_fsm_start(); + // wait for "raw data" to reset + mp_hal_delay_ms(10); + // Initial values for pins will vary, depending on what peripherals the pins // share on-chip. @@ -72,23 +61,21 @@ void common_hal_touchio_touchin_construct(touchio_touchin_obj_t* self, // For simple finger touch, the values may vary as much as a factor of two, // but for touches using fruit or other objects, the difference is much less. - self->pin = pin->number; + self->pin = pin; self->threshold = get_raw_reading(self) + 100; } bool common_hal_touchio_touchin_deinited(touchio_touchin_obj_t* self) { - return self->pin == 0xff; + return self->pin == NULL; } void common_hal_touchio_touchin_deinit(touchio_touchin_obj_t* self) { if (common_hal_touchio_touchin_deinited(self)) { return; } - - //touch_pad_deinit(); - - reset_pin_number(self->pin); - self->pin = 0xff; + touch_pad_deinit(); + reset_pin_number(self->pin->touch_channel); + self->pin = NULL; } bool common_hal_touchio_touchin_get_value(touchio_touchin_obj_t *self) { diff --git a/ports/esp32s2/common-hal/touchio/TouchIn.h b/ports/esp32s2/common-hal/touchio/TouchIn.h index 81d80c9dd9..585bb37bf1 100644 --- a/ports/esp32s2/common-hal/touchio/TouchIn.h +++ b/ports/esp32s2/common-hal/touchio/TouchIn.h @@ -33,7 +33,7 @@ typedef struct { mp_obj_base_t base; - uint8_t pin; + const mcu_pin_obj_t * pin; uint16_t threshold; } touchio_touchin_obj_t; diff --git a/ports/esp32s2/peripherals/pins.c b/ports/esp32s2/peripherals/pins.c index e372c84b1d..0d3d89ad50 100755 --- a/ports/esp32s2/peripherals/pins.c +++ b/ports/esp32s2/peripherals/pins.c @@ -29,11 +29,7 @@ #define NO_ADC 0 #define NO_ADC_CHANNEL ADC_CHANNEL_MAX -#define TOUCH \ - .has_touch = true, - -#define NO_TOUCH \ - .has_touch = false, +#define NO_TOUCH_CHANNEL TOUCH_PAD_MAX // This macro is used to simplify pin definition in boards//pins.c #define PIN(p_name, p_number, p_adc_index, p_adc_channel, p_touch_channel) \ @@ -42,49 +38,49 @@ const mcu_pin_obj_t pin_## p_name = { \ .number = p_number, \ .adc_index = p_adc_index, \ .adc_channel = p_adc_channel, \ - p_touch_channel \ + .touch_channel = p_touch_channel, \ } -PIN(GPIO0, 0, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); -PIN(GPIO1, 1, ADC_UNIT_1, ADC_CHANNEL_0, TOUCH); -PIN(GPIO2, 2, ADC_UNIT_1, ADC_CHANNEL_1, TOUCH); -PIN(GPIO3, 3, ADC_UNIT_1, ADC_CHANNEL_2, TOUCH); -PIN(GPIO4, 4, ADC_UNIT_1, ADC_CHANNEL_3, TOUCH); -PIN(GPIO5, 5, ADC_UNIT_1, ADC_CHANNEL_4, TOUCH); -PIN(GPIO6, 6, ADC_UNIT_1, ADC_CHANNEL_5, TOUCH); -PIN(GPIO7, 7, ADC_UNIT_1, ADC_CHANNEL_6, TOUCH); -PIN(GPIO8, 8, ADC_UNIT_1, ADC_CHANNEL_7, TOUCH); -PIN(GPIO9, 9, ADC_UNIT_1, ADC_CHANNEL_8, TOUCH); -PIN(GPIO10, 10, ADC_UNIT_1, ADC_CHANNEL_9, TOUCH); -PIN(GPIO11, 11, ADC_UNIT_2, ADC_CHANNEL_0, TOUCH); -PIN(GPIO12, 12, ADC_UNIT_2, ADC_CHANNEL_1, TOUCH); -PIN(GPIO13, 13, ADC_UNIT_2, ADC_CHANNEL_2, TOUCH); -PIN(GPIO14, 14, ADC_UNIT_2, ADC_CHANNEL_3, TOUCH); -PIN(GPIO15, 15, ADC_UNIT_2, ADC_CHANNEL_4, NO_TOUCH); -PIN(GPIO16, 16, ADC_UNIT_2, ADC_CHANNEL_5, NO_TOUCH); -PIN(GPIO17, 17, ADC_UNIT_2, ADC_CHANNEL_6, NO_TOUCH); -PIN(GPIO18, 18, ADC_UNIT_2, ADC_CHANNEL_7, NO_TOUCH); -PIN(GPIO19, 19, ADC_UNIT_2, ADC_CHANNEL_8, NO_TOUCH); -PIN(GPIO20, 20, ADC_UNIT_2, ADC_CHANNEL_9, NO_TOUCH); -PIN(GPIO21, 21, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); -PIN(GPIO26, 26, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); -PIN(GPIO27, 27, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); -PIN(GPIO28, 28, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); -PIN(GPIO29, 29, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); -PIN(GPIO30, 30, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); -PIN(GPIO31, 31, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); -PIN(GPIO32, 32, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); -PIN(GPIO33, 33, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); -PIN(GPIO34, 34, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); -PIN(GPIO35, 35, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); -PIN(GPIO36, 36, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); -PIN(GPIO37, 37, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); -PIN(GPIO38, 38, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); -PIN(GPIO39, 39, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); -PIN(GPIO40, 40, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); -PIN(GPIO41, 41, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); -PIN(GPIO42, 42, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); -PIN(GPIO43, 43, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); -PIN(GPIO44, 44, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); -PIN(GPIO45, 45, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); -PIN(GPIO46, 46, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH); +PIN(GPIO0, 0, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +PIN(GPIO1, 1, ADC_UNIT_1, ADC_CHANNEL_0, TOUCH_PAD_NUM1); +PIN(GPIO2, 2, ADC_UNIT_1, ADC_CHANNEL_1, TOUCH_PAD_NUM2); +PIN(GPIO3, 3, ADC_UNIT_1, ADC_CHANNEL_2, TOUCH_PAD_NUM3); +PIN(GPIO4, 4, ADC_UNIT_1, ADC_CHANNEL_3, TOUCH_PAD_NUM4); +PIN(GPIO5, 5, ADC_UNIT_1, ADC_CHANNEL_4, TOUCH_PAD_NUM5); +PIN(GPIO6, 6, ADC_UNIT_1, ADC_CHANNEL_5, TOUCH_PAD_NUM6); +PIN(GPIO7, 7, ADC_UNIT_1, ADC_CHANNEL_6, TOUCH_PAD_NUM7); +PIN(GPIO8, 8, ADC_UNIT_1, ADC_CHANNEL_7, TOUCH_PAD_NUM8); +PIN(GPIO9, 9, ADC_UNIT_1, ADC_CHANNEL_8, TOUCH_PAD_NUM9); +PIN(GPIO10, 10, ADC_UNIT_1, ADC_CHANNEL_9, TOUCH_PAD_NUM10); +PIN(GPIO11, 11, ADC_UNIT_2, ADC_CHANNEL_0, TOUCH_PAD_NUM11); +PIN(GPIO12, 12, ADC_UNIT_2, ADC_CHANNEL_1, TOUCH_PAD_NUM12); +PIN(GPIO13, 13, ADC_UNIT_2, ADC_CHANNEL_2, TOUCH_PAD_NUM13); +PIN(GPIO14, 14, ADC_UNIT_2, ADC_CHANNEL_3, TOUCH_PAD_NUM14); +PIN(GPIO15, 15, ADC_UNIT_2, ADC_CHANNEL_4, NO_TOUCH_CHANNEL); +PIN(GPIO16, 16, ADC_UNIT_2, ADC_CHANNEL_5, NO_TOUCH_CHANNEL); +PIN(GPIO17, 17, ADC_UNIT_2, ADC_CHANNEL_6, NO_TOUCH_CHANNEL); +PIN(GPIO18, 18, ADC_UNIT_2, ADC_CHANNEL_7, NO_TOUCH_CHANNEL); +PIN(GPIO19, 19, ADC_UNIT_2, ADC_CHANNEL_8, NO_TOUCH_CHANNEL); +PIN(GPIO20, 20, ADC_UNIT_2, ADC_CHANNEL_9, NO_TOUCH_CHANNEL); +PIN(GPIO21, 21, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +PIN(GPIO26, 26, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +PIN(GPIO27, 27, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +PIN(GPIO28, 28, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +PIN(GPIO29, 29, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +PIN(GPIO30, 30, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +PIN(GPIO31, 31, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +PIN(GPIO32, 32, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +PIN(GPIO33, 33, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +PIN(GPIO34, 34, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +PIN(GPIO35, 35, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +PIN(GPIO36, 36, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +PIN(GPIO37, 37, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +PIN(GPIO38, 38, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +PIN(GPIO39, 39, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +PIN(GPIO40, 40, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +PIN(GPIO41, 41, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +PIN(GPIO42, 42, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +PIN(GPIO43, 43, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +PIN(GPIO44, 44, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +PIN(GPIO45, 45, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +PIN(GPIO46, 46, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); diff --git a/ports/esp32s2/peripherals/pins.h b/ports/esp32s2/peripherals/pins.h index 8be57f320f..c78eb83851 100644 --- a/ports/esp32s2/peripherals/pins.h +++ b/ports/esp32s2/peripherals/pins.h @@ -37,13 +37,14 @@ #include "components/hal/include/hal/gpio_types.h" #include "components/hal/include/hal/adc_types.h" +#include "components/hal/include/hal/touch_sensor_types.h" typedef struct { PIN_PREFIX_FIELDS gpio_num_t number; - bool has_touch:1; uint8_t adc_index:2; uint8_t adc_channel:6; + uint8_t touch_channel; } mcu_pin_obj_t; extern const mcu_pin_obj_t pin_GPIO0; From 2ebd06f8ee3d5818cd0c61468a7e12072b59c973 Mon Sep 17 00:00:00 2001 From: 0-Arngerdur-1 Date: Fri, 23 Oct 2020 15:14:45 -0500 Subject: [PATCH 087/145] Fix typos and fix translate --- locale/es.po | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/locale/es.po b/locale/es.po index b3a4333a80..e2ae41ee3d 100644 --- a/locale/es.po +++ b/locale/es.po @@ -168,7 +168,7 @@ msgstr "'%s' espera un registro" #: py/emitinlinethumb.c #, c-format msgid "'%s' expects a special register" -msgstr "'%s' espera un carácter" +msgstr "'%s' espera un registro especial" #: py/emitinlinethumb.c #, c-format @@ -239,7 +239,7 @@ msgstr "el objeto 'coroutine' no es un iterador" #: py/compile.c msgid "'data' requires at least 2 arguments" -msgstr "'data' requiere como minomo 2 argumentos" +msgstr "'data' requiere como mínimo 2 argumentos" #: py/compile.c msgid "'data' requires integer arguments" @@ -255,7 +255,7 @@ msgstr "'return' fuera de una función" #: py/compile.c msgid "'yield from' inside async function" -msgstr "'yield from' dentro función asincrónica" +msgstr "'yield from' dentro de una función asincrónica" #: py/compile.c msgid "'yield' outside function" @@ -289,7 +289,7 @@ msgstr "ADC2 está siendo usado por WiFi" #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, c-format msgid "Address must be %d bytes long" -msgstr "La dirección debe ser %d bytes de largo" +msgstr "La dirección debe tener %d bytes de largo" #: shared-bindings/_bleio/Address.c msgid "Address type out of range" @@ -318,9 +318,7 @@ msgstr "Todos los canales de eventos estan siendo usados" #: ports/atmel-samd/audio_dma.c ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "All sync event channels in use" -msgstr "" -"Todos los canales de eventos de sincronización (sync event channels) están " -"siendo utilizados" +msgstr "Todos los canales de eventos de sincronización (sync event channels) están siendo utilizados" #: shared-bindings/pwmio/PWMOut.c msgid "All timers for this pin are in use" @@ -347,7 +345,7 @@ msgstr "Ya se encuentra publicando." #: ports/atmel-samd/common-hal/canio/Listener.c msgid "Already have all-matches listener" -msgstr "Ya se tiene un escucha todas-las-coincidencias" +msgstr "Ya se tiene un escucha de todas las coincidencias" #: shared-module/memorymonitor/AllocationAlarm.c #: shared-module/memorymonitor/AllocationSize.c @@ -370,7 +368,7 @@ msgstr "Funcionalidad AnalogOut no soportada" #: shared-bindings/analogio/AnalogOut.c msgid "AnalogOut is only 16 bits. Value must be less than 65536." -msgstr "AnalogOut es solo de 16 bits. Value debe ser menos a 65536." +msgstr "AnalogOut es solo de 16 bits. El valor debe ser menor que 65536." #: ports/atmel-samd/common-hal/analogio/AnalogOut.c msgid "AnalogOut not supported on given pin" @@ -383,7 +381,7 @@ msgstr "Otro envío ya está activo" #: shared-bindings/pulseio/PulseOut.c msgid "Array must contain halfwords (type 'H')" -msgstr "Array debe contener media palabra (type 'H')" +msgstr "El array debe contener medias palabras (escriba 'H')" #: shared-bindings/nvm/ByteArray.c msgid "Array values should be single bytes." @@ -4013,7 +4011,7 @@ msgstr "zi debe ser una forma (n_section,2)" #~ msgstr "Falló el iniciar borrado de flash, err 0x%04x" #~ msgid "Flash write failed" -#~ msgstr "Falló la escritura" +#~ msgstr "Falló la escritura flash" #~ msgid "Flash write failed to start, err 0x%04x" #~ msgstr "Falló el iniciar la escritura de flash, err 0x%04x" @@ -4070,7 +4068,7 @@ msgstr "zi debe ser una forma (n_section,2)" #~ msgstr "Sin soporte PulseIn para %q" #~ msgid "No hardware support for analog out." -#~ msgstr "Sin soporte de hardware para analog out" +#~ msgstr "Sin soporte de hardware para salida analógica" #~ msgid "Not connected." #~ msgstr "No conectado." @@ -4079,24 +4077,24 @@ msgstr "zi debe ser una forma (n_section,2)" #~ msgstr "Solo formato Windows, BMP sin comprimir soportado %d" #~ msgid "Only bit maps of 8 bit color or less are supported" -#~ msgstr "Solo se admiten bit maps de color de 8 bits o menos" +#~ msgstr "Solo se admiten mapas de bits de color de 8 bits o menos" #~ msgid "" #~ "Only monochrome, indexed 8bpp, and 16bpp or greater BMPs supported: %d " #~ "bpp given" #~ msgstr "" #~ "Solo se admiten BMP monocromos, indexados de 8bpp y 16bpp o superiores:%d " -#~ "bppdado" +#~ "bpp dado" #, fuzzy #~ msgid "Only slices with step=1 (aka None) are supported" -#~ msgstr "solo se admiten segmentos con step=1 (alias None)" +#~ msgstr "Solo se admiten segmentos con step=1 (alias None)" #~ msgid "Only true color (24 bpp or higher) BMP supported %x" #~ msgstr "Solo color verdadero (24 bpp o superior) BMP admitido %x" #~ msgid "Only tx supported on UART1 (GPIO2)." -#~ msgstr "Solo tx soportada en UART1 (GPIO2)" +#~ msgstr "Solo tx soportada en UART1 (GPIO2)." #~ msgid "PWM not supported on pin %d" #~ msgstr "El pin %d no soporta PWM" @@ -4111,11 +4109,11 @@ msgstr "zi debe ser una forma (n_section,2)" #~ msgstr "Pines no válidos para SPI" #~ msgid "Pixel beyond bounds of buffer" -#~ msgstr "Pixel beyond bounds of buffer" +#~ msgstr "Píxel fuera de los límites del búfer" #, fuzzy #~ msgid "Range out of bounds" -#~ msgstr "address fuera de límites" +#~ msgstr "Rango fuera de límites" #~ msgid "STA must be active" #~ msgstr "STA debe estar activo" @@ -4135,10 +4133,10 @@ msgstr "zi debe ser una forma (n_section,2)" #~ msgstr "" #~ "El heap de CircuitPython estaba corrupto porque el stack era demasiado " #~ "pequeño.\n" -#~ "Aumente los límites del tamaño del stacj y presione reset (después de " +#~ "Aumente los límites del tamaño del stack y presione reset (después de " #~ "expulsarCIRCUITPY).\n" #~ "Si no cambió el stack, entonces reporte un issue aquí con el contenido " -#~ "desu unidad CIRCUITPY:\n" +#~ "de su unidad CIRCUITPY:\n" #~ msgid "" #~ "The microcontroller's power dipped. Please make sure your power supply " @@ -4191,7 +4189,7 @@ msgstr "zi debe ser una forma (n_section,2)" #~ "malo ha sucedido.\n" #~ msgid "bad GATT role" -#~ msgstr "mal GATT role" +#~ msgstr "rol de GATT malo" #~ msgid "bits must be 8" #~ msgstr "bits debe ser 8" @@ -4224,7 +4222,7 @@ msgstr "zi debe ser una forma (n_section,2)" #~ msgstr "no se puede establecer STA config" #~ msgid "characteristics includes an object that is not a Characteristic" -#~ msgstr "characteristics incluye un objeto que no es una Characteristica" +#~ msgstr "characteristics incluye un objeto que no es una Characteristic" #~ msgid "color buffer must be a buffer or int" #~ msgstr "color buffer deber ser un buffer o un int" From b4eb27557d98084024e9392dcb64bf9724c04517 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sat, 24 Oct 2020 07:26:01 -0500 Subject: [PATCH 088/145] workflows: Upload stubs to s3 --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fa576bbf0a..0792d36a01 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -111,11 +111,13 @@ jobs: with: name: mpy-cross.static-x64-windows path: mpy-cross/mpy-cross.static.exe - - name: Upload mpy-cross builds to S3 + - name: Upload stubs and mpy-cross builds to S3 run: | [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static-raspbian s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-raspbian-${{ env.CP_VERSION }} --no-progress --region us-east-1 [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-amd64-linux-${{ env.CP_VERSION }} --no-progress --region us-east-1 [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static.exe s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-x64-windows-${{ env.CP_VERSION }}.exe --no-progress --region us-east-1 + zip -9 circuitpython-stubs.CP_VERSION }}.zip stubs + [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp circuitpython-stubs.zip s3://adafruit-circuit-python/bin/mpy-cross/circuitpython-stubs-${{ env.CP_VERSION }}.zip --no-progress --region us-east-1 env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} From 4cad5478e6b6abe6c15546fee4d1a81e180f6d15 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sat, 24 Oct 2020 13:15:50 -0500 Subject: [PATCH 089/145] ulab: Incorporate bugfixes (update to tag 0.54.5) In particular, this closes #3954. --- extmod/ulab | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extmod/ulab b/extmod/ulab index 11a7ecff6d..7f2c1ae52b 160000 --- a/extmod/ulab +++ b/extmod/ulab @@ -1 +1 @@ -Subproject commit 11a7ecff6d76a02644ff23a734b792afaa615e44 +Subproject commit 7f2c1ae52bee57ce32ac0a74652610cc233d3442 From 543316a8fbaa78db485c1135b8f9ee5c2d1982e3 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 25 Oct 2020 13:26:55 -0500 Subject: [PATCH 090/145] ulab: Update again .. pull in various doc build fixes that prevented the previous commit from building. This is still "0.54.5", the tag was updated in micropython-ulab (since no functional difference was introduced, only doc and CI differences, I imagine) --- extmod/ulab | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extmod/ulab b/extmod/ulab index 7f2c1ae52b..8242b84753 160000 --- a/extmod/ulab +++ b/extmod/ulab @@ -1 +1 @@ -Subproject commit 7f2c1ae52bee57ce32ac0a74652610cc233d3442 +Subproject commit 8242b84753355433b61230ab6631c06e5ac77f35 From 85aa851714f8bc24817b2d56b3286419b43b537a Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 25 Oct 2020 15:21:13 -0500 Subject: [PATCH 091/145] make translate --- locale/circuitpython.pot | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index cf92b0584a..cc058e61a2 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-15 16:06+0530\n" +"POT-Creation-Date: 2020-10-25 15:21-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -2863,6 +2863,14 @@ msgstr "" msgid "maximum recursion depth exceeded" msgstr "" +#: extmod/ulab/code/approx/approx.c +msgid "maxiter must be > 0" +msgstr "" + +#: extmod/ulab/code/approx/approx.c +msgid "maxiter should be > 0" +msgstr "" + #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" @@ -3295,6 +3303,10 @@ msgstr "" msgid "sort argument must be an ndarray" msgstr "" +#: extmod/ulab/code/numerical/numerical.c +msgid "sorted axis can't be longer than 65535" +msgstr "" + #: extmod/ulab/code/filter/filter.c msgid "sos array must be of shape (n_section, 6)" msgstr "" From c43011f149b981b4f9919a221f4ad4e9861b43a1 Mon Sep 17 00:00:00 2001 From: Senuros Date: Sun, 25 Oct 2020 22:08:10 +0100 Subject: [PATCH 092/145] Improving German translation --- locale/de_DE.po | 62 ++++++++++++++++++++++++------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/locale/de_DE.po b/locale/de_DE.po index e54b670a90..0e2e5a038e 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -73,7 +73,7 @@ msgstr "Der Index %q befindet sich außerhalb des Bereiches" #: py/obj.c msgid "%q indices must be integers, not %q" -msgstr "" +msgstr "%q Indizes müssen Integer sein, nicht %q" #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" @@ -81,7 +81,7 @@ msgstr "%q Liste muss eine Liste sein" #: shared-bindings/memorymonitor/AllocationAlarm.c msgid "%q must be >= 0" -msgstr "" +msgstr "%q muss >= 0 sein" #: shared-bindings/_bleio/CharacteristicBuffer.c #: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c @@ -97,11 +97,11 @@ msgstr "%q muss ein Tupel der Länge 2 sein" #: shared-bindings/canio/Match.c msgid "%q out of range" -msgstr "" +msgstr "%q außerhalb des Bereichs" #: ports/atmel-samd/common-hal/microcontroller/Pin.c msgid "%q pin invalid" -msgstr "" +msgstr "%q Pin ungültig" #: shared-bindings/fontio/BuiltinFont.c msgid "%q should be an int" @@ -117,11 +117,11 @@ msgstr "'%q' Argument erforderlich" #: py/runtime.c msgid "'%q' object cannot assign attribute '%q'" -msgstr "" +msgstr "'%q' Objekt kann das Attribut '%q' nicht zuweisen" #: py/proto.c msgid "'%q' object does not support '%q'" -msgstr "" +msgstr "'%q' Objekt unterstützt '%q' nicht" #: py/obj.c msgid "'%q' object does not support item assignment" @@ -129,11 +129,11 @@ msgstr "" #: py/obj.c msgid "'%q' object does not support item deletion" -msgstr "" +msgstr "'%q' objekt unterstützt das " #: py/runtime.c msgid "'%q' object has no attribute '%q'" -msgstr "" +msgstr "'%q' Objekt hat kein Attribut '%q'" #: py/runtime.c msgid "'%q' object is not an iterator" @@ -141,7 +141,7 @@ msgstr "" #: py/objtype.c py/runtime.c msgid "'%q' object is not callable" -msgstr "" +msgstr "'%q' Objekt ist kein callable" #: py/runtime.c msgid "'%q' object is not iterable" @@ -280,7 +280,7 @@ msgstr "Ein Hardware Interrupt Kanal wird schon benutzt" #: ports/esp32s2/common-hal/analogio/AnalogIn.c msgid "ADC2 is being used by WiFi" -msgstr "" +msgstr "ADC2 wird vom WiFi benutzt" #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, c-format @@ -346,11 +346,11 @@ msgstr "" #: shared-module/memorymonitor/AllocationAlarm.c #: shared-module/memorymonitor/AllocationSize.c msgid "Already running" -msgstr "" +msgstr "Läuft bereits" #: ports/esp32s2/common-hal/wifi/Radio.c msgid "Already scanning for wifi networks" -msgstr "" +msgstr "Sucht bereits nach wifi Netzwerken" #: ports/cxd56/common-hal/analogio/AnalogIn.c msgid "AnalogIn not supported on given pin" @@ -390,7 +390,7 @@ msgstr "Es darf höchstens %d %q spezifiziert werden (nicht %d)" #: shared-module/memorymonitor/AllocationAlarm.c #, c-format msgid "Attempt to allocate %d blocks" -msgstr "" +msgstr "Versuche %d Blöcke zu allokieren" #: supervisor/shared/safe_mode.c msgid "Attempted heap allocation when MicroPython VM not running." @@ -400,7 +400,7 @@ msgstr "" #: shared-bindings/wifi/Radio.c msgid "Authentication failure" -msgstr "" +msgstr "Authentifizierungsfehler" #: main.c msgid "Auto-reload is off.\n" @@ -478,11 +478,11 @@ msgstr "Die Pufferlänge %d ist zu groß. Sie muss kleiner als %d sein" #: ports/atmel-samd/common-hal/sdioio/SDCard.c #: ports/cxd56/common-hal/sdioio/SDCard.c shared-module/sdcardio/SDCard.c msgid "Buffer length must be a multiple of 512" -msgstr "" +msgstr "Die Pufferlänge muss ein vielfaches von 512 sein" #: ports/stm/common-hal/sdioio/SDCard.c msgid "Buffer must be a multiple of 512 bytes" -msgstr "" +msgstr "Der Puffer muss ein vielfaches von 512 bytes sein" #: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c msgid "Buffer must be at least length 1" @@ -660,7 +660,7 @@ msgstr "Beschädigter raw code" #: ports/cxd56/common-hal/camera/Camera.c msgid "Could not initialize Camera" -msgstr "" +msgstr "Konnte Kamera nicht initialisieren" #: ports/cxd56/common-hal/gnss/GNSS.c msgid "Could not initialize GNSS" @@ -668,7 +668,7 @@ msgstr "" #: ports/cxd56/common-hal/sdioio/SDCard.c msgid "Could not initialize SDCard" -msgstr "" +msgstr "Konnte SDKarte nicht initialisieren" #: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c @@ -701,7 +701,7 @@ msgstr "" #: shared-bindings/_bleio/Adapter.c msgid "Could not set address" -msgstr "" +msgstr "Konnte Adresse nicht setzen" #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Could not start PWM" @@ -818,7 +818,7 @@ msgstr "Characteristic wird erwartet" #: shared-bindings/_bleio/Adapter.c msgid "Expected a DigitalInOut" -msgstr "" +msgstr "DigitanInOut wird erwartet" #: shared-bindings/_bleio/Characteristic.c msgid "Expected a Service" @@ -826,7 +826,7 @@ msgstr "Ein Service wird erwartet" #: shared-bindings/_bleio/Adapter.c msgid "Expected a UART" -msgstr "" +msgstr "UART wird erwartet" #: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c #: shared-bindings/_bleio/Service.c @@ -853,7 +853,7 @@ msgstr "FFT ist nur für ndarrays definiert" #: ports/esp32s2/common-hal/socketpool/Socket.c msgid "Failed SSL handshake" -msgstr "" +msgstr "SSL Handshake fehlgeschlagen" #: shared-bindings/ps2io/Ps2.c msgid "Failed sending command." @@ -918,16 +918,16 @@ msgstr "Datei existiert" #: ports/atmel-samd/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" -msgstr "" +msgstr "Filter zu komplex" #: ports/cxd56/common-hal/camera/Camera.c msgid "Format not supported" -msgstr "" +msgstr "Format nicht unterstützt" #: shared-module/framebufferio/FramebufferDisplay.c #, c-format msgid "Framebuffer requires %d bytes" -msgstr "" +msgstr "Framepuffer benötigt %d bytes" #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "Frequency captured is above capability. Capture Paused." @@ -968,7 +968,7 @@ msgstr "Hardware in benutzung, probiere alternative Pins" #: shared-bindings/wifi/Radio.c msgid "Hostname must be between 1 and 253 characters" -msgstr "" +msgstr "Der Hostname muss zwischen 1 und 253 Zeichen haben" #: extmod/vfs_posix_file.c py/objstringio.c msgid "I/O operation on closed file" @@ -980,7 +980,7 @@ msgstr "I2C-Init-Fehler" #: shared-bindings/audiobusio/I2SOut.c msgid "I2SOut not available" -msgstr "" +msgstr "I2SOut nicht verfügbar" #: shared-bindings/aesio/aes.c #, c-format @@ -1026,12 +1026,12 @@ msgstr "Interner Fehler #%d" #: shared-bindings/sdioio/SDCard.c msgid "Invalid %q" -msgstr "" +msgstr "Ungültiger %q" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "Invalid %q pin" -msgstr "Ungültiger %q pin" +msgstr "Ungültiger %q Pin" #: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c #: ports/stm/common-hal/busio/UART.c ports/stm/common-hal/canio/CAN.c @@ -1049,7 +1049,7 @@ msgstr "Ungültige BMP-Datei" #: shared-bindings/wifi/Radio.c msgid "Invalid BSSID" -msgstr "" +msgstr "Ungültige BSSID" #: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c @@ -1100,7 +1100,7 @@ msgstr "Ungültige format chunk size" #: ports/esp32s2/common-hal/pwmio/PWMOut.c msgid "Invalid frequency" -msgstr "" +msgstr "Ungültige Frequenz" #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Invalid frequency supplied" From 998661246cc84330a239e33a89e2ce6f8f3e9c38 Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Sun, 25 Oct 2020 21:03:27 +0000 Subject: [PATCH 093/145] Translated using Weblate (Swedish) Currently translated at 100.0% (836 of 836 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/ --- locale/sv.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/sv.po b/locale/sv.po index 22007e11f3..989b8257e7 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-10-16 19:50-0500\n" -"PO-Revision-Date: 2020-10-22 01:12+0000\n" +"PO-Revision-Date: 2020-10-26 02:36+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.3.1\n" +"X-Generator: Weblate 4.3.2-dev\n" #: main.c msgid "" @@ -494,7 +494,7 @@ msgstr "Bufferten är för stor och kan inte allokeras" #: shared-bindings/_bleio/PacketBuffer.c #, c-format msgid "Buffer too short by %d bytes" -msgstr "Buffert år %d bytes för kort" +msgstr "Buffert är %d bytes för kort" #: ports/atmel-samd/common-hal/displayio/ParallelBus.c #: ports/nrf/common-hal/displayio/ParallelBus.c @@ -2161,7 +2161,7 @@ msgstr "buffert för liten" #: shared-bindings/socketpool/Socket.c msgid "buffer too small for requested bytes" -msgstr "buffertför liten för begärd längd" +msgstr "buffert för liten för begärd längd" #: shared-bindings/_pew/PewPew.c msgid "buttons must be digitalio.DigitalInOut" From 396d92f867c66673c8dffc77f7c0cbcaa83a157f Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 21 Oct 2020 10:38:01 -0500 Subject: [PATCH 094/145] esp32s2: Add canio This works in loopback mode, though the hardware filtering only permits a single address or mask filter. --- ports/esp32s2/Makefile | 4 +- .../espressif_kaluga_1/mpconfigboard.mk | 2 +- ports/esp32s2/common-hal/canio/CAN.c | 297 ++++++++++++++++++ ports/esp32s2/common-hal/canio/CAN.h | 52 +++ ports/esp32s2/common-hal/canio/Listener.c | 182 +++++++++++ ports/esp32s2/common-hal/canio/Listener.h | 40 +++ ports/esp32s2/common-hal/canio/__init__.c | 25 ++ ports/esp32s2/common-hal/canio/__init__.h | 27 ++ ports/esp32s2/mpconfigport.mk | 1 + 9 files changed, 627 insertions(+), 3 deletions(-) create mode 100644 ports/esp32s2/common-hal/canio/CAN.c create mode 100644 ports/esp32s2/common-hal/canio/CAN.h create mode 100644 ports/esp32s2/common-hal/canio/Listener.c create mode 100644 ports/esp32s2/common-hal/canio/Listener.h create mode 100644 ports/esp32s2/common-hal/canio/__init__.c create mode 100644 ports/esp32s2/common-hal/canio/__init__.h diff --git a/ports/esp32s2/Makefile b/ports/esp32s2/Makefile index 8d891edd02..5d8ccad50d 100644 --- a/ports/esp32s2/Makefile +++ b/ports/esp32s2/Makefile @@ -331,10 +331,10 @@ $(BUILD)/firmware.uf2: $(BUILD)/circuitpython-firmware.bin $(Q)$(PYTHON3) $(TOP)/tools/uf2/utils/uf2conv.py -f 0xbfdd4eee -b 0x0000 -c -o $@ $^ flash: $(BUILD)/firmware.bin - esptool.py --chip esp32s2 -p $(PORT) --no-stub -b 460800 --before=default_reset --after=hard_reset write_flash $(FLASH_FLAGS) 0x0000 $^ + esptool.py --chip esp32s2 -p $(PORT) -b 460800 --before=default_reset --after=hard_reset write_flash $(FLASH_FLAGS) 0x0000 $^ flash-circuitpython-only: $(BUILD)/circuitpython-firmware.bin - esptool.py --chip esp32s2 -p $(PORT) --no-stub -b 460800 --before=default_reset --after=hard_reset write_flash $(FLASH_FLAGS) 0x10000 $^ + esptool.py --chip esp32s2 -p $(PORT) -b 460800 --before=default_reset --after=hard_reset write_flash $(FLASH_FLAGS) 0x10000 $^ include $(TOP)/py/mkrules.mk diff --git a/ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.mk b/ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.mk index ba85e46efc..2dce038819 100644 --- a/ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.mk +++ b/ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.mk @@ -11,7 +11,7 @@ LONGINT_IMPL = MPZ CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 CIRCUITPY_ESP_FLASH_MODE=dio -CIRCUITPY_ESP_FLASH_FREQ=40m +CIRCUITPY_ESP_FLASH_FREQ=80m CIRCUITPY_ESP_FLASH_SIZE=4MB CIRCUITPY_MODULE=wrover diff --git a/ports/esp32s2/common-hal/canio/CAN.c b/ports/esp32s2/common-hal/canio/CAN.c new file mode 100644 index 0000000000..f1741969db --- /dev/null +++ b/ports/esp32s2/common-hal/canio/CAN.c @@ -0,0 +1,297 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Jeff Epler for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include + +#include "py/runtime.h" +#include "py/mperrno.h" + +#include "common-hal/canio/CAN.h" +#include "shared-bindings/microcontroller/Pin.h" +#include "shared-bindings/util.h" +#include "supervisor/port.h" +#include "hal/twai_ll.h" + +#include "hal/twai_types.h" + +STATIC bool reserved_can; + +twai_timing_config_t get_t_config(int baudrate) { + switch(baudrate) { + case 1000000: + { + twai_timing_config_t t_config = TWAI_TIMING_CONFIG_1MBITS(); + return t_config; + } + case 800000: + { + twai_timing_config_t t_config = TWAI_TIMING_CONFIG_800KBITS(); + return t_config; + } + case 500000: + { + twai_timing_config_t t_config = TWAI_TIMING_CONFIG_500KBITS(); + return t_config; + } + case 250000: + { + twai_timing_config_t t_config = TWAI_TIMING_CONFIG_250KBITS(); + return t_config; + } + case 125000: + { + twai_timing_config_t t_config = TWAI_TIMING_CONFIG_125KBITS(); + return t_config; + } + case 100000: + { + twai_timing_config_t t_config = TWAI_TIMING_CONFIG_100KBITS(); + return t_config; + } + case 50000: + { + twai_timing_config_t t_config = TWAI_TIMING_CONFIG_50KBITS(); + return t_config; + } + case 25000: + { + twai_timing_config_t t_config = TWAI_TIMING_CONFIG_25KBITS(); + return t_config; + } + case 20000: + { + twai_timing_config_t t_config = TWAI_TIMING_CONFIG_20KBITS(); + return t_config; + } + case 16000: + { + twai_timing_config_t t_config = TWAI_TIMING_CONFIG_16KBITS(); + return t_config; + } + case 12500: + { + twai_timing_config_t t_config = TWAI_TIMING_CONFIG_12_5KBITS(); + return t_config; + } + case 10000: + { + twai_timing_config_t t_config = TWAI_TIMING_CONFIG_10KBITS(); + return t_config; + } + case 5000: + { + twai_timing_config_t t_config = TWAI_TIMING_CONFIG_5KBITS(); + return t_config; + } + case 1000: + { + twai_timing_config_t t_config = TWAI_TIMING_CONFIG_1KBITS(); + return t_config; + } + default: + mp_raise_ValueError(translate("Baudrate not supported by peripheral")); + } +} + +__attribute__((optimize("O0"))) +void common_hal_canio_can_construct(canio_can_obj_t *self, mcu_pin_obj_t *tx, mcu_pin_obj_t *rx, int baudrate, bool loopback, bool silent) +{ +#define DIV_ROUND(a, b) (((a) + (b)/2) / (b)) +#define DIV_ROUND_UP(a, b) (((a) + (b) - 1) / (b)) + if (reserved_can) { + mp_raise_ValueError(translate("All CAN peripherals are in use")); + } + + if (loopback && silent) { + mp_raise_ValueError(translate("loopback + silent mode not supported by peripheral")); + } + + self->t_config = get_t_config(baudrate);; + twai_general_config_t g_config = TWAI_GENERAL_CONFIG_DEFAULT(-1, -1, TWAI_MODE_NORMAL); + g_config.tx_io = tx->number; + g_config.rx_io = rx->number; + if (loopback) { + g_config.mode = TWAI_MODE_NO_ACK; + } + if (silent) { + g_config.mode = TWAI_MODE_LISTEN_ONLY; + } + self->g_config = g_config; + + { + twai_filter_config_t f_config = TWAI_FILTER_CONFIG_ACCEPT_ALL(); + self->f_config = f_config; + } + + esp_err_t result = twai_driver_install(&self->g_config, &self->t_config, &self->f_config); + if (result == ESP_ERR_NO_MEM) { + mp_raise_msg(&mp_type_MemoryError, translate("ESP-IDF memory allocation failed")); + } else if (result == ESP_ERR_INVALID_ARG) { + mp_raise_ValueError(translate("Invalid pins")); + } else if (result != ESP_OK) { + mp_raise_OSError_msg_varg(translate("twai_driver_install returned esp-idf error #%d"), (int)result); + } + + result = twai_start(); + if (result != ESP_OK) { + mp_raise_OSError_msg_varg(translate("twai_start returned esp-idf error #%d"), (int)result); + } + + self->silent = silent; + self->loopback = loopback; + self->baudrate = baudrate; + self->tx_pin = tx; + self->rx_pin = rx; + + claim_pin(tx); + claim_pin(rx); + + reserved_can = true; +} + +bool common_hal_canio_can_loopback_get(canio_can_obj_t *self) +{ + return self->loopback; +} + +int common_hal_canio_can_baudrate_get(canio_can_obj_t *self) +{ + return self->baudrate; +} + +int common_hal_canio_can_transmit_error_count_get(canio_can_obj_t *self) +{ + twai_status_info_t info; + twai_get_status_info(&info); + return info.tx_error_counter; +} + +int common_hal_canio_can_receive_error_count_get(canio_can_obj_t *self) +{ + twai_status_info_t info; + twai_get_status_info(&info); + return info.rx_error_counter; +} + +canio_bus_state_t common_hal_canio_can_state_get(canio_can_obj_t *self) { + twai_status_info_t info; + twai_get_status_info(&info); + if (info.state == TWAI_STATE_BUS_OFF || info.state == TWAI_STATE_RECOVERING) { + return BUS_STATE_OFF; + } + if (info.tx_error_counter > 127 || info.rx_error_counter > 127) { + return BUS_STATE_ERROR_PASSIVE; + } + if (info.tx_error_counter > 96 || info.rx_error_counter > 96) { + return BUS_STATE_ERROR_WARNING; + } + return BUS_STATE_ERROR_ACTIVE; +} + +static void can_restart(void) { + twai_status_info_t info; + twai_get_status_info(&info); + if (info.state != TWAI_STATE_BUS_OFF) { + return; + } + twai_initiate_recovery(); + // wait 100ms (hard coded for now) for bus to recover + uint64_t deadline = port_get_raw_ticks(NULL) + 100; + do { + twai_get_status_info(&info); + } while (port_get_raw_ticks(NULL) < deadline && (info.state == TWAI_STATE_BUS_OFF || info.state == TWAI_STATE_RECOVERING)); +} + +void canio_maybe_auto_restart(canio_can_obj_t *self) { + if (self->auto_restart) can_restart(); +} + +void common_hal_canio_can_restart(canio_can_obj_t *self) { + if (!common_hal_canio_can_auto_restart_get(self)) { + can_restart(); + } +} + +bool common_hal_canio_can_auto_restart_get(canio_can_obj_t *self) { + return self->auto_restart; +} + +void common_hal_canio_can_auto_restart_set(canio_can_obj_t *self, bool value) { + self->auto_restart = value; + canio_maybe_auto_restart(self); +} + +void common_hal_canio_can_send(canio_can_obj_t *self, mp_obj_t message_in) +{ + canio_maybe_auto_restart(self); + canio_message_obj_t *message = message_in; + bool rtr = message->base.type == &canio_remote_transmission_request_type; + twai_message_t message_out = { + .extd = message->extended, + .rtr = rtr, + .self = self->loopback, + .identifier = message->id, + .data_length_code = message->size, + }; + if (!rtr) { + memcpy(message_out.data, message->data, message->size); + } + // Allow transmission to occur in background + twai_transmit(&message_out, 0); +} + +bool common_hal_canio_can_silent_get(canio_can_obj_t *self) { + return self->silent; +} + +bool common_hal_canio_can_deinited(canio_can_obj_t *self) { + return !self->tx_pin; +} + +void common_hal_canio_can_check_for_deinit(canio_can_obj_t *self) { + if (common_hal_canio_can_deinited(self)) { + raise_deinited_error(); + } +} + +void common_hal_canio_can_deinit(canio_can_obj_t *self) +{ + if (self->tx_pin) { + (void)twai_stop(); + (void)twai_driver_uninstall(); + reset_pin_number(self->tx_pin->number); + reset_pin_number(self->rx_pin->number); + reserved_can = false; + } + self->tx_pin = NULL; + self->rx_pin = NULL; +} + +void common_hal_canio_reset(void) { + (void)twai_stop(); + (void)twai_driver_uninstall(); + reserved_can = false; +} diff --git a/ports/esp32s2/common-hal/canio/CAN.h b/ports/esp32s2/common-hal/canio/CAN.h new file mode 100644 index 0000000000..e15d515908 --- /dev/null +++ b/ports/esp32s2/common-hal/canio/CAN.h @@ -0,0 +1,52 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Jeff Epler for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#pragma once + +#include "py/obj.h" +#include "shared-bindings/canio/__init__.h" +#include "shared-bindings/canio/CAN.h" +#include "common-hal/microcontroller/Pin.h" +#include "common-hal/canio/__init__.h" +#include "shared-module/canio/Message.h" + +#include "driver/twai.h" + +#define FILTER_BANK_COUNT (28) + +typedef struct canio_can_obj { + mp_obj_base_t base; + int baudrate; + const mcu_pin_obj_t *rx_pin; + const mcu_pin_obj_t *tx_pin; + bool loopback:1; + bool silent:1; + bool auto_restart:1; + bool fifo_in_use:1; + twai_filter_config_t f_config; + twai_general_config_t g_config; + twai_timing_config_t t_config; +} canio_can_obj_t; diff --git a/ports/esp32s2/common-hal/canio/Listener.c b/ports/esp32s2/common-hal/canio/Listener.c new file mode 100644 index 0000000000..fddbfeb583 --- /dev/null +++ b/ports/esp32s2/common-hal/canio/Listener.c @@ -0,0 +1,182 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Jeff Epler for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include +#include + +#include "py/obj.h" +#include "py/runtime.h" + +#include "common-hal/canio/__init__.h" +#include "common-hal/canio/Listener.h" +#include "shared-bindings/canio/Listener.h" +#include "shared-bindings/util.h" +#include "supervisor/shared/tick.h" +#include "supervisor/shared/safe_mode.h" + +#include "hal/twai_ll.h" + +// IDE = "extended ID" flag of packet header. We always add this bit to the +// mask because a match is always for just one kind of address length +#define FILTER16_IDE (1<<3) +#define FILTER32_IDE (1<<2) + +// Work around a problem reported at +// https://github.com/espressif/esp-idf/issues/6020 where +// twai_ll_set_acc_filter does not work under -Os optimization +__attribute__((optimize("O0"))) +__attribute__((noinline)) +static void canio_set_acc_filter(twai_dev_t* hw, uint32_t code, uint32_t mask, bool single_filter) +{ + uint32_t code_swapped = __builtin_bswap32(code); + uint32_t mask_swapped = __builtin_bswap32(mask); + for (int i = 0; i < 4; i++) { + hw->acceptance_filter.acr[i].val = ((code_swapped >> (i * 8)) & 0xFF); + hw->acceptance_filter.amr[i].val = ((mask_swapped >> (i * 8)) & 0xFF); + } + hw->mode_reg.afm = single_filter; +} + +STATIC void install_standard_filter(canio_listener_obj_t *self, canio_match_obj_t *match) { + canio_set_acc_filter(&TWAI, match->id << 21, ~(match->mask << 21), true); + self->extended = false; + self->standard = true; +} + +STATIC void install_extended_filter(canio_listener_obj_t *self, canio_match_obj_t *match) { + canio_set_acc_filter(&TWAI, match->id << 3, ~(match->mask << 3), true); + self->extended = true; + self->standard = false; +} + +STATIC void install_all_match_filter(canio_listener_obj_t *self) { + canio_set_acc_filter(&TWAI, 0u, ~0u, true); + self->extended = true; + self->standard = true; +} + +__attribute__((noinline,optimize("O0"))) +void set_filters(canio_listener_obj_t *self, size_t nmatch, canio_match_obj_t **matches) { + twai_ll_enter_reset_mode(&TWAI); + + if (!nmatch) { + install_all_match_filter(self); + } else { + canio_match_obj_t *match = matches[0]; + if (match->extended) { + install_extended_filter(self, match); + } else { + install_standard_filter(self, match); + } + } + + twai_ll_exit_reset_mode(&TWAI); +} + + +void common_hal_canio_listener_construct(canio_listener_obj_t *self, canio_can_obj_t *can, size_t nmatch, canio_match_obj_t **matches, float timeout) { + if (can->fifo_in_use) { + mp_raise_ValueError(translate("All RX FIFOs in use")); + } + if (nmatch > 1) { + mp_raise_ValueError(translate("Filters too complex")); + } + + // Nothing can fail now so it's safe to assign self->can + can->fifo_in_use = 1; + self->can = can; + self->pending = false; + + set_filters(self, nmatch, matches); + self->extended = self->standard = true; + + common_hal_canio_listener_set_timeout(self, timeout); +} + +void common_hal_canio_listener_set_timeout(canio_listener_obj_t *self, float timeout) { + self->timeout_ms = (int)MICROPY_FLOAT_C_FUN(ceil)(timeout * 1000); +} + +float common_hal_canio_listener_get_timeout(canio_listener_obj_t *self) { + return self->timeout_ms / 1000.0f; +} + +void common_hal_canio_listener_check_for_deinit(canio_listener_obj_t *self) { + if (!self->can) { + raise_deinited_error(); + } + common_hal_canio_can_check_for_deinit(self->can); +} + +// The API has no peek method so we must receive a packet into a holding area +// and then we can say that we have 1 message pending +int common_hal_canio_listener_in_waiting(canio_listener_obj_t *self) { + while (!self->pending && twai_receive(&self->message_in, 0) == ESP_OK) { + if (self->message_in.extd && self->extended) { + self->pending = true; + } + if (!self->message_in.extd && self->standard) { + self->pending = true; + } + } + return self->pending; +} + +mp_obj_t common_hal_canio_listener_receive(canio_listener_obj_t *self) { + if (!common_hal_canio_listener_in_waiting(self)) { + uint64_t deadline = supervisor_ticks_ms64() + self->timeout_ms; + do { + if (supervisor_ticks_ms64() > deadline) { + return NULL; + } + } while (!common_hal_canio_listener_in_waiting(self)); + } + + bool rtr = self->message_in.rtr; + + int dlc = self->message_in.data_length_code; + canio_message_obj_t *message = m_new_obj(canio_message_obj_t); + message->base.type = rtr ? &canio_remote_transmission_request_type : &canio_message_type; + message->extended = self->message_in.extd; + message->id = self->message_in.identifier; + message->size = dlc; + + if (!rtr) { + MP_STATIC_ASSERT(sizeof(self->message_in.data) == sizeof(message->data)); + memcpy(message->data, self->message_in.data, sizeof(message->data)); + } + + self->pending = false; + + return message; +} + +void common_hal_canio_listener_deinit(canio_listener_obj_t *self) { + if (self->can) { + self->can->fifo_in_use = false; + } + self->can = NULL; +} diff --git a/ports/esp32s2/common-hal/canio/Listener.h b/ports/esp32s2/common-hal/canio/Listener.h new file mode 100644 index 0000000000..d24900e435 --- /dev/null +++ b/ports/esp32s2/common-hal/canio/Listener.h @@ -0,0 +1,40 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Jeff Epler for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#pragma once + +#include "common-hal/canio/CAN.h" +#include "shared-module/canio/Match.h" + +typedef struct canio_listener_obj { + mp_obj_base_t base; + canio_can_obj_t *can; + bool extended:1; + bool standard:1; + bool pending:1; + twai_message_t message_in; + uint32_t timeout_ms; +} canio_listener_obj_t; diff --git a/ports/esp32s2/common-hal/canio/__init__.c b/ports/esp32s2/common-hal/canio/__init__.c new file mode 100644 index 0000000000..7932bfc2da --- /dev/null +++ b/ports/esp32s2/common-hal/canio/__init__.c @@ -0,0 +1,25 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Jeff Epler for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ diff --git a/ports/esp32s2/common-hal/canio/__init__.h b/ports/esp32s2/common-hal/canio/__init__.h new file mode 100644 index 0000000000..20b6638cd8 --- /dev/null +++ b/ports/esp32s2/common-hal/canio/__init__.h @@ -0,0 +1,27 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Jeff Epler for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#pragma once diff --git a/ports/esp32s2/mpconfigport.mk b/ports/esp32s2/mpconfigport.mk index 4e8a7bdef2..c9863572a5 100644 --- a/ports/esp32s2/mpconfigport.mk +++ b/ports/esp32s2/mpconfigport.mk @@ -16,6 +16,7 @@ LONGINT_IMPL = MPZ CIRCUITPY_FULL_BUILD = 1 CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_AUDIOIO = 0 +CIRCUITPY_CANIO = 1 CIRCUITPY_COUNTIO = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 From bdc13437910320c0784902661b16b6171720f1ab Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 21 Oct 2020 11:30:33 -0500 Subject: [PATCH 095/145] make translate --- locale/circuitpython.pot | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 7ed2d1ba1d..94a6a8514d 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-16 19:50-0500\n" +"POT-Creation-Date: 2020-10-21 20:13-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -288,11 +288,16 @@ msgstr "" msgid "Address type out of range" msgstr "" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "All CAN peripherals are in use" +msgstr "" + #: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "" @@ -407,6 +412,10 @@ msgid "" "disable.\n" msgstr "" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "Baudrate not supported by peripheral" +msgstr "" + #: shared-module/displayio/Display.c #: shared-module/framebufferio/FramebufferDisplay.c msgid "Below minimum frame rate" @@ -775,7 +784,7 @@ msgstr "" msgid "ECB only operates on 16 bytes at a time" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "" @@ -901,6 +910,7 @@ msgid "File exists" msgstr "" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "" @@ -1119,7 +1129,7 @@ msgstr "" #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c #: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c @@ -2837,6 +2847,10 @@ msgstr "" msgid "long int not supported in this build" msgstr "" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "loopback + silent mode not supported by peripheral" +msgstr "" + #: py/parse.c msgid "malformed f-string" msgstr "" @@ -3181,6 +3195,8 @@ msgstr "" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -3432,6 +3448,16 @@ msgstr "" msgid "tuple/list has wrong length" msgstr "" +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_driver_install returned esp-idf error #%d" +msgstr "" + +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_start returned esp-idf error #%d" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c From 32f2a8d54cf54bb3f9dcba33f4b617d4dcf8b596 Mon Sep 17 00:00:00 2001 From: Lucian Copeland Date: Mon, 26 Oct 2020 11:03:54 -0400 Subject: [PATCH 096/145] Fix readme link --- ports/esp32s2/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ports/esp32s2/README.md b/ports/esp32s2/README.md index 8a6dfbd2d8..f3e678de85 100644 --- a/ports/esp32s2/README.md +++ b/ports/esp32s2/README.md @@ -30,18 +30,20 @@ Connect these pins using a [USB adapter](https://www.adafruit.com/product/4090) ## Building and flashing ## -Before building or flashing the ESP32-S2, you must [install the esp-idf](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/index.html). This must be re-done ever time the esp-idf is updated, but not every time you build. Run `cd ports/esp32s2` from `circuitpython/` to move to the esp32s2 port root, and run: +Before building or flashing the ESP32-S2, you must [install the esp-idf](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/get-started/index.html). This must be re-done ever time the esp-idf is updated, but not every time you build. Run `cd ports/esp32s2` from `circuitpython/` to move to the esp32s2 port root, and run: ``` ./esp-idf/install.sh ``` -Additionally, any time you open a new bash environment for building or flashing, you must add the esp-idf tools to your path: +After this initial installation, you must add the esp-idf tools to your path. You must also do this **any time you open a new bash environment for building or flashing**: ``` . esp-idf/export.sh ``` +When Circuitpython updates the ESP-IDF to a new release, you may need to run this installation process again. The exact commands used may also vary based on your bash environment. + Building boards such as the Saola is typically done through `make flash`. The default port is `tty.SLAB_USBtoUART`, which will only work on certain Mac setups. On most machines, both Mac and Linux, you will need to set the port yourself by running `ls /dev/tty.usb*` and selecting the one that only appears when your development board is plugged in. An example make command with the port setting is as follows: ``` From c9f7df3bab8c46cc51b12eefc95391a00ba8c7e1 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 26 Oct 2020 10:06:49 -0500 Subject: [PATCH 097/145] canio: Give implementation-specific limits for CAN.Listen --- shared-bindings/canio/CAN.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/shared-bindings/canio/CAN.c b/shared-bindings/canio/CAN.c index 6dae36943a..4982a97b9d 100644 --- a/shared-bindings/canio/CAN.c +++ b/shared-bindings/canio/CAN.c @@ -214,7 +214,24 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(canio_can_restart_obj, canio_can_restart); //| //| An empty filter list causes all messages to be accepted. //| -//| Timeout dictates how long receive() and next() will block.""" +//| Timeout dictates how long receive() and next() will block. +//| +//| Platform specific notes: +//| +//| SAM E5x supports two Listeners. Filter blocks are shared between the two +//| listeners. There are 4 standard filter blocks and 4 extended filter blocks. +//| Each block can either match 2 single addresses or a mask of addresses. +//| The number of filter blocks can be increased, up to a hardware maximum, by +//| rebuilding CircuitPython, but this decreases the CircuitPython free +//| memory even if canio is not used. +//| +//| STM32F405 supports two Listeners. Filter blocks are shared between the two listeners. +//| There are 14 filter blocks. Each block can match 2 standard addresses with +//| mask or 1 extended address with mask. +//| +//| ESP32S2 supports one Listener. There is a single filter block, which can either match a +//| standard address with mask or an extended address with mask. +//| """ //| ... //| STATIC mp_obj_t canio_can_listen(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { From 81ab6a05d0652688d446fc75c838be95f13fb32b Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 26 Oct 2020 13:25:00 -0700 Subject: [PATCH 098/145] Use old translation date to avoid merge conflict --- locale/circuitpython.pot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index cc058e61a2..a5581e7fa7 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-25 15:21-0500\n" +"POT-Creation-Date: 2020-10-15 16:06+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" From 1117edae63df7b66f1575980bf54d6836f9a8aa8 Mon Sep 17 00:00:00 2001 From: Christian Walther Date: Sat, 24 Oct 2020 17:13:10 +0200 Subject: [PATCH 099/145] Fix erroneous claim of board.I2C() by deinited display. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit At the end of a session that called displayio.release_displays() (and did not initialize a new display), a board.I2C() bus that was previously used by a display would wrongly be considered still in use. While I can’t think of any unrecoverable problem this would cause in the next session, it violates the assumption that a soft reboot resets everything not needed by displays, potentially leading to confusion. By itself, this change does not fix the problem yet - rather, it introduces the same issue as in #3581 for SPI. This needs to be solved in the same way for I2C and SPI. --- shared-module/board/__init__.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-module/board/__init__.c b/shared-module/board/__init__.c index 39b68a0f11..856103b7b6 100644 --- a/shared-module/board/__init__.c +++ b/shared-module/board/__init__.c @@ -139,7 +139,7 @@ void reset_board_busses(void) { bool display_using_i2c = false; #if CIRCUITPY_DISPLAYIO for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { - if (displays[i].i2cdisplay_bus.bus == i2c_singleton) { + if (displays[i].bus_base.type == &displayio_i2cdisplay_type && displays[i].i2cdisplay_bus.bus == i2c_singleton) { display_using_i2c = true; break; } From f4f80e07ca3dc2f5a93484e5342540837a94a505 Mon Sep 17 00:00:00 2001 From: Christian Walther Date: Sat, 24 Oct 2020 17:23:17 +0200 Subject: [PATCH 100/145] Fix lost board.SPI and board.I2C after being used by display. Fixes #3581. Pins were marked as never_reset by common_hal_displayio_fourwire_construct() and common_hal_sharpdisplay_framebuffer_construct(), but these marks were never removed, so at the end of a session after displayio.release_displays(), {spi|i2c}_singleton would be set to NULL but the pins would not be reset. In the next session, board.SPI() and board.I2C() were unable to reconstruct the object because the pins were still in use. For symmetry with creation of the singleton, add deinitialization before setting it to NULL in reset_board_busses(). This makes the pins resettable, so that reset_port(), moved behind it, then resets them. --- main.c | 4 +++- shared-module/board/__init__.c | 14 +++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/main.c b/main.c index b43b3b8c80..80b163f607 100755 --- a/main.c +++ b/main.c @@ -234,10 +234,12 @@ void cleanup_after_vm(supervisor_allocation* heap) { common_hal_canio_reset(); #endif - reset_port(); + // reset_board_busses() first because it may release pins from the never_reset state, so that + // reset_port() can reset them. #if CIRCUITPY_BOARD reset_board_busses(); #endif + reset_port(); reset_board(); reset_status_led(); } diff --git a/shared-module/board/__init__.c b/shared-module/board/__init__.c index 856103b7b6..967b430d2b 100644 --- a/shared-module/board/__init__.c +++ b/shared-module/board/__init__.c @@ -145,8 +145,11 @@ void reset_board_busses(void) { } } #endif - if (!display_using_i2c) { - i2c_singleton = NULL; + if (i2c_singleton != NULL) { + if (!display_using_i2c) { + common_hal_busio_i2c_deinit(i2c_singleton); + i2c_singleton = NULL; + } } #endif #if BOARD_SPI @@ -169,9 +172,10 @@ void reset_board_busses(void) { // make sure SPI lock is not held over a soft reset if (spi_singleton != NULL) { common_hal_busio_spi_unlock(spi_singleton); - } - if (!display_using_spi) { - spi_singleton = NULL; + if (!display_using_spi) { + common_hal_busio_spi_deinit(spi_singleton); + spi_singleton = NULL; + } } #endif #if BOARD_UART From 99a3750a2cfd1da8cdd266ca9a0367f0c3a54092 Mon Sep 17 00:00:00 2001 From: Christian Walther Date: Sat, 24 Oct 2020 17:50:11 +0200 Subject: [PATCH 101/145] Fix lost board.SPI and board.I2C after explicitly deiniting them. After calling board.SPI().deinit(), calling board.SPI() again would return the unusable deinited object and there was no way of getting it back into an initialized state until the end of the session. --- shared-bindings/board/__init__.c | 10 ++++++++-- shared-module/board/__init__.c | 10 ++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/shared-bindings/board/__init__.c b/shared-bindings/board/__init__.c index 6837fc41c2..717698408a 100644 --- a/shared-bindings/board/__init__.c +++ b/shared-bindings/board/__init__.c @@ -28,6 +28,12 @@ #include "py/runtime.h" #include "shared-bindings/board/__init__.h" +#if BOARD_I2C +#include "shared-bindings/busio/I2C.h" +#endif +#if BOARD_SPI +#include "shared-bindings/busio/SPI.h" +#endif //| """Board specific pin names //| @@ -45,7 +51,7 @@ #if BOARD_I2C mp_obj_t board_i2c(void) { mp_obj_t singleton = common_hal_board_get_i2c(); - if (singleton != NULL) { + if (singleton != NULL && !common_hal_busio_i2c_deinited(singleton)) { return singleton; } assert_pin_free(DEFAULT_I2C_BUS_SDA); @@ -69,7 +75,7 @@ MP_DEFINE_CONST_FUN_OBJ_0(board_i2c_obj, board_i2c); #if BOARD_SPI mp_obj_t board_spi(void) { mp_obj_t singleton = common_hal_board_get_spi(); - if (singleton != NULL) { + if (singleton != NULL && !common_hal_busio_spi_deinited(singleton)) { return singleton; } assert_pin_free(DEFAULT_SPI_BUS_SCK); diff --git a/shared-module/board/__init__.c b/shared-module/board/__init__.c index 967b430d2b..2f1c34e565 100644 --- a/shared-module/board/__init__.c +++ b/shared-module/board/__init__.c @@ -55,9 +55,8 @@ mp_obj_t common_hal_board_get_i2c(void) { } mp_obj_t common_hal_board_create_i2c(void) { - if (i2c_singleton != NULL) { - return i2c_singleton; - } + // All callers have either already verified this or come so early that it can't be otherwise. + assert(i2c_singleton == NULL || common_hal_busio_i2c_deinited(i2c_singleton)); busio_i2c_obj_t *self = &i2c_obj; self->base.type = &busio_i2c_type; @@ -79,9 +78,8 @@ mp_obj_t common_hal_board_get_spi(void) { } mp_obj_t common_hal_board_create_spi(void) { - if (spi_singleton != NULL) { - return spi_singleton; - } + // All callers have either already verified this or come so early that it can't be otherwise. + assert(spi_singleton == NULL || common_hal_busio_spi_deinited(spi_singleton)); busio_spi_obj_t *self = &spi_obj; self->base.type = &busio_spi_type; From 5deb045a8112100de3cb28fdb7b6c56444663503 Mon Sep 17 00:00:00 2001 From: Gaetan Date: Mon, 26 Oct 2020 23:32:57 +0100 Subject: [PATCH 102/145] Ready to PR * ../../.github/workflows/build.yml + boards/holyiot_nrf52840/board.c + boards/holyiot_nrf52840/mpconfigboard.h + boards/holyiot_nrf52840/mpconfigboard.mk + boards/holyiot_nrf52840/pins.c --- .github/workflows/build.yml | 1 + ports/nrf/boards/holyiot_nrf52840/board.c | 38 ++++++++++++ .../boards/holyiot_nrf52840/mpconfigboard.h | 33 +++++++++++ .../boards/holyiot_nrf52840/mpconfigboard.mk | 8 +++ ports/nrf/boards/holyiot_nrf52840/pins.c | 59 +++++++++++++++++++ 5 files changed, 139 insertions(+) create mode 100644 ports/nrf/boards/holyiot_nrf52840/board.c create mode 100644 ports/nrf/boards/holyiot_nrf52840/mpconfigboard.h create mode 100644 ports/nrf/boards/holyiot_nrf52840/mpconfigboard.mk create mode 100644 ports/nrf/boards/holyiot_nrf52840/pins.c diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index feb6a7f633..cada55aaa4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -214,6 +214,7 @@ jobs: - "hallowing_m0_express" - "hallowing_m4_express" - "hiibot_bluefi" + - "holyiot_nrf52840" - "ikigaisense_vita" - "imxrt1010_evk" - "imxrt1020_evk" diff --git a/ports/nrf/boards/holyiot_nrf52840/board.c b/ports/nrf/boards/holyiot_nrf52840/board.c new file mode 100644 index 0000000000..4421970eef --- /dev/null +++ b/ports/nrf/boards/holyiot_nrf52840/board.c @@ -0,0 +1,38 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "boards/board.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} diff --git a/ports/nrf/boards/holyiot_nrf52840/mpconfigboard.h b/ports/nrf/boards/holyiot_nrf52840/mpconfigboard.h new file mode 100644 index 0000000000..3b64d3a629 --- /dev/null +++ b/ports/nrf/boards/holyiot_nrf52840/mpconfigboard.h @@ -0,0 +1,33 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2016 Glenn Ruben Bakke + * + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "nrfx/hal/nrf_gpio.h" + +#define MICROPY_HW_BOARD_NAME "Holyiot nRF52840" +#define MICROPY_HW_MCU_NAME "nRF52840" + +#define MICROPY_HW_LED_STATUS (&pin_P0_19) diff --git a/ports/nrf/boards/holyiot_nrf52840/mpconfigboard.mk b/ports/nrf/boards/holyiot_nrf52840/mpconfigboard.mk new file mode 100644 index 0000000000..d85de75071 --- /dev/null +++ b/ports/nrf/boards/holyiot_nrf52840/mpconfigboard.mk @@ -0,0 +1,8 @@ +USB_VID = 0x239A +USB_PID = 0x80A0 +USB_PRODUCT = "HOLYIOTNRF52840" +USB_MANUFACTURER = "Holyiot" + +MCU_CHIP = nrf52840 + +INTERNAL_FLASH_FILESYSTEM = 1 \ No newline at end of file diff --git a/ports/nrf/boards/holyiot_nrf52840/pins.c b/ports/nrf/boards/holyiot_nrf52840/pins.c new file mode 100644 index 0000000000..4e2593e58f --- /dev/null +++ b/ports/nrf/boards/holyiot_nrf52840/pins.c @@ -0,0 +1,59 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + + { MP_ROM_QSTR(MP_QSTR_P1_10), MP_ROM_PTR(&pin_P0_02) }, + { MP_ROM_QSTR(MP_QSTR_P1_11), MP_ROM_PTR(&pin_P1_11) }, + { MP_ROM_QSTR(MP_QSTR_P1_13), MP_ROM_PTR(&pin_P1_13) }, + { MP_ROM_QSTR(MP_QSTR_P1_15), MP_ROM_PTR(&pin_P1_15) }, + { MP_ROM_QSTR(MP_QSTR_P0_03), MP_ROM_PTR(&pin_P0_03) }, + { MP_ROM_QSTR(MP_QSTR_P0_02), MP_ROM_PTR(&pin_P0_02) }, + { MP_ROM_QSTR(MP_QSTR_P0_28), MP_ROM_PTR(&pin_P0_28) }, + { MP_ROM_QSTR(MP_QSTR_P0_29), MP_ROM_PTR(&pin_P0_29) }, + { MP_ROM_QSTR(MP_QSTR_P0_30), MP_ROM_PTR(&pin_P0_30) }, + { MP_ROM_QSTR(MP_QSTR_P0_31), MP_ROM_PTR(&pin_P0_31) }, + { MP_ROM_QSTR(MP_QSTR_P0_04), MP_ROM_PTR(&pin_P0_04) }, + { MP_ROM_QSTR(MP_QSTR_P0_05), MP_ROM_PTR(&pin_P0_05) }, + { MP_ROM_QSTR(MP_QSTR_P1_14), MP_ROM_PTR(&pin_P1_14) }, + { MP_ROM_QSTR(MP_QSTR_P1_12), MP_ROM_PTR(&pin_P1_12) }, + { MP_ROM_QSTR(MP_QSTR_P0_25), MP_ROM_PTR(&pin_P0_25) }, + { MP_ROM_QSTR(MP_QSTR_P0_11), MP_ROM_PTR(&pin_P0_11) }, + { MP_ROM_QSTR(MP_QSTR_P1_08), MP_ROM_PTR(&pin_P1_08) }, + { MP_ROM_QSTR(MP_QSTR_P0_27), MP_ROM_PTR(&pin_P0_28) }, + { MP_ROM_QSTR(MP_QSTR_P0_08), MP_ROM_PTR(&pin_P0_08) }, + { MP_ROM_QSTR(MP_QSTR_P0_06), MP_ROM_PTR(&pin_P0_06) }, + { MP_ROM_QSTR(MP_QSTR_P0_26), MP_ROM_PTR(&pin_P0_26) }, + + { MP_ROM_QSTR(MP_QSTR_P0_10), MP_ROM_PTR(&pin_P0_10) }, + { MP_ROM_QSTR(MP_QSTR_P0_09), MP_ROM_PTR(&pin_P0_09) }, + { MP_ROM_QSTR(MP_QSTR_P1_06), MP_ROM_PTR(&pin_P1_06) }, + { MP_ROM_QSTR(MP_QSTR_P1_04), MP_ROM_PTR(&pin_P1_04) }, + { MP_ROM_QSTR(MP_QSTR_P1_02), MP_ROM_PTR(&pin_P1_02) }, + { MP_ROM_QSTR(MP_QSTR_P1_01), MP_ROM_PTR(&pin_P1_01) }, + { MP_ROM_QSTR(MP_QSTR_P1_03), MP_ROM_PTR(&pin_P1_03) }, + { MP_ROM_QSTR(MP_QSTR_P1_00), MP_ROM_PTR(&pin_P1_00) }, + { MP_ROM_QSTR(MP_QSTR_P0_22), MP_ROM_PTR(&pin_P0_22) }, + { MP_ROM_QSTR(MP_QSTR_P1_07), MP_ROM_PTR(&pin_P1_07) }, + { MP_ROM_QSTR(MP_QSTR_P1_05), MP_ROM_PTR(&pin_P1_05) }, + { MP_ROM_QSTR(MP_QSTR_P0_24), MP_ROM_PTR(&pin_P0_24) }, + { MP_ROM_QSTR(MP_QSTR_P0_20), MP_ROM_PTR(&pin_P0_20) }, + { MP_ROM_QSTR(MP_QSTR_P0_17), MP_ROM_PTR(&pin_P0_17) }, + { MP_ROM_QSTR(MP_QSTR_P0_15), MP_ROM_PTR(&pin_P0_15) }, + { MP_ROM_QSTR(MP_QSTR_P0_14), MP_ROM_PTR(&pin_P0_14) }, + { MP_ROM_QSTR(MP_QSTR_P0_13), MP_ROM_PTR(&pin_P0_13) }, + { MP_ROM_QSTR(MP_QSTR_P0_16), MP_ROM_PTR(&pin_P0_16) }, + + + { MP_ROM_QSTR(MP_QSTR_P0_07), MP_ROM_PTR(&pin_P0_07) }, + { MP_ROM_QSTR(MP_QSTR_P1_09), MP_ROM_PTR(&pin_P1_09) }, + { MP_ROM_QSTR(MP_QSTR_P0_12), MP_ROM_PTR(&pin_P0_12) }, + { MP_ROM_QSTR(MP_QSTR_P0_23), MP_ROM_PTR(&pin_P0_23) }, + { MP_ROM_QSTR(MP_QSTR_P0_21), MP_ROM_PTR(&pin_P0_21) }, + { MP_ROM_QSTR(MP_QSTR_P0_19), MP_ROM_PTR(&pin_P0_19) }, + + // RESET { MP_ROM_QSTR(MP_QSTR_P0_18), MP_ROM_PTR(&pin_P0_18) }, + +}; + + +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); \ No newline at end of file From cfaa02ef19c2370cfa8dc5d7fc27664f34d9c90c Mon Sep 17 00:00:00 2001 From: Gaetan Date: Mon, 26 Oct 2020 23:36:54 +0100 Subject: [PATCH 103/145] Fix error --- CONTRIBUTING.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c94e8db8c6..15b4cfc892 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,8 +4,6 @@ SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://g SPDX-License-Identifier: MIT --> - - # Contributing Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). From fc591c8d847ad543ee2e8a368574783e2c230309 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 19 Oct 2020 18:30:26 -0700 Subject: [PATCH 104/145] Add EInk Portal --- .../adafruit_esp32s2_eink_portal/board.c | 47 +++++++++++++++++++ .../mpconfigboard.h | 45 ++++++++++++++++++ .../mpconfigboard.mk | 17 +++++++ .../adafruit_esp32s2_eink_portal/pins.c | 39 +++++++++++++++ .../adafruit_esp32s2_eink_portal/sdkconfig | 33 +++++++++++++ 5 files changed, 181 insertions(+) create mode 100644 ports/esp32s2/boards/adafruit_esp32s2_eink_portal/board.c create mode 100644 ports/esp32s2/boards/adafruit_esp32s2_eink_portal/mpconfigboard.h create mode 100644 ports/esp32s2/boards/adafruit_esp32s2_eink_portal/mpconfigboard.mk create mode 100644 ports/esp32s2/boards/adafruit_esp32s2_eink_portal/pins.c create mode 100644 ports/esp32s2/boards/adafruit_esp32s2_eink_portal/sdkconfig diff --git a/ports/esp32s2/boards/adafruit_esp32s2_eink_portal/board.c b/ports/esp32s2/boards/adafruit_esp32s2_eink_portal/board.c new file mode 100644 index 0000000000..9f708874bf --- /dev/null +++ b/ports/esp32s2/boards/adafruit_esp32s2_eink_portal/board.c @@ -0,0 +1,47 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "boards/board.h" +#include "mpconfigboard.h" +#include "shared-bindings/microcontroller/Pin.h" + +void board_init(void) { + // USB + common_hal_never_reset_pin(&pin_GPIO19); + common_hal_never_reset_pin(&pin_GPIO20); + + // Debug UART + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} diff --git a/ports/esp32s2/boards/adafruit_esp32s2_eink_portal/mpconfigboard.h b/ports/esp32s2/boards/adafruit_esp32s2_eink_portal/mpconfigboard.h new file mode 100644 index 0000000000..5a17a0cad1 --- /dev/null +++ b/ports/esp32s2/boards/adafruit_esp32s2_eink_portal/mpconfigboard.h @@ -0,0 +1,45 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +//Micropython setup + +#define MICROPY_HW_BOARD_NAME "EInk Portal" +#define MICROPY_HW_MCU_NAME "ESP32S2" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO1) + +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) + +#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") + +#define AUTORESET_DELAY_MS 500 + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO34) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO33) + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO36) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO37) diff --git a/ports/esp32s2/boards/adafruit_esp32s2_eink_portal/mpconfigboard.mk b/ports/esp32s2/boards/adafruit_esp32s2_eink_portal/mpconfigboard.mk new file mode 100644 index 0000000000..31aff57da4 --- /dev/null +++ b/ports/esp32s2/boards/adafruit_esp32s2_eink_portal/mpconfigboard.mk @@ -0,0 +1,17 @@ +USB_VID = 0x239A +USB_PID = 0x80E6 +USB_PRODUCT = "EInk Portal" +USB_MANUFACTURER = "Adafruit" + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = MPZ + +# The default queue depth of 16 overflows on release builds, +# so increase it to 32. +CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 + +CIRCUITPY_ESP_FLASH_MODE=dio +CIRCUITPY_ESP_FLASH_FREQ=40m +CIRCUITPY_ESP_FLASH_SIZE=4MB + +CIRCUITPY_MODULE=wrover diff --git a/ports/esp32s2/boards/adafruit_esp32s2_eink_portal/pins.c b/ports/esp32s2/boards/adafruit_esp32s2_eink_portal/pins.c new file mode 100644 index 0000000000..2cf3d24029 --- /dev/null +++ b/ports/esp32s2/boards/adafruit_esp32s2_eink_portal/pins.c @@ -0,0 +1,39 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_AD1), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO13) }, + + { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_SPEAKER_ENABLE), MP_ROM_PTR(&pin_GPIO16) }, + + { MP_ROM_QSTR(MP_QSTR_EPD_BUSY), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_EPD_RESET), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_EPD_DC), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_EPD_CS), MP_ROM_PTR(&pin_GPIO8) }, + + { MP_ROM_QSTR(MP_QSTR_BUTTON_A), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_BUTTON_B), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_BUTTON_C), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_BUTTON_D), MP_ROM_PTR(&pin_GPIO11) }, + + { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_GPIO2) }, + + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO34) }, + + { MP_ROM_QSTR(MP_QSTR_CS), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO37) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO21) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO1) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/esp32s2/boards/adafruit_esp32s2_eink_portal/sdkconfig b/ports/esp32s2/boards/adafruit_esp32s2_eink_portal/sdkconfig new file mode 100644 index 0000000000..9d8bbde967 --- /dev/null +++ b/ports/esp32s2/boards/adafruit_esp32s2_eink_portal/sdkconfig @@ -0,0 +1,33 @@ +CONFIG_ESP32S2_SPIRAM_SUPPORT=y + +# +# SPI RAM config +# +# CONFIG_SPIRAM_TYPE_AUTO is not set +CONFIG_SPIRAM_TYPE_ESPPSRAM16=y +# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set +CONFIG_SPIRAM_SIZE=2097152 + +# +# PSRAM clock and cs IO for ESP32S2 +# +CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_DEFAULT_PSRAM_CS_IO=26 +# end of PSRAM clock and cs IO for ESP32S2 + +# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set +# CONFIG_SPIRAM_RODATA is not set +# CONFIG_SPIRAM_SPEED_80M is not set +CONFIG_SPIRAM_SPEED_40M=y +# CONFIG_SPIRAM_SPEED_26M is not set +# CONFIG_SPIRAM_SPEED_20M is not set +CONFIG_SPIRAM=y +CONFIG_SPIRAM_BOOT_INIT=y +# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set +CONFIG_SPIRAM_USE_MEMMAP=y +# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set +# CONFIG_SPIRAM_USE_MALLOC is not set +CONFIG_SPIRAM_MEMTEST=y +# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# end of SPI RAM config From 0d1649880f1c23ec6c9c0a4834f3712a8495f9d8 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 26 Oct 2020 16:58:00 -0700 Subject: [PATCH 105/145] Add grayscale EInk support --- shared-bindings/displayio/EPaperDisplay.c | 35 +++++++++++++++++++---- shared-bindings/displayio/EPaperDisplay.h | 2 +- shared-module/displayio/ColorConverter.c | 9 +++--- shared-module/displayio/EPaperDisplay.c | 15 ++++++---- shared-module/displayio/EPaperDisplay.h | 1 + shared-module/displayio/Palette.h | 1 + shared-module/displayio/display_core.c | 1 + 7 files changed, 48 insertions(+), 16 deletions(-) diff --git a/shared-bindings/displayio/EPaperDisplay.c b/shared-bindings/displayio/EPaperDisplay.c index 8be4ee4c4a..e0326d9c82 100644 --- a/shared-bindings/displayio/EPaperDisplay.c +++ b/shared-bindings/displayio/EPaperDisplay.c @@ -49,7 +49,19 @@ //| Most people should not use this class directly. Use a specific display driver instead that will //| contain the startup and shutdown sequences at minimum.""" //| -//| def __init__(self, display_bus: _DisplayBus, start_sequence: ReadableBuffer, stop_sequence: ReadableBuffer, *, width: int, height: int, ram_width: int, ram_height: int, colstart: int = 0, rowstart: int = 0, rotation: int = 0, set_column_window_command: Optional[int] = None, set_row_window_command: Optional[int] = None, single_byte_bounds: bool = False, write_black_ram_command: int, black_bits_inverted: bool = False, write_color_ram_command: Optional[int] = None, color_bits_inverted: bool = False, highlight_color: int = 0x000000, refresh_display_command: int, refresh_time: float = 40, busy_pin: Optional[microcontroller.Pin] = None, busy_state: bool = True, seconds_per_frame: float = 180, always_toggle_chip_select: bool = False) -> None: +//| def __init__(self, display_bus: _DisplayBus, +//| start_sequence: ReadableBuffer, stop_sequence: ReadableBuffer, *, +//| width: int, height: int, ram_width: int, ram_height: int, +//| colstart: int = 0, rowstart: int = 0, rotation: int = 0, +//| set_column_window_command: Optional[int] = None, +//| set_row_window_command: Optional[int] = None, single_byte_bounds: bool = False, +//| write_black_ram_command: int, black_bits_inverted: bool = False, +//| write_color_ram_command: Optional[int] = None, +//| color_bits_inverted: bool = False, highlight_color: int = 0x000000, +//| refresh_display_command: int, refresh_time: float = 40, +//| busy_pin: Optional[microcontroller.Pin] = None, busy_state: bool = True, +//| seconds_per_frame: float = 180, always_toggle_chip_select: bool = False, +//| grayscale: bool = False) -> None: //| """Create a EPaperDisplay object on the given display bus (`displayio.FourWire` or `displayio.ParallelBus`). //| //| The ``start_sequence`` and ``stop_sequence`` are bitpacked to minimize the ram impact. Every @@ -84,11 +96,18 @@ //| :param microcontroller.Pin busy_pin: Pin used to signify the display is busy //| :param bool busy_state: State of the busy pin when the display is busy //| :param float seconds_per_frame: Minimum number of seconds between screen refreshes -//| :param bool always_toggle_chip_select: When True, chip select is toggled every byte""" +//| :param bool always_toggle_chip_select: When True, chip select is toggled every byte +//| :param bool grayscale: When true, the color ram is the low bit of 2-bit grayscale""" //| ... //| STATIC mp_obj_t displayio_epaperdisplay_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { - enum { ARG_display_bus, ARG_start_sequence, ARG_stop_sequence, ARG_width, ARG_height, ARG_ram_width, ARG_ram_height, ARG_colstart, ARG_rowstart, ARG_rotation, ARG_set_column_window_command, ARG_set_row_window_command, ARG_set_current_column_command, ARG_set_current_row_command, ARG_write_black_ram_command, ARG_black_bits_inverted, ARG_write_color_ram_command, ARG_color_bits_inverted, ARG_highlight_color, ARG_refresh_display_command, ARG_refresh_time, ARG_busy_pin, ARG_busy_state, ARG_seconds_per_frame, ARG_always_toggle_chip_select }; + enum { ARG_display_bus, ARG_start_sequence, ARG_stop_sequence, ARG_width, ARG_height, + ARG_ram_width, ARG_ram_height, ARG_colstart, ARG_rowstart, ARG_rotation, + ARG_set_column_window_command, ARG_set_row_window_command, ARG_set_current_column_command, + ARG_set_current_row_command, ARG_write_black_ram_command, ARG_black_bits_inverted, + ARG_write_color_ram_command, ARG_color_bits_inverted, ARG_highlight_color, + ARG_refresh_display_command, ARG_refresh_time, ARG_busy_pin, ARG_busy_state, + ARG_seconds_per_frame, ARG_always_toggle_chip_select, ARG_grayscale }; static const mp_arg_t allowed_args[] = { { MP_QSTR_display_bus, MP_ARG_REQUIRED | MP_ARG_OBJ }, { MP_QSTR_start_sequence, MP_ARG_REQUIRED | MP_ARG_OBJ }, @@ -115,6 +134,7 @@ STATIC mp_obj_t displayio_epaperdisplay_make_new(const mp_obj_type_t *type, size { MP_QSTR_busy_state, MP_ARG_BOOL | MP_ARG_KW_ONLY, {.u_bool = true} }, { MP_QSTR_seconds_per_frame, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_OBJ_NEW_SMALL_INT(180)} }, { MP_QSTR_always_toggle_chip_select, MP_ARG_BOOL | MP_ARG_KW_ONLY, {.u_bool = false} }, + { MP_QSTR_grayscale, MP_ARG_BOOL | MP_ARG_KW_ONLY, {.u_bool = false} }, }; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); @@ -151,11 +171,14 @@ STATIC mp_obj_t displayio_epaperdisplay_make_new(const mp_obj_type_t *type, size self, display_bus, start_bufinfo.buf, start_bufinfo.len, stop_bufinfo.buf, stop_bufinfo.len, - args[ARG_width].u_int, args[ARG_height].u_int, args[ARG_ram_width].u_int, args[ARG_ram_height].u_int, args[ARG_colstart].u_int, args[ARG_rowstart].u_int, rotation, + args[ARG_width].u_int, args[ARG_height].u_int, args[ARG_ram_width].u_int, args[ARG_ram_height].u_int, + args[ARG_colstart].u_int, args[ARG_rowstart].u_int, rotation, args[ARG_set_column_window_command].u_int, args[ARG_set_row_window_command].u_int, args[ARG_set_current_column_command].u_int, args[ARG_set_current_row_command].u_int, - args[ARG_write_black_ram_command].u_int, args[ARG_black_bits_inverted].u_bool, write_color_ram_command, args[ARG_color_bits_inverted].u_bool, highlight_color, args[ARG_refresh_display_command].u_int, refresh_time, - busy_pin, args[ARG_busy_state].u_bool, seconds_per_frame, args[ARG_always_toggle_chip_select].u_bool + args[ARG_write_black_ram_command].u_int, args[ARG_black_bits_inverted].u_bool, write_color_ram_command, + args[ARG_color_bits_inverted].u_bool, highlight_color, args[ARG_refresh_display_command].u_int, refresh_time, + busy_pin, args[ARG_busy_state].u_bool, seconds_per_frame, + args[ARG_always_toggle_chip_select].u_bool, args[ARG_grayscale].u_bool ); return self; diff --git a/shared-bindings/displayio/EPaperDisplay.h b/shared-bindings/displayio/EPaperDisplay.h index e4b81c8838..352de899a9 100644 --- a/shared-bindings/displayio/EPaperDisplay.h +++ b/shared-bindings/displayio/EPaperDisplay.h @@ -44,7 +44,7 @@ void common_hal_displayio_epaperdisplay_construct(displayio_epaperdisplay_obj_t* uint16_t set_column_window_command, uint16_t set_row_window_command, uint16_t set_current_column_command, uint16_t set_current_row_command, uint16_t write_black_ram_command, bool black_bits_inverted, uint16_t write_color_ram_command, bool color_bits_inverted, uint32_t highlight_color, uint16_t refresh_display_command, mp_float_t refresh_time, - const mcu_pin_obj_t* busy_pin, bool busy_state, mp_float_t seconds_per_frame, bool always_toggle_chip_select); + const mcu_pin_obj_t* busy_pin, bool busy_state, mp_float_t seconds_per_frame, bool always_toggle_chip_select, bool grayscale); bool common_hal_displayio_epaperdisplay_refresh(displayio_epaperdisplay_obj_t* self); diff --git a/shared-module/displayio/ColorConverter.c b/shared-module/displayio/ColorConverter.c index dc64da03da..03ec99ceb1 100644 --- a/shared-module/displayio/ColorConverter.c +++ b/shared-module/displayio/ColorConverter.c @@ -165,9 +165,9 @@ void displayio_colorconverter_convert(displayio_colorconverter_t *self, const _d g8 = MIN(255,g8 + (randg&0x03)); } else { int bitmask = 0xFF >> colorspace->depth; - b8 = MIN(255,b8 + (randb&bitmask)); - r8 = MIN(255,r8 + (randr&bitmask)); - g8 = MIN(255,g8 + (randg&bitmask)); + b8 = MIN(255,b8 + (randb & bitmask)); + r8 = MIN(255,r8 + (randr & bitmask)); + g8 = MIN(255,g8 + (randg & bitmask)); } pixel = r8 << 16 | g8 << 8 | b8; } @@ -196,7 +196,8 @@ void displayio_colorconverter_convert(displayio_colorconverter_t *self, const _d return; } else if (colorspace->grayscale && colorspace->depth <= 8) { uint8_t luma = displayio_colorconverter_compute_luma(pixel); - output_color->pixel = luma >> (8 - colorspace->depth); + size_t bitmask = (1 << colorspace->depth) - 1; + output_color->pixel = (luma >> colorspace->grayscale_bit) & bitmask; output_color->opaque = true; return; } diff --git a/shared-module/displayio/EPaperDisplay.c b/shared-module/displayio/EPaperDisplay.c index 46c7ea82e1..514b99a13b 100644 --- a/shared-module/displayio/EPaperDisplay.c +++ b/shared-module/displayio/EPaperDisplay.c @@ -49,7 +49,7 @@ void common_hal_displayio_epaperdisplay_construct(displayio_epaperdisplay_obj_t* uint16_t set_column_window_command, uint16_t set_row_window_command, uint16_t set_current_column_command, uint16_t set_current_row_command, uint16_t write_black_ram_command, bool black_bits_inverted, uint16_t write_color_ram_command, bool color_bits_inverted, uint32_t highlight_color, uint16_t refresh_display_command, mp_float_t refresh_time, - const mcu_pin_obj_t* busy_pin, bool busy_state, mp_float_t seconds_per_frame, bool chip_select) { + const mcu_pin_obj_t* busy_pin, bool busy_state, mp_float_t seconds_per_frame, bool chip_select, bool grayscale) { if (highlight_color != 0x000000) { self->core.colorspace.tricolor = true; self->core.colorspace.tricolor_hue = displayio_colorconverter_compute_hue(highlight_color); @@ -72,6 +72,7 @@ void common_hal_displayio_epaperdisplay_construct(displayio_epaperdisplay_obj_t* self->refreshing = false; self->milliseconds_per_frame = seconds_per_frame * 1000; self->chip_select = chip_select ? CHIP_SELECT_TOGGLE_EVERY_BYTE : CHIP_SELECT_UNTOUCHED; + self->grayscale = grayscale; self->start_sequence = start_sequence; self->start_sequence_len = start_sequence_len; @@ -230,17 +231,16 @@ bool displayio_epaperdisplay_refresh_area(displayio_epaperdisplay_obj_t* self, c uint32_t mask[mask_length]; uint8_t passes = 1; - if (self->core.colorspace.tricolor) { + if (self->core.colorspace.tricolor || self->grayscale) { passes = 2; } for (uint8_t pass = 0; pass < passes; pass++) { uint16_t remaining_rows = displayio_area_height(&clipped); - // added false parameter at end for SH1107_addressing quirk if (self->set_row_window_command != NO_COMMAND) { displayio_display_core_set_region_to_update(&self->core, self->set_column_window_command, self->set_row_window_command, self->set_current_column_command, self->set_current_row_command, - false, self->chip_select, &clipped, false); + false, self->chip_select, &clipped, false /* SH1107_addressing */); } uint8_t write_command = self->write_black_ram_command; @@ -270,8 +270,13 @@ bool displayio_epaperdisplay_refresh_area(displayio_epaperdisplay_obj_t* self, c memset(buffer, 0, buffer_size * sizeof(buffer[0])); self->core.colorspace.grayscale = true; + self->core.colorspace.grayscale_bit = 7; if (pass == 1) { - self->core.colorspace.grayscale = false; + if (self->grayscale) { // 4-color grayscale + self->core.colorspace.grayscale_bit = 6; + } else { // Tri-color + self->core.colorspace.grayscale = false; + } } displayio_display_core_fill_area(&self->core, &subrectangle, mask, buffer); diff --git a/shared-module/displayio/EPaperDisplay.h b/shared-module/displayio/EPaperDisplay.h index 3b9f6e3680..4103fe5fce 100644 --- a/shared-module/displayio/EPaperDisplay.h +++ b/shared-module/displayio/EPaperDisplay.h @@ -55,6 +55,7 @@ typedef struct { bool black_bits_inverted; bool color_bits_inverted; bool refreshing; + bool grayscale; display_chip_select_behavior_t chip_select; } displayio_epaperdisplay_obj_t; diff --git a/shared-module/displayio/Palette.h b/shared-module/displayio/Palette.h index da72f250f9..993912cc51 100644 --- a/shared-module/displayio/Palette.h +++ b/shared-module/displayio/Palette.h @@ -37,6 +37,7 @@ typedef struct { uint8_t bytes_per_cell; uint8_t tricolor_hue; uint8_t tricolor_luma; + uint8_t grayscale_bit; // The lowest grayscale bit. Normally 8 - depth. bool grayscale; bool tricolor; bool pixels_in_byte_share_row; diff --git a/shared-module/displayio/display_core.c b/shared-module/displayio/display_core.c index 411f9f3736..57d33b5651 100644 --- a/shared-module/displayio/display_core.c +++ b/shared-module/displayio/display_core.c @@ -48,6 +48,7 @@ void displayio_display_core_construct(displayio_display_core_t* self, uint16_t color_depth, bool grayscale, bool pixels_in_byte_share_row, uint8_t bytes_per_cell, bool reverse_pixels_in_byte, bool reverse_bytes_in_word) { self->colorspace.depth = color_depth; self->colorspace.grayscale = grayscale; + self->colorspace.grayscale_bit = 8 - color_depth; self->colorspace.pixels_in_byte_share_row = pixels_in_byte_share_row; self->colorspace.bytes_per_cell = bytes_per_cell; self->colorspace.reverse_pixels_in_byte = reverse_pixels_in_byte; From 95cb5961d26a4e1e048d48266d21547dc9229ba9 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 26 Oct 2020 16:58:56 -0700 Subject: [PATCH 106/145] Fix ESP32-S2 SPI when DMA is sometimes used --- ports/esp32s2/common-hal/busio/SPI.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ports/esp32s2/common-hal/busio/SPI.c b/ports/esp32s2/common-hal/busio/SPI.c index 1906ca6f00..490419f34a 100644 --- a/ports/esp32s2/common-hal/busio/SPI.c +++ b/ports/esp32s2/common-hal/busio/SPI.c @@ -357,6 +357,9 @@ bool common_hal_busio_spi_transfer(busio_spi_obj_t *self, const uint8_t *data_ou } else { hal->dma_enabled = 0; burst_length = sizeof(hal->hw->data_buf); + // When switching to non-DMA, we need to make sure DMA is off. Otherwise, + // the S2 will transmit zeroes instead of our data. + spi_ll_txdma_disable(hal->hw); } // This rounds up. From d86c6a74a48adc1e559845acd9821d4ad6f63590 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 26 Oct 2020 17:06:04 -0700 Subject: [PATCH 107/145] Add to CI build --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fa576bbf0a..95bd2bfa47 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -418,6 +418,7 @@ jobs: fail-fast: false matrix: board: + - "adafruit_esp32s2_eink_portal" - "adafruit_metro_esp32s2" - "electroniccats_bastwifi" - "espressif_kaluga_1" From 2ba66599670c0d3d0f5ef5dc8780c34cf9d61231 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 26 Oct 2020 19:07:37 -0500 Subject: [PATCH 108/145] esp32s2: Makefile: restore --no-stub --- ports/esp32s2/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/esp32s2/Makefile b/ports/esp32s2/Makefile index 5d8ccad50d..8d891edd02 100644 --- a/ports/esp32s2/Makefile +++ b/ports/esp32s2/Makefile @@ -331,10 +331,10 @@ $(BUILD)/firmware.uf2: $(BUILD)/circuitpython-firmware.bin $(Q)$(PYTHON3) $(TOP)/tools/uf2/utils/uf2conv.py -f 0xbfdd4eee -b 0x0000 -c -o $@ $^ flash: $(BUILD)/firmware.bin - esptool.py --chip esp32s2 -p $(PORT) -b 460800 --before=default_reset --after=hard_reset write_flash $(FLASH_FLAGS) 0x0000 $^ + esptool.py --chip esp32s2 -p $(PORT) --no-stub -b 460800 --before=default_reset --after=hard_reset write_flash $(FLASH_FLAGS) 0x0000 $^ flash-circuitpython-only: $(BUILD)/circuitpython-firmware.bin - esptool.py --chip esp32s2 -p $(PORT) -b 460800 --before=default_reset --after=hard_reset write_flash $(FLASH_FLAGS) 0x10000 $^ + esptool.py --chip esp32s2 -p $(PORT) --no-stub -b 460800 --before=default_reset --after=hard_reset write_flash $(FLASH_FLAGS) 0x10000 $^ include $(TOP)/py/mkrules.mk From 3a501a04951849ddd83455706fe87a6950d051fe Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 26 Oct 2020 19:18:37 -0500 Subject: [PATCH 109/145] esp32s2: canio: respond to review comments * explain the introduction of the temporary variable in get_t_config * get rid of unneeded __attribute__ * get rid of unneeded members of canio_can_obj_t * get rid of unneeded header inclusion --- ports/esp32s2/common-hal/canio/CAN.c | 14 ++++++-------- ports/esp32s2/common-hal/canio/CAN.h | 3 --- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/ports/esp32s2/common-hal/canio/CAN.c b/ports/esp32s2/common-hal/canio/CAN.c index f1741969db..768fde2431 100644 --- a/ports/esp32s2/common-hal/canio/CAN.c +++ b/ports/esp32s2/common-hal/canio/CAN.c @@ -33,7 +33,6 @@ #include "shared-bindings/microcontroller/Pin.h" #include "shared-bindings/util.h" #include "supervisor/port.h" -#include "hal/twai_ll.h" #include "hal/twai_types.h" @@ -43,6 +42,10 @@ twai_timing_config_t get_t_config(int baudrate) { switch(baudrate) { case 1000000: { + // TWAI_TIMING_CONFIG_abc expands to a C designated initializer list + // { .brp = 4, ...}. This is only acceptable to the compiler as an + // initializer and 'return TWAI_TIMING_CONFIG_1MBITS()` is not valid. + // Instead, introduce a temporary, named variable and return it. twai_timing_config_t t_config = TWAI_TIMING_CONFIG_1MBITS(); return t_config; } @@ -116,7 +119,6 @@ twai_timing_config_t get_t_config(int baudrate) { } } -__attribute__((optimize("O0"))) void common_hal_canio_can_construct(canio_can_obj_t *self, mcu_pin_obj_t *tx, mcu_pin_obj_t *rx, int baudrate, bool loopback, bool silent) { #define DIV_ROUND(a, b) (((a) + (b)/2) / (b)) @@ -129,7 +131,7 @@ void common_hal_canio_can_construct(canio_can_obj_t *self, mcu_pin_obj_t *tx, mc mp_raise_ValueError(translate("loopback + silent mode not supported by peripheral")); } - self->t_config = get_t_config(baudrate);; + twai_timing_config_t t_config = get_t_config(baudrate); twai_general_config_t g_config = TWAI_GENERAL_CONFIG_DEFAULT(-1, -1, TWAI_MODE_NORMAL); g_config.tx_io = tx->number; g_config.rx_io = rx->number; @@ -139,14 +141,10 @@ void common_hal_canio_can_construct(canio_can_obj_t *self, mcu_pin_obj_t *tx, mc if (silent) { g_config.mode = TWAI_MODE_LISTEN_ONLY; } - self->g_config = g_config; - { twai_filter_config_t f_config = TWAI_FILTER_CONFIG_ACCEPT_ALL(); - self->f_config = f_config; - } - esp_err_t result = twai_driver_install(&self->g_config, &self->t_config, &self->f_config); + esp_err_t result = twai_driver_install(&g_config, &t_config, &f_config); if (result == ESP_ERR_NO_MEM) { mp_raise_msg(&mp_type_MemoryError, translate("ESP-IDF memory allocation failed")); } else if (result == ESP_ERR_INVALID_ARG) { diff --git a/ports/esp32s2/common-hal/canio/CAN.h b/ports/esp32s2/common-hal/canio/CAN.h index e15d515908..85fb6972be 100644 --- a/ports/esp32s2/common-hal/canio/CAN.h +++ b/ports/esp32s2/common-hal/canio/CAN.h @@ -46,7 +46,4 @@ typedef struct canio_can_obj { bool silent:1; bool auto_restart:1; bool fifo_in_use:1; - twai_filter_config_t f_config; - twai_general_config_t g_config; - twai_timing_config_t t_config; } canio_can_obj_t; From ba0a3769e343b465c82dde4aafe99bcf11c84dbe Mon Sep 17 00:00:00 2001 From: _fonzlate Date: Mon, 26 Oct 2020 17:08:51 +0000 Subject: [PATCH 110/145] Translated using Weblate (Dutch) Currently translated at 100.0% (836 of 836 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/nl/ --- locale/nl.po | 122 ++++++++++++++++++++++++++------------------------- 1 file changed, 63 insertions(+), 59 deletions(-) diff --git a/locale/nl.po b/locale/nl.po index ca7530c0fd..59b1f2e73b 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -6,15 +6,15 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-10-16 19:50-0500\n" -"PO-Revision-Date: 2020-09-09 16:05+0000\n" -"Last-Translator: Jelle Jager \n" +"PO-Revision-Date: 2020-10-27 16:47+0000\n" +"Last-Translator: _fonzlate \n" "Language-Team: none\n" "Language: nl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.3-dev\n" +"X-Generator: Weblate 4.3.2-dev\n" #: main.c msgid "" @@ -98,7 +98,7 @@ msgstr "%q moet een tuple van lengte 2 zijn" #: shared-bindings/canio/Match.c msgid "%q out of range" -msgstr "" +msgstr "%q buiten bereik" #: ports/atmel-samd/common-hal/microcontroller/Pin.c msgid "%q pin invalid" @@ -252,7 +252,7 @@ msgstr "'return' buiten de functie" #: py/compile.c msgid "'yield from' inside async function" -msgstr "" +msgstr "'yield from' binnen asynchrone functie" #: py/compile.c msgid "'yield' outside function" @@ -281,7 +281,7 @@ msgstr "Een hardware interrupt kanaal is al in gebruik" #: ports/esp32s2/common-hal/analogio/AnalogIn.c msgid "ADC2 is being used by WiFi" -msgstr "" +msgstr "ADC2 wordt gebruikt door WiFi" #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, c-format @@ -299,7 +299,7 @@ msgstr "Alle I2C peripherals zijn in gebruik" #: ports/atmel-samd/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" -msgstr "" +msgstr "Alle RX FIFO's zijn in gebruik" #: ports/esp32s2/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c msgid "All SPI peripherals are in use" @@ -342,7 +342,7 @@ msgstr "Advertising is al bezig." #: ports/atmel-samd/common-hal/canio/Listener.c msgid "Already have all-matches listener" -msgstr "" +msgstr "Heeft al een luisteraar voor 'all-matches'" #: shared-module/memorymonitor/AllocationAlarm.c #: shared-module/memorymonitor/AllocationSize.c @@ -351,7 +351,7 @@ msgstr "Wordt al uitgevoerd" #: ports/esp32s2/common-hal/wifi/Radio.c msgid "Already scanning for wifi networks" -msgstr "" +msgstr "Zoekt al naar WiFi netwerken" #: ports/cxd56/common-hal/analogio/AnalogIn.c msgid "AnalogIn not supported on given pin" @@ -399,7 +399,7 @@ msgstr "heap allocatie geprobeerd terwijl MicroPython VM niet draait." #: shared-bindings/wifi/Radio.c msgid "Authentication failure" -msgstr "" +msgstr "Authenticatiefout" #: main.c msgid "Auto-reload is off.\n" @@ -617,7 +617,7 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "CircuitPython was unable to allocate the heap.\n" -msgstr "" +msgstr "CircuitPython kon het heap geheugen niet toewijzen.\n" #: shared-module/bitbangio/SPI.c msgid "Clock pin init failed." @@ -658,7 +658,7 @@ msgstr "Corrupt raw code" #: ports/cxd56/common-hal/camera/Camera.c msgid "Could not initialize Camera" -msgstr "" +msgstr "Kon camera niet initialiseren" #: ports/cxd56/common-hal/gnss/GNSS.c msgid "Could not initialize GNSS" @@ -695,7 +695,7 @@ msgstr "Kan PWM niet herstarten" #: ports/esp32s2/common-hal/neopixel_write/__init__.c msgid "Could not retrieve clock" -msgstr "" +msgstr "Kon klok niet ophalen" #: shared-bindings/_bleio/Adapter.c msgid "Could not set address" @@ -789,7 +789,7 @@ msgstr "ECB werkt alleen met 16 bytes tegelijkertijd" #: ports/esp32s2/common-hal/busio/SPI.c msgid "ESP-IDF memory allocation failed" -msgstr "" +msgstr "ESP-IDF geheugen toewijzing mislukt" #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c #: ports/atmel-samd/common-hal/ps2io/Ps2.c @@ -850,7 +850,7 @@ msgstr "FFT alleen voor ndarrays gedefineerd" #: ports/esp32s2/common-hal/socketpool/Socket.c msgid "Failed SSL handshake" -msgstr "" +msgstr "SSL handdruk mislukt" #: shared-bindings/ps2io/Ps2.c msgid "Failed sending command." @@ -877,11 +877,11 @@ msgstr "Mislukt een RX buffer van %d bytes te alloceren" #: ports/esp32s2/common-hal/wifi/__init__.c msgid "Failed to allocate Wifi memory" -msgstr "" +msgstr "Kon WiFi geheugen niet toewijzen" #: ports/esp32s2/common-hal/wifi/ScannedNetworks.c msgid "Failed to allocate wifi scan memory" -msgstr "" +msgstr "Kon WiFi scan geheugen niet toewijzen" #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Failed to connect: internal error" @@ -893,7 +893,7 @@ msgstr "Verbinding mislukt: timeout" #: ports/esp32s2/common-hal/wifi/__init__.c msgid "Failed to init wifi" -msgstr "" +msgstr "Kon WiFi niet initialiseren" #: shared-module/audiomp3/MP3Decoder.c msgid "Failed to parse MP3 file" @@ -915,11 +915,11 @@ msgstr "Bestand bestaat" #: ports/atmel-samd/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" -msgstr "" +msgstr "Filters zijn te complex" #: ports/cxd56/common-hal/camera/Camera.c msgid "Format not supported" -msgstr "" +msgstr "Formaat wordt niet ondersteund" #: shared-module/framebufferio/FramebufferDisplay.c #, c-format @@ -963,7 +963,7 @@ msgstr "Hardware in gebruik, probeer alternatieve pinnen" #: shared-bindings/wifi/Radio.c msgid "Hostname must be between 1 and 253 characters" -msgstr "" +msgstr "Hostnaam moet tussen 1 en 253 karakters zijn" #: extmod/vfs_posix_file.c py/objstringio.c msgid "I/O operation on closed file" @@ -996,7 +996,7 @@ msgstr "Incorrecte buffer grootte" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c msgid "Input taking too long" -msgstr "" +msgstr "Invoer duurt te lang" #: ports/esp32s2/common-hal/neopixel_write/__init__.c py/moduerrno.c msgid "Input/output error" @@ -1044,7 +1044,7 @@ msgstr "Ongeldig BMP bestand" #: shared-bindings/wifi/Radio.c msgid "Invalid BSSID" -msgstr "" +msgstr "Ongeldig BSSID" #: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c @@ -1095,7 +1095,7 @@ msgstr "Ongeldig formaat stuk grootte" #: ports/esp32s2/common-hal/pwmio/PWMOut.c msgid "Invalid frequency" -msgstr "" +msgstr "Onjuiste frequentie" #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Invalid frequency supplied" @@ -1218,7 +1218,7 @@ msgstr "Maximale x waarde indien gespiegeld is %d" #: shared-bindings/canio/Message.c msgid "Messages limited to 8 bytes" -msgstr "" +msgstr "Berichten zijn beperkt tot 8 bytes" #: supervisor/shared/safe_mode.c msgid "MicroPython NLR jump failed. Likely memory corruption." @@ -1330,11 +1330,11 @@ msgstr "Geen lange integer ondersteuning" #: ports/esp32s2/common-hal/pwmio/PWMOut.c msgid "No more channels available" -msgstr "" +msgstr "Geen kanalen meer beschikbaar" #: ports/esp32s2/common-hal/pwmio/PWMOut.c msgid "No more timers available" -msgstr "" +msgstr "Geen timers meer beschikbaar" #: ports/stm/common-hal/pwmio/PWMOut.c msgid "No more timers available on this pin." @@ -1342,7 +1342,7 @@ msgstr "Geen timers meer beschikbaar op deze pin." #: shared-bindings/wifi/Radio.c msgid "No network with that ssid" -msgstr "" +msgstr "Geen netwerk met dat SSID gevonden" #: shared-module/touchio/TouchIn.c msgid "No pulldown on pin; 1Mohm recommended" @@ -1366,7 +1366,7 @@ msgstr "Nordic Soft Device assertion mislukt." #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" -msgstr "" +msgstr "Geen geldige IP string" #: ports/nrf/common-hal/_bleio/__init__.c #: shared-bindings/_bleio/CharacteristicBuffer.c @@ -1384,7 +1384,7 @@ msgstr "Opgeslagen code wordt niet uitgevoerd.\n" #: shared-bindings/_bleio/__init__.c msgid "Not settable" -msgstr "" +msgstr "Niet instelbaar" #: shared-bindings/util.c msgid "" @@ -1403,11 +1403,11 @@ msgstr "Alleen 8 of 16 bit mono met " #: ports/esp32s2/common-hal/socketpool/SocketPool.c msgid "Only IPv4 SOCK_STREAM sockets supported" -msgstr "" +msgstr "Alleen IPv4 SOCK_STREAM sockets worden ondersteund" #: ports/esp32s2/common-hal/wifi/__init__.c msgid "Only IPv4 addresses supported" -msgstr "" +msgstr "Alleen IPv4 adressen worden ondersteund" #: shared-module/displayio/OnDiskBitmap.c #, c-format @@ -1428,15 +1428,15 @@ msgstr "" #: shared-module/displayio/ColorConverter.c msgid "Only one color can be transparent at a time" -msgstr "" +msgstr "Er kan maar één kleur per keer transparant zijn" #: shared-bindings/ipaddress/__init__.c msgid "Only raw int supported for ip" -msgstr "" +msgstr "Alleen raw int ondersteund voor IP" #: ports/esp32s2/common-hal/socketpool/SocketPool.c msgid "Out of sockets" -msgstr "" +msgstr "Geen sockets meer beschikbaar" #: shared-bindings/audiobusio/PDMIn.c msgid "Oversample must be multiple of 8." @@ -1510,6 +1510,8 @@ msgid "" "Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " "instead" msgstr "" +"Poort ondersteund geen PWM drager. Geef een pin, frequentie en inschakeltijd " +"op" #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c @@ -1519,6 +1521,8 @@ msgid "" "Port does not accept pins or frequency. Construct and pass a PWMOut Carrier " "instead" msgstr "" +"Poort accepteert geen pin of frequentie. Stel een PWMOut Carrier samen en " +"geef die op" #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" @@ -1584,7 +1588,7 @@ msgstr "Verversing te snel" #: shared-bindings/canio/RemoteTransmissionRequest.c msgid "RemoteTransmissionRequests limited to 8 bytes" -msgstr "" +msgstr "RemoteTransmissionRequests is beperkt tot 8 bytes" #: shared-bindings/aesio/aes.c msgid "Requested AES mode is unsupported" @@ -1657,11 +1661,11 @@ msgstr "Serializer in gebruik" #: shared-bindings/ssl/SSLContext.c msgid "Server side context cannot have hostname" -msgstr "" +msgstr "Context aan de serverkant kan geen hostnaam hebben" #: ports/cxd56/common-hal/camera/Camera.c msgid "Size not supported" -msgstr "" +msgstr "Afmeting niet ondersteund" #: shared-bindings/nvm/ByteArray.c msgid "Slice and value different lengths." @@ -1676,7 +1680,7 @@ msgstr "Slices niet ondersteund" #: ports/esp32s2/common-hal/socketpool/SocketPool.c msgid "SocketPool can only be used with wifi.radio" -msgstr "" +msgstr "SocketPool kan alleen met wifi.radio gebruikt worden" #: shared-bindings/aesio/aes.c msgid "Source and destination buffers must be the same length" @@ -1724,7 +1728,7 @@ msgstr "" #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" -msgstr "" +msgstr "De lengte van rgb_pins moet 6, 12, 18, 24 of 30 zijn" #: supervisor/shared/safe_mode.c msgid "" @@ -1783,7 +1787,7 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "To exit, please reset the board without " -msgstr "" +msgstr "Om te beëindigen, reset het bord zonder " #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample." @@ -1856,7 +1860,7 @@ msgstr "Niet in staat buffers voor gesigneerde conversie te alloceren" #: ports/esp32s2/common-hal/busio/I2C.c msgid "Unable to create lock" -msgstr "" +msgstr "Kan vergrendeling niet maken" #: shared-module/displayio/I2CDisplay.c #, c-format @@ -1887,11 +1891,11 @@ msgstr "Onverwacht mrfx uuid type" #: ports/esp32s2/common-hal/socketpool/Socket.c #, c-format msgid "Unhandled ESP TLS error %d %d %x %d" -msgstr "" +msgstr "Niet behandelde ESP TLS fout %d %d %x %d" #: shared-bindings/wifi/Radio.c msgid "Unknown failure" -msgstr "" +msgstr "Onbekende fout" #: ports/nrf/common-hal/_bleio/__init__.c #, c-format @@ -2009,7 +2013,7 @@ msgstr "" #: shared-bindings/wifi/Radio.c msgid "WiFi password must be between 8 and 63 characters" -msgstr "" +msgstr "WiFi wachtwoord moet tussen 8 en 63 karakters bevatten" #: ports/nrf/common-hal/_bleio/PacketBuffer.c msgid "Writes not supported on Characteristic" @@ -2164,7 +2168,7 @@ msgstr "buffer te klein" #: shared-bindings/socketpool/Socket.c msgid "buffer too small for requested bytes" -msgstr "" +msgstr "buffer te klein voor gevraagde bytes" #: shared-bindings/_pew/PewPew.c msgid "buttons must be digitalio.DigitalInOut" @@ -2185,7 +2189,7 @@ msgstr "butes > 8 niet ondersteund" #: py/objarray.c msgid "bytes length not a multiple of item size" -msgstr "" +msgstr "bytes lengte is geen veelvoud van itemgrootte" #: py/objstr.c msgid "bytes value out of range" @@ -2503,11 +2507,11 @@ msgstr "uitzonderingen moeten afleiden van BaseException" #: shared-bindings/canio/CAN.c msgid "expected '%q' but got '%q'" -msgstr "" +msgstr "verwachtte '%q' maar ontving '%q'" #: shared-bindings/canio/CAN.c msgid "expected '%q' or '%q' but got '%q'" -msgstr "" +msgstr "verwachtte '%q' of '%q' maar ontving '%q'" #: py/objstr.c msgid "expected ':' after format specifier" @@ -2721,7 +2725,7 @@ msgstr "oorspronkelijke waarden moeten itereerbaar zijn" #: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c msgid "initial_value length is wrong" -msgstr "" +msgstr "lengte van initial_value is onjuist" #: py/compile.c msgid "inline assembler must be a function" @@ -2798,7 +2802,7 @@ msgstr "ongeldige formaatspecificatie" #: shared-bindings/wifi/Radio.c msgid "invalid hostname" -msgstr "" +msgstr "onjuiste hostnaam" #: extmod/modussl_axtls.c msgid "invalid key" @@ -3162,11 +3166,11 @@ msgstr "ord() verwacht een teken (char) maar vond een string van lengte %d" #: shared-bindings/displayio/Bitmap.c msgid "out of range of source" -msgstr "" +msgstr "buiten bereik van bron" #: shared-bindings/displayio/Bitmap.c msgid "out of range of target" -msgstr "" +msgstr "buiten bereik van doel" #: py/objint_mpz.c msgid "overflow converting long int to machine word" @@ -3175,7 +3179,7 @@ msgstr "overloop bij converteren van long int naar machine word" #: py/modstruct.c #, c-format msgid "pack expected %d items for packing (got %d)" -msgstr "" +msgstr "pack verwachtte %d elementen (ontving %d)" #: shared-bindings/_stage/Layer.c shared-bindings/_stage/Text.c msgid "palette must be 32 bytes long" @@ -3244,7 +3248,7 @@ msgstr "pow() met 3 argumenten vereist integers" #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h msgid "pressing boot button at start up.\n" -msgstr "" +msgstr "druk bootknop in bij opstarten.\n" #: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h #: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h @@ -3252,7 +3256,7 @@ msgstr "" #: ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h #: ports/atmel-samd/boards/meowmeow/mpconfigboard.h msgid "pressing both buttons at start up.\n" -msgstr "" +msgstr "druk beide knoppen in bij opstarten.\n" #: extmod/modutimeq.c msgid "queue overflow" @@ -3379,7 +3383,7 @@ msgstr "sosfilt vereist itereerbare argumenten" #: shared-bindings/displayio/Bitmap.c msgid "source palette too large" -msgstr "" +msgstr "bronpalet te groot" #: py/objstr.c msgid "start/end indices" @@ -3514,7 +3518,7 @@ msgstr "objecttype '%q' heeft geen attribuut '%q'" #: py/objgenerator.c msgid "type object 'generator' has no attribute '__await__'" -msgstr "" +msgstr "het type object 'generator' heeft geen attribuut '__await__'" #: py/objtype.c msgid "type takes 1 or 3 arguments" @@ -3624,7 +3628,7 @@ msgstr "watchdog time-out moet groter zijn dan 0" #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" -msgstr "" +msgstr "breedte moet groter dan nul zijn" #: shared-bindings/_bleio/Adapter.c msgid "window must be <= interval" From f2e79ce89da0ed926a5b10c22e0cd3fc81197e6c Mon Sep 17 00:00:00 2001 From: Jelle Jager Date: Mon, 26 Oct 2020 16:37:46 +0000 Subject: [PATCH 111/145] Translated using Weblate (Dutch) Currently translated at 100.0% (836 of 836 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/nl/ --- locale/nl.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/nl.po b/locale/nl.po index 59b1f2e73b..f6efee0195 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -7,7 +7,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-10-16 19:50-0500\n" "PO-Revision-Date: 2020-10-27 16:47+0000\n" -"Last-Translator: _fonzlate \n" +"Last-Translator: Jelle Jager \n" "Language-Team: none\n" "Language: nl\n" "MIME-Version: 1.0\n" @@ -481,7 +481,7 @@ msgstr "Buffer lengte moet een veelvoud van 512 zijn" #: ports/stm/common-hal/sdioio/SDCard.c msgid "Buffer must be a multiple of 512 bytes" -msgstr "Buffer moet een veelvoud van 512 zijn" +msgstr "Buffer moet een veelvoud van 512 bytes zijn" #: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c msgid "Buffer must be at least length 1" From e00ae204db06f6505f9965fb5433d8e3cb4e220c Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Tue, 27 Oct 2020 17:48:01 +0100 Subject: [PATCH 112/145] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ --- locale/ID.po | 12 ++++++++++++ locale/cs.po | 12 ++++++++++++ locale/de_DE.po | 12 ++++++++++++ locale/el.po | 12 ++++++++++++ locale/es.po | 20 +++++++++++++++++--- locale/fil.po | 12 ++++++++++++ locale/fr.po | 12 ++++++++++++ locale/hi.po | 12 ++++++++++++ locale/it_IT.po | 12 ++++++++++++ locale/ja.po | 12 ++++++++++++ locale/ko.po | 12 ++++++++++++ locale/nl.po | 12 ++++++++++++ locale/pl.po | 12 ++++++++++++ locale/pt_BR.po | 12 ++++++++++++ locale/sv.po | 12 ++++++++++++ locale/zh_Latn_pinyin.po | 12 ++++++++++++ 16 files changed, 197 insertions(+), 3 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index 958ff1e6b2..94a874826d 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -2918,6 +2918,14 @@ msgstr "" msgid "maximum recursion depth exceeded" msgstr "" +#: extmod/ulab/code/approx/approx.c +msgid "maxiter must be > 0" +msgstr "" + +#: extmod/ulab/code/approx/approx.c +msgid "maxiter should be > 0" +msgstr "" + #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" @@ -3351,6 +3359,10 @@ msgstr "memulai ulang software(soft reboot)\n" msgid "sort argument must be an ndarray" msgstr "" +#: extmod/ulab/code/numerical/numerical.c +msgid "sorted axis can't be longer than 65535" +msgstr "" + #: extmod/ulab/code/filter/filter.c msgid "sos array must be of shape (n_section, 6)" msgstr "" diff --git a/locale/cs.po b/locale/cs.po index 6a3d00d993..b8da707413 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -2875,6 +2875,14 @@ msgstr "" msgid "maximum recursion depth exceeded" msgstr "" +#: extmod/ulab/code/approx/approx.c +msgid "maxiter must be > 0" +msgstr "" + +#: extmod/ulab/code/approx/approx.c +msgid "maxiter should be > 0" +msgstr "" + #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" @@ -3307,6 +3315,10 @@ msgstr "" msgid "sort argument must be an ndarray" msgstr "" +#: extmod/ulab/code/numerical/numerical.c +msgid "sorted axis can't be longer than 65535" +msgstr "" + #: extmod/ulab/code/filter/filter.c msgid "sos array must be of shape (n_section, 6)" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index 0e2e5a038e..4d43a26557 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -2954,6 +2954,14 @@ msgstr "" msgid "maximum recursion depth exceeded" msgstr "maximale Rekursionstiefe überschritten" +#: extmod/ulab/code/approx/approx.c +msgid "maxiter must be > 0" +msgstr "" + +#: extmod/ulab/code/approx/approx.c +msgid "maxiter should be > 0" +msgstr "" + #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" @@ -3392,6 +3400,10 @@ msgstr "weicher reboot\n" msgid "sort argument must be an ndarray" msgstr "sortierungs Argument muss ein ndarray sein" +#: extmod/ulab/code/numerical/numerical.c +msgid "sorted axis can't be longer than 65535" +msgstr "" + #: extmod/ulab/code/filter/filter.c msgid "sos array must be of shape (n_section, 6)" msgstr "" diff --git a/locale/el.po b/locale/el.po index 5e55065b30..80fdb7eca1 100644 --- a/locale/el.po +++ b/locale/el.po @@ -2870,6 +2870,14 @@ msgstr "" msgid "maximum recursion depth exceeded" msgstr "" +#: extmod/ulab/code/approx/approx.c +msgid "maxiter must be > 0" +msgstr "" + +#: extmod/ulab/code/approx/approx.c +msgid "maxiter should be > 0" +msgstr "" + #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" @@ -3302,6 +3310,10 @@ msgstr "" msgid "sort argument must be an ndarray" msgstr "" +#: extmod/ulab/code/numerical/numerical.c +msgid "sorted axis can't be longer than 65535" +msgstr "" + #: extmod/ulab/code/filter/filter.c msgid "sos array must be of shape (n_section, 6)" msgstr "" diff --git a/locale/es.po b/locale/es.po index 5cf9cf8654..38e0ff8d39 100644 --- a/locale/es.po +++ b/locale/es.po @@ -318,7 +318,9 @@ msgstr "Todos los canales de eventos estan siendo usados" #: ports/atmel-samd/audio_dma.c ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "All sync event channels in use" -msgstr "Todos los canales de eventos de sincronización (sync event channels) están siendo utilizados" +msgstr "" +"Todos los canales de eventos de sincronización (sync event channels) están " +"siendo utilizados" #: shared-bindings/pwmio/PWMOut.c msgid "All timers for this pin are in use" @@ -2941,6 +2943,14 @@ msgstr "max_lenght debe ser > 0" msgid "maximum recursion depth exceeded" msgstr "profundidad máxima de recursión excedida" +#: extmod/ulab/code/approx/approx.c +msgid "maxiter must be > 0" +msgstr "" + +#: extmod/ulab/code/approx/approx.c +msgid "maxiter should be > 0" +msgstr "" + #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" @@ -3378,6 +3388,10 @@ msgstr "reinicio suave\n" msgid "sort argument must be an ndarray" msgstr "argumento de ordenado debe ser un ndarray" +#: extmod/ulab/code/numerical/numerical.c +msgid "sorted axis can't be longer than 65535" +msgstr "" + #: extmod/ulab/code/filter/filter.c msgid "sos array must be of shape (n_section, 6)" msgstr "el arreglo sos debe de forma (n_section, 6)" @@ -4135,8 +4149,8 @@ msgstr "zi debe ser una forma (n_section,2)" #~ "pequeño.\n" #~ "Aumente los límites del tamaño del stack y presione reset (después de " #~ "expulsarCIRCUITPY).\n" -#~ "Si no cambió el stack, entonces reporte un issue aquí con el contenido " -#~ "de su unidad CIRCUITPY:\n" +#~ "Si no cambió el stack, entonces reporte un issue aquí con el contenido de " +#~ "su unidad CIRCUITPY:\n" #~ msgid "" #~ "The microcontroller's power dipped. Please make sure your power supply " diff --git a/locale/fil.po b/locale/fil.po index 7a91f5c859..838bca98ba 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -2919,6 +2919,14 @@ msgstr "" msgid "maximum recursion depth exceeded" msgstr "lumagpas ang maximum recursion depth" +#: extmod/ulab/code/approx/approx.c +msgid "maxiter must be > 0" +msgstr "" + +#: extmod/ulab/code/approx/approx.c +msgid "maxiter should be > 0" +msgstr "" + #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" @@ -3355,6 +3363,10 @@ msgstr "malambot na reboot\n" msgid "sort argument must be an ndarray" msgstr "" +#: extmod/ulab/code/numerical/numerical.c +msgid "sorted axis can't be longer than 65535" +msgstr "" + #: extmod/ulab/code/filter/filter.c msgid "sos array must be of shape (n_section, 6)" msgstr "" diff --git a/locale/fr.po b/locale/fr.po index cf0ea4fc31..b4a15ee1f9 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -2965,6 +2965,14 @@ msgstr "max_length doit être > 0" msgid "maximum recursion depth exceeded" msgstr "profondeur maximale de récursivité dépassée" +#: extmod/ulab/code/approx/approx.c +msgid "maxiter must be > 0" +msgstr "" + +#: extmod/ulab/code/approx/approx.c +msgid "maxiter should be > 0" +msgstr "" + #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" @@ -3404,6 +3412,10 @@ msgstr "redémarrage logiciel\n" msgid "sort argument must be an ndarray" msgstr "l'argument de «sort» doit être un ndarray" +#: extmod/ulab/code/numerical/numerical.c +msgid "sorted axis can't be longer than 65535" +msgstr "" + #: extmod/ulab/code/filter/filter.c msgid "sos array must be of shape (n_section, 6)" msgstr "le tableau sos doit être de forme (n_section, 6)" diff --git a/locale/hi.po b/locale/hi.po index bd6d5395bf..9174580a26 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -2870,6 +2870,14 @@ msgstr "" msgid "maximum recursion depth exceeded" msgstr "" +#: extmod/ulab/code/approx/approx.c +msgid "maxiter must be > 0" +msgstr "" + +#: extmod/ulab/code/approx/approx.c +msgid "maxiter should be > 0" +msgstr "" + #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" @@ -3302,6 +3310,10 @@ msgstr "" msgid "sort argument must be an ndarray" msgstr "" +#: extmod/ulab/code/numerical/numerical.c +msgid "sorted axis can't be longer than 65535" +msgstr "" + #: extmod/ulab/code/filter/filter.c msgid "sos array must be of shape (n_section, 6)" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index 9ed3bb1e1c..6345c095c7 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -2921,6 +2921,14 @@ msgstr "" msgid "maximum recursion depth exceeded" msgstr "profondità massima di ricorsione superata" +#: extmod/ulab/code/approx/approx.c +msgid "maxiter must be > 0" +msgstr "" + +#: extmod/ulab/code/approx/approx.c +msgid "maxiter should be > 0" +msgstr "" + #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" @@ -3362,6 +3370,10 @@ msgstr "soft reboot\n" msgid "sort argument must be an ndarray" msgstr "" +#: extmod/ulab/code/numerical/numerical.c +msgid "sorted axis can't be longer than 65535" +msgstr "" + #: extmod/ulab/code/filter/filter.c msgid "sos array must be of shape (n_section, 6)" msgstr "" diff --git a/locale/ja.po b/locale/ja.po index 8c3751c8e8..abd2e1803d 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -2900,6 +2900,14 @@ msgstr "max_lengthは0より大きくなければなりません" msgid "maximum recursion depth exceeded" msgstr "最大の再帰深度を超えました" +#: extmod/ulab/code/approx/approx.c +msgid "maxiter must be > 0" +msgstr "" + +#: extmod/ulab/code/approx/approx.c +msgid "maxiter should be > 0" +msgstr "" + #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" @@ -3335,6 +3343,10 @@ msgstr "ソフトリブート\n" msgid "sort argument must be an ndarray" msgstr "" +#: extmod/ulab/code/numerical/numerical.c +msgid "sorted axis can't be longer than 65535" +msgstr "" + #: extmod/ulab/code/filter/filter.c msgid "sos array must be of shape (n_section, 6)" msgstr "" diff --git a/locale/ko.po b/locale/ko.po index 9c5750b9f5..e5b728b846 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -2876,6 +2876,14 @@ msgstr "" msgid "maximum recursion depth exceeded" msgstr "" +#: extmod/ulab/code/approx/approx.c +msgid "maxiter must be > 0" +msgstr "" + +#: extmod/ulab/code/approx/approx.c +msgid "maxiter should be > 0" +msgstr "" + #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" @@ -3308,6 +3316,10 @@ msgstr "" msgid "sort argument must be an ndarray" msgstr "" +#: extmod/ulab/code/numerical/numerical.c +msgid "sorted axis can't be longer than 65535" +msgstr "" + #: extmod/ulab/code/filter/filter.c msgid "sos array must be of shape (n_section, 6)" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index f6efee0195..234bb930ae 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -2934,6 +2934,14 @@ msgstr "max_length moet >0 zijn" msgid "maximum recursion depth exceeded" msgstr "maximale recursiediepte overschreden" +#: extmod/ulab/code/approx/approx.c +msgid "maxiter must be > 0" +msgstr "" + +#: extmod/ulab/code/approx/approx.c +msgid "maxiter should be > 0" +msgstr "" + #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" @@ -3369,6 +3377,10 @@ msgstr "zachte herstart\n" msgid "sort argument must be an ndarray" msgstr "sorteerargument moet een ndarray zijn" +#: extmod/ulab/code/numerical/numerical.c +msgid "sorted axis can't be longer than 65535" +msgstr "" + #: extmod/ulab/code/filter/filter.c msgid "sos array must be of shape (n_section, 6)" msgstr "sos array moet vorm (n_section, 6) hebben" diff --git a/locale/pl.po b/locale/pl.po index f6292a0a3b..cadb2c43eb 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -2893,6 +2893,14 @@ msgstr "max_length musi być > 0" msgid "maximum recursion depth exceeded" msgstr "przekroczono dozwoloną głębokość rekurencji" +#: extmod/ulab/code/approx/approx.c +msgid "maxiter must be > 0" +msgstr "" + +#: extmod/ulab/code/approx/approx.c +msgid "maxiter should be > 0" +msgstr "" + #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" @@ -3327,6 +3335,10 @@ msgstr "programowy reset\n" msgid "sort argument must be an ndarray" msgstr "" +#: extmod/ulab/code/numerical/numerical.c +msgid "sorted axis can't be longer than 65535" +msgstr "" + #: extmod/ulab/code/filter/filter.c msgid "sos array must be of shape (n_section, 6)" msgstr "" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index b80afeb1aa..2c3d9b2074 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -2954,6 +2954,14 @@ msgstr "max_length deve ser > 0" msgid "maximum recursion depth exceeded" msgstr "a recursão máxima da profundidade foi excedida" +#: extmod/ulab/code/approx/approx.c +msgid "maxiter must be > 0" +msgstr "" + +#: extmod/ulab/code/approx/approx.c +msgid "maxiter should be > 0" +msgstr "" + #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" @@ -3395,6 +3403,10 @@ msgstr "reinicialização soft\n" msgid "sort argument must be an ndarray" msgstr "o argumento da classificação deve ser um ndarray" +#: extmod/ulab/code/numerical/numerical.c +msgid "sorted axis can't be longer than 65535" +msgstr "" + #: extmod/ulab/code/filter/filter.c msgid "sos array must be of shape (n_section, 6)" msgstr "o sos da matriz deve estar na forma (n_section, 6)" diff --git a/locale/sv.po b/locale/sv.po index 989b8257e7..f2fa50189b 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -2927,6 +2927,14 @@ msgstr "max_length måste vara > 0" msgid "maximum recursion depth exceeded" msgstr "maximal rekursionsdjup överskriden" +#: extmod/ulab/code/approx/approx.c +msgid "maxiter must be > 0" +msgstr "" + +#: extmod/ulab/code/approx/approx.c +msgid "maxiter should be > 0" +msgstr "" + #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" @@ -3362,6 +3370,10 @@ msgstr "mjuk omstart\n" msgid "sort argument must be an ndarray" msgstr "argumentet sort måste vara en ndarray" +#: extmod/ulab/code/numerical/numerical.c +msgid "sorted axis can't be longer than 65535" +msgstr "" + #: extmod/ulab/code/filter/filter.c msgid "sos array must be of shape (n_section, 6)" msgstr "sos array måste ha form (n_section, 6)" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 13d0dfa796..5ed34cc6c3 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -2917,6 +2917,14 @@ msgstr "Max_length bìxū > 0" msgid "maximum recursion depth exceeded" msgstr "chāochū zuìdà dìguī shēndù" +#: extmod/ulab/code/approx/approx.c +msgid "maxiter must be > 0" +msgstr "" + +#: extmod/ulab/code/approx/approx.c +msgid "maxiter should be > 0" +msgstr "" + #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" @@ -3351,6 +3359,10 @@ msgstr "ruǎn chóngqǐ\n" msgid "sort argument must be an ndarray" msgstr "páixù cānshù bìxū shì ndarray" +#: extmod/ulab/code/numerical/numerical.c +msgid "sorted axis can't be longer than 65535" +msgstr "" + #: extmod/ulab/code/filter/filter.c msgid "sos array must be of shape (n_section, 6)" msgstr "sos shùzǔ de xíngzhuàng bìxū wèi (n_section, 6)" From 54c0e98a37fc3c997d3a7a566a67e33d1636f46a Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 27 Oct 2020 13:58:23 -0700 Subject: [PATCH 113/145] Fix openbook build --- ports/atmel-samd/boards/openbook_m4/board.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/atmel-samd/boards/openbook_m4/board.c b/ports/atmel-samd/boards/openbook_m4/board.c index f0010f6d78..07dd1741ac 100644 --- a/ports/atmel-samd/boards/openbook_m4/board.c +++ b/ports/atmel-samd/boards/openbook_m4/board.c @@ -97,7 +97,8 @@ void board_init(void) { &pin_PA01, // busy_pin false, // busy_state 5, // seconds_per_frame - false); // chip_select (don't always toggle chip select) + false, // chip_select (don't always toggle chip select) + false); // grayscale } bool board_requests_safe_mode(void) { From 91e85e8037c058f5029f9ba61d6da952eeac436e Mon Sep 17 00:00:00 2001 From: Adolfo Jayme Barrientos Date: Tue, 27 Oct 2020 17:19:22 +0000 Subject: [PATCH 114/145] Translated using Weblate (Spanish) Currently translated at 99.6% (836 of 839 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/es/ --- locale/es.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/es.po b/locale/es.po index 38e0ff8d39..6b8b96d2d7 100644 --- a/locale/es.po +++ b/locale/es.po @@ -8,15 +8,15 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-10-16 19:50-0500\n" -"PO-Revision-Date: 2020-10-22 22:15+0000\n" -"Last-Translator: Alvaro Figueroa \n" +"PO-Revision-Date: 2020-10-27 21:01+0000\n" +"Last-Translator: Adolfo Jayme Barrientos \n" "Language-Team: \n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.3.1\n" +"X-Generator: Weblate 4.3.2-dev\n" #: main.c msgid "" @@ -33,7 +33,7 @@ msgid "" "https://github.com/adafruit/circuitpython/issues\n" msgstr "" "\n" -"Reporte un problema con el contenido de su unidad CIRCUITPY en\n" +"Presente un problema con el contenido de su unidad CIRCUITPY en\n" "https://github.com/adafruit/circuitpython/issues\n" #: py/obj.c From 54c26a772ba071d129c0e30e8fc6d44e1be74029 Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Tue, 27 Oct 2020 16:59:40 +0000 Subject: [PATCH 115/145] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (839 of 839 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/ --- locale/pt_BR.po | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 2c3d9b2074..16631c32a7 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-10-16 19:50-0500\n" -"PO-Revision-Date: 2020-10-21 19:58+0000\n" +"PO-Revision-Date: 2020-10-27 21:01+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.3.1\n" +"X-Generator: Weblate 4.3.2-dev\n" #: main.c msgid "" @@ -2956,11 +2956,11 @@ msgstr "a recursão máxima da profundidade foi excedida" #: extmod/ulab/code/approx/approx.c msgid "maxiter must be > 0" -msgstr "" +msgstr "maxiter deve ser > 0" #: extmod/ulab/code/approx/approx.c msgid "maxiter should be > 0" -msgstr "" +msgstr "maxiter pode ser > 0" #: py/runtime.c #, c-format @@ -3405,7 +3405,7 @@ msgstr "o argumento da classificação deve ser um ndarray" #: extmod/ulab/code/numerical/numerical.c msgid "sorted axis can't be longer than 65535" -msgstr "" +msgstr "o eixo ordenado não pode ser maior do que 65535" #: extmod/ulab/code/filter/filter.c msgid "sos array must be of shape (n_section, 6)" From 32f6f64a288903395358b4be73a92fe03a71fc67 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Tue, 27 Oct 2020 22:01:17 +0100 Subject: [PATCH 116/145] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ --- locale/ID.po | 32 +++++++++++++++++++++++++++++--- locale/cs.po | 32 +++++++++++++++++++++++++++++--- locale/de_DE.po | 32 +++++++++++++++++++++++++++++--- locale/el.po | 32 +++++++++++++++++++++++++++++--- locale/es.po | 32 +++++++++++++++++++++++++++++--- locale/fil.po | 32 +++++++++++++++++++++++++++++--- locale/fr.po | 32 +++++++++++++++++++++++++++++--- locale/hi.po | 32 +++++++++++++++++++++++++++++--- locale/it_IT.po | 32 +++++++++++++++++++++++++++++--- locale/ja.po | 32 +++++++++++++++++++++++++++++--- locale/ko.po | 32 +++++++++++++++++++++++++++++--- locale/nl.po | 32 +++++++++++++++++++++++++++++--- locale/pl.po | 32 +++++++++++++++++++++++++++++--- locale/pt_BR.po | 32 +++++++++++++++++++++++++++++--- locale/sv.po | 32 +++++++++++++++++++++++++++++--- locale/zh_Latn_pinyin.po | 32 +++++++++++++++++++++++++++++--- 16 files changed, 464 insertions(+), 48 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index 94a874826d..7debab27ac 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-16 19:50-0500\n" +"POT-Creation-Date: 2020-10-21 20:13-0500\n" "PO-Revision-Date: 2020-10-10 23:51+0000\n" "Last-Translator: oon arfiandwi \n" "Language-Team: LANGUAGE \n" @@ -292,11 +292,16 @@ msgstr "Alamat harus sepanjang %d byte" msgid "Address type out of range" msgstr "Jenis alamat di luar batas" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "All CAN peripherals are in use" +msgstr "" + #: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "Semua perangkat I2C sedang digunakan" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "" @@ -413,6 +418,10 @@ msgstr "" "Auto-reload aktif. Silahkan simpan data-data (files) melalui USB untuk " "menjalankannya atau masuk ke REPL untukmenonaktifkan.\n" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "Baudrate not supported by peripheral" +msgstr "" + #: shared-module/displayio/Display.c #: shared-module/framebufferio/FramebufferDisplay.c msgid "Below minimum frame rate" @@ -793,7 +802,7 @@ msgstr "Mode kendara tidak digunakan saat arah input." msgid "ECB only operates on 16 bytes at a time" msgstr "ECB hanya beroperasi pada 16 byte di satu waktu" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "" @@ -919,6 +928,7 @@ msgid "File exists" msgstr "File sudah ada" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "" @@ -1140,7 +1150,7 @@ msgstr "Pin untuk channel kanan tidak valid" #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c #: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c @@ -2884,6 +2894,10 @@ msgstr "" msgid "long int not supported in this build" msgstr "" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "loopback + silent mode not supported by peripheral" +msgstr "" + #: py/parse.c msgid "malformed f-string" msgstr "" @@ -3237,6 +3251,8 @@ msgstr "" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -3493,6 +3509,16 @@ msgstr "" msgid "tuple/list has wrong length" msgstr "" +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_driver_install returned esp-idf error #%d" +msgstr "" + +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_start returned esp-idf error #%d" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c diff --git a/locale/cs.po b/locale/cs.po index b8da707413..e4f677d8e2 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-16 19:50-0500\n" +"POT-Creation-Date: 2020-10-21 20:13-0500\n" "PO-Revision-Date: 2020-05-24 03:22+0000\n" "Last-Translator: dronecz \n" "Language-Team: LANGUAGE \n" @@ -292,11 +292,16 @@ msgstr "" msgid "Address type out of range" msgstr "" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "All CAN peripherals are in use" +msgstr "" + #: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "" @@ -411,6 +416,10 @@ msgid "" "disable.\n" msgstr "" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "Baudrate not supported by peripheral" +msgstr "" + #: shared-module/displayio/Display.c #: shared-module/framebufferio/FramebufferDisplay.c msgid "Below minimum frame rate" @@ -779,7 +788,7 @@ msgstr "" msgid "ECB only operates on 16 bytes at a time" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "" @@ -905,6 +914,7 @@ msgid "File exists" msgstr "" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "" @@ -1123,7 +1133,7 @@ msgstr "" #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c #: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c @@ -2841,6 +2851,10 @@ msgstr "" msgid "long int not supported in this build" msgstr "" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "loopback + silent mode not supported by peripheral" +msgstr "" + #: py/parse.c msgid "malformed f-string" msgstr "" @@ -3193,6 +3207,8 @@ msgstr "" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -3448,6 +3464,16 @@ msgstr "" msgid "tuple/list has wrong length" msgstr "" +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_driver_install returned esp-idf error #%d" +msgstr "" + +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_start returned esp-idf error #%d" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c diff --git a/locale/de_DE.po b/locale/de_DE.po index 4d43a26557..141a5e8c03 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-16 19:50-0500\n" +"POT-Creation-Date: 2020-10-21 20:13-0500\n" "PO-Revision-Date: 2020-06-16 18:24+0000\n" "Last-Translator: Andreas Buchen \n" "Language: de_DE\n" @@ -291,11 +291,16 @@ msgstr "Die Adresse muss %d Bytes lang sein" msgid "Address type out of range" msgstr "Adresstyp außerhalb des zulässigen Bereichs" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "All CAN peripherals are in use" +msgstr "" + #: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "Alle I2C-Peripheriegeräte sind in Benutzung" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "" @@ -414,6 +419,10 @@ msgstr "" "Automatisches Neuladen ist aktiv. Speichere Dateien über USB um sie " "auszuführen oder verbinde dich mit der REPL zum Deaktivieren.\n" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "Baudrate not supported by peripheral" +msgstr "" + #: shared-module/displayio/Display.c #: shared-module/framebufferio/FramebufferDisplay.c msgid "Below minimum frame rate" @@ -789,7 +798,7 @@ msgstr "Drive mode wird nicht verwendet, wenn die Richtung input ist." msgid "ECB only operates on 16 bytes at a time" msgstr "Die EZB arbeitet jeweils nur mit 16 Bytes" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "" @@ -916,6 +925,7 @@ msgid "File exists" msgstr "Datei existiert" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "Filter zu komplex" @@ -1140,7 +1150,7 @@ msgstr "Ungültiger Pin für rechten Kanal" #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c #: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c @@ -2920,6 +2930,10 @@ msgstr "" msgid "long int not supported in this build" msgstr "long int wird in diesem Build nicht unterstützt" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "loopback + silent mode not supported by peripheral" +msgstr "" + #: py/parse.c msgid "malformed f-string" msgstr "fehlformatierter f-string" @@ -3276,6 +3290,8 @@ msgstr "pow () mit 3 Argumenten erfordert Integer" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -3534,6 +3550,16 @@ msgstr "Tupelindex außerhalb des Bereichs" msgid "tuple/list has wrong length" msgstr "tupel/list hat falsche Länge" +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_driver_install returned esp-idf error #%d" +msgstr "" + +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_start returned esp-idf error #%d" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c diff --git a/locale/el.po b/locale/el.po index 80fdb7eca1..cc6da670cd 100644 --- a/locale/el.po +++ b/locale/el.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-16 19:50-0500\n" +"POT-Creation-Date: 2020-10-21 20:13-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -287,11 +287,16 @@ msgstr "" msgid "Address type out of range" msgstr "" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "All CAN peripherals are in use" +msgstr "" + #: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "" @@ -406,6 +411,10 @@ msgid "" "disable.\n" msgstr "" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "Baudrate not supported by peripheral" +msgstr "" + #: shared-module/displayio/Display.c #: shared-module/framebufferio/FramebufferDisplay.c msgid "Below minimum frame rate" @@ -774,7 +783,7 @@ msgstr "" msgid "ECB only operates on 16 bytes at a time" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "" @@ -900,6 +909,7 @@ msgid "File exists" msgstr "" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "" @@ -1118,7 +1128,7 @@ msgstr "" #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c #: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c @@ -2836,6 +2846,10 @@ msgstr "" msgid "long int not supported in this build" msgstr "" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "loopback + silent mode not supported by peripheral" +msgstr "" + #: py/parse.c msgid "malformed f-string" msgstr "" @@ -3188,6 +3202,8 @@ msgstr "" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -3443,6 +3459,16 @@ msgstr "" msgid "tuple/list has wrong length" msgstr "" +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_driver_install returned esp-idf error #%d" +msgstr "" + +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_start returned esp-idf error #%d" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c diff --git a/locale/es.po b/locale/es.po index 6b8b96d2d7..348af34067 100644 --- a/locale/es.po +++ b/locale/es.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-16 19:50-0500\n" +"POT-Creation-Date: 2020-10-21 20:13-0500\n" "PO-Revision-Date: 2020-10-27 21:01+0000\n" "Last-Translator: Adolfo Jayme Barrientos \n" "Language-Team: \n" @@ -295,11 +295,16 @@ msgstr "La dirección debe tener %d bytes de largo" msgid "Address type out of range" msgstr "Tipo de dirección fuera de rango" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "All CAN peripherals are in use" +msgstr "" + #: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "Todos los periféricos I2C están siendo usados" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "Todos los FIFOs de RX en uso" @@ -420,6 +425,10 @@ msgstr "" "Auto-reload habilitado. Simplemente guarda los archivos via USB para " "ejecutarlos o entra al REPL para desabilitarlos.\n" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "Baudrate not supported by peripheral" +msgstr "" + #: shared-module/displayio/Display.c #: shared-module/framebufferio/FramebufferDisplay.c msgid "Below minimum frame rate" @@ -794,7 +803,7 @@ msgstr "Modo Drive no se usa cuando la dirección es input." msgid "ECB only operates on 16 bytes at a time" msgstr "ECB solo opera sobre 16 bytes a la vez" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "Fallo ESP-IDF al tomar la memoria" @@ -920,6 +929,7 @@ msgid "File exists" msgstr "El archivo ya existe" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "Filtros muy complejos" @@ -1141,7 +1151,7 @@ msgstr "Pin inválido para canal derecho" #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c #: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c @@ -2909,6 +2919,10 @@ msgstr "variable local referenciada antes de la asignación" msgid "long int not supported in this build" msgstr "long int no soportado en esta compilación" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "loopback + silent mode not supported by peripheral" +msgstr "" + #: py/parse.c msgid "malformed f-string" msgstr "cadena-f mal formada" @@ -3264,6 +3278,8 @@ msgstr "pow() con 3 argumentos requiere enteros" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -3522,6 +3538,16 @@ msgstr "tuple index fuera de rango" msgid "tuple/list has wrong length" msgstr "tupla/lista tiene una longitud incorrecta" +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_driver_install returned esp-idf error #%d" +msgstr "" + +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_start returned esp-idf error #%d" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c diff --git a/locale/fil.po b/locale/fil.po index 838bca98ba..7bc33dba3e 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-16 19:50-0500\n" +"POT-Creation-Date: 2020-10-21 20:13-0500\n" "PO-Revision-Date: 2018-12-20 22:15-0800\n" "Last-Translator: Timothy \n" "Language-Team: fil\n" @@ -289,11 +289,16 @@ msgstr "ang palette ay dapat 32 bytes ang haba" msgid "Address type out of range" msgstr "" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "All CAN peripherals are in use" +msgstr "" + #: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "Lahat ng I2C peripherals ginagamit" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "" @@ -411,6 +416,10 @@ msgstr "" "Ang awtomatikong pag re-reload ay ON. i-save lamang ang mga files sa USB " "para patakbuhin sila o pasukin ang REPL para i-disable ito.\n" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "Baudrate not supported by peripheral" +msgstr "" + #: shared-module/displayio/Display.c #: shared-module/framebufferio/FramebufferDisplay.c msgid "Below minimum frame rate" @@ -785,7 +794,7 @@ msgstr "Drive mode ay hindi ginagamit kapag ang direksyon ay input." msgid "ECB only operates on 16 bytes at a time" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "" @@ -913,6 +922,7 @@ msgid "File exists" msgstr "Mayroong file" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "" @@ -1133,7 +1143,7 @@ msgstr "Mali ang pin para sa kanang channel" #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c #: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c @@ -2885,6 +2895,10 @@ msgstr "local variable na reference bago na i-assign" msgid "long int not supported in this build" msgstr "long int hindi sinusuportahan sa build na ito" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "loopback + silent mode not supported by peripheral" +msgstr "" + #: py/parse.c msgid "malformed f-string" msgstr "" @@ -3239,6 +3253,8 @@ msgstr "pow() na may 3 argumento kailangan ng integers" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -3498,6 +3514,16 @@ msgstr "indeks ng tuple wala sa sakop" msgid "tuple/list has wrong length" msgstr "mali ang haba ng tuple/list" +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_driver_install returned esp-idf error #%d" +msgstr "" + +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_start returned esp-idf error #%d" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c diff --git a/locale/fr.po b/locale/fr.po index b4a15ee1f9..920e22cb0c 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-16 19:50-0500\n" +"POT-Creation-Date: 2020-10-21 20:13-0500\n" "PO-Revision-Date: 2020-10-22 20:48+0000\n" "Last-Translator: Antonin ENFRUN \n" "Language: fr\n" @@ -296,11 +296,16 @@ msgstr "L'adresse doit être longue de %d octets" msgid "Address type out of range" msgstr "Type d'adresse hors plage" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "All CAN peripherals are in use" +msgstr "" + #: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "Tous les périphériques I2C sont utilisés" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "Tout les RX FIFOs sont utilisé" @@ -420,6 +425,10 @@ msgstr "" "Auto-chargement activé. Copiez simplement les fichiers en USB pour les " "lancer ou entrez sur REPL pour le désactiver.\n" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "Baudrate not supported by peripheral" +msgstr "" + #: shared-module/displayio/Display.c #: shared-module/framebufferio/FramebufferDisplay.c msgid "Below minimum frame rate" @@ -798,7 +807,7 @@ msgstr "Le mode Drive n'est pas utilisé quand la direction est 'input'." msgid "ECB only operates on 16 bytes at a time" msgstr "La BCE ne fonctionne que sur 16 octets à la fois" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "ESP-IDF échec d'allocation de la mémoire" @@ -925,6 +934,7 @@ msgid "File exists" msgstr "Le fichier existe" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "Filtre trop complexe" @@ -1146,7 +1156,7 @@ msgstr "Broche invalide pour le canal droit" #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c #: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c @@ -2931,6 +2941,10 @@ msgstr "variable locale référencée avant d'être assignée" msgid "long int not supported in this build" msgstr "entiers longs non supportés dans cette build" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "loopback + silent mode not supported by peripheral" +msgstr "" + #: py/parse.c msgid "malformed f-string" msgstr "f-string mal formé" @@ -3288,6 +3302,8 @@ msgstr "pow() avec 3 arguments nécessite des entiers" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -3546,6 +3562,16 @@ msgstr "index du tuple hors gamme" msgid "tuple/list has wrong length" msgstr "tuple/liste a une mauvaise longueur" +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_driver_install returned esp-idf error #%d" +msgstr "" + +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_start returned esp-idf error #%d" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c diff --git a/locale/hi.po b/locale/hi.po index 9174580a26..4966ad8e80 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-16 19:50-0500\n" +"POT-Creation-Date: 2020-10-21 20:13-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -287,11 +287,16 @@ msgstr "" msgid "Address type out of range" msgstr "" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "All CAN peripherals are in use" +msgstr "" + #: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "" @@ -406,6 +411,10 @@ msgid "" "disable.\n" msgstr "" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "Baudrate not supported by peripheral" +msgstr "" + #: shared-module/displayio/Display.c #: shared-module/framebufferio/FramebufferDisplay.c msgid "Below minimum frame rate" @@ -774,7 +783,7 @@ msgstr "" msgid "ECB only operates on 16 bytes at a time" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "" @@ -900,6 +909,7 @@ msgid "File exists" msgstr "" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "" @@ -1118,7 +1128,7 @@ msgstr "" #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c #: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c @@ -2836,6 +2846,10 @@ msgstr "" msgid "long int not supported in this build" msgstr "" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "loopback + silent mode not supported by peripheral" +msgstr "" + #: py/parse.c msgid "malformed f-string" msgstr "" @@ -3188,6 +3202,8 @@ msgstr "" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -3443,6 +3459,16 @@ msgstr "" msgid "tuple/list has wrong length" msgstr "" +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_driver_install returned esp-idf error #%d" +msgstr "" + +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_start returned esp-idf error #%d" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c diff --git a/locale/it_IT.po b/locale/it_IT.po index 6345c095c7..82840c8523 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-16 19:50-0500\n" +"POT-Creation-Date: 2020-10-21 20:13-0500\n" "PO-Revision-Date: 2018-10-02 16:27+0200\n" "Last-Translator: Enrico Paganin \n" "Language-Team: \n" @@ -288,11 +288,16 @@ msgstr "la palette deve essere lunga 32 byte" msgid "Address type out of range" msgstr "" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "All CAN peripherals are in use" +msgstr "" + #: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "Tutte le periferiche I2C sono in uso" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "" @@ -410,6 +415,10 @@ msgstr "" "L'auto-reload è attivo. Salva i file su USB per eseguirli o entra nel REPL " "per disabilitarlo.\n" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "Baudrate not supported by peripheral" +msgstr "" + #: shared-module/displayio/Display.c #: shared-module/framebufferio/FramebufferDisplay.c msgid "Below minimum frame rate" @@ -785,7 +794,7 @@ msgstr "" msgid "ECB only operates on 16 bytes at a time" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "" @@ -913,6 +922,7 @@ msgid "File exists" msgstr "File esistente" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "" @@ -1135,7 +1145,7 @@ msgstr "Pin non valido per il canale destro" #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c #: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c @@ -2887,6 +2897,10 @@ msgstr "variabile locale richiamata prima di un assegnamento" msgid "long int not supported in this build" msgstr "long int non supportata in questa build" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "loopback + silent mode not supported by peripheral" +msgstr "" + #: py/parse.c msgid "malformed f-string" msgstr "" @@ -3246,6 +3260,8 @@ msgstr "pow() con 3 argomenti richiede interi" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -3505,6 +3521,16 @@ msgstr "indice della tupla fuori intervallo" msgid "tuple/list has wrong length" msgstr "tupla/lista ha la lunghezza sbagliata" +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_driver_install returned esp-idf error #%d" +msgstr "" + +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_start returned esp-idf error #%d" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c diff --git a/locale/ja.po b/locale/ja.po index abd2e1803d..ae7e51ba6b 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-16 19:50-0500\n" +"POT-Creation-Date: 2020-10-21 20:13-0500\n" "PO-Revision-Date: 2020-09-25 18:20+0000\n" "Last-Translator: Taku Fukada \n" "Language-Team: none\n" @@ -294,11 +294,16 @@ msgstr "アドレスは、%dバイト長でなければなりません" msgid "Address type out of range" msgstr "address_typeが範囲外" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "All CAN peripherals are in use" +msgstr "" + #: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "全てのI2C周辺機器が使用中" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "全てのRX FIFOが使用中" @@ -415,6 +420,10 @@ msgstr "" "オートリロードがオンです。ファイルをUSB経由で保存するだけで実行できます。REPL" "に入ると無効化します。\n" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "Baudrate not supported by peripheral" +msgstr "" + #: shared-module/displayio/Display.c #: shared-module/framebufferio/FramebufferDisplay.c msgid "Below minimum frame rate" @@ -787,7 +796,7 @@ msgstr "方向がinputのときドライブモードは使われません" msgid "ECB only operates on 16 bytes at a time" msgstr "ECBは一度に16バイトの演算のみを行います" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "" @@ -913,6 +922,7 @@ msgid "File exists" msgstr "ファイルが存在します" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "" @@ -1133,7 +1143,7 @@ msgstr "右チャネルのピンが不正" #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c #: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c @@ -2866,6 +2876,10 @@ msgstr "" msgid "long int not supported in this build" msgstr "このビルドはlong intに非対応" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "loopback + silent mode not supported by peripheral" +msgstr "" + #: py/parse.c msgid "malformed f-string" msgstr "不正な形式のf-string" @@ -3220,6 +3234,8 @@ msgstr "pow()の第3引数には整数が必要" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -3476,6 +3492,16 @@ msgstr "" msgid "tuple/list has wrong length" msgstr "タプル/リストの長さが正しくありません" +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_driver_install returned esp-idf error #%d" +msgstr "" + +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_start returned esp-idf error #%d" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c diff --git a/locale/ko.po b/locale/ko.po index e5b728b846..858a036c83 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-16 19:50-0500\n" +"POT-Creation-Date: 2020-10-21 20:13-0500\n" "PO-Revision-Date: 2020-10-05 12:12+0000\n" "Last-Translator: Michal Čihař \n" "Language-Team: LANGUAGE \n" @@ -290,11 +290,16 @@ msgstr "" msgid "Address type out of range" msgstr "" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "All CAN peripherals are in use" +msgstr "" + #: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "사용중인 모든 I2C주변 기기" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "" @@ -411,6 +416,10 @@ msgstr "" "자동 새로 고침이 켜져 있습니다. USB를 통해 파일을 저장하여 실행하십시오. 비활" "성화하려면 REPL을 입력하십시오.\n" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "Baudrate not supported by peripheral" +msgstr "" + #: shared-module/displayio/Display.c #: shared-module/framebufferio/FramebufferDisplay.c msgid "Below minimum frame rate" @@ -779,7 +788,7 @@ msgstr "" msgid "ECB only operates on 16 bytes at a time" msgstr "" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "" @@ -905,6 +914,7 @@ msgid "File exists" msgstr "" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "" @@ -1123,7 +1133,7 @@ msgstr "오른쪽 채널 핀이 잘못되었습니다" #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c #: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c @@ -2842,6 +2852,10 @@ msgstr "" msgid "long int not supported in this build" msgstr "" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "loopback + silent mode not supported by peripheral" +msgstr "" + #: py/parse.c msgid "malformed f-string" msgstr "" @@ -3194,6 +3208,8 @@ msgstr "" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -3449,6 +3465,16 @@ msgstr "" msgid "tuple/list has wrong length" msgstr "" +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_driver_install returned esp-idf error #%d" +msgstr "" + +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_start returned esp-idf error #%d" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c diff --git a/locale/nl.po b/locale/nl.po index 234bb930ae..bf05abb721 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-16 19:50-0500\n" +"POT-Creation-Date: 2020-10-21 20:13-0500\n" "PO-Revision-Date: 2020-10-27 16:47+0000\n" "Last-Translator: Jelle Jager \n" "Language-Team: none\n" @@ -292,11 +292,16 @@ msgstr "Adres moet %d bytes lang zijn" msgid "Address type out of range" msgstr "Adres type buiten bereik" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "All CAN peripherals are in use" +msgstr "" + #: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "Alle I2C peripherals zijn in gebruik" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "Alle RX FIFO's zijn in gebruik" @@ -413,6 +418,10 @@ msgstr "" "Auto-herlaad staat aan. Sla bestanden simpelweg op over USB om uit te voeren " "of start REPL om uit te schakelen.\n" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "Baudrate not supported by peripheral" +msgstr "" + #: shared-module/displayio/Display.c #: shared-module/framebufferio/FramebufferDisplay.c msgid "Below minimum frame rate" @@ -787,7 +796,7 @@ msgstr "Drive modus niet gebruikt als de richting input is." msgid "ECB only operates on 16 bytes at a time" msgstr "ECB werkt alleen met 16 bytes tegelijkertijd" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "ESP-IDF geheugen toewijzing mislukt" @@ -913,6 +922,7 @@ msgid "File exists" msgstr "Bestand bestaat" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "Filters zijn te complex" @@ -1135,7 +1145,7 @@ msgstr "Ongeldige pin voor rechter kanaal" #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c #: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c @@ -2900,6 +2910,10 @@ msgstr "verwijzing naar een (nog) niet toegewezen lokale variabele" msgid "long int not supported in this build" msgstr "long int wordt niet ondersteund in deze build" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "loopback + silent mode not supported by peripheral" +msgstr "" + #: py/parse.c msgid "malformed f-string" msgstr "onjuist gevormde f-string" @@ -3253,6 +3267,8 @@ msgstr "pow() met 3 argumenten vereist integers" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -3510,6 +3526,16 @@ msgstr "tuple index buiten bereik" msgid "tuple/list has wrong length" msgstr "tuple of lijst heeft onjuiste lengte" +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_driver_install returned esp-idf error #%d" +msgstr "" + +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_start returned esp-idf error #%d" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c diff --git a/locale/pl.po b/locale/pl.po index cadb2c43eb..1dbb0ba12b 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-16 19:50-0500\n" +"POT-Creation-Date: 2020-10-21 20:13-0500\n" "PO-Revision-Date: 2020-09-29 01:39+0000\n" "Last-Translator: Maciej Stankiewicz \n" "Language-Team: pl\n" @@ -294,11 +294,16 @@ msgstr "Adres musi mieć %d bajtów" msgid "Address type out of range" msgstr "" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "All CAN peripherals are in use" +msgstr "" + #: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "Wszystkie peryferia I2C w użyciu" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "" @@ -415,6 +420,10 @@ msgstr "" "Samo-przeładowywanie włączone. Po prostu zapisz pliki przez USB aby je " "uruchomić, albo wejdź w konsolę aby wyłączyć.\n" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "Baudrate not supported by peripheral" +msgstr "" + #: shared-module/displayio/Display.c #: shared-module/framebufferio/FramebufferDisplay.c msgid "Below minimum frame rate" @@ -787,7 +796,7 @@ msgstr "Tryb sterowania nieużywany w trybie wejścia." msgid "ECB only operates on 16 bytes at a time" msgstr "ECB działa tylko na 16 bajtach naraz" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "" @@ -913,6 +922,7 @@ msgid "File exists" msgstr "Plik istnieje" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "" @@ -1133,7 +1143,7 @@ msgstr "Zła nóżka dla prawego kanału" #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c #: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c @@ -2859,6 +2869,10 @@ msgstr "zmienna lokalna użyta przed przypisaniem" msgid "long int not supported in this build" msgstr "long int jest nieobsługiwany" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "loopback + silent mode not supported by peripheral" +msgstr "" + #: py/parse.c msgid "malformed f-string" msgstr "" @@ -3212,6 +3226,8 @@ msgstr "trzyargumentowe pow() wymaga liczb całkowitych" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -3468,6 +3484,16 @@ msgstr "indeks krotki poza zakresem" msgid "tuple/list has wrong length" msgstr "krotka/lista ma złą długość" +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_driver_install returned esp-idf error #%d" +msgstr "" + +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_start returned esp-idf error #%d" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 16631c32a7..8696d7509a 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-16 19:50-0500\n" +"POT-Creation-Date: 2020-10-21 20:13-0500\n" "PO-Revision-Date: 2020-10-27 21:01+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" @@ -296,11 +296,16 @@ msgstr "O endereço deve ter %d bytes de comprimento" msgid "Address type out of range" msgstr "O tipo do endereço está fora do alcance" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "All CAN peripherals are in use" +msgstr "" + #: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "Todos os periféricos I2C estão em uso" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "Todos os FIFOs RX estão em uso" @@ -419,6 +424,10 @@ msgstr "" "O recarregamento automático está ativo. Simplesmente salve os arquivos via " "USB para executá-los ou digite REPL para desativar.\n" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "Baudrate not supported by peripheral" +msgstr "" + #: shared-module/displayio/Display.c #: shared-module/framebufferio/FramebufferDisplay.c msgid "Below minimum frame rate" @@ -796,7 +805,7 @@ msgstr "O modo do controlador não é usado quando a direção for inserida." msgid "ECB only operates on 16 bytes at a time" msgstr "O BCE opera apenas com 16 bytes por vez" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "Houve uma falha na alocação da memória ESP-IDF" @@ -922,6 +931,7 @@ msgid "File exists" msgstr "Arquivo já existe" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "Os filtros são muito complexos" @@ -1144,7 +1154,7 @@ msgstr "Pino inválido para canal direito" #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c #: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c @@ -2920,6 +2930,10 @@ msgstr "a variável local referenciada antes da atribuição" msgid "long int not supported in this build" msgstr "o long int não é suportado nesta compilação" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "loopback + silent mode not supported by peripheral" +msgstr "" + #: py/parse.c msgid "malformed f-string" msgstr "f-string malformado" @@ -3279,6 +3293,8 @@ msgstr "o pow() com 3 argumentos requer números inteiros" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -3536,6 +3552,16 @@ msgstr "o índice da tupla está fora do intervalo" msgid "tuple/list has wrong length" msgstr "a tupla/lista está com tamanho incorreto" +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_driver_install returned esp-idf error #%d" +msgstr "" + +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_start returned esp-idf error #%d" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c diff --git a/locale/sv.po b/locale/sv.po index f2fa50189b..53ed60acae 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-16 19:50-0500\n" +"POT-Creation-Date: 2020-10-21 20:13-0500\n" "PO-Revision-Date: 2020-10-26 02:36+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" @@ -292,11 +292,16 @@ msgstr "Adressen måste vara %d byte lång" msgid "Address type out of range" msgstr "Adresstyp utanför intervallet" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "All CAN peripherals are in use" +msgstr "" + #: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "All I2C-kringutrustning används" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "Alla RX FIFO i bruk" @@ -413,6 +418,10 @@ msgstr "" "Autoladdning är på. Spara bara filer via USB för att köra dem eller ange " "REPL för att inaktivera.\n" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "Baudrate not supported by peripheral" +msgstr "" + #: shared-module/displayio/Display.c #: shared-module/framebufferio/FramebufferDisplay.c msgid "Below minimum frame rate" @@ -787,7 +796,7 @@ msgstr "Drivläge används inte när riktning är input." msgid "ECB only operates on 16 bytes at a time" msgstr "ECB arbetar endast på 16 byte åt gången" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "ESP-IDF-minnetilldelning misslyckades" @@ -913,6 +922,7 @@ msgid "File exists" msgstr "Filen finns redan" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "Filter för komplexa" @@ -1133,7 +1143,7 @@ msgstr "Ogiltig pinne för höger kanal" #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c #: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c @@ -2893,6 +2903,10 @@ msgstr "lokal variabel refererad före tilldelning" msgid "long int not supported in this build" msgstr "long int stöds inte i denna build" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "loopback + silent mode not supported by peripheral" +msgstr "" + #: py/parse.c msgid "malformed f-string" msgstr "f-sträng har felaktigt format" @@ -3246,6 +3260,8 @@ msgstr "pow() med 3 argument kräver heltal" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -3503,6 +3519,16 @@ msgstr "tupelindex utanför intervallet" msgid "tuple/list has wrong length" msgstr "tupel/lista har fel längd" +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_driver_install returned esp-idf error #%d" +msgstr "" + +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_start returned esp-idf error #%d" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 5ed34cc6c3..9b32993eb0 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: circuitpython-cn\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-16 19:50-0500\n" +"POT-Creation-Date: 2020-10-21 20:13-0500\n" "PO-Revision-Date: 2020-10-22 20:48+0000\n" "Last-Translator: hexthat \n" "Language-Team: Chinese Hanyu Pinyin\n" @@ -294,11 +294,16 @@ msgstr "Dìzhǐ bìxū shì %d zì jié zhǎng" msgid "Address type out of range" msgstr "Dìzhǐ lèixíng chāochū fànwéi" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "All CAN peripherals are in use" +msgstr "" + #: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" msgstr "Suǒyǒu I2C wàiwéi qì zhèngzài shǐyòng" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "All RX FIFOs in use" msgstr "Suǒyǒu shǐyòng zhōng de RX FIFO" @@ -415,6 +420,10 @@ msgstr "" "Zìdòng chóngxīn jiāzài. Zhǐ xū tōngguò USB bǎocún wénjiàn lái yùnxíng tāmen " "huò shūrù REPL jìnyòng.\n" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "Baudrate not supported by peripheral" +msgstr "" + #: shared-module/displayio/Display.c #: shared-module/framebufferio/FramebufferDisplay.c msgid "Below minimum frame rate" @@ -785,7 +794,7 @@ msgstr "Fāngxiàng shūrù shí qūdòng móshì méiyǒu shǐyòng." msgid "ECB only operates on 16 bytes at a time" msgstr "ECB yí cì zhǐ shǐ yòng 16 gè zì jié" -#: ports/esp32s2/common-hal/busio/SPI.c +#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" msgstr "ESP-IDF nèicún fēnpèi shībài" @@ -911,6 +920,7 @@ msgid "File exists" msgstr "Wénjiàn cúnzài" #: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" msgstr "guò lǜ qì tài fù zá" @@ -1131,7 +1141,7 @@ msgstr "Yòuxián tōngdào yǐn jiǎo wúxiào" #: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c #: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c #: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c -#: ports/esp32s2/common-hal/busio/UART.c +#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c #: ports/mimxrt10xx/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c @@ -2883,6 +2893,10 @@ msgstr "fùzhí qián yǐnyòng de júbù biànliàng" msgid "long int not supported in this build" msgstr "cǐ bǎnběn bù zhīchí zhǎng zhěngshù" +#: ports/esp32s2/common-hal/canio/CAN.c +msgid "loopback + silent mode not supported by peripheral" +msgstr "" + #: py/parse.c msgid "malformed f-string" msgstr "jīxíng de f-string" @@ -3235,6 +3249,8 @@ msgstr "pow() yǒu 3 cānshù xūyào zhěngshù" #: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h #: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h #: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h #: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h msgid "pressing boot button at start up.\n" @@ -3492,6 +3508,16 @@ msgstr "yuán zǔ suǒyǐn chāochū fànwéi" msgid "tuple/list has wrong length" msgstr "yuán zǔ/lièbiǎo chángdù cuòwù" +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_driver_install returned esp-idf error #%d" +msgstr "" + +#: ports/esp32s2/common-hal/canio/CAN.c +#, c-format +msgid "twai_start returned esp-idf error #%d" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c From d0426b3438a934257c5351f7eb2d9cdd79881c03 Mon Sep 17 00:00:00 2001 From: Noel Gaetan Date: Tue, 27 Oct 2020 23:54:46 +0100 Subject: [PATCH 117/145] Update pins.c fix mistake --- ports/nrf/boards/holyiot_nrf52840/pins.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/nrf/boards/holyiot_nrf52840/pins.c b/ports/nrf/boards/holyiot_nrf52840/pins.c index 4e2593e58f..cdec4dfa8e 100644 --- a/ports/nrf/boards/holyiot_nrf52840/pins.c +++ b/ports/nrf/boards/holyiot_nrf52840/pins.c @@ -51,9 +51,9 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_P0_21), MP_ROM_PTR(&pin_P0_21) }, { MP_ROM_QSTR(MP_QSTR_P0_19), MP_ROM_PTR(&pin_P0_19) }, - // RESET { MP_ROM_QSTR(MP_QSTR_P0_18), MP_ROM_PTR(&pin_P0_18) }, + // RESET { MP_ROM_QSTR(MP_QSTR_P0_18), MP_ROM_PTR(&pin_P0_18) } }; -MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); \ No newline at end of file +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From 27827a4fef74dc66996ecb670f01ad5d58500899 Mon Sep 17 00:00:00 2001 From: Gaetan Date: Wed, 28 Oct 2020 00:34:07 +0100 Subject: [PATCH 118/145] =?UTF-8?q?Fix=20EOF=20error=20modifi=C3=A9=C2=A0:?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20mpconfigboard.mk=20modifi=C3=A9?= =?UTF-8?q?=C2=A0:=20=20=20=20=20=20=20=20=20pins.c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ports/nrf/boards/holyiot_nrf52840/mpconfigboard.mk | 2 +- ports/nrf/boards/holyiot_nrf52840/pins.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ports/nrf/boards/holyiot_nrf52840/mpconfigboard.mk b/ports/nrf/boards/holyiot_nrf52840/mpconfigboard.mk index d85de75071..ead2059531 100644 --- a/ports/nrf/boards/holyiot_nrf52840/mpconfigboard.mk +++ b/ports/nrf/boards/holyiot_nrf52840/mpconfigboard.mk @@ -5,4 +5,4 @@ USB_MANUFACTURER = "Holyiot" MCU_CHIP = nrf52840 -INTERNAL_FLASH_FILESYSTEM = 1 \ No newline at end of file +INTERNAL_FLASH_FILESYSTEM = 1 diff --git a/ports/nrf/boards/holyiot_nrf52840/pins.c b/ports/nrf/boards/holyiot_nrf52840/pins.c index 4e2593e58f..604744e0ea 100644 --- a/ports/nrf/boards/holyiot_nrf52840/pins.c +++ b/ports/nrf/boards/holyiot_nrf52840/pins.c @@ -43,7 +43,6 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_P0_13), MP_ROM_PTR(&pin_P0_13) }, { MP_ROM_QSTR(MP_QSTR_P0_16), MP_ROM_PTR(&pin_P0_16) }, - { MP_ROM_QSTR(MP_QSTR_P0_07), MP_ROM_PTR(&pin_P0_07) }, { MP_ROM_QSTR(MP_QSTR_P1_09), MP_ROM_PTR(&pin_P1_09) }, { MP_ROM_QSTR(MP_QSTR_P0_12), MP_ROM_PTR(&pin_P0_12) }, @@ -55,5 +54,4 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { }; - -MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); \ No newline at end of file +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From 9b911b2211715e9da7ae55b691f54fe2f33a4486 Mon Sep 17 00:00:00 2001 From: Gaetan Date: Wed, 28 Oct 2020 00:38:07 +0100 Subject: [PATCH 119/145] =?UTF-8?q?modifi=C3=A9=C2=A0:=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20pins.c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ports/nrf/boards/holyiot_nrf52840/pins.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ports/nrf/boards/holyiot_nrf52840/pins.c b/ports/nrf/boards/holyiot_nrf52840/pins.c index 604744e0ea..8e06675916 100644 --- a/ports/nrf/boards/holyiot_nrf52840/pins.c +++ b/ports/nrf/boards/holyiot_nrf52840/pins.c @@ -50,8 +50,12 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_P0_21), MP_ROM_PTR(&pin_P0_21) }, { MP_ROM_QSTR(MP_QSTR_P0_19), MP_ROM_PTR(&pin_P0_19) }, - // RESET { MP_ROM_QSTR(MP_QSTR_P0_18), MP_ROM_PTR(&pin_P0_18) }, + // RESET { MP_ROM_QSTR(MP_QSTR_P0_18), MP_ROM_PTR(&pin_P0_18) } }; +<<<<<<< HEAD +======= + +>>>>>>> d0426b3438a934257c5351f7eb2d9cdd79881c03 MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From b44011d196a0a7294fca1e1825054761979ba075 Mon Sep 17 00:00:00 2001 From: Gaetan Date: Wed, 28 Oct 2020 01:43:42 +0100 Subject: [PATCH 120/145] fix railing Whitespace pin.c --- ports/nrf/boards/holyiot_nrf52840/pins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/nrf/boards/holyiot_nrf52840/pins.c b/ports/nrf/boards/holyiot_nrf52840/pins.c index c9e222b671..83be4f0ac7 100644 --- a/ports/nrf/boards/holyiot_nrf52840/pins.c +++ b/ports/nrf/boards/holyiot_nrf52840/pins.c @@ -49,7 +49,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_P0_23), MP_ROM_PTR(&pin_P0_23) }, { MP_ROM_QSTR(MP_QSTR_P0_21), MP_ROM_PTR(&pin_P0_21) }, { MP_ROM_QSTR(MP_QSTR_P0_19), MP_ROM_PTR(&pin_P0_19) }, - + // RESET { MP_ROM_QSTR(MP_QSTR_P0_18), MP_ROM_PTR(&pin_P0_18) } }; From 5ab2f16f64f0935ac8ad6fa776c435d55a3cff1e Mon Sep 17 00:00:00 2001 From: Gaetan Date: Wed, 28 Oct 2020 22:08:10 +0100 Subject: [PATCH 121/145] =?UTF-8?q?Change=20Board=20Name=20to=20ADM=5FB=5F?= =?UTF-8?q?NRF52840=5F1=20edit=20=20=20:=20=20=20=20=20=20=20=20=20.github?= =?UTF-8?q?/workflows/build.yml=20rename=C2=A0:=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?ports/nrf/boards/holyiot=5Fnrf52840/board.c=20->=20ports/nrf/bo?= =?UTF-8?q?ards/ADM=5FB=5FNRF52840=5F1/board.c=20rename=C2=A0:=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20ports/nrf/boards/holyiot=5Fnrf52840/mpconfigboar?= =?UTF-8?q?d.h=20->=20ports/nrf/boards/ADM=5FB=5FNRF52840=5F1/mpconfigboar?= =?UTF-8?q?d.h=20rename=C2=A0:=20=20=20=20=20=20=20=20=20ports/nrf/boards/?= =?UTF-8?q?holyiot=5Fnrf52840/mpconfigboard.mk=20->=20ports/nrf/boards/ADM?= =?UTF-8?q?=5FB=5FNRF52840=5F1/mpconfigboard.mk=20rename=C2=A0:=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20ports/nrf/boards/holyiot=5Fnrf52840/pins.c=20?= =?UTF-8?q?->=20ports/nrf/boards/ADM=5FB=5FNRF52840=5F1/pins.c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 2 +- .../nrf/boards/{holyiot_nrf52840 => ADM_B_NRF52840_1}/board.c | 0 .../{holyiot_nrf52840 => ADM_B_NRF52840_1}/mpconfigboard.h | 2 +- .../{holyiot_nrf52840 => ADM_B_NRF52840_1}/mpconfigboard.mk | 4 ++-- .../nrf/boards/{holyiot_nrf52840 => ADM_B_NRF52840_1}/pins.c | 0 5 files changed, 4 insertions(+), 4 deletions(-) rename ports/nrf/boards/{holyiot_nrf52840 => ADM_B_NRF52840_1}/board.c (100%) rename ports/nrf/boards/{holyiot_nrf52840 => ADM_B_NRF52840_1}/mpconfigboard.h (95%) rename ports/nrf/boards/{holyiot_nrf52840 => ADM_B_NRF52840_1}/mpconfigboard.mk (55%) rename ports/nrf/boards/{holyiot_nrf52840 => ADM_B_NRF52840_1}/pins.c (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cada55aaa4..1a967046ca 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -162,6 +162,7 @@ jobs: board: - "8086_commander" - "TG-Watch02A" + - "ADM_B_NRF52840_1" - "aloriumtech_evo_m51" - "aramcon_badge_2019" - "arduino_mkr1300" @@ -214,7 +215,6 @@ jobs: - "hallowing_m0_express" - "hallowing_m4_express" - "hiibot_bluefi" - - "holyiot_nrf52840" - "ikigaisense_vita" - "imxrt1010_evk" - "imxrt1020_evk" diff --git a/ports/nrf/boards/holyiot_nrf52840/board.c b/ports/nrf/boards/ADM_B_NRF52840_1/board.c similarity index 100% rename from ports/nrf/boards/holyiot_nrf52840/board.c rename to ports/nrf/boards/ADM_B_NRF52840_1/board.c diff --git a/ports/nrf/boards/holyiot_nrf52840/mpconfigboard.h b/ports/nrf/boards/ADM_B_NRF52840_1/mpconfigboard.h similarity index 95% rename from ports/nrf/boards/holyiot_nrf52840/mpconfigboard.h rename to ports/nrf/boards/ADM_B_NRF52840_1/mpconfigboard.h index 3b64d3a629..575d09feb5 100644 --- a/ports/nrf/boards/holyiot_nrf52840/mpconfigboard.h +++ b/ports/nrf/boards/ADM_B_NRF52840_1/mpconfigboard.h @@ -27,7 +27,7 @@ #include "nrfx/hal/nrf_gpio.h" -#define MICROPY_HW_BOARD_NAME "Holyiot nRF52840" +#define MICROPY_HW_BOARD_NAME "AtelierDuMaker nRF52840 Breakout" #define MICROPY_HW_MCU_NAME "nRF52840" #define MICROPY_HW_LED_STATUS (&pin_P0_19) diff --git a/ports/nrf/boards/holyiot_nrf52840/mpconfigboard.mk b/ports/nrf/boards/ADM_B_NRF52840_1/mpconfigboard.mk similarity index 55% rename from ports/nrf/boards/holyiot_nrf52840/mpconfigboard.mk rename to ports/nrf/boards/ADM_B_NRF52840_1/mpconfigboard.mk index ead2059531..f3a2e830dd 100644 --- a/ports/nrf/boards/holyiot_nrf52840/mpconfigboard.mk +++ b/ports/nrf/boards/ADM_B_NRF52840_1/mpconfigboard.mk @@ -1,7 +1,7 @@ USB_VID = 0x239A USB_PID = 0x80A0 -USB_PRODUCT = "HOLYIOTNRF52840" -USB_MANUFACTURER = "Holyiot" +USB_PRODUCT = "ADM_B_NRF52840_1" +USB_MANUFACTURER = "AtelierDuMaker" MCU_CHIP = nrf52840 diff --git a/ports/nrf/boards/holyiot_nrf52840/pins.c b/ports/nrf/boards/ADM_B_NRF52840_1/pins.c similarity index 100% rename from ports/nrf/boards/holyiot_nrf52840/pins.c rename to ports/nrf/boards/ADM_B_NRF52840_1/pins.c From 3dcee5be803a4d6bd9f05ecb13608467dc2e3a55 Mon Sep 17 00:00:00 2001 From: Gaetan Date: Wed, 28 Oct 2020 22:38:13 +0100 Subject: [PATCH 122/145] Fix: .github/workflows/build.yml --- .github/workflows/build.yml | 49 ++++++++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1a967046ca..2f61b60415 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,7 +28,7 @@ jobs: - name: CircuitPython version run: | git describe --dirty --tags - echo "::set-env name=CP_VERSION::$(git describe --dirty --tags)" + echo >>$GITHUB_ENV CP_VERSION=$(git describe --dirty --tags) - name: Set up Python 3.8 uses: actions/setup-python@v1 with: @@ -36,7 +36,7 @@ jobs: - name: Install deps run: | sudo apt-get install -y eatmydata - sudo eatmydata apt-get install -y gettext librsvg2-bin mingw-w64 + sudo eatmydata apt-get install -y gettext librsvg2-bin mingw-w64 latexmk texlive-fonts-recommended texlive-latex-recommended texlive-latex-extra pip install requests sh click setuptools cpp-coveralls "Sphinx<4" sphinx-rtd-theme recommonmark sphinx-autoapi sphinxcontrib-svg2pdfconverter polib pyyaml astroid isort black awscli - name: Versions run: | @@ -73,17 +73,26 @@ jobs: with: name: stubs path: circuitpython-stubs* - - name: Docs + - name: Test Documentation Build (HTML) run: sphinx-build -E -W -b html -D version=${{ env.CP_VERSION }} -D release=${{ env.CP_VERSION }} . _build/html - uses: actions/upload-artifact@v2 with: name: docs path: _build/html + - name: Test Documentation Build (LaTeX/PDF) + run: | + make latexpdf + - uses: actions/upload-artifact@v2 + with: + name: docs + path: _build/latex - name: Translations run: make check-translate - name: New boards check run: python3 -u ci_new_boards_check.py working-directory: tools + - name: Duplicate USB VID/PID Check + run: python3 -u -m tools.ci_check_duplicate_usb_vid_pid - name: Build mpy-cross.static-raspbian run: make -C mpy-cross -j2 -f Makefile.static-raspbian - uses: actions/upload-artifact@v2 @@ -122,8 +131,8 @@ jobs: run: echo "$GITHUB_CONTEXT" - name: Install dependencies run: | - brew install gettext awscli - echo "::set-env name=PATH::/usr/local/opt/gettext/bin:$PATH" + brew install gettext + echo >>$GITHUB_PATH /usr/local/opt/gettext/bin - name: Versions run: | gcc --version @@ -137,7 +146,7 @@ jobs: - name: CircuitPython version run: | git describe --dirty --tags - echo "::set-env name=CP_VERSION::$(git describe --dirty --tags)" + echo >>$GITHUB_ENV CP_VERSION=$(git describe --dirty --tags) - name: Build mpy-cross run: make -C mpy-cross -j2 - uses: actions/upload-artifact@v2 @@ -161,8 +170,8 @@ jobs: matrix: board: - "8086_commander" - - "TG-Watch02A" - "ADM_B_NRF52840_1" + - "TG-Watch02A" - "aloriumtech_evo_m51" - "aramcon_badge_2019" - "arduino_mkr1300" @@ -171,7 +180,8 @@ jobs: - "arduino_nano_33_iot" - "arduino_zero" - "bast_pro_mini_m0" - - "bdmicro_vina_m0" + - "bdmicro_vina_d21" + - "bdmicro_vina_d51" - "bless_dev_board_multi_sensor" - "blm_badge" - "capablerobot_usbhub" @@ -189,6 +199,8 @@ jobs: - "datum_imu" - "datum_light" - "datum_weather" + - "dynossat_edu_eps" + - "dynossat_edu_obc" - "electronut_labs_blip" - "electronut_labs_papyr" - "escornabot_makech" @@ -202,6 +214,7 @@ jobs: - "feather_m0_rfm69" - "feather_m0_rfm9x" - "feather_m0_supersized" + - "feather_m4_can" - "feather_m4_express" - "feather_m7_1011" - "feather_mimxrt1011" @@ -228,11 +241,13 @@ jobs: - "makerdiary_nrf52840_m2_devkit" - "makerdiary_nrf52840_mdk" - "makerdiary_nrf52840_mdk_usb_dongle" + - "matrixportal_m4" - "meowbit_v121" - "meowmeow" - "metro_m0_express" - "metro_m4_airlift_lite" - "metro_m4_express" + - "metro_m7_1011" - "metro_nrf52840_express" - "mini_sam_m4" - "monster_m4sk" @@ -254,6 +269,7 @@ jobs: - "pca10100" - "pewpew10" - "pewpew_m4" + - "picoplanet" - "pirkey_m0" - "pitaya_go" - "pyb_nano_v2" @@ -267,6 +283,8 @@ jobs: - "pyportal" - "pyportal_titano" - "pyruler" + - "qtpy_m0" + - "qtpy_m0_haxpress" - "raytac_mdbt50q-db-40" - "robohatmm1_m4" - "sam32" @@ -401,9 +419,17 @@ jobs: fail-fast: false matrix: board: + - "adafruit_metro_esp32s2" + - "electroniccats_bastwifi" + - "espressif_kaluga_1" - "espressif_saola_1_wroom" - "espressif_saola_1_wrover" + - "microdev_micro_s2" + - "muselab_nanoesp32_s2" + - "targett_module_clip_wroom" + - "targett_module_clip_wrover" - "unexpectedmaker_feathers2" + - "unexpectedmaker_feathers2_prerelease" steps: - name: Set up Python 3.8 @@ -423,6 +449,11 @@ jobs: with: path: ${{ github.workspace }}/.idf_tools key: ${{ runner.os }}-idf-tools-${{ hashFiles('.git/modules/ports/esp32s2/esp-idf/HEAD') }}-20200801 + - name: Clone IDF submodules + run: | + (cd $IDF_PATH && git submodule update --init) + env: + IDF_PATH: ${{ github.workspace }}/ports/esp32s2/esp-idf - name: Install IDF tools run: | $IDF_PATH/tools/idf_tools.py --non-interactive install required @@ -473,4 +504,4 @@ jobs: env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')) + if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')) \ No newline at end of file From 34ce8d8642d43397627e6001b221039d7190db5b Mon Sep 17 00:00:00 2001 From: Noel Gaetan Date: Wed, 28 Oct 2020 22:43:54 +0100 Subject: [PATCH 123/145] Update build.yml --- .github/workflows/build.yml | 47 +++++++------------------------------ 1 file changed, 8 insertions(+), 39 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2f61b60415..6619cbdf23 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,7 +28,7 @@ jobs: - name: CircuitPython version run: | git describe --dirty --tags - echo >>$GITHUB_ENV CP_VERSION=$(git describe --dirty --tags) + echo "::set-env name=CP_VERSION::$(git describe --dirty --tags)" - name: Set up Python 3.8 uses: actions/setup-python@v1 with: @@ -36,7 +36,7 @@ jobs: - name: Install deps run: | sudo apt-get install -y eatmydata - sudo eatmydata apt-get install -y gettext librsvg2-bin mingw-w64 latexmk texlive-fonts-recommended texlive-latex-recommended texlive-latex-extra + sudo eatmydata apt-get install -y gettext librsvg2-bin mingw-w64 pip install requests sh click setuptools cpp-coveralls "Sphinx<4" sphinx-rtd-theme recommonmark sphinx-autoapi sphinxcontrib-svg2pdfconverter polib pyyaml astroid isort black awscli - name: Versions run: | @@ -73,26 +73,17 @@ jobs: with: name: stubs path: circuitpython-stubs* - - name: Test Documentation Build (HTML) + - name: Docs run: sphinx-build -E -W -b html -D version=${{ env.CP_VERSION }} -D release=${{ env.CP_VERSION }} . _build/html - uses: actions/upload-artifact@v2 with: name: docs path: _build/html - - name: Test Documentation Build (LaTeX/PDF) - run: | - make latexpdf - - uses: actions/upload-artifact@v2 - with: - name: docs - path: _build/latex - name: Translations run: make check-translate - name: New boards check run: python3 -u ci_new_boards_check.py working-directory: tools - - name: Duplicate USB VID/PID Check - run: python3 -u -m tools.ci_check_duplicate_usb_vid_pid - name: Build mpy-cross.static-raspbian run: make -C mpy-cross -j2 -f Makefile.static-raspbian - uses: actions/upload-artifact@v2 @@ -131,8 +122,8 @@ jobs: run: echo "$GITHUB_CONTEXT" - name: Install dependencies run: | - brew install gettext - echo >>$GITHUB_PATH /usr/local/opt/gettext/bin + brew install gettext awscli + echo "::set-env name=PATH::/usr/local/opt/gettext/bin:$PATH" - name: Versions run: | gcc --version @@ -146,7 +137,7 @@ jobs: - name: CircuitPython version run: | git describe --dirty --tags - echo >>$GITHUB_ENV CP_VERSION=$(git describe --dirty --tags) + echo "::set-env name=CP_VERSION::$(git describe --dirty --tags)" - name: Build mpy-cross run: make -C mpy-cross -j2 - uses: actions/upload-artifact@v2 @@ -180,8 +171,7 @@ jobs: - "arduino_nano_33_iot" - "arduino_zero" - "bast_pro_mini_m0" - - "bdmicro_vina_d21" - - "bdmicro_vina_d51" + - "bdmicro_vina_m0" - "bless_dev_board_multi_sensor" - "blm_badge" - "capablerobot_usbhub" @@ -199,8 +189,6 @@ jobs: - "datum_imu" - "datum_light" - "datum_weather" - - "dynossat_edu_eps" - - "dynossat_edu_obc" - "electronut_labs_blip" - "electronut_labs_papyr" - "escornabot_makech" @@ -214,7 +202,6 @@ jobs: - "feather_m0_rfm69" - "feather_m0_rfm9x" - "feather_m0_supersized" - - "feather_m4_can" - "feather_m4_express" - "feather_m7_1011" - "feather_mimxrt1011" @@ -241,13 +228,11 @@ jobs: - "makerdiary_nrf52840_m2_devkit" - "makerdiary_nrf52840_mdk" - "makerdiary_nrf52840_mdk_usb_dongle" - - "matrixportal_m4" - "meowbit_v121" - "meowmeow" - "metro_m0_express" - "metro_m4_airlift_lite" - "metro_m4_express" - - "metro_m7_1011" - "metro_nrf52840_express" - "mini_sam_m4" - "monster_m4sk" @@ -269,7 +254,6 @@ jobs: - "pca10100" - "pewpew10" - "pewpew_m4" - - "picoplanet" - "pirkey_m0" - "pitaya_go" - "pyb_nano_v2" @@ -283,8 +267,6 @@ jobs: - "pyportal" - "pyportal_titano" - "pyruler" - - "qtpy_m0" - - "qtpy_m0_haxpress" - "raytac_mdbt50q-db-40" - "robohatmm1_m4" - "sam32" @@ -419,17 +401,9 @@ jobs: fail-fast: false matrix: board: - - "adafruit_metro_esp32s2" - - "electroniccats_bastwifi" - - "espressif_kaluga_1" - "espressif_saola_1_wroom" - "espressif_saola_1_wrover" - - "microdev_micro_s2" - - "muselab_nanoesp32_s2" - - "targett_module_clip_wroom" - - "targett_module_clip_wrover" - "unexpectedmaker_feathers2" - - "unexpectedmaker_feathers2_prerelease" steps: - name: Set up Python 3.8 @@ -449,11 +423,6 @@ jobs: with: path: ${{ github.workspace }}/.idf_tools key: ${{ runner.os }}-idf-tools-${{ hashFiles('.git/modules/ports/esp32s2/esp-idf/HEAD') }}-20200801 - - name: Clone IDF submodules - run: | - (cd $IDF_PATH && git submodule update --init) - env: - IDF_PATH: ${{ github.workspace }}/ports/esp32s2/esp-idf - name: Install IDF tools run: | $IDF_PATH/tools/idf_tools.py --non-interactive install required @@ -504,4 +473,4 @@ jobs: env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')) \ No newline at end of file + if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')) From cbad75a7d2c2b997a7663f7793fe36cac82a9deb Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Wed, 28 Oct 2020 15:40:36 +0000 Subject: [PATCH 124/145] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (844 of 844 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/ --- locale/pt_BR.po | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 8696d7509a..7ad85e0b78 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-10-21 20:13-0500\n" -"PO-Revision-Date: 2020-10-27 21:01+0000\n" +"PO-Revision-Date: 2020-10-28 21:45+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -298,7 +298,7 @@ msgstr "O tipo do endereço está fora do alcance" #: ports/esp32s2/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" -msgstr "" +msgstr "Todos os periféricos CAN estão em uso" #: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" @@ -426,7 +426,7 @@ msgstr "" #: ports/esp32s2/common-hal/canio/CAN.c msgid "Baudrate not supported by peripheral" -msgstr "" +msgstr "O Baudrate não é suportado pelo periférico" #: shared-module/displayio/Display.c #: shared-module/framebufferio/FramebufferDisplay.c @@ -2932,7 +2932,7 @@ msgstr "o long int não é suportado nesta compilação" #: ports/esp32s2/common-hal/canio/CAN.c msgid "loopback + silent mode not supported by peripheral" -msgstr "" +msgstr "o loopback + o modo silencioso não é suportado pelo periférico" #: py/parse.c msgid "malformed f-string" @@ -3555,12 +3555,12 @@ msgstr "a tupla/lista está com tamanho incorreto" #: ports/esp32s2/common-hal/canio/CAN.c #, c-format msgid "twai_driver_install returned esp-idf error #%d" -msgstr "" +msgstr "o twai_driver_install retornou um erro esp-idf #%d" #: ports/esp32s2/common-hal/canio/CAN.c #, c-format msgid "twai_start returned esp-idf error #%d" -msgstr "" +msgstr "o twai_start retornou um erro esp-idf #%d" #: ports/atmel-samd/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c From a28755d53df963ad70cae62e526a3cb2f147851f Mon Sep 17 00:00:00 2001 From: hexthat Date: Wed, 28 Oct 2020 06:14:24 +0000 Subject: [PATCH 125/145] Translated using Weblate (Chinese (Pinyin)) Currently translated at 100.0% (844 of 844 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/ --- locale/zh_Latn_pinyin.po | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 9b32993eb0..4cc86400d9 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: circuitpython-cn\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-10-21 20:13-0500\n" -"PO-Revision-Date: 2020-10-22 20:48+0000\n" +"PO-Revision-Date: 2020-10-28 21:45+0000\n" "Last-Translator: hexthat \n" "Language-Team: Chinese Hanyu Pinyin\n" "Language: zh_Latn_pinyin\n" @@ -15,7 +15,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.3.1\n" +"X-Generator: Weblate 4.3.2-dev\n" #: main.c msgid "" @@ -296,7 +296,7 @@ msgstr "Dìzhǐ lèixíng chāochū fànwéi" #: ports/esp32s2/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" -msgstr "" +msgstr "suǒ yǒu CAN wài shè dōu zài shǐ yòng zhōng" #: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" @@ -422,7 +422,7 @@ msgstr "" #: ports/esp32s2/common-hal/canio/CAN.c msgid "Baudrate not supported by peripheral" -msgstr "" +msgstr "wài shè bù zhī chí de bō tè lā tè" #: shared-module/displayio/Display.c #: shared-module/framebufferio/FramebufferDisplay.c @@ -2895,7 +2895,7 @@ msgstr "cǐ bǎnběn bù zhīchí zhǎng zhěngshù" #: ports/esp32s2/common-hal/canio/CAN.c msgid "loopback + silent mode not supported by peripheral" -msgstr "" +msgstr "Wài shè bù zhī chí huán huí + jìng yīn mó shì" #: py/parse.c msgid "malformed f-string" @@ -2933,11 +2933,11 @@ msgstr "chāochū zuìdà dìguī shēndù" #: extmod/ulab/code/approx/approx.c msgid "maxiter must be > 0" -msgstr "" +msgstr "maxiter bì xū > 0" #: extmod/ulab/code/approx/approx.c msgid "maxiter should be > 0" -msgstr "" +msgstr "maxiter yìng wéi > 0" #: py/runtime.c #, c-format @@ -3377,7 +3377,7 @@ msgstr "páixù cānshù bìxū shì ndarray" #: extmod/ulab/code/numerical/numerical.c msgid "sorted axis can't be longer than 65535" -msgstr "" +msgstr "pái xù zhóu bù néng chāo guò 65535" #: extmod/ulab/code/filter/filter.c msgid "sos array must be of shape (n_section, 6)" @@ -3511,12 +3511,12 @@ msgstr "yuán zǔ/lièbiǎo chángdù cuòwù" #: ports/esp32s2/common-hal/canio/CAN.c #, c-format msgid "twai_driver_install returned esp-idf error #%d" -msgstr "" +msgstr "twai_driver_install fǎn huí esp-idf cuò wù #%d" #: ports/esp32s2/common-hal/canio/CAN.c #, c-format msgid "twai_start returned esp-idf error #%d" -msgstr "" +msgstr "twai_start fǎn huí esp -idf cuò wù #%d" #: ports/atmel-samd/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c From e83be19d0f43d406c0968eb3903972cf127efb8d Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 28 Oct 2020 17:48:12 -0500 Subject: [PATCH 126/145] actions: Fix location of stubs upload --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0792d36a01..5092e48323 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -117,7 +117,7 @@ jobs: [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-amd64-linux-${{ env.CP_VERSION }} --no-progress --region us-east-1 [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static.exe s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-x64-windows-${{ env.CP_VERSION }}.exe --no-progress --region us-east-1 zip -9 circuitpython-stubs.CP_VERSION }}.zip stubs - [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp circuitpython-stubs.zip s3://adafruit-circuit-python/bin/mpy-cross/circuitpython-stubs-${{ env.CP_VERSION }}.zip --no-progress --region us-east-1 + [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp circuitpython-stubs.zip s3://adafruit-circuit-python/bin/stubs/circuitpython-stubs-${{ env.CP_VERSION }}.zip --no-progress --region us-east-1 env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} From 25bad660c6cfc0c697ad02da18d9b9e8c1d9053e Mon Sep 17 00:00:00 2001 From: lady ada Date: Wed, 28 Oct 2020 19:23:18 -0400 Subject: [PATCH 127/145] add light sensor, move batt monitor --- ports/esp32s2/boards/adafruit_esp32s2_eink_portal/pins.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ports/esp32s2/boards/adafruit_esp32s2_eink_portal/pins.c b/ports/esp32s2/boards/adafruit_esp32s2_eink_portal/pins.c index 2cf3d24029..65bc3fb53b 100644 --- a/ports/esp32s2/boards/adafruit_esp32s2_eink_portal/pins.c +++ b/ports/esp32s2/boards/adafruit_esp32s2_eink_portal/pins.c @@ -18,8 +18,10 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_BUTTON_C), MP_ROM_PTR(&pin_GPIO12) }, { MP_ROM_QSTR(MP_QSTR_BUTTON_D), MP_ROM_PTR(&pin_GPIO11) }, - { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_GPIO2) }, - { MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_LIGHT), MP_ROM_PTR(&pin_GPIO3) }, + + { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_GPIO4) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO33) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO34) }, From 59b9ca409cc6d1835567f866f9a96c04bc78d2c3 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Wed, 28 Oct 2020 20:33:10 -0400 Subject: [PATCH 128/145] matrixportal ESP TX and RX pins were swapped --- ports/atmel-samd/boards/matrixportal_m4/pins.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/atmel-samd/boards/matrixportal_m4/pins.c b/ports/atmel-samd/boards/matrixportal_m4/pins.c index 34865597b6..1f9956d9ec 100644 --- a/ports/atmel-samd/boards/matrixportal_m4/pins.c +++ b/ports/atmel-samd/boards/matrixportal_m4/pins.c @@ -16,8 +16,8 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_ESP_BUSY), MP_ROM_PTR(&pin_PA22) }, { MP_OBJ_NEW_QSTR(MP_QSTR_ESP_RESET), MP_ROM_PTR(&pin_PA21) }, { MP_OBJ_NEW_QSTR(MP_QSTR_ESP_RTS), MP_ROM_PTR(&pin_PA18) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_ESP_TX), MP_ROM_PTR(&pin_PA12) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_ESP_RX), MP_ROM_PTR(&pin_PA13) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_ESP_TX), MP_ROM_PTR(&pin_PA13) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_ESP_RX), MP_ROM_PTR(&pin_PA12) }, { MP_OBJ_NEW_QSTR(MP_QSTR_SCL),MP_ROM_PTR(&pin_PB30) }, { MP_OBJ_NEW_QSTR(MP_QSTR_SDA),MP_ROM_PTR(&pin_PB31) }, From ad166ca479f405a9cb43fae9fe7b082d2e6ba19f Mon Sep 17 00:00:00 2001 From: sw23 Date: Thu, 29 Oct 2020 20:15:34 -0400 Subject: [PATCH 129/145] Fixing make stub warnings and mypy issuesmak --- shared-bindings/canio/CAN.c | 8 ++++---- shared-bindings/canio/Listener.c | 2 +- shared-bindings/canio/Match.c | 2 +- shared-bindings/canio/Message.c | 2 +- shared-bindings/canio/RemoteTransmissionRequest.c | 2 +- shared-bindings/displayio/Bitmap.c | 4 ++-- shared-bindings/displayio/Display.c | 2 +- shared-bindings/socketpool/Socket.c | 2 +- shared-bindings/socketpool/SocketPool.c | 2 +- shared-bindings/ssl/SSLContext.c | 2 +- shared-bindings/wifi/Radio.c | 4 ++-- tools/extract_pyi.py | 9 ++++++++- 12 files changed, 24 insertions(+), 17 deletions(-) diff --git a/shared-bindings/canio/CAN.c b/shared-bindings/canio/CAN.c index 4982a97b9d..13066764e3 100644 --- a/shared-bindings/canio/CAN.c +++ b/shared-bindings/canio/CAN.c @@ -49,7 +49,7 @@ //| loopback: bool = False, //| silent: bool = False, //| auto_restart: bool = False, -//| ): +//| ) -> None: //| """A common shared-bus protocol. The rx and tx pins are generally //| connected to a transceiver which controls the H and L pins on a //| shared bus. @@ -171,7 +171,7 @@ STATIC const mp_obj_property_t canio_can_receive_error_count_obj = { (mp_obj_t)mp_const_none}, }; -//| state: State +//| state: BusState //| """The current state of the bus. (read-only)""" STATIC mp_obj_t canio_can_state_get(mp_obj_t self_in) { canio_can_obj_t *self = MP_OBJ_TO_PTR(self_in); @@ -291,7 +291,7 @@ STATIC const mp_obj_property_t canio_can_loopback_obj = { }; -//| def send(message: Union[RemoteTransmissionRequest, Message]) -> None: +//| def send(self, message: Union[RemoteTransmissionRequest, Message]) -> None: //| """Send a message on the bus with the given data and id. //| If the message could not be sent due to a full fifo or a bus error condition, RuntimeError is raised. //| """ @@ -352,7 +352,7 @@ STATIC mp_obj_t canio_can_enter(mp_obj_t self_in) { } STATIC MP_DEFINE_CONST_FUN_OBJ_1(canio_can_enter_obj, canio_can_enter); -//| def __exit__(self, unused1, unused2, unused3) -> None: +//| def __exit__(self, unused1: Optional[Type[BaseException]], unused2: Optional[BaseException], unused3: Optional[TracebackType]) -> None: //| """Calls deinit()""" //| ... STATIC mp_obj_t canio_can_exit(size_t num_args, const mp_obj_t args[]) { diff --git a/shared-bindings/canio/Listener.c b/shared-bindings/canio/Listener.c index 93552af814..8a39f0f2ae 100644 --- a/shared-bindings/canio/Listener.c +++ b/shared-bindings/canio/Listener.c @@ -123,7 +123,7 @@ STATIC mp_obj_t canio_listener_enter(mp_obj_t self_in) { } STATIC MP_DEFINE_CONST_FUN_OBJ_1(canio_listener_enter_obj, canio_listener_enter); -//| def __exit__(self, unused1, unused2, unused3) -> None: +//| def __exit__(self, unused1: Optional[Type[BaseException]], unused2: Optional[BaseException], unused3: Optional[TracebackType]) -> None: //| """Calls deinit()""" //| ... STATIC mp_obj_t canio_listener_exit(size_t num_args, const mp_obj_t args[]) { diff --git a/shared-bindings/canio/Match.c b/shared-bindings/canio/Match.c index 3fbc1773e8..6039631fad 100644 --- a/shared-bindings/canio/Match.c +++ b/shared-bindings/canio/Match.c @@ -33,7 +33,7 @@ //| """Describe CAN bus messages to match""" //| //| -//| def __init__(self, id: int, *, mask: Optional[int] = None, extended: bool = False): +//| def __init__(self, id: int, *, mask: Optional[int] = None, extended: bool = False) -> None: //| """Construct a Match with the given properties. //| //| If mask is not None, then the filter is for any id which matches all diff --git a/shared-bindings/canio/Message.c b/shared-bindings/canio/Message.c index e47e997c70..04fa8fc6c2 100644 --- a/shared-bindings/canio/Message.c +++ b/shared-bindings/canio/Message.c @@ -31,7 +31,7 @@ #include "py/runtime.h" //| class Message: -//| def __init__(self, id: int, data: bytes, *, extended: bool = False): +//| def __init__(self, id: int, data: bytes, *, extended: bool = False) -> None: //| """Construct a Message to send on a CAN bus. //| //| :param int id: The numeric ID of the message diff --git a/shared-bindings/canio/RemoteTransmissionRequest.c b/shared-bindings/canio/RemoteTransmissionRequest.c index d762787b18..fcd2590340 100644 --- a/shared-bindings/canio/RemoteTransmissionRequest.c +++ b/shared-bindings/canio/RemoteTransmissionRequest.c @@ -31,7 +31,7 @@ #include "py/runtime.h" //| class RemoteTransmissionRequest: -//| def __init__(self, id: int, length: int, *, extended: bool = False): +//| def __init__(self, id: int, length: int, *, extended: bool = False) -> None: //| """Construct a RemoteTransmissionRequest to send on a CAN bus. //| //| :param int id: The numeric ID of the requested message diff --git a/shared-bindings/displayio/Bitmap.c b/shared-bindings/displayio/Bitmap.c index 5a2fc785f8..b9f06fe143 100644 --- a/shared-bindings/displayio/Bitmap.c +++ b/shared-bindings/displayio/Bitmap.c @@ -172,7 +172,7 @@ STATIC mp_obj_t bitmap_subscr(mp_obj_t self_in, mp_obj_t index_obj, mp_obj_t val return mp_const_none; } -//| def blit(self, x: int, y: int, source_bitmap: bitmap, *, x1: int, y1: int, x2: int, y2: int, skip_index: int) -> None: +//| def blit(self, x: int, y: int, source_bitmap: Bitmap, *, x1: int, y1: int, x2: int, y2: int, skip_index: int) -> None: //| """Inserts the source_bitmap region defined by rectangular boundaries //| (x1,y1) and (x2,y2) into the bitmap at the specified (x,y) location. //| @@ -274,7 +274,7 @@ STATIC mp_obj_t displayio_bitmap_obj_blit(size_t n_args, const mp_obj_t *pos_arg MP_DEFINE_CONST_FUN_OBJ_KW(displayio_bitmap_blit_obj, 4, displayio_bitmap_obj_blit); // `displayio_bitmap_obj_blit` requires at least 4 arguments -//| def fill(self, value: Any) -> None: +//| def fill(self, value: int) -> None: //| """Fills the bitmap with the supplied palette index value.""" //| ... //| diff --git a/shared-bindings/displayio/Display.c b/shared-bindings/displayio/Display.c index e78a893b01..1ed59f2331 100644 --- a/shared-bindings/displayio/Display.c +++ b/shared-bindings/displayio/Display.c @@ -39,7 +39,7 @@ #include "shared-module/displayio/__init__.h" #include "supervisor/shared/translate.h" -//| _DisplayBus = Union[FourWire, ParallelBus, I2CDisplay] +//| _DisplayBus = Union['FourWire', 'ParallelBus', 'I2CDisplay'] //| """:py:class:`FourWire`, :py:class:`ParallelBus` or :py:class:`I2CDisplay`""" //| diff --git a/shared-bindings/socketpool/Socket.c b/shared-bindings/socketpool/Socket.c index e7b31842d2..362e4d7e86 100644 --- a/shared-bindings/socketpool/Socket.c +++ b/shared-bindings/socketpool/Socket.c @@ -161,7 +161,7 @@ STATIC mp_obj_t socketpool_socket_close(mp_obj_t self_in) { } STATIC MP_DEFINE_CONST_FUN_OBJ_1(socketpool_socket_close_obj, socketpool_socket_close); -//| def connect(self, address: tuple) -> None: +//| def connect(self, address: Tuple[str, int]) -> None: //| """Connect a socket to a remote address //| //| :param ~tuple address: tuple of (remote_address, remote_port)""" diff --git a/shared-bindings/socketpool/SocketPool.c b/shared-bindings/socketpool/SocketPool.c index 527cf7e984..b737b5fc2d 100644 --- a/shared-bindings/socketpool/SocketPool.c +++ b/shared-bindings/socketpool/SocketPool.c @@ -82,7 +82,7 @@ STATIC mp_obj_t socketpool_socketpool_socket(size_t n_args, const mp_obj_t *pos_ } MP_DEFINE_CONST_FUN_OBJ_KW(socketpool_socketpool_socket_obj, 1, socketpool_socketpool_socket); -//| def getaddrinfo(host: str, port: int, family: int = 0, type: int = 0, proto: int = 0, flags: int = 0) -> tuple: +//| def getaddrinfo(host: str, port: int, family: int = 0, type: int = 0, proto: int = 0, flags: int = 0) -> Tuple[int, int, int, str, Tuple[str, int]]: //| """Gets the address information for a hostname and port //| //| Returns the appropriate family, socket type, socket protocol and diff --git a/shared-bindings/ssl/SSLContext.c b/shared-bindings/ssl/SSLContext.c index d2c236d3bf..9d4df72619 100644 --- a/shared-bindings/ssl/SSLContext.c +++ b/shared-bindings/ssl/SSLContext.c @@ -51,7 +51,7 @@ STATIC mp_obj_t ssl_sslcontext_make_new(const mp_obj_type_t *type, size_t n_args return MP_OBJ_FROM_PTR(s); } -//| def wrap_socket(sock: socketpool.Socket, *, server_side: bool = False, server_hostname: str = None) -> socketpool.Socket: +//| def wrap_socket(sock: socketpool.Socket, *, server_side: bool = False, server_hostname: Optional[str] = None) -> socketpool.Socket: //| """Wraps the socket into a socket-compatible class that handles SSL negotiation. //| The socket must be of type SOCK_STREAM.""" //| ... diff --git a/shared-bindings/wifi/Radio.c b/shared-bindings/wifi/Radio.c index a274c437e0..a56ca5aaa6 100644 --- a/shared-bindings/wifi/Radio.c +++ b/shared-bindings/wifi/Radio.c @@ -79,7 +79,7 @@ const mp_obj_property_t wifi_radio_mac_address_obj = { }; -//| def start_scanning_networks(self, *, start_channel=1, stop_channel=11) -> Iterable[Network]: +//| def start_scanning_networks(self, *, start_channel: int = 1, stop_channel: int = 11) -> Iterable[Network]: //| """Scans for available wifi networks over the given channel range. Make sure the channels are allowed in your country.""" //| ... //| @@ -283,7 +283,7 @@ const mp_obj_property_t wifi_radio_ap_info_obj = { (mp_obj_t)&mp_const_none_obj }, }; -//| def ping(self, ip, *, timeout: float = 0.5) -> float: +//| def ping(self, ip: wifi.Radio, *, timeout: float = 0.5) -> float: //| """Ping an IP to test connectivity. Returns echo time in seconds. //| Returns None when it times out.""" //| ... diff --git a/tools/extract_pyi.py b/tools/extract_pyi.py index 651216e11a..b7ce584a1e 100644 --- a/tools/extract_pyi.py +++ b/tools/extract_pyi.py @@ -17,7 +17,8 @@ import black IMPORTS_IGNORE = frozenset({'int', 'float', 'bool', 'str', 'bytes', 'tuple', 'list', 'set', 'dict', 'bytearray', 'slice', 'file', 'buffer', 'range', 'array', 'struct_time'}) -IMPORTS_TYPING = frozenset({'Any', 'Optional', 'Union', 'Tuple', 'List', 'Sequence', 'NamedTuple', 'Iterable', 'Iterator', 'Callable', 'AnyStr', 'overload'}) +IMPORTS_TYPING = frozenset({'Any', 'Optional', 'Union', 'Tuple', 'List', 'Sequence', 'NamedTuple', 'Iterable', 'Iterator', 'Callable', 'AnyStr', 'overload', 'Type'}) +IMPORTS_TYPES = frozenset({'TracebackType'}) CPY_TYPING = frozenset({'ReadableBuffer', 'WriteableBuffer', 'AudioSample', 'FrameBuffer'}) @@ -63,6 +64,7 @@ def find_stub_issues(tree): def extract_imports(tree): modules = set() typing = set() + types = set() cpy_typing = set() def collect_annotations(anno_tree): @@ -74,6 +76,8 @@ def extract_imports(tree): continue elif node.id in IMPORTS_TYPING: typing.add(node.id) + elif node.id in IMPORTS_TYPES: + types.add(node.id) elif node.id in CPY_TYPING: cpy_typing.add(node.id) elif isinstance(node, ast.Attribute): @@ -94,6 +98,7 @@ def extract_imports(tree): return { "modules": sorted(modules), "typing": sorted(typing), + "types": sorted(types), "cpy_typing": sorted(cpy_typing), } @@ -181,6 +186,8 @@ def convert_folder(top_level, stub_directory): # Add import statements imports = extract_imports(tree) import_lines = ["from __future__ import annotations"] + if imports["types"]: + import_lines.append("from types import " + ", ".join(imports["types"])) if imports["typing"]: import_lines.append("from typing import " + ", ".join(imports["typing"])) if imports["cpy_typing"]: From 9f3a1fe27b9f29771b87a4d5eb1914075d2b1e3a Mon Sep 17 00:00:00 2001 From: sw23 Date: Fri, 30 Oct 2020 01:29:58 -0400 Subject: [PATCH 130/145] Fixing stub for wifi_radio_ping --- shared-bindings/wifi/Radio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/wifi/Radio.c b/shared-bindings/wifi/Radio.c index a56ca5aaa6..e81e8793c4 100644 --- a/shared-bindings/wifi/Radio.c +++ b/shared-bindings/wifi/Radio.c @@ -283,7 +283,7 @@ const mp_obj_property_t wifi_radio_ap_info_obj = { (mp_obj_t)&mp_const_none_obj }, }; -//| def ping(self, ip: wifi.Radio, *, timeout: float = 0.5) -> float: +//| def ping(self, ip: ipaddress.IPv4Address, *, timeout: Optional[float] = 0.5) -> float: //| """Ping an IP to test connectivity. Returns echo time in seconds. //| Returns None when it times out.""" //| ... From 6a63d20a5d2e7184bfc5747b465818fb7eee6b49 Mon Sep 17 00:00:00 2001 From: sw23 Date: Fri, 30 Oct 2020 18:56:40 -0400 Subject: [PATCH 131/145] Fixing remaining stub mypy issues + run check-stubs to CI --- .github/workflows/build.yml | 2 +- shared-bindings/ipaddress/IPv4Address.c | 2 +- shared-bindings/socketpool/SocketPool.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 64d43f4d98..8039883e34 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -68,7 +68,7 @@ jobs: run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --via-mpy -d basics float working-directory: tests - name: Stubs - run: make stubs -j2 + run: make check-stubs -j2 - uses: actions/upload-artifact@v2 with: name: stubs diff --git a/shared-bindings/ipaddress/IPv4Address.c b/shared-bindings/ipaddress/IPv4Address.c index b2a10158ae..e027f32d65 100644 --- a/shared-bindings/ipaddress/IPv4Address.c +++ b/shared-bindings/ipaddress/IPv4Address.c @@ -126,7 +126,7 @@ const mp_obj_property_t ipaddress_ipv4address_version_obj = { (mp_obj_t)&mp_const_none_obj}, }; -//| def __eq__(self, other: IPv4Address) -> bool: +//| def __eq__(self, other: object) -> bool: //| """Two Address objects are equal if their addresses and address types are equal.""" //| ... //| diff --git a/shared-bindings/socketpool/SocketPool.c b/shared-bindings/socketpool/SocketPool.c index b737b5fc2d..0cead525f8 100644 --- a/shared-bindings/socketpool/SocketPool.c +++ b/shared-bindings/socketpool/SocketPool.c @@ -58,7 +58,7 @@ STATIC mp_obj_t socketpool_socketpool_make_new(const mp_obj_type_t *type, size_t } -//| def socket(self, family: int = AF_INET, type: int = SOCK_STREAM, proto: int = IPPROTO_TCP) -> None: +//| def socket(self, family: int, type: int, proto: int) -> socketpool.Socket: //| """Create a new socket //| //| :param ~int family: AF_INET or AF_INET6 From 8e72b68e3de90f87261ce289dd7d3a28815cfd0b Mon Sep 17 00:00:00 2001 From: sw23 Date: Fri, 30 Oct 2020 19:16:26 -0400 Subject: [PATCH 132/145] Adding mypy to dep list and clarifying Stubs stage name --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8039883e34..07db88963b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,7 +37,7 @@ jobs: run: | sudo apt-get install -y eatmydata sudo eatmydata apt-get install -y gettext librsvg2-bin mingw-w64 latexmk texlive-fonts-recommended texlive-latex-recommended texlive-latex-extra - pip install requests sh click setuptools cpp-coveralls "Sphinx<4" sphinx-rtd-theme recommonmark sphinx-autoapi sphinxcontrib-svg2pdfconverter polib pyyaml astroid isort black awscli + pip install requests sh click setuptools cpp-coveralls "Sphinx<4" sphinx-rtd-theme recommonmark sphinx-autoapi sphinxcontrib-svg2pdfconverter polib pyyaml astroid isort black awscli mypy - name: Versions run: | gcc --version @@ -67,7 +67,7 @@ jobs: - name: mpy Tests run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --via-mpy -d basics float working-directory: tests - - name: Stubs + - name: Build and Validate Stubs run: make check-stubs -j2 - uses: actions/upload-artifact@v2 with: From 345d84ffde527b16f50c203f7b6a718886be34f6 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 30 Oct 2020 22:16:12 -0400 Subject: [PATCH 133/145] improve USB CDC disconnect/reconnect checking --- supervisor/serial.h | 1 - supervisor/shared/serial.c | 6 +++--- supervisor/shared/usb/usb.c | 3 --- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/supervisor/serial.h b/supervisor/serial.h index 9c2d44737a..066886303e 100644 --- a/supervisor/serial.h +++ b/supervisor/serial.h @@ -47,5 +47,4 @@ char serial_read(void); bool serial_bytes_available(void); bool serial_connected(void); -extern volatile bool _serial_connected; #endif // MICROPY_INCLUDED_SUPERVISOR_SERIAL_H diff --git a/supervisor/shared/serial.c b/supervisor/shared/serial.c index 91e90671d2..7383cc2282 100644 --- a/supervisor/shared/serial.c +++ b/supervisor/shared/serial.c @@ -47,8 +47,6 @@ busio_uart_obj_t debug_uart; byte buf_array[64]; #endif -volatile bool _serial_connected; - void serial_early_init(void) { #if defined(DEBUG_UART_TX) && defined(DEBUG_UART_RX) debug_uart.base.type = &busio_uart_type; @@ -71,7 +69,9 @@ bool serial_connected(void) { #if defined(DEBUG_UART_TX) && defined(DEBUG_UART_RX) return true; #else - return _serial_connected; + // True if DTR is asserted, and the USB connection is up. + // tud_cdc_get_line_state(): bit 0 is DTR, bit 1 is RTS + return (tud_cdc_get_line_state() & 1) && tud_ready(); #endif } diff --git a/supervisor/shared/usb/usb.c b/supervisor/shared/usb/usb.c index 89fbf56f37..93d3436e9d 100644 --- a/supervisor/shared/usb/usb.c +++ b/supervisor/shared/usb/usb.c @@ -116,7 +116,6 @@ void tud_umount_cb(void) { // remote_wakeup_en : if host allows us to perform remote wakeup // USB Specs: Within 7ms, device must draw an average current less than 2.5 mA from bus void tud_suspend_cb(bool remote_wakeup_en) { - _serial_connected = false; } // Invoked when usb bus is resumed @@ -128,8 +127,6 @@ void tud_resume_cb(void) { void tud_cdc_line_state_cb(uint8_t itf, bool dtr, bool rts) { (void) itf; // interface ID, not used - _serial_connected = dtr; - // DTR = false is counted as disconnected if ( !dtr ) { From 1f179b331750fbe05ccb4caff44e985234c9ee71 Mon Sep 17 00:00:00 2001 From: sw23 Date: Fri, 30 Oct 2020 23:19:27 -0400 Subject: [PATCH 134/145] Adding socket and socketpool class attributes --- shared-bindings/socket/__init__.c | 15 ++++++++------- shared-bindings/socketpool/SocketPool.c | 11 +++++++++-- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/shared-bindings/socket/__init__.c b/shared-bindings/socket/__init__.c index 38840da5ea..2969b37149 100644 --- a/shared-bindings/socket/__init__.c +++ b/shared-bindings/socket/__init__.c @@ -49,7 +49,14 @@ STATIC const mp_obj_type_t socket_type; //| class socket: //| -//| def __init__(self, family: int, type: int, proto: int) -> None: +//| AF_INET = 2 +//| AF_INET6 = 10 +//| SOCK_STREAM = 1 +//| SOCK_DGRAM = 2 +//| SOCK_RAW = 3 +//| IPPROTO_TCP = 6 +//| +//| def __init__(self, family: int = AF_INET, type: int = SOCK_STREAM, proto: int = IPPROTO_TCP) -> None: //| """Create a new socket //| //| :param int family: AF_INET or AF_INET6 @@ -57,12 +64,6 @@ STATIC const mp_obj_type_t socket_type; //| :param int proto: IPPROTO_TCP, IPPROTO_UDP or IPPROTO_RAW (ignored)""" //| ... //| -//| AF_INET: int -//| AF_INET6: int -//| SOCK_STREAM: int -//| SOCK_DGRAM: int -//| SOCK_RAW: int -//| STATIC mp_obj_t socket_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { mp_arg_check_num(n_args, kw_args, 0, 4, false); diff --git a/shared-bindings/socketpool/SocketPool.c b/shared-bindings/socketpool/SocketPool.c index 0cead525f8..2234f359ef 100644 --- a/shared-bindings/socketpool/SocketPool.c +++ b/shared-bindings/socketpool/SocketPool.c @@ -57,8 +57,14 @@ STATIC mp_obj_t socketpool_socketpool_make_new(const mp_obj_type_t *type, size_t return MP_OBJ_FROM_PTR(s); } - -//| def socket(self, family: int, type: int, proto: int) -> socketpool.Socket: +//| AF_INET = 0 +//| AF_INET6 = 1 +//| SOCK_STREAM = 0 +//| SOCK_DGRAM = 1 +//| SOCK_RAW = 2 +//| IPPROTO_TCP = 6 +//| +//| def socket(self, family: int = AF_INET, type: int = SOCK_STREAM, proto: int = IPPROTO_TCP) -> socketpool.Socket: //| """Create a new socket //| //| :param ~int family: AF_INET or AF_INET6 @@ -66,6 +72,7 @@ STATIC mp_obj_t socketpool_socketpool_make_new(const mp_obj_type_t *type, size_t //| :param ~int proto: IPPROTO_TCP, IPPROTO_UDP or IPPROTO_RAW (ignored)""" //| ... //| + STATIC mp_obj_t socketpool_socketpool_socket(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { mp_arg_check_num(n_args, kw_args, 0, 5, false); From a7616808e951b52e2ced08a7a279a224490ae404 Mon Sep 17 00:00:00 2001 From: "ITACA Innovation S.R.L" <40298126+ITACAInnovation@users.noreply.github.com> Date: Sat, 31 Oct 2020 10:12:49 +0100 Subject: [PATCH 135/145] Updated pinout --- ports/atmel-samd/boards/uchip/pins.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/ports/atmel-samd/boards/uchip/pins.c b/ports/atmel-samd/boards/uchip/pins.c index 856a220742..cfb6432336 100644 --- a/ports/atmel-samd/boards/uchip/pins.c +++ b/ports/atmel-samd/boards/uchip/pins.c @@ -1,14 +1,15 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA08) }, - { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA10) }, - { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA09) }, - { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA11) }, - { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA02) }, - { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PA04) }, - { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_PA03) }, - { MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_PA05) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA06) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA06) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA08) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA10) }, + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA09) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PA11) }, + { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_PA02) }, + { MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_PA03) }, + { MP_ROM_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_PA04) }, { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA16) }, { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA08) }, { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA10) }, @@ -19,8 +20,10 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PA19) }, { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA22) }, { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA23) }, - { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PA03) }, - { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_PA05) }, + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA31) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA30) }, + { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PA02) }, + { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_PA03) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA09) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA08) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA22) }, From 9a8484b853116e6f95f50da6d3bc66323d55ca9f Mon Sep 17 00:00:00 2001 From: "ITACA Innovation S.R.L" <40298126+ITACAInnovation@users.noreply.github.com> Date: Sat, 31 Oct 2020 11:06:56 +0100 Subject: [PATCH 136/145] Update mpconfigboard.h Removed ignore PA30 PA31 in order to allow using them as pinout --- ports/atmel-samd/boards/uchip/mpconfigboard.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/ports/atmel-samd/boards/uchip/mpconfigboard.h b/ports/atmel-samd/boards/uchip/mpconfigboard.h index 1877a41ef9..5d6af4b782 100644 --- a/ports/atmel-samd/boards/uchip/mpconfigboard.h +++ b/ports/atmel-samd/boards/uchip/mpconfigboard.h @@ -16,8 +16,6 @@ #define IGNORE_PIN_PA27 1 #define IGNORE_PIN_PA28 1 -#define IGNORE_PIN_PA30 1 -#define IGNORE_PIN_PA31 1 #define IGNORE_PIN_PB01 1 #define IGNORE_PIN_PB02 1 From 80ad300cad64a7da77d9292dbe5d2b81e458d5dc Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sat, 31 Oct 2020 11:58:28 -0500 Subject: [PATCH 137/145] workflows: Fix typo that broke builds while trying to upload stubs --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 64d43f4d98..00db4f8cde 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -116,7 +116,7 @@ jobs: [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static-raspbian s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-raspbian-${{ env.CP_VERSION }} --no-progress --region us-east-1 [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-amd64-linux-${{ env.CP_VERSION }} --no-progress --region us-east-1 [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static.exe s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-x64-windows-${{ env.CP_VERSION }}.exe --no-progress --region us-east-1 - zip -9 circuitpython-stubs.CP_VERSION }}.zip stubs + zip -9 circuitpython-stubs.${{ env.CP_VERSION }}.zip stubs [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp circuitpython-stubs.zip s3://adafruit-circuit-python/bin/stubs/circuitpython-stubs-${{ env.CP_VERSION }}.zip --no-progress --region us-east-1 env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} From 0c30a26c9bcdfe537262d4ad3ea62b7eaba0c7b8 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Sat, 31 Oct 2020 13:19:13 -0400 Subject: [PATCH 138/145] Update .github/workflows/build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 00db4f8cde..36bf136d4d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -116,7 +116,7 @@ jobs: [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static-raspbian s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-raspbian-${{ env.CP_VERSION }} --no-progress --region us-east-1 [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-amd64-linux-${{ env.CP_VERSION }} --no-progress --region us-east-1 [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static.exe s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-x64-windows-${{ env.CP_VERSION }}.exe --no-progress --region us-east-1 - zip -9 circuitpython-stubs.${{ env.CP_VERSION }}.zip stubs + zip -9 circuitpython-stubs.zip stubs [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp circuitpython-stubs.zip s3://adafruit-circuit-python/bin/stubs/circuitpython-stubs-${{ env.CP_VERSION }}.zip --no-progress --region us-east-1 env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} From 073dc8751c92d943897db9e68b617fe7ba358f00 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Sat, 31 Oct 2020 14:50:13 -0400 Subject: [PATCH 139/145] Use correct stubs directory name The stubs directory is called `circuitpython-stubs`, not `stubs`. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 36bf136d4d..514fa82da2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -116,7 +116,7 @@ jobs: [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static-raspbian s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-raspbian-${{ env.CP_VERSION }} --no-progress --region us-east-1 [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-amd64-linux-${{ env.CP_VERSION }} --no-progress --region us-east-1 [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static.exe s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-x64-windows-${{ env.CP_VERSION }}.exe --no-progress --region us-east-1 - zip -9 circuitpython-stubs.zip stubs + zip -9 circuitpython-stubs.zip circuitpython-stubs [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp circuitpython-stubs.zip s3://adafruit-circuit-python/bin/stubs/circuitpython-stubs-${{ env.CP_VERSION }}.zip --no-progress --region us-east-1 env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} From 3845db4bb98dbfa0b35b11baaa5d62f9f4266dea Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sat, 31 Oct 2020 20:13:51 -0500 Subject: [PATCH 140/145] Update build.yml Need to request zip to recurse, because it is not the default --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 514fa82da2..b6c80558eb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -116,7 +116,7 @@ jobs: [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static-raspbian s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-raspbian-${{ env.CP_VERSION }} --no-progress --region us-east-1 [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-amd64-linux-${{ env.CP_VERSION }} --no-progress --region us-east-1 [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static.exe s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-x64-windows-${{ env.CP_VERSION }}.exe --no-progress --region us-east-1 - zip -9 circuitpython-stubs.zip circuitpython-stubs + zip -9r circuitpython-stubs.zip circuitpython-stubs [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp circuitpython-stubs.zip s3://adafruit-circuit-python/bin/stubs/circuitpython-stubs-${{ env.CP_VERSION }}.zip --no-progress --region us-east-1 env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} From 856a6d4558d594e690a9e39ba841ef086c37ed9f Mon Sep 17 00:00:00 2001 From: Alvaro Figueroa Date: Sat, 31 Oct 2020 15:51:35 +0000 Subject: [PATCH 141/145] Translated using Weblate (Spanish) Currently translated at 99.2% (838 of 844 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/es/ --- locale/es.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/es.po b/locale/es.po index 348af34067..a750c80554 100644 --- a/locale/es.po +++ b/locale/es.po @@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-10-21 20:13-0500\n" -"PO-Revision-Date: 2020-10-27 21:01+0000\n" -"Last-Translator: Adolfo Jayme Barrientos \n" +"PO-Revision-Date: 2020-11-01 16:26+0000\n" +"Last-Translator: Alvaro Figueroa \n" "Language-Team: \n" "Language: es\n" "MIME-Version: 1.0\n" @@ -297,7 +297,7 @@ msgstr "Tipo de dirección fuera de rango" #: ports/esp32s2/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" -msgstr "" +msgstr "Todos los periféricos CAN están en uso" #: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" @@ -427,7 +427,7 @@ msgstr "" #: ports/esp32s2/common-hal/canio/CAN.c msgid "Baudrate not supported by peripheral" -msgstr "" +msgstr "El periférico no maneja el Baudrate" #: shared-module/displayio/Display.c #: shared-module/framebufferio/FramebufferDisplay.c From 7a07e8fa32de376c2f523b6c7d13e1b473198423 Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Fri, 30 Oct 2020 21:04:56 +0000 Subject: [PATCH 142/145] Translated using Weblate (Swedish) Currently translated at 100.0% (844 of 844 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/ --- locale/sv.po | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/locale/sv.po b/locale/sv.po index 53ed60acae..65cd9f6f1f 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-10-21 20:13-0500\n" -"PO-Revision-Date: 2020-10-26 02:36+0000\n" +"PO-Revision-Date: 2020-11-01 16:26+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -294,7 +294,7 @@ msgstr "Adresstyp utanför intervallet" #: ports/esp32s2/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" -msgstr "" +msgstr "All I2C-kringutrustning används" #: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" @@ -420,7 +420,7 @@ msgstr "" #: ports/esp32s2/common-hal/canio/CAN.c msgid "Baudrate not supported by peripheral" -msgstr "" +msgstr "Baudrate stöds inte av kringutrustning" #: shared-module/displayio/Display.c #: shared-module/framebufferio/FramebufferDisplay.c @@ -2905,7 +2905,7 @@ msgstr "long int stöds inte i denna build" #: ports/esp32s2/common-hal/canio/CAN.c msgid "loopback + silent mode not supported by peripheral" -msgstr "" +msgstr "loopback + tyst läge stöds inte av kringutrustning" #: py/parse.c msgid "malformed f-string" @@ -2943,11 +2943,11 @@ msgstr "maximal rekursionsdjup överskriden" #: extmod/ulab/code/approx/approx.c msgid "maxiter must be > 0" -msgstr "" +msgstr "maxiter måste vara > 0" #: extmod/ulab/code/approx/approx.c msgid "maxiter should be > 0" -msgstr "" +msgstr "maxiter bör vara > 0" #: py/runtime.c #, c-format @@ -3388,7 +3388,7 @@ msgstr "argumentet sort måste vara en ndarray" #: extmod/ulab/code/numerical/numerical.c msgid "sorted axis can't be longer than 65535" -msgstr "" +msgstr "sorterad axel kan inte vara längre än 65535" #: extmod/ulab/code/filter/filter.c msgid "sos array must be of shape (n_section, 6)" @@ -3522,12 +3522,12 @@ msgstr "tupel/lista har fel längd" #: ports/esp32s2/common-hal/canio/CAN.c #, c-format msgid "twai_driver_install returned esp-idf error #%d" -msgstr "" +msgstr "twai_driver_install returnerade esp-idf-fel #%d" #: ports/esp32s2/common-hal/canio/CAN.c #, c-format msgid "twai_start returned esp-idf error #%d" -msgstr "" +msgstr "twai_start returnerade esp-idf-fel #%d" #: ports/atmel-samd/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c From 041c2a9f6174996a7c841e4ff7a1e158958c9745 Mon Sep 17 00:00:00 2001 From: Brian Dean Date: Mon, 2 Nov 2020 08:35:25 -0500 Subject: [PATCH 143/145] .../boards/bdmicro_vina_d51: PAD updates for better resource flexibility. --- .../boards/bdmicro_vina_d51/mpconfigboard.h | 10 +- .../atmel-samd/boards/bdmicro_vina_d51/pins.c | 118 ++++++++++-------- 2 files changed, 68 insertions(+), 60 deletions(-) diff --git a/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.h b/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.h index 6bc9bb7063..8b015df05e 100644 --- a/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.h +++ b/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.h @@ -12,14 +12,14 @@ #define BOARD_HAS_CRYSTAL 1 -#define DEFAULT_I2C_BUS_SDA (&pin_PB02) -#define DEFAULT_I2C_BUS_SCL (&pin_PB03) +#define DEFAULT_I2C_BUS_SCL (&pin_PA16) +#define DEFAULT_I2C_BUS_SDA (&pin_PA17) +#define DEFAULT_UART_BUS_RX (&pin_PB20) +#define DEFAULT_UART_BUS_TX (&pin_PB21) #define DEFAULT_SPI_BUS_MISO (&pin_PB23) -#define DEFAULT_UART_BUS_TX (&pin_PB24) -#define DEFAULT_UART_BUS_RX (&pin_PB25) #define DEFAULT_SPI_BUS_MOSI (&pin_PC27) #define DEFAULT_SPI_BUS_SCK (&pin_PC28) -#define MICROPY_HW_LED_STATUS (&pin_PA15) +#define MICROPY_HW_LED_STATUS (&pin_PA23) #define MICROPY_HW_LED_RX (&pin_PC05) #define MICROPY_HW_LED_TX (&pin_PC06) diff --git a/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c b/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c index 931e0328fc..8eeab8a9a5 100644 --- a/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c +++ b/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c @@ -1,64 +1,70 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PB08) }, - { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB09) }, - { MP_ROM_QSTR(MP_QSTR_A10), MP_ROM_PTR(&pin_PC00) }, - { MP_ROM_QSTR(MP_QSTR_A11), MP_ROM_PTR(&pin_PC01) }, - { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA04) }, - { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA06) }, - { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA07) }, - { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PB00) }, - { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_PB01) }, - { MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_PB05) }, - { MP_ROM_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_PB06) }, - { MP_ROM_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_PB07) }, - { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PC10) }, - { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PC11) }, - { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA14) }, - { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA13) }, - { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PB14) }, - { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PB15) }, - { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PC20) }, - { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PC21) }, - { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA12) }, - { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PB31) }, - { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PA16) }, - { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA04) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA06) }, + { MP_ROM_QSTR(MP_QSTR_A10), MP_ROM_PTR(&pin_PB07) }, + { MP_ROM_QSTR(MP_QSTR_A11), MP_ROM_PTR(&pin_PC00) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA07) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PB08) }, + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PB09) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PC02) }, + { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_PC03) }, + { MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_PB04) }, + { MP_ROM_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_PB05) }, + { MP_ROM_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_PB06) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PB31) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PC16) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PC13) }, + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA14) }, + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA15) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PB12) }, + { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PB13) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PC17) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PC18) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PC19) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PC20) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PC21) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PB18) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PB19) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PC12) }, { MP_ROM_QSTR(MP_QSTR_DAC0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_DAC1), MP_ROM_PTR(&pin_PA05) }, - { MP_ROM_QSTR(MP_QSTR_ESP01_EN), MP_ROM_PTR(&pin_PC03) }, + { MP_ROM_QSTR(MP_QSTR_ESP01_EN), MP_ROM_PTR(&pin_PC15) }, + { MP_ROM_QSTR(MP_QSTR_E5), MP_ROM_PTR(&pin_PC15) }, { MP_ROM_QSTR(MP_QSTR_ESP01_GPIO0), MP_ROM_PTR(&pin_PA18) }, - { MP_ROM_QSTR(MP_QSTR_UART3_RTS), MP_ROM_PTR(&pin_PA18) }, + { MP_ROM_QSTR(MP_QSTR_E3), MP_ROM_PTR(&pin_PA18) }, { MP_ROM_QSTR(MP_QSTR_ESP01_GPIO2), MP_ROM_PTR(&pin_PA19) }, - { MP_ROM_QSTR(MP_QSTR_UART3_CTS), MP_ROM_PTR(&pin_PA19) }, - { MP_ROM_QSTR(MP_QSTR_ESP01_RESET), MP_ROM_PTR(&pin_PC02) }, - { MP_ROM_QSTR(MP_QSTR_ESP01_RX), MP_ROM_PTR(&pin_PB21) }, - { MP_ROM_QSTR(MP_QSTR_UART3_RX), MP_ROM_PTR(&pin_PB21) }, - { MP_ROM_QSTR(MP_QSTR_ESP01_TX), MP_ROM_PTR(&pin_PB20) }, - { MP_ROM_QSTR(MP_QSTR_UART3_TX), MP_ROM_PTR(&pin_PB20) }, - { MP_ROM_QSTR(MP_QSTR_I2C_SCL), MP_ROM_PTR(&pin_PB03) }, - { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PB03) }, - { MP_ROM_QSTR(MP_QSTR_I2C_SDA), MP_ROM_PTR(&pin_PB02) }, - { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PB02) }, + { MP_ROM_QSTR(MP_QSTR_E4), MP_ROM_PTR(&pin_PA19) }, + { MP_ROM_QSTR(MP_QSTR_ESP01_RESET), MP_ROM_PTR(&pin_PC14) }, + { MP_ROM_QSTR(MP_QSTR_E6), MP_ROM_PTR(&pin_PC14) }, + { MP_ROM_QSTR(MP_QSTR_ESP01_RX), MP_ROM_PTR(&pin_PA12) }, + { MP_ROM_QSTR(MP_QSTR_UART3_RX), MP_ROM_PTR(&pin_PA12) }, + { MP_ROM_QSTR(MP_QSTR_I2C3_SCL), MP_ROM_PTR(&pin_PA12) }, + { MP_ROM_QSTR(MP_QSTR_E2), MP_ROM_PTR(&pin_PA12) }, + { MP_ROM_QSTR(MP_QSTR_ESP01_TX), MP_ROM_PTR(&pin_PA13) }, + { MP_ROM_QSTR(MP_QSTR_UART3_TX), MP_ROM_PTR(&pin_PA13) }, + { MP_ROM_QSTR(MP_QSTR_I2C3_SDA), MP_ROM_PTR(&pin_PA13) }, + { MP_ROM_QSTR(MP_QSTR_E1), MP_ROM_PTR(&pin_PA13) }, + { MP_ROM_QSTR(MP_QSTR_I2C1_SCL), MP_ROM_PTR(&pin_PA16) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA16) }, + { MP_ROM_QSTR(MP_QSTR_I2C1_SDA), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA17) }, { MP_ROM_QSTR(MP_QSTR_I2S_FS_0), MP_ROM_PTR(&pin_PA20) }, - { MP_ROM_QSTR(MP_QSTR_I2S_FS_1), MP_ROM_PTR(&pin_PA23) }, { MP_ROM_QSTR(MP_QSTR_I2S_MCK_0), MP_ROM_PTR(&pin_PB17) }, - { MP_ROM_QSTR(MP_QSTR_I2S_MCK_1), MP_ROM_PTR(&pin_PB13) }, { MP_ROM_QSTR(MP_QSTR_I2S_SCK_0), MP_ROM_PTR(&pin_PB16) }, - { MP_ROM_QSTR(MP_QSTR_I2S_SCK_1), MP_ROM_PTR(&pin_PB12) }, { MP_ROM_QSTR(MP_QSTR_I2S_SDI), MP_ROM_PTR(&pin_PA22) }, { MP_ROM_QSTR(MP_QSTR_I2S_SDO), MP_ROM_PTR(&pin_PA21) }, - { MP_ROM_QSTR(MP_QSTR_LED_B), MP_ROM_PTR(&pin_PA15) }, - { MP_ROM_QSTR(MP_QSTR_LED_STATUS), MP_ROM_PTR(&pin_PA15) }, - { MP_ROM_QSTR(MP_QSTR_LED_G), MP_ROM_PTR(&pin_PB18) }, - { MP_ROM_QSTR(MP_QSTR_LED_R), MP_ROM_PTR(&pin_PB19) }, + { MP_ROM_QSTR(MP_QSTR_LED_B), MP_ROM_PTR(&pin_PA23) }, + { MP_ROM_QSTR(MP_QSTR_LED_STATUS), MP_ROM_PTR(&pin_PA23) }, + { MP_ROM_QSTR(MP_QSTR_LED_G), MP_ROM_PTR(&pin_PB15) }, + { MP_ROM_QSTR(MP_QSTR_LED_R), MP_ROM_PTR(&pin_PB14) }, { MP_ROM_QSTR(MP_QSTR_LED_RX), MP_ROM_PTR(&pin_PC05) }, { MP_ROM_QSTR(MP_QSTR_LED_TX), MP_ROM_PTR(&pin_PC06) }, - { MP_ROM_QSTR(MP_QSTR_RS485_RE), MP_ROM_PTR(&pin_PC15) }, - { MP_ROM_QSTR(MP_QSTR_RS485_RX), MP_ROM_PTR(&pin_PC13) }, - { MP_ROM_QSTR(MP_QSTR_RS485_TE), MP_ROM_PTR(&pin_PC14) }, - { MP_ROM_QSTR(MP_QSTR_RS485_TX), MP_ROM_PTR(&pin_PC12) }, + { MP_ROM_QSTR(MP_QSTR_RS485_RE), MP_ROM_PTR(&pin_PB01) }, + { MP_ROM_QSTR(MP_QSTR_RS485_RX), MP_ROM_PTR(&pin_PB03) }, + { MP_ROM_QSTR(MP_QSTR_RS485_TE), MP_ROM_PTR(&pin_PB00) }, + { MP_ROM_QSTR(MP_QSTR_RS485_TX), MP_ROM_PTR(&pin_PB02) }, { MP_ROM_QSTR(MP_QSTR_SPI_MISO), MP_ROM_PTR(&pin_PB23) }, { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PB23) }, { MP_ROM_QSTR(MP_QSTR_SPI_MOSI), MP_ROM_PTR(&pin_PC27) }, @@ -67,14 +73,16 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PC28) }, { MP_ROM_QSTR(MP_QSTR_SPI_SS), MP_ROM_PTR(&pin_PB22) }, { MP_ROM_QSTR(MP_QSTR_SS), MP_ROM_PTR(&pin_PB22) }, - { MP_ROM_QSTR(MP_QSTR_UART1_CTS), MP_ROM_PTR(&pin_PC19) }, - { MP_ROM_QSTR(MP_QSTR_UART1_RTS), MP_ROM_PTR(&pin_PC18) }, - { MP_ROM_QSTR(MP_QSTR_UART1_RX), MP_ROM_PTR(&pin_PC17) }, - { MP_ROM_QSTR(MP_QSTR_UART1_TX), MP_ROM_PTR(&pin_PC16) }, - { MP_ROM_QSTR(MP_QSTR_UART2_RX), MP_ROM_PTR(&pin_PB25) }, - { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB25) }, - { MP_ROM_QSTR(MP_QSTR_UART2_TX), MP_ROM_PTR(&pin_PB24) }, - { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB24) }, + { MP_ROM_QSTR(MP_QSTR_UART1_CTS), MP_ROM_PTR(&pin_PC25) }, + { MP_ROM_QSTR(MP_QSTR_UART1_RTS), MP_ROM_PTR(&pin_PC24) }, + { MP_ROM_QSTR(MP_QSTR_UART1_RX), MP_ROM_PTR(&pin_PB24) }, + { MP_ROM_QSTR(MP_QSTR_UART1_TX), MP_ROM_PTR(&pin_PB25) }, + { MP_ROM_QSTR(MP_QSTR_UART2_RX), MP_ROM_PTR(&pin_PB20) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB20) }, + { MP_ROM_QSTR(MP_QSTR_I2C2_SCL), MP_ROM_PTR(&pin_PB20) }, + { MP_ROM_QSTR(MP_QSTR_UART2_TX), MP_ROM_PTR(&pin_PB21) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB21) }, + { MP_ROM_QSTR(MP_QSTR_I2C2_SDA), MP_ROM_PTR(&pin_PB21) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, From 23afe08b6f81b70e2f24c609e6c43b0682aaf30b Mon Sep 17 00:00:00 2001 From: Lucian Copeland Date: Mon, 2 Nov 2020 17:15:19 -0500 Subject: [PATCH 144/145] Add GPIO reset to end of neopixel-write --- ports/esp32s2/common-hal/neopixel_write/__init__.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/esp32s2/common-hal/neopixel_write/__init__.c b/ports/esp32s2/common-hal/neopixel_write/__init__.c index 553cb79f83..63d50bf14a 100644 --- a/ports/esp32s2/common-hal/neopixel_write/__init__.c +++ b/ports/esp32s2/common-hal/neopixel_write/__init__.c @@ -125,4 +125,6 @@ void common_hal_neopixel_write (const digitalio_digitalinout_obj_t* digitalinout // Free channel again esp32s2_peripherals_free_rmt(config.channel); + // Swap pin back to GPIO mode + gpio_set_direction(digitalinout->pin->number, GPIO_MODE_OUTPUT); } From 88fcf4ef7e001e547ed94747df5d22b6736c881c Mon Sep 17 00:00:00 2001 From: sw23 Date: Mon, 2 Nov 2020 19:59:07 -0500 Subject: [PATCH 145/145] Removing implementation-specific values for socket/socketpool class attributes --- shared-bindings/socket/__init__.c | 12 ++++++------ shared-bindings/socketpool/SocketPool.c | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/shared-bindings/socket/__init__.c b/shared-bindings/socket/__init__.c index 2969b37149..799bf28afa 100644 --- a/shared-bindings/socket/__init__.c +++ b/shared-bindings/socket/__init__.c @@ -49,12 +49,12 @@ STATIC const mp_obj_type_t socket_type; //| class socket: //| -//| AF_INET = 2 -//| AF_INET6 = 10 -//| SOCK_STREAM = 1 -//| SOCK_DGRAM = 2 -//| SOCK_RAW = 3 -//| IPPROTO_TCP = 6 +//| AF_INET: int +//| AF_INET6: int +//| SOCK_STREAM: int +//| SOCK_DGRAM: int +//| SOCK_RAW: int +//| IPPROTO_TCP: int //| //| def __init__(self, family: int = AF_INET, type: int = SOCK_STREAM, proto: int = IPPROTO_TCP) -> None: //| """Create a new socket diff --git a/shared-bindings/socketpool/SocketPool.c b/shared-bindings/socketpool/SocketPool.c index 2234f359ef..73eeed2652 100644 --- a/shared-bindings/socketpool/SocketPool.c +++ b/shared-bindings/socketpool/SocketPool.c @@ -57,12 +57,12 @@ STATIC mp_obj_t socketpool_socketpool_make_new(const mp_obj_type_t *type, size_t return MP_OBJ_FROM_PTR(s); } -//| AF_INET = 0 -//| AF_INET6 = 1 -//| SOCK_STREAM = 0 -//| SOCK_DGRAM = 1 -//| SOCK_RAW = 2 -//| IPPROTO_TCP = 6 +//| AF_INET: int +//| AF_INET6: int +//| SOCK_STREAM: int +//| SOCK_DGRAM: int +//| SOCK_RAW: int +//| IPPROTO_TCP: int //| //| def socket(self, family: int = AF_INET, type: int = SOCK_STREAM, proto: int = IPPROTO_TCP) -> socketpool.Socket: //| """Create a new socket