summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsommersoft <sommersoft@gmail.com>2019-02-22 23:12:11 +0000
committersommersoft <sommersoft@gmail.com>2019-02-22 23:12:11 +0000
commita1060747f866073dba4782d3067038cd7148cdb0 (patch)
tree71b193e4a5f8217c619da7c59b6e6a70948d29bf
parentea9200a042e4a0c5fe0e773498d7697a5ea1c07f (diff)
parentd33923942bfa69c9a9ae30d5ee62f86e402b1b48 (diff)
Merge branch 'new_master' into new_freq_in
-rwxr-xr-x.travis.yml3
-rw-r--r--drivers/wiznet5k/internet/dhcp/dhcp.c142
-rw-r--r--extmod/modujson.c4
-rw-r--r--extmod/modure.c8
-rw-r--r--extmod/vfs_fat.h2
-rw-r--r--extmod/vfs_fat_file.c6
m---------frozen/Adafruit_CircuitPython_BusDevice0
m---------frozen/Adafruit_CircuitPython_CircuitPlayground0
m---------frozen/Adafruit_CircuitPython_Crickit0
m---------frozen/Adafruit_CircuitPython_DotStar0
m---------frozen/Adafruit_CircuitPython_HID0
m---------frozen/Adafruit_CircuitPython_IRRemote0
m---------frozen/Adafruit_CircuitPython_LIS3DH0
m---------frozen/Adafruit_CircuitPython_Motor0
m---------frozen/Adafruit_CircuitPython_NeoPixel0
m---------frozen/Adafruit_CircuitPython_Thermistor0
m---------frozen/Adafruit_CircuitPython_seesaw0
m---------lib/tinyusb0
-rwxr-xr-xlib/utils/pyexec.c3
-rw-r--r--locale/ID.po60
-rw-r--r--locale/circuitpython.pot6
-rw-r--r--locale/de_DE.po500
-rw-r--r--locale/en_US.po6
-rw-r--r--locale/es.po140
-rw-r--r--locale/fil.po140
-rw-r--r--locale/fr.po146
-rw-r--r--locale/it_IT.po136
-rw-r--r--locale/pt_BR.po84
-rwxr-xr-xmain.c21
-rw-r--r--ports/atmel-samd/Makefile7
-rw-r--r--ports/atmel-samd/boards/pirkey_m0/mpconfigboard.mk2
-rw-r--r--ports/atmel-samd/boards/pyportal/board.c4
-rw-r--r--ports/atmel-samd/boards/pyportal/pins.c1
-rw-r--r--ports/atmel-samd/boards/sam32/mpconfigboard.mk1
-rw-r--r--ports/atmel-samd/common-hal/analogio/AnalogOut.c15
-rw-r--r--ports/atmel-samd/common-hal/audioio/AudioOut.c2
-rw-r--r--ports/atmel-samd/common-hal/pulseio/PWMOut.c2
-rw-r--r--ports/atmel-samd/common-hal/pulseio/PulseOut.c2
-rw-r--r--ports/atmel-samd/mpconfigport.h9
-rw-r--r--ports/atmel-samd/mpconfigport.mk5
m---------ports/atmel-samd/peripherals0
-rw-r--r--ports/atmel-samd/supervisor/port.c11
-rw-r--r--ports/atmel-samd/timer_handler.c51
-rw-r--r--ports/atmel-samd/timer_handler.h35
-rw-r--r--ports/nrf/bluetooth/ble_drv.c25
-rw-r--r--ports/nrf/bluetooth/ble_drv.h6
-rw-r--r--ports/nrf/boards/feather_nrf52840_express/mpconfigboard.h4
-rw-r--r--ports/nrf/boards/particle_argon/mpconfigboard.h4
-rw-r--r--ports/nrf/boards/particle_boron/mpconfigboard.h4
-rw-r--r--ports/nrf/boards/particle_xenon/mpconfigboard.h4
-rw-r--r--ports/nrf/boards/pca10056/mpconfigboard.h4
-rw-r--r--ports/nrf/boards/sparkfun_nrf52840_mini/mpconfigboard.h4
-rw-r--r--ports/nrf/boards/sparkfun_nrf52840_mini/mpconfigboard.mk4
-rw-r--r--ports/nrf/common-hal/bleio/CharacteristicBuffer.c31
-rw-r--r--ports/nrf/common-hal/bleio/CharacteristicBuffer.h1
-rw-r--r--ports/nrf/mpconfigport.h7
-rw-r--r--ports/nrf/mpconfigport.mk3
-rw-r--r--ports/unix/Makefile1
-rw-r--r--py/circuitpy_mpconfig.h89
-rw-r--r--py/circuitpy_mpconfig.mk7
-rw-r--r--py/moduerrno.c4
-rwxr-xr-xpy/mpconfig.h5
-rw-r--r--py/objmodule.c20
-rw-r--r--py/runtime.c25
-rw-r--r--shared-bindings/audiobusio/PDMIn.c4
-rw-r--r--shared-bindings/busio/UART.c2
-rw-r--r--shared-bindings/storage/__init__.c21
-rw-r--r--shared-bindings/storage/__init__.h2
-rw-r--r--shared-module/displayio/Display.c2
-rw-r--r--shared-module/displayio/__init__.c20
-rw-r--r--shared-module/storage/__init__.c5
-rw-r--r--supervisor/filesystem.h9
-rw-r--r--supervisor/flash.h1
-rw-r--r--supervisor/shared/filesystem.c32
-rw-r--r--supervisor/shared/flash.c20
-rw-r--r--supervisor/shared/usb/usb_msc_flash.c4
-rw-r--r--supervisor/stub/filesystem.c8
-rw-r--r--supervisor/supervisor.mk14
78 files changed, 1098 insertions, 852 deletions
diff --git a/.travis.yml b/.travis.yml
index f588bc85c..a30635cfb 100755
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,7 +4,7 @@ language: c
compiler:
- gcc
git:
- depth: 1
+ depth: 6
# Each item under 'env' is a separate Travis job to execute.
# They run in separate environments, so each one must take the time
@@ -56,7 +56,6 @@ notifications:
before_script:
# Expand the git tree back to 4.0.0-alpha.1 and then fetch the latest tag.
- LAST_TAG=`git ls-remote --quiet --tags --sort=version:refname | egrep -o "refs/tags/[0-9]+.*\$" | tail -n 1`
- - git fetch --shallow-exclude=4.0.0-alpha.1 || git fetch --unshallow
- git fetch --depth 1 origin $LAST_TAG:$LAST_TAG
- git describe --dirty --always --tags
- function var_search () { case "$1" in *$2*) true;; *) false;; esac; }
diff --git a/drivers/wiznet5k/internet/dhcp/dhcp.c b/drivers/wiznet5k/internet/dhcp/dhcp.c
index c56e64474..00f41c3c7 100644
--- a/drivers/wiznet5k/internet/dhcp/dhcp.c
+++ b/drivers/wiznet5k/internet/dhcp/dhcp.c
@@ -11,7 +11,7 @@
//! <2012/12/20> V1.1.0
//! 1. Optimize code
//! 2. Add reg_dhcp_cbfunc()
-//! 3. Add DHCP_stop()
+//! 3. Add DHCP_stop()
//! 4. Integrate check_DHCP_state() & DHCP_run() to DHCP_run()
//! 5. Don't care system endian
//! 6. Add comments
@@ -22,30 +22,30 @@
//!
//! Copyright (c) 2013, WIZnet Co., LTD.
//! All rights reserved.
-//!
-//! Redistribution and use in source and binary forms, with or without
-//! modification, are permitted provided that the following conditions
-//! are met:
-//!
-//! * Redistributions of source code must retain the above copyright
-//! notice, this list of conditions and the following disclaimer.
+//!
+//! Redistribution and use in source and binary forms, with or without
+//! modification, are permitted provided that the following conditions
+//! are met:
+//!
+//! * Redistributions of source code must retain the above copyright
+//! notice, this list of conditions and the following disclaimer.
//! * Redistributions in binary form must reproduce the above copyright
//! notice, this list of conditions and the following disclaimer in the
-//! documentation and/or other materials provided with the distribution.
-//! * Neither the name of the <ORGANIZATION> nor the names of its
-//! contributors may be used to endorse or promote products derived
-//! from this software without specific prior written permission.
-//!
+//! documentation and/or other materials provided with the distribution.
+//! * Neither the name of the <ORGANIZATION> nor the names of its
+//! contributors may be used to endorse or promote products derived
+//! from this software without specific prior written permission.
+//!
//! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-//! AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+//! AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
//! IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-//! ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-//! LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-//! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+//! ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+//! LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+//! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
//! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-//! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-//! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-//! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+//! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+//! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+//! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
//! THE POSSIBILITY OF SUCH DAMAGE.
//
//*****************************************************************************
@@ -59,7 +59,7 @@
#ifdef _DHCP_DEBUG_
#include <stdio.h>
-#endif
+#endif
/* DHCP state machine. */
#define STATE_DHCP_INIT 0 ///< Initialize
@@ -70,7 +70,7 @@
#define STATE_DHCP_RELEASE 5 ///< No use
#define STATE_DHCP_STOP 6 ///< Stop processing DHCP
-#define DHCP_FLAGSBROADCAST 0x8000 ///< The broadcast value of flags in @ref RIP_MSG
+#define DHCP_FLAGSBROADCAST 0x8000 ///< The broadcast value of flags in @ref RIP_MSG
#define DHCP_FLAGSUNICAST 0x0000 ///< The unicast value of flags in @ref RIP_MSG
/* DHCP message OP code */
@@ -99,7 +99,7 @@
#define OPT_SIZE 312 /// Max OPT size of @ref RIP_MSG
#define RIP_MSG_SIZE (236+OPT_SIZE) /// Max size of @ref RIP_MSG
-/*
+/*
* @brief DHCP option and value (cf. RFC1533)
*/
enum
@@ -171,7 +171,7 @@ enum
/*
* @brief DHCP message format
- */
+ */
typedef struct {
uint8_t op; ///< @ref DHCP_BOOTREQUEST or @ref DHCP_BOOTREPLY
uint8_t htype; ///< @ref DHCP_HTYPE10MB or @ref DHCP_HTYPE100MB
@@ -182,7 +182,7 @@ typedef struct {
uint16_t flags; ///< @ref DHCP_FLAGSBROADCAST or @ref DHCP_FLAGSUNICAST
uint8_t ciaddr[4]; ///< @ref Request IP to DHCP sever
uint8_t yiaddr[4]; ///< @ref Offered IP from DHCP server
- uint8_t siaddr[4]; ///< No use
+ uint8_t siaddr[4]; ///< No use
uint8_t giaddr[4]; ///< No use
uint8_t chaddr[16]; ///< DHCP client 6bytes MAC address. Others is filled to zero
uint8_t sname[64]; ///< No use
@@ -205,7 +205,7 @@ uint8_t DHCP_allocated_dns[4] = {0, }; // DNS address from DHCP
int8_t dhcp_state = STATE_DHCP_INIT; // DHCP state
-int8_t dhcp_retry_count = 0;
+int8_t dhcp_retry_count = 0;
uint32_t dhcp_lease_time = INFINITE_LEASETIME;
volatile uint32_t dhcp_tick_1s = 0; // unit 1 second
@@ -215,7 +215,7 @@ uint32_t DHCP_XID; // Any number
RIP_MSG* pDHCPMSG; // Buffer pointer for DHCP processing
-uint8_t HOST_NAME[] = DCHP_HOST_NAME;
+uint8_t HOST_NAME[] = DCHP_HOST_NAME;
uint8_t DHCP_CHADDR[6]; // DHCP Client MAC address.
@@ -306,9 +306,9 @@ void makeDHCPMSG(void)
*(ptmp+0) = (uint8_t)((DHCP_XID & 0xFF000000) >> 24);
*(ptmp+1) = (uint8_t)((DHCP_XID & 0x00FF0000) >> 16);
*(ptmp+2) = (uint8_t)((DHCP_XID & 0x0000FF00) >> 8);
- *(ptmp+3) = (uint8_t)((DHCP_XID & 0x000000FF) >> 0);
+ *(ptmp+3) = (uint8_t)((DHCP_XID & 0x000000FF) >> 0);
pDHCPMSG->secs = DHCP_SECS;
- ptmp = (uint8_t*)(&pDHCPMSG->flags);
+ ptmp = (uint8_t*)(&pDHCPMSG->flags);
*(ptmp+0) = (uint8_t)((DHCP_FLAGSBROADCAST & 0xFF00) >> 8);
*(ptmp+1) = (uint8_t)((DHCP_FLAGSBROADCAST & 0x00FF) >> 0);
@@ -356,16 +356,16 @@ void send_DHCP_DISCOVER(void)
uint16_t i;
uint8_t ip[4];
uint16_t k = 0;
-
+
makeDHCPMSG();
k = 4; // because MAGIC_COOKIE already made by makeDHCPMSG()
-
+
// Option Request Param
pDHCPMSG->OPT[k++] = dhcpMessageType;
pDHCPMSG->OPT[k++] = 0x01;
pDHCPMSG->OPT[k++] = DHCP_DISCOVER;
-
+
// Client identifier
pDHCPMSG->OPT[k++] = dhcpClientIdentifier;
pDHCPMSG->OPT[k++] = 0x07;
@@ -376,10 +376,10 @@ void send_DHCP_DISCOVER(void)
pDHCPMSG->OPT[k++] = DHCP_CHADDR[3];
pDHCPMSG->OPT[k++] = DHCP_CHADDR[4];
pDHCPMSG->OPT[k++] = DHCP_CHADDR[5];
-
+
// host name
pDHCPMSG->OPT[k++] = hostName;
- pDHCPMSG->OPT[k++] = 0; // fill zero length of hostname
+ pDHCPMSG->OPT[k++] = 0; // fill zero length of hostname
for(i = 0 ; HOST_NAME[i] != 0; i++)
pDHCPMSG->OPT[k++] = HOST_NAME[i];
pDHCPMSG->OPT[k++] = DHCP_CHADDR[3];
@@ -432,18 +432,18 @@ void send_DHCP_REQUEST(void)
ip[0] = DHCP_SIP[0];
ip[1] = DHCP_SIP[1];
ip[2] = DHCP_SIP[2];
- ip[3] = DHCP_SIP[3];
+ ip[3] = DHCP_SIP[3];
}
else
{
ip[0] = 255;
ip[1] = 255;
ip[2] = 255;
- ip[3] = 255;
+ ip[3] = 255;
}
-
+
k = 4; // because MAGIC_COOKIE already made by makeDHCPMSG()
-
+
// Option Request Param.
pDHCPMSG->OPT[k++] = dhcpMessageType;
pDHCPMSG->OPT[k++] = 0x01;
@@ -467,7 +467,7 @@ void send_DHCP_REQUEST(void)
pDHCPMSG->OPT[k++] = DHCP_allocated_ip[1];
pDHCPMSG->OPT[k++] = DHCP_allocated_ip[2];
pDHCPMSG->OPT[k++] = DHCP_allocated_ip[3];
-
+
pDHCPMSG->OPT[k++] = dhcpServerIdentifier;
pDHCPMSG->OPT[k++] = 0x04;
pDHCPMSG->OPT[k++] = DHCP_SIP[0];
@@ -485,7 +485,7 @@ void send_DHCP_REQUEST(void)
pDHCPMSG->OPT[k++] = DHCP_CHADDR[4];
pDHCPMSG->OPT[k++] = DHCP_CHADDR[5];
pDHCPMSG->OPT[k - (i+3+1)] = i+3; // length of hostname
-
+
pDHCPMSG->OPT[k++] = dhcpParamRequest;
pDHCPMSG->OPT[k++] = 0x08;
pDHCPMSG->OPT[k++] = subnetMask;
@@ -503,7 +503,7 @@ void send_DHCP_REQUEST(void)
#ifdef _DHCP_DEBUG_
printf("> Send DHCP_REQUEST\r\n");
#endif
-
+
WIZCHIP_EXPORT(sendto)(DHCP_SOCKET, (uint8_t *)pDHCPMSG, RIP_MSG_SIZE, ip, DHCP_SERVER_PORT);
}
@@ -514,11 +514,11 @@ void send_DHCP_DECLINE(void)
int i;
uint8_t ip[4];
uint16_t k = 0;
-
+
makeDHCPMSG();
k = 4; // because MAGIC_COOKIE already made by makeDHCPMSG()
-
+
*((uint8_t*)(&pDHCPMSG->flags)) = ((DHCP_FLAGSUNICAST & 0xFF00)>> 8);
*((uint8_t*)(&pDHCPMSG->flags)+1) = (DHCP_FLAGSUNICAST & 0x00FF);
@@ -577,15 +577,15 @@ int8_t parseDHCPMSG(void)
uint8_t * p;
uint8_t * e;
- uint8_t type;
+ uint8_t type = 0;
uint8_t opt_len;
-
+
if((len = getSn_RX_RSR(DHCP_SOCKET)) > 0)
{
len = WIZCHIP_EXPORT(recvfrom)(DHCP_SOCKET, (uint8_t *)pDHCPMSG, len, svr_addr, &svr_port);
- #ifdef _DHCP_DEBUG_
+ #ifdef _DHCP_DEBUG_
printf("DHCP message : %d.%d.%d.%d(%d) %d received. \r\n",svr_addr[0],svr_addr[1],svr_addr[2], svr_addr[3],svr_port, len);
- #endif
+ #endif
}
else return 0;
if (svr_port == DHCP_SERVER_PORT) {
@@ -624,7 +624,7 @@ int8_t parseDHCPMSG(void)
break;
case routersOnSubnet :
p++;
- opt_len = *p++;
+ opt_len = *p++;
DHCP_allocated_gw[0] = *p++;
DHCP_allocated_gw[1] = *p++;
DHCP_allocated_gw[2] = *p++;
@@ -632,8 +632,8 @@ int8_t parseDHCPMSG(void)
p = p + (opt_len - 4);
break;
case dns :
- p++;
- opt_len = *p++;
+ p++;
+ opt_len = *p++;
DHCP_allocated_dns[0] = *p++;
DHCP_allocated_dns[1] = *p++;
DHCP_allocated_dns[2] = *p++;
@@ -647,7 +647,7 @@ int8_t parseDHCPMSG(void)
dhcp_lease_time = (dhcp_lease_time << 8) + *p++;
dhcp_lease_time = (dhcp_lease_time << 8) + *p++;
dhcp_lease_time = (dhcp_lease_time << 8) + *p++;
- #ifdef _DHCP_DEBUG_
+ #ifdef _DHCP_DEBUG_
dhcp_lease_time = 10;
#endif
break;
@@ -740,7 +740,7 @@ uint8_t DHCP_run(void)
case STATE_DHCP_LEASED :
ret = DHCP_IP_LEASED;
if ((dhcp_lease_time != INFINITE_LEASETIME) && ((dhcp_lease_time/2) < dhcp_tick_1s)) {
-
+
#ifdef _DHCP_DEBUG_
printf("> Maintains the IP address \r\n");
#endif
@@ -750,7 +750,7 @@ uint8_t DHCP_run(void)
OLD_allocated_ip[1] = DHCP_allocated_ip[1];
OLD_allocated_ip[2] = DHCP_allocated_ip[2];
OLD_allocated_ip[3] = DHCP_allocated_ip[3];
-
+
DHCP_XID++;
send_DHCP_REQUEST();
@@ -765,21 +765,21 @@ uint8_t DHCP_run(void)
ret = DHCP_IP_LEASED;
if (type == DHCP_ACK) {
dhcp_retry_count = 0;
- if (OLD_allocated_ip[0] != DHCP_allocated_ip[0] ||
+ if (OLD_allocated_ip[0] != DHCP_allocated_ip[0] ||
OLD_allocated_ip[1] != DHCP_allocated_ip[1] ||
OLD_allocated_ip[2] != DHCP_allocated_ip[2] ||
- OLD_allocated_ip[3] != DHCP_allocated_ip[3])
+ OLD_allocated_ip[3] != DHCP_allocated_ip[3])
{
ret = DHCP_IP_CHANGED;
dhcp_ip_update();
#ifdef _DHCP_DEBUG_
printf(">IP changed.\r\n");
#endif
-
+
}
#ifdef _DHCP_DEBUG_
else printf(">IP is continued.\r\n");
- #endif
+ #endif
reset_DHCP_timeout();
dhcp_state = STATE_DHCP_LEASED;
} else if (type == DHCP_NAK) {
@@ -809,7 +809,7 @@ void DHCP_stop(void)
uint8_t check_DHCP_timeout(void)
{
uint8_t ret = DHCP_RUNNING;
-
+
if (dhcp_retry_count < MAX_DHCP_RETRY) {
if (dhcp_tick_next < dhcp_tick_1s) {
@@ -818,7 +818,7 @@ uint8_t check_DHCP_timeout(void)
// printf("<<timeout>> state : STATE_DHCP_DISCOVER\r\n");
send_DHCP_DISCOVER();
break;
-
+
case STATE_DHCP_REQUEST :
// printf("<<timeout>> state : STATE_DHCP_REQUEST\r\n");
@@ -827,10 +827,10 @@ uint8_t check_DHCP_timeout(void)
case STATE_DHCP_REREQUEST :
// printf("<<timeout>> state : STATE_DHCP_REREQUEST\r\n");
-
+
send_DHCP_REQUEST();
break;
-
+
default :
break;
}
@@ -892,7 +892,7 @@ int8_t check_DHCP_leasedIP(void)
return 0;
}
-}
+}
void DHCP_init(uint8_t s, DHCP_INIT_BUFFER_TYPE* buf)
{
@@ -903,11 +903,11 @@ void DHCP_init(uint8_t s, DHCP_INIT_BUFFER_TYPE* buf)
// assign temporary mac address, you should be set SHAR before call this function.
DHCP_CHADDR[0] = 0x00;
DHCP_CHADDR[1] = 0x08;
- DHCP_CHADDR[2] = 0xdc;
+ DHCP_CHADDR[2] = 0xdc;
DHCP_CHADDR[3] = 0x00;
DHCP_CHADDR[4] = 0x00;
- DHCP_CHADDR[5] = 0x00;
- setSHAR(DHCP_CHADDR);
+ DHCP_CHADDR[5] = 0x00;
+ setSHAR(DHCP_CHADDR);
}
DHCP_SOCKET = s; // SOCK_DHCP
@@ -941,7 +941,7 @@ void getIPfromDHCP(uint8_t* ip)
{
ip[0] = DHCP_allocated_ip[0];
ip[1] = DHCP_allocated_ip[1];
- ip[2] = DHCP_allocated_ip[2];
+ ip[2] = DHCP_allocated_ip[2];
ip[3] = DHCP_allocated_ip[3];
}
@@ -950,7 +950,7 @@ void getGWfromDHCP(uint8_t* ip)
ip[0] =DHCP_allocated_gw[0];
ip[1] =DHCP_allocated_gw[1];
ip[2] =DHCP_allocated_gw[2];
- ip[3] =DHCP_allocated_gw[3];
+ ip[3] =DHCP_allocated_gw[3];
}
void getSNfromDHCP(uint8_t* ip)
@@ -958,7 +958,7 @@ void getSNfromDHCP(uint8_t* ip)
ip[0] = DHCP_allocated_sn[0];
ip[1] = DHCP_allocated_sn[1];
ip[2] = DHCP_allocated_sn[2];
- ip[3] = DHCP_allocated_sn[3];
+ ip[3] = DHCP_allocated_sn[3];
}
void getDNSfromDHCP(uint8_t* ip)
@@ -966,14 +966,10 @@ void getDNSfromDHCP(uint8_t* ip)
ip[0] = DHCP_allocated_dns[0];
ip[1] = DHCP_allocated_dns[1];
ip[2] = DHCP_allocated_dns[2];
- ip[3] = DHCP_allocated_dns[3];
+ ip[3] = DHCP_allocated_dns[3];
}
uint32_t getDHCPLeasetime(void)
{
return dhcp_lease_time;
}
-
-
-
-
diff --git a/extmod/modujson.c b/extmod/modujson.c
index ea6c8b40f..6b24bf578 100644
--- a/extmod/modujson.c
+++ b/extmod/modujson.c
@@ -292,7 +292,11 @@ STATIC mp_obj_t mod_ujson_loads(mp_obj_t obj) {
STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_ujson_loads_obj, mod_ujson_loads);
STATIC const mp_rom_map_elem_t mp_module_ujson_globals_table[] = {
+#if CIRCUITPY
+ { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_json) },
+#else
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ujson) },
+#endif
{ MP_ROM_QSTR(MP_QSTR_dump), MP_ROM_PTR(&mod_ujson_dump_obj) },
{ MP_ROM_QSTR(MP_QSTR_dumps), MP_ROM_PTR(&mod_ujson_dumps_obj) },
{ MP_ROM_QSTR(MP_QSTR_load), MP_ROM_PTR(&mod_ujson_load_obj) },
diff --git a/extmod/modure.c b/extmod/modure.c
index a368ee8fa..125afef4d 100644
--- a/extmod/modure.c
+++ b/extmod/modure.c
@@ -405,7 +405,11 @@ STATIC MP_DEFINE_CONST_DICT(re_locals_dict, re_locals_dict_table);
STATIC const mp_obj_type_t re_type = {
{ &mp_type_type },
+#if CIRCUITPY
+ .name = MP_QSTR_re,
+#else
.name = MP_QSTR_ure,
+#endif
.print = re_print,
.locals_dict = (void*)&re_locals_dict,
};
@@ -462,7 +466,11 @@ MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_re_sub_obj, 3, 5, mod_re_sub);
#endif
STATIC const mp_rom_map_elem_t mp_module_re_globals_table[] = {
+#if CIRCUITPY
+ { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_re) },
+#else
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ure) },
+#endif
{ MP_ROM_QSTR(MP_QSTR_compile), MP_ROM_PTR(&mod_re_compile_obj) },
{ MP_ROM_QSTR(MP_QSTR_match), MP_ROM_PTR(&mod_re_match_obj) },
{ MP_ROM_QSTR(MP_QSTR_search), MP_ROM_PTR(&mod_re_search_obj) },
diff --git a/extmod/vfs_fat.h b/extmod/vfs_fat.h
index dd5e5ffcb..08b03d0d1 100644
--- a/extmod/vfs_fat.h
+++ b/extmod/vfs_fat.h
@@ -38,6 +38,8 @@
#define FSUSER_NO_FILESYSTEM (0x0008) // the block device has no filesystem on it
// Device is writable over USB and read-only to MicroPython.
#define FSUSER_USB_WRITABLE (0x0010)
+// Bit set when the above flag is checked before opening a file for write.
+#define FSUSER_CONCURRENT_WRITE_PROTECTED (0x0020)
typedef struct _fs_user_mount_t {
mp_obj_base_t base;
diff --git a/extmod/vfs_fat_file.c b/extmod/vfs_fat_file.c
index 1b2bb27f8..6aad1884c 100644
--- a/extmod/vfs_fat_file.c
+++ b/extmod/vfs_fat_file.c
@@ -34,6 +34,7 @@
#include "py/mperrno.h"
#include "lib/oofatfs/ff.h"
#include "extmod/vfs_fat.h"
+#include "supervisor/filesystem.h"
// this table converts from FRESULT to POSIX errno
const byte fresult_to_errno_table[20] = {
@@ -186,12 +187,15 @@ STATIC mp_obj_t file_open(fs_user_mount_t *vfs, const mp_obj_type_t *type, mp_ar
break;
}
}
+ assert(vfs != NULL);
+ if ((mode & FA_WRITE) != 0 && !filesystem_is_writable_by_python(vfs)) {
+ mp_raise_OSError(MP_EROFS);
+ }
pyb_file_obj_t *o = m_new_obj_with_finaliser(pyb_file_obj_t);
o->base.type = type;
const char *fname = mp_obj_str_get_str(args[0].u_obj);
- assert(vfs != NULL);
FRESULT res = f_open(&vfs->fatfs, &o->fp, fname, mode);
if (res != FR_OK) {
m_del_obj(pyb_file_obj_t, o);
diff --git a/frozen/Adafruit_CircuitPython_BusDevice b/frozen/Adafruit_CircuitPython_BusDevice
-Subproject d86fc7e81d51465ca1eae6f8c1141f81f065f5a
+Subproject 3e6bf71c75c9ed4ada51ab69f8bd196dad18c0c
diff --git a/frozen/Adafruit_CircuitPython_CircuitPlayground b/frozen/Adafruit_CircuitPython_CircuitPlayground
-Subproject f4ee725fb93fd1a31666d3f71d10c94eb96df7c
+Subproject 1d38fd81edd30f1bd70c0cfe77819ab610ea89a
diff --git a/frozen/Adafruit_CircuitPython_Crickit b/frozen/Adafruit_CircuitPython_Crickit
-Subproject 412392c8bdb6b4378e007eb7974c76b92fa9ff1
+Subproject a1686803566793ec2de7e043bf6822e47cfa31d
diff --git a/frozen/Adafruit_CircuitPython_DotStar b/frozen/Adafruit_CircuitPython_DotStar
-Subproject 03c24157d46672c723021686f7a838cfeb2db2b
+Subproject 409e90902ac49720c4add985e8e1a1660bbe63a
diff --git a/frozen/Adafruit_CircuitPython_HID b/frozen/Adafruit_CircuitPython_HID
-Subproject f5e70e09250f2a25ebb6487a30a763041644c5d
+Subproject dbfabac857123443506a3a1de9b5917d5824882
diff --git a/frozen/Adafruit_CircuitPython_IRRemote b/frozen/Adafruit_CircuitPython_IRRemote
-Subproject ec11164ec6682094a48d0f9848d2c4c89c08f3b
+Subproject aa4428f304b982aa19a5800822e78c47dc8a3b6
diff --git a/frozen/Adafruit_CircuitPython_LIS3DH b/frozen/Adafruit_CircuitPython_LIS3DH
-Subproject 6298cd363811ad6ac10d4325c898be87a70d7bb
+Subproject a03f9011279f9e630549432589463912831fcee
diff --git a/frozen/Adafruit_CircuitPython_Motor b/frozen/Adafruit_CircuitPython_Motor
-Subproject 4421e79661002ff8da6c0c4f22940ec843ee300
+Subproject a8894480283e3b81f39a3db5716b443963abc56
diff --git a/frozen/Adafruit_CircuitPython_NeoPixel b/frozen/Adafruit_CircuitPython_NeoPixel
-Subproject 72e8f3855ecd136641d536a49311c38ee4f76f3
+Subproject 6e35cd2b40575a20e2904b096508325cef4a71d
diff --git a/frozen/Adafruit_CircuitPython_Thermistor b/frozen/Adafruit_CircuitPython_Thermistor
-Subproject eae584918e72ff5fa323825470f276b31829ef9
+Subproject 893c5ec6a9aeef38284985074c2058e87754ad3
diff --git a/frozen/Adafruit_CircuitPython_seesaw b/frozen/Adafruit_CircuitPython_seesaw
-Subproject c92c22ff029ee05bd392299cf25887e9af48903
+Subproject 2df8a671a5a3d055b75df278fb354b558718b56
diff --git a/lib/tinyusb b/lib/tinyusb
-Subproject 29b49199beb8e9b5fead83e5cd36105f8746f1d
+Subproject 55874813f82157b7509729b1a0c66e68f86e2d0
diff --git a/lib/utils/pyexec.c b/lib/utils/pyexec.c
index e637fe544..e8a1983b0 100755
--- a/lib/utils/pyexec.c
+++ b/lib/utils/pyexec.c
@@ -89,6 +89,9 @@ STATIC int parse_compile_execute(const void *source, mp_parse_input_kind_t input
}
// source is a lexer, parse and compile the script
qstr source_name = lex->source_name;
+ if (input_kind == MP_PARSE_FILE_INPUT) {
+ mp_store_global(MP_QSTR___file__, MP_OBJ_NEW_QSTR(source_name));
+ }
mp_parse_tree_t parse_tree = mp_parse(lex, input_kind);
module_fun = mp_compile(&parse_tree, source_name, MP_EMIT_OPT_NONE, exec_flags & EXEC_FLAG_IS_REPL);
// Clear the parse tree because it has a heap pointer we don't need anymore.
diff --git a/locale/ID.po b/locale/ID.po
index 2c2712561..4757b8cc1 100644
--- a/locale/ID.po
+++ b/locale/ID.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-02-15 19:19-0500\n"
+"POT-Creation-Date: 2019-02-17 23:36-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -1336,7 +1336,7 @@ msgstr ""
msgid "3-arg pow() not supported"
msgstr ""
-#: py/modbuiltins.c:517
+#: py/modbuiltins.c:521
msgid "must use keyword argument for key function"
msgstr ""
@@ -2709,7 +2709,7 @@ msgstr "Baudrate tidak didukung"
msgid "Group full"
msgstr ""
-#: shared-module/displayio/Group.c:73
+#: shared-module/displayio/Group.c:73 shared-module/displayio/Group.c:112
msgid "Layer must be a Group or TileGrid subclass."
msgstr ""
@@ -2843,45 +2843,45 @@ msgid ""
"exit safe mode.\n"
msgstr ""
-#, fuzzy
-#~ msgid "buffer_size must be >= 1"
-#~ msgstr "buffers harus mempunyai panjang yang sama"
-
-#, fuzzy
-#~ msgid "unicode_characters must be a string"
-#~ msgstr "keyword harus berupa string"
-
-#~ msgid "All PWM peripherals are in use"
-#~ msgstr "Semua perangkat PWM sedang digunakan"
+#~ msgid "Not enough pins available"
+#~ msgstr "Pin yang tersedia tidak cukup"
-#~ msgid "Invalid UUID string length"
-#~ msgstr "Panjang string UUID tidak valid"
+#~ msgid "busio.UART not available"
+#~ msgstr "busio.UART tidak tersedia"
#~ msgid ""
-#~ "enough power for the whole circuit and press reset (after ejecting "
-#~ "CIRCUITPY).\n"
+#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n"
#~ msgstr ""
-#~ "tegangan cukup untuk semua sirkuit dan tekan reset (setelah mencabut "
-#~ "CIRCUITPY).\n"
+#~ "Silahkan taruh masalah disini dengan isi dari CIRCUITPY drive: anda \n"
-#~ msgid "Invalid UUID parameter"
-#~ msgstr "Parameter UUID tidak valid"
+#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
+#~ msgstr ""
+#~ "Sepertinya inti kode CircuitPython kita crash dengan sangat keras. Ups!\n"
#, fuzzy
#~ msgid "unpack requires a buffer of %d bytes"
#~ msgstr "Gagal untuk megalokasikan buffer RX dari %d byte"
-#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
-#~ msgstr ""
-#~ "Sepertinya inti kode CircuitPython kita crash dengan sangat keras. Ups!\n"
+#~ msgid "Invalid UUID parameter"
+#~ msgstr "Parameter UUID tidak valid"
#~ msgid ""
-#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n"
+#~ "enough power for the whole circuit and press reset (after ejecting "
+#~ "CIRCUITPY).\n"
#~ msgstr ""
-#~ "Silahkan taruh masalah disini dengan isi dari CIRCUITPY drive: anda \n"
+#~ "tegangan cukup untuk semua sirkuit dan tekan reset (setelah mencabut "
+#~ "CIRCUITPY).\n"
-#~ msgid "busio.UART not available"
-#~ msgstr "busio.UART tidak tersedia"
+#~ msgid "Invalid UUID string length"
+#~ msgstr "Panjang string UUID tidak valid"
-#~ msgid "Not enough pins available"
-#~ msgstr "Pin yang tersedia tidak cukup"
+#~ msgid "All PWM peripherals are in use"
+#~ msgstr "Semua perangkat PWM sedang digunakan"
+
+#, fuzzy
+#~ msgid "unicode_characters must be a string"
+#~ msgstr "keyword harus berupa string"
+
+#, fuzzy
+#~ msgid "buffer_size must be >= 1"
+#~ msgstr "buffers harus mempunyai panjang yang sama"
diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot
index b1788fc9e..d61ded2a2 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: 2019-02-15 19:19-0500\n"
+"POT-Creation-Date: 2019-02-17 23:36-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -1302,7 +1302,7 @@ msgstr ""
msgid "3-arg pow() not supported"
msgstr ""
-#: py/modbuiltins.c:517
+#: py/modbuiltins.c:521
msgid "must use keyword argument for key function"
msgstr ""
@@ -2667,7 +2667,7 @@ msgstr ""
msgid "Group full"
msgstr ""
-#: shared-module/displayio/Group.c:73
+#: shared-module/displayio/Group.c:73 shared-module/displayio/Group.c:112
msgid "Layer must be a Group or TileGrid subclass."
msgstr ""
diff --git a/locale/de_DE.po b/locale/de_DE.po
index a3cd82c0a..750e0d41a 100644
--- a/locale/de_DE.po
+++ b/locale/de_DE.po
@@ -7,10 +7,10 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-02-15 19:19-0500\n"
+"POT-Creation-Date: 2019-02-17 23:36-0500\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
-"Last-Translator: Sebastian Plamauer\n"
-"Language-Team: \n"
+"Last-Translator: Pascal Deneaux\n"
+"Language-Team: Sebastian Plamauer, Pascal Deneaux\n"
"Language: en_US\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -69,11 +69,11 @@ msgstr "eine nicht-hex zahl wurde gefunden"
#: extmod/modubinascii.c:169
msgid "incorrect padding"
-msgstr "falsches padding"
+msgstr "padding ist inkorrekt"
#: extmod/moductypes.c:122
msgid "syntax error in uctypes descriptor"
-msgstr "Syntaxfehler in uctypes Definition"
+msgstr "Syntaxfehler in uctypes Deskriptor"
#: extmod/moductypes.c:219
msgid "Cannot unambiguously get sizeof scalar"
@@ -103,11 +103,11 @@ msgstr "leerer heap"
msgid "syntax error in JSON"
msgstr "Syntaxfehler in JSON"
-#: extmod/modure.c:265
+#: extmod/modure.c:161
msgid "Splitting with sub-captures"
-msgstr "Teilen mit unter-captures"
+msgstr ""
-#: extmod/modure.c:428
+#: extmod/modure.c:207
msgid "Error in regex"
msgstr "Fehler in regex"
@@ -155,19 +155,19 @@ msgstr "kompilieren von Skripten ist nicht unterstützt"
msgid " output:\n"
msgstr " Ausgabe:\n"
-#: main.c:166 main.c:250
+#: main.c:166 main.c:247
msgid ""
"Auto-reload is on. Simply save files over USB to run them or enter REPL to "
"disable.\n"
msgstr ""
"Automatisches Neuladen ist aktiv. Speichere Dateien über USB um sie "
-"auszuführen oder verbinde dich mit der REPL zum deaktivieren.\n"
+"auszuführen oder verbinde dich mit der REPL zum Deaktivieren.\n"
#: main.c:168
msgid "Running in safe mode! Auto-reload is off.\n"
msgstr "Sicherheitsmodus aktiv! Automatisches Neuladen ist deaktiviert.\n"
-#: main.c:170 main.c:252
+#: main.c:170 main.c:249
msgid "Auto-reload is off.\n"
msgstr "Automatisches Neuladen ist deaktiviert.\n"
@@ -180,19 +180,19 @@ msgid "WARNING: Your code filename has two extensions\n"
msgstr ""
"WARNUNG: Der Dateiname deines Programms hat zwei Dateityperweiterungen\n"
-#: main.c:223
+#: main.c:221
msgid ""
"\n"
"Code done running. Waiting for reload.\n"
msgstr ""
+"\n"
+"Der Code wurde ausgeführt. Warte auf reload.\n"
-#: main.c:257
+#: main.c:254
msgid "Press any key to enter the REPL. Use CTRL-D to reload."
-msgstr ""
-"Drücke eine Taste um dich mit der REPL zu verbinden. Drücke Strg-D zum neu "
-"laden"
+msgstr "Drücke eine Taste um dich mit der REPL zu verbinden. Drücke Strg-D zum neu laden"
-#: main.c:422
+#: main.c:419
msgid "soft reboot\n"
msgstr "soft reboot\n"
@@ -320,7 +320,11 @@ msgstr "Alle event Kanäle werden benutzt"
msgid "Sample rate too high. It must be less than %d"
msgstr "Abtastrate zu hoch. Wert muss unter %d liegen"
-#: ports/atmel-samd/common-hal/busio/I2C.c:74
+#: ports/atmel-samd/common-hal/busio/I2C.c:71
+msgid "Not enough pins available"
+msgstr "Nicht genug Pins vorhanden"
+
+#: ports/atmel-samd/common-hal/busio/I2C.c:78
#: ports/atmel-samd/common-hal/busio/SPI.c:176
#: ports/atmel-samd/common-hal/busio/UART.c:120
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c:45
@@ -328,11 +332,11 @@ msgstr "Abtastrate zu hoch. Wert muss unter %d liegen"
msgid "Invalid pins"
msgstr "Ungültige Pins"
-#: ports/atmel-samd/common-hal/busio/I2C.c:97
+#: ports/atmel-samd/common-hal/busio/I2C.c:101
msgid "SDA or SCL needs a pull up"
msgstr "SDA oder SCL brauchen pull up"
-#: ports/atmel-samd/common-hal/busio/I2C.c:117
+#: ports/atmel-samd/common-hal/busio/I2C.c:121
msgid "Unsupported baudrate"
msgstr "Baudrate wird nicht unterstützt"
@@ -341,12 +345,12 @@ msgid "bytes > 8 bits not supported"
msgstr "bytes mit mehr als 8 bits werden nicht unterstützt"
#: ports/atmel-samd/common-hal/busio/UART.c:73
-#: ports/nrf/common-hal/busio/UART.c:149
+#: ports/nrf/common-hal/busio/UART.c:91
msgid "tx and rx cannot both be None"
msgstr "tx und rx können nicht beide None sein"
#: ports/atmel-samd/common-hal/busio/UART.c:146
-#: ports/nrf/common-hal/busio/UART.c:188
+#: ports/nrf/common-hal/busio/UART.c:132
msgid "Failed to allocate RX buffer"
msgstr "Konnte keinen RX Buffer allozieren"
@@ -354,13 +358,13 @@ msgstr "Konnte keinen RX Buffer allozieren"
msgid "Could not initialize UART"
msgstr "Konnte UART nicht initialisieren"
-#: ports/atmel-samd/common-hal/busio/UART.c:252
-#: ports/nrf/common-hal/busio/UART.c:230
+#: ports/atmel-samd/common-hal/busio/UART.c:241
+#: ports/nrf/common-hal/busio/UART.c:174
msgid "No RX pin"
msgstr "Kein RX Pin"
-#: ports/atmel-samd/common-hal/busio/UART.c:311
-#: ports/nrf/common-hal/busio/UART.c:265
+#: ports/atmel-samd/common-hal/busio/UART.c:300
+#: ports/nrf/common-hal/busio/UART.c:209
msgid "No TX pin"
msgstr "Kein TX Pin"
@@ -488,9 +492,7 @@ msgstr "Minimale PWM Frequenz ist %dHz"
#: ports/esp8266/common-hal/pulseio/PWMOut.c:68
#, c-format
msgid "Multiple PWM frequencies not supported. PWM already set to %dhz."
-msgstr ""
-"Mehrere PWM Frequenzen werden nicht unterstützt. PWM wurde bereits auf %dHz "
-"gesetzt."
+msgstr "Mehrere PWM Frequenzen werden nicht unterstützt. PWM wurde bereits auf %dHz gesetzt."
#: ports/esp8266/common-hal/pulseio/PWMOut.c:77 ports/esp8266/machine_pwm.c:70
#, c-format
@@ -507,8 +509,7 @@ msgstr "Dateisystem kann nicht wieder gemounted werden."
#: ports/esp8266/common-hal/storage/__init__.c:38
msgid "Use esptool to erase flash and re-upload Python instead"
-msgstr ""
-"Benutze esptool um den flash zu löschen und stattdessen Python hochzuladen"
+msgstr "Benutze das esptool um den flash zu löschen und Python erneut hochzuladen"
#: ports/esp8266/esp_mphal.c:154
msgid "C-level assert"
@@ -564,8 +565,7 @@ msgstr "len muss ein vielfaches von 4 sein"
#: ports/esp8266/modesp.c:274
#, c-format
msgid "memory allocation failed, allocating %u bytes for native code"
-msgstr ""
-"Speicherallozierung fehlgeschlagen, alloziere %u Bytes für nativen Code"
+msgstr "Speicherallozierung fehlgeschlagen, alloziere %u Bytes für nativen Code"
#: ports/esp8266/modesp.c:317
msgid "flash location must be below 1MByte"
@@ -829,23 +829,26 @@ msgstr "Alle I2C-Peripheriegeräte sind in Benutzung"
msgid "All SPI peripherals are in use"
msgstr "Alle SPI-Peripheriegeräte sind in Benutzung"
-#: ports/nrf/common-hal/busio/UART.c:47
+#: ports/nrf/common-hal/busio/UART.c:49
#, c-format
msgid "error = 0x%08lX"
msgstr "error = 0x%08lX"
-#: ports/nrf/common-hal/busio/UART.c:145
-#, fuzzy
-msgid "All UART peripherals are in use"
-msgstr "Alle I2C-Peripheriegeräte sind in Benutzung"
-
-#: ports/nrf/common-hal/busio/UART.c:153
+#: ports/nrf/common-hal/busio/UART.c:95
msgid "Invalid buffer size"
msgstr "Ungültige Puffergröße"
-#: ports/nrf/common-hal/busio/UART.c:157
+#: ports/nrf/common-hal/busio/UART.c:99
msgid "Odd parity is not supported"
-msgstr "Ungerade Parität wird nicht unterstützt"
+msgstr "Eine ungerade Parität wird nicht unterstützt"
+
+#: ports/nrf/common-hal/busio/UART.c:335 ports/nrf/common-hal/busio/UART.c:339
+#: ports/nrf/common-hal/busio/UART.c:344 ports/nrf/common-hal/busio/UART.c:349
+#: ports/nrf/common-hal/busio/UART.c:355 ports/nrf/common-hal/busio/UART.c:360
+#: ports/nrf/common-hal/busio/UART.c:365 ports/nrf/common-hal/busio/UART.c:369
+#: ports/nrf/common-hal/busio/UART.c:377
+msgid "busio.UART not available"
+msgstr "busio.UART nicht verfügbar"
#: ports/nrf/common-hal/microcontroller/Processor.c:48
msgid "Cannot get temperature"
@@ -865,12 +868,12 @@ msgstr "ffi_prep_closure_loc"
#: ports/unix/modffi.c:413
msgid "Don't know how to pass object to native function"
-msgstr ""
+msgstr "Ich weiß nicht, wie man das Objekt an die native Funktion übergeben kann"
#: ports/unix/modusocket.c:474
#, c-format
msgid "[addrinfo error %d]"
-msgstr ""
+msgstr "[addrinfo error %d]"
#: py/argcheck.c:53
msgid "function does not take keyword arguments"
@@ -879,8 +882,7 @@ msgstr "Funktion akzeptiert keine Keyword-Argumente"
#: py/argcheck.c:63 py/bc.c:85 py/objnamedtuple.c:108
#, c-format
msgid "function takes %d positional arguments but %d were given"
-msgstr ""
-"Funktion nimmt %d Argumente ohne Keyword an, aber es wurden %d angegeben"
+msgstr "Funktion nimmt %d Argumente ohne Keyword an, aber es wurden %d angegeben"
#: py/argcheck.c:73
#, c-format
@@ -910,8 +912,7 @@ msgstr "Anzahl/Type der Argumente passen nicht"
#: py/argcheck.c:156
msgid "keyword argument(s) not yet implemented - use normal args instead"
-msgstr ""
-"Keyword-Argument(e) noch nicht implementiert - verwenden Sie stattdessen "
+msgstr "Keyword-Argument(e) noch nicht implementiert - verwenden Sie stattdessen "
"normale Argumente"
#: py/bc.c:88 py/objnamedtuple.c:112
@@ -949,11 +950,11 @@ msgstr "Funktion vermisst Keyword-only-Argument"
#: py/binary.c:112
msgid "bad typecode"
-msgstr ""
+msgstr "schlechter typecode"
#: py/builtinevex.c:99
msgid "bad compile mode"
-msgstr ""
+msgstr "schlechter compile mode"
#: py/builtinhelp.c:137
msgid "Plus any modules on the filesystem\n"
@@ -1147,56 +1148,56 @@ msgstr ""
#: py/emitinlinethumb.c:188 py/emitinlinethumb.c:230
#, c-format
msgid "'%s' expects at most r%d"
-msgstr ""
+msgstr "'%s' erwartet höchstens r%d"
#: py/emitinlinethumb.c:197 py/emitinlinextensa.c:162
#, c-format
msgid "'%s' expects a register"
-msgstr ""
+msgstr "'%s' erwartet ein Register"
#: py/emitinlinethumb.c:211
#, c-format
msgid "'%s' expects a special register"
-msgstr ""
+msgstr "'%s' erwartet ein Spezialregister"
#: py/emitinlinethumb.c:239
#, c-format
msgid "'%s' expects an FPU register"
-msgstr ""
+msgstr "'%s' erwartet ein FPU-Register"
#: py/emitinlinethumb.c:292
#, c-format
msgid "'%s' expects {r0, r1, ...}"
-msgstr ""
+msgstr "'%s' erwartet {r0, r1, ...}"
#: py/emitinlinethumb.c:299 py/emitinlinextensa.c:169
#, c-format
msgid "'%s' expects an integer"
-msgstr ""
+msgstr "'%s' erwartet ein Integer"
#: py/emitinlinethumb.c:304
#, c-format
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
-msgstr ""
+msgstr "'%s' Integer 0x%x passt nicht in Maske 0x%x"
#: py/emitinlinethumb.c:328
#, c-format
msgid "'%s' expects an address of the form [a, b]"
-msgstr ""
+msgstr "'%s' erwartet eine Adresse in der Form [a, b]"
#: py/emitinlinethumb.c:334 py/emitinlinextensa.c:182
#, c-format
msgid "'%s' expects a label"
-msgstr ""
+msgstr "'%s' erwartet ein Label"
#: py/emitinlinethumb.c:345 py/emitinlinextensa.c:193
msgid "label '%q' not defined"
-msgstr ""
+msgstr "Label '%q' nicht definiert"
#: py/emitinlinethumb.c:806
#, c-format
msgid "unsupported Thumb instruction '%s' with %d arguments"
-msgstr ""
+msgstr "nicht unterstützter Thumb-Befehl '%s' mit %d Argumenten"
#: py/emitinlinethumb.c:810
msgid "branch not in range"
@@ -1204,11 +1205,11 @@ msgstr "Zweig ist außerhalb der Reichweite"
#: py/emitinlinextensa.c:86
msgid "can only have up to 4 parameters to Xtensa assembly"
-msgstr ""
+msgstr "kann nur bis zu 4 Parameter für die Xtensa assembly haben"
#: py/emitinlinextensa.c:91 py/emitinlinextensa.c:96
msgid "parameters must be registers in sequence a2 to a5"
-msgstr ""
+msgstr "Die Parameter müssen Register der Reihenfolge a2 bis a5 sein"
#: py/emitinlinextensa.c:174
#, c-format
@@ -1262,19 +1263,19 @@ msgstr ""
#: py/emitnative.c:1540
msgid "can't implicitly convert '%q' to 'bool'"
-msgstr ""
+msgstr "Kann '%q' nicht implizit nach 'bool' konvertieren"
#: py/emitnative.c:1774
msgid "unary op %q not implemented"
-msgstr ""
+msgstr "Der unäre Operator %q ist nicht implementiert"
#: py/emitnative.c:1930
msgid "binary op %q not implemented"
-msgstr ""
+msgstr "Der binäre Operator %q ist nicht implementiert"
#: py/emitnative.c:1951
msgid "can't do binary op between '%q' and '%q'"
-msgstr ""
+msgstr "Eine binäre Operation zwischen '%q' und '%q' ist nicht möglich"
#: py/emitnative.c:2126
msgid "casting"
@@ -1298,51 +1299,51 @@ msgstr ""
#: py/modbuiltins.c:162
msgid "chr() arg not in range(0x110000)"
-msgstr ""
+msgstr "chr() arg ist nicht in range(0x110000)"
#: py/modbuiltins.c:171
msgid "chr() arg not in range(256)"
-msgstr ""
+msgstr "chr() arg ist nicht in range(256)"
#: py/modbuiltins.c:285
msgid "arg is an empty sequence"
-msgstr ""
+msgstr "arg ist eine leere Sequenz"
#: py/modbuiltins.c:350
msgid "ord expects a character"
-msgstr ""
+msgstr "ord erwartet ein Zeichen"
#: py/modbuiltins.c:353
#, c-format
msgid "ord() expected a character, but string of length %d found"
-msgstr ""
+msgstr "ord() erwartet ein Zeichen aber es wurde eine Zeichenfolge mit Länge %d gefunden"
#: py/modbuiltins.c:363
msgid "3-arg pow() not supported"
-msgstr ""
+msgstr "3-arg pow() wird nicht unterstützt"
#: py/modbuiltins.c:517
msgid "must use keyword argument for key function"
-msgstr ""
+msgstr "muss Schlüsselwortargument für key function verwenden"
#: py/modmath.c:41 shared-bindings/math/__init__.c:53
msgid "math domain error"
-msgstr ""
+msgstr "math domain error"
#: py/modmath.c:196 py/objfloat.c:270 py/objint_longlong.c:222
#: py/objint_mpz.c:230 py/runtime.c:619 shared-bindings/math/__init__.c:346
msgid "division by zero"
-msgstr ""
+msgstr "Division durch Null"
#: py/modmicropython.c:155
msgid "schedule stack full"
-msgstr ""
+msgstr "Der schedule stack ist voll"
#: py/modstruct.c:148 py/modstruct.c:156 py/modstruct.c:244 py/modstruct.c:254
#: shared-bindings/struct/__init__.c:102 shared-bindings/struct/__init__.c:161
#: shared-module/struct/__init__.c:128 shared-module/struct/__init__.c:183
msgid "buffer too small"
-msgstr "Puffer zu klein"
+msgstr "Der Puffer ist zu klein"
#: py/modthread.c:240
msgid "expecting a dict for keyword args"
@@ -1366,7 +1367,7 @@ msgstr "Datei existiert"
#: py/moduerrno.c:152
msgid "Unsupported operation"
-msgstr "Nicht unterstützter Vorgang"
+msgstr "Nicht unterstützte Operation"
#: py/moduerrno.c:153
msgid "Invalid argument"
@@ -1374,7 +1375,7 @@ msgstr "Ungültiges Argument"
#: py/moduerrno.c:154
msgid "No space left on device"
-msgstr ""
+msgstr "Kein Speicherplatz auf Gerät"
#: py/obj.c:92
msgid "Traceback (most recent call last):\n"
@@ -1390,7 +1391,7 @@ msgstr " Datei \"%q\""
#: py/obj.c:102
msgid ", in %q\n"
-msgstr ""
+msgstr ", in %q\n"
#: py/obj.c:259
msgid "can't convert to int"
@@ -1489,7 +1490,7 @@ msgstr "'%s' Objekt unterstützt keine item assignment"
msgid "object with buffer protocol required"
msgstr "Objekt mit Pufferprotokoll (buffer protocol) erforderlich"
-#: py/objarray.c:413 py/objstr.c:437 py/objstrunicode.c:211 py/objtuple.c:188
+#: py/objarray.c:413 py/objstr.c:428 py/objstrunicode.c:191 py/objtuple.c:188
#: shared-bindings/nvm/ByteArray.c:85
msgid "only slices with step=1 (aka None) are supported"
msgstr ""
@@ -1552,24 +1553,24 @@ msgstr ""
#: py/objint.c:144
msgid "can't convert inf to int"
-msgstr ""
+msgstr "kann inf nicht nach int konvertieren"
#: py/objint.c:146
msgid "can't convert NaN to int"
-msgstr ""
+msgstr "kann NaN nicht nach int konvertieren"
#: py/objint.c:163
msgid "float too big"
-msgstr ""
+msgstr "float zu groß"
#: py/objint.c:328
msgid "long int not supported in this build"
-msgstr ""
+msgstr "long int wird in diesem Build nicht unterstützt"
#: py/objint.c:334 py/objint.c:340 py/objint.c:350 py/objint.c:358
#: py/sequence.c:41
msgid "small int overflow"
-msgstr ""
+msgstr "small int Überlauf"
#: py/objint_longlong.c:189 py/objint_mpz.c:283 py/runtime.c:486
msgid "negative power with no float support"
@@ -1639,223 +1640,218 @@ msgstr ""
msgid "wrong number of arguments"
msgstr ""
-#: py/objstr.c:414 py/objstrunicode.c:118
-#, fuzzy
-msgid "offset out of bounds"
-msgstr "Modul nicht gefunden"
-
-#: py/objstr.c:477
+#: py/objstr.c:468
msgid "join expects a list of str/bytes objects consistent with self object"
msgstr ""
-#: py/objstr.c:552 py/objstr.c:657 py/objstr.c:1754
+#: py/objstr.c:543 py/objstr.c:648 py/objstr.c:1745
msgid "empty separator"
msgstr ""
-#: py/objstr.c:651
+#: py/objstr.c:642
msgid "rsplit(None,n)"
msgstr ""
-#: py/objstr.c:723
+#: py/objstr.c:714
msgid "substring not found"
msgstr ""
-#: py/objstr.c:780
+#: py/objstr.c:771
msgid "start/end indices"
msgstr ""
-#: py/objstr.c:941
+#: py/objstr.c:932
msgid "bad format string"
msgstr ""
-#: py/objstr.c:963
+#: py/objstr.c:954
msgid "single '}' encountered in format string"
msgstr ""
-#: py/objstr.c:1002
+#: py/objstr.c:993
msgid "bad conversion specifier"
msgstr ""
-#: py/objstr.c:1006
+#: py/objstr.c:997
msgid "end of format while looking for conversion specifier"
msgstr ""
-#: py/objstr.c:1008
+#: py/objstr.c:999
#, c-format
msgid "unknown conversion specifier %c"
msgstr ""
-#: py/objstr.c:1039
+#: py/objstr.c:1030
msgid "unmatched '{' in format"
msgstr ""
-#: py/objstr.c:1046
+#: py/objstr.c:1037
msgid "expected ':' after format specifier"
msgstr ""
-#: py/objstr.c:1060
+#: py/objstr.c:1051
msgid ""
"can't switch from automatic field numbering to manual field specification"
msgstr ""
-#: py/objstr.c:1065 py/objstr.c:1093
+#: py/objstr.c:1056 py/objstr.c:1084
msgid "tuple index out of range"
msgstr ""
-#: py/objstr.c:1081
+#: py/objstr.c:1072
msgid "attributes not supported yet"
msgstr ""
-#: py/objstr.c:1089
+#: py/objstr.c:1080
msgid ""
"can't switch from manual field specification to automatic field numbering"
msgstr ""
-#: py/objstr.c:1181
+#: py/objstr.c:1172
msgid "invalid format specifier"
msgstr ""
-#: py/objstr.c:1202
+#: py/objstr.c:1193
msgid "sign not allowed in string format specifier"
msgstr ""
-#: py/objstr.c:1210
+#: py/objstr.c:1201
msgid "sign not allowed with integer format specifier 'c'"
msgstr ""
-#: py/objstr.c:1269
+#: py/objstr.c:1260
#, c-format
msgid "unknown format code '%c' for object of type '%s'"
msgstr ""
-#: py/objstr.c:1341
+#: py/objstr.c:1332
#, c-format
msgid "unknown format code '%c' for object of type 'float'"
msgstr ""
-#: py/objstr.c:1353
+#: py/objstr.c:1344
msgid "'=' alignment not allowed in string format specifier"
msgstr ""
-#: py/objstr.c:1377
+#: py/objstr.c:1368
#, c-format
msgid "unknown format code '%c' for object of type 'str'"
msgstr ""
-#: py/objstr.c:1425
+#: py/objstr.c:1416
msgid "format requires a dict"
msgstr ""
-#: py/objstr.c:1434
+#: py/objstr.c:1425
msgid "incomplete format key"
msgstr ""
-#: py/objstr.c:1492
+#: py/objstr.c:1483
msgid "incomplete format"
msgstr ""
-#: py/objstr.c:1500
+#: py/objstr.c:1491
msgid "not enough arguments for format string"
msgstr ""
-#: py/objstr.c:1510
+#: py/objstr.c:1501
#, c-format
msgid "%%c requires int or char"
msgstr ""
-#: py/objstr.c:1517
+#: py/objstr.c:1508
msgid "integer required"
msgstr ""
-#: py/objstr.c:1580
+#: py/objstr.c:1571
#, c-format
msgid "unsupported format character '%c' (0x%x) at index %d"
msgstr ""
-#: py/objstr.c:1587
+#: py/objstr.c:1578
msgid "not all arguments converted during string formatting"
msgstr ""
-#: py/objstr.c:2112
+#: py/objstr.c:2103
msgid "can't convert to str implicitly"
msgstr ""
-#: py/objstr.c:2116
+#: py/objstr.c:2107
msgid "can't convert '%q' object to %q implicitly"
msgstr ""
-#: py/objstrunicode.c:154
+#: py/objstrunicode.c:134
#, c-format
msgid "string indices must be integers, not %s"
msgstr ""
-#: py/objstrunicode.c:165 py/objstrunicode.c:184
+#: py/objstrunicode.c:145 py/objstrunicode.c:164
msgid "string index out of range"
msgstr ""
-#: py/objtype.c:371
+#: py/objtype.c:368
msgid "__init__() should return None"
msgstr ""
-#: py/objtype.c:373
+#: py/objtype.c:370
#, c-format
msgid "__init__() should return None, not '%s'"
msgstr ""
-#: py/objtype.c:636 py/objtype.c:1290 py/runtime.c:1065
+#: py/objtype.c:633 py/objtype.c:1287 py/runtime.c:1065
msgid "unreadable attribute"
msgstr ""
-#: py/objtype.c:881 py/runtime.c:653
+#: py/objtype.c:878 py/runtime.c:653
msgid "object not callable"
msgstr ""
-#: py/objtype.c:883 py/runtime.c:655
+#: py/objtype.c:880 py/runtime.c:655
#, c-format
msgid "'%s' object is not callable"
msgstr ""
-#: py/objtype.c:991
+#: py/objtype.c:988
msgid "type takes 1 or 3 arguments"
msgstr ""
-#: py/objtype.c:1002
+#: py/objtype.c:999
msgid "cannot create instance"
msgstr ""
-#: py/objtype.c:1004
+#: py/objtype.c:1001
msgid "cannot create '%q' instances"
msgstr ""
-#: py/objtype.c:1062
+#: py/objtype.c:1059
msgid "can't add special method to already-subclassed class"
msgstr ""
-#: py/objtype.c:1106 py/objtype.c:1112
+#: py/objtype.c:1103 py/objtype.c:1109
msgid "type is not an acceptable base type"
msgstr ""
-#: py/objtype.c:1115
+#: py/objtype.c:1112
msgid "type '%q' is not an acceptable base type"
msgstr ""
-#: py/objtype.c:1152
+#: py/objtype.c:1149
msgid "multiple inheritance not supported"
msgstr ""
-#: py/objtype.c:1179
+#: py/objtype.c:1176
msgid "multiple bases have instance lay-out conflict"
msgstr ""
-#: py/objtype.c:1220
+#: py/objtype.c:1217
msgid "first argument to super() must be type"
msgstr ""
-#: py/objtype.c:1385
+#: py/objtype.c:1382
msgid "issubclass() arg 2 must be a class or a tuple of classes"
msgstr ""
-#: py/objtype.c:1399
+#: py/objtype.c:1396
msgid "issubclass() arg 1 must be a class"
msgstr ""
@@ -1977,16 +1973,16 @@ msgstr "'%s' Objekt nicht iterierbar"
#: py/runtime.c:1260 py/runtime.c:1296
msgid "object not an iterator"
-msgstr ""
+msgstr "Objekt ist kein Iterator"
#: py/runtime.c:1262 py/runtime.c:1298
#, c-format
msgid "'%s' object is not an iterator"
-msgstr ""
+msgstr "'%s' Objekt ist kein Iterator"
#: py/runtime.c:1401
msgid "exceptions must derive from BaseException"
-msgstr ""
+msgstr "Exceptions müssen von BaseException abgeleitet sein"
#: py/runtime.c:1430
msgid "cannot import name %q"
@@ -2007,23 +2003,23 @@ msgstr "maximale Rekursionstiefe überschritten"
#: py/sequence.c:273
msgid "object not in sequence"
-msgstr ""
+msgstr "Objekt ist nicht in sequence"
#: py/stream.c:96
msgid "stream operation not supported"
-msgstr ""
+msgstr "stream operation ist nicht unterstützt"
#: py/stream.c:254
msgid "string not supported; use bytes or bytearray"
-msgstr ""
+msgstr "Zeichenfolgen werden nicht unterstützt; Verwenden Sie bytes oder bytearray"
#: py/stream.c:289
msgid "length argument not allowed for this type"
-msgstr ""
+msgstr "Für diesen Typ ist length nicht zulässig"
#: py/vm.c:255
msgid "local variable referenced before assignment"
-msgstr ""
+msgstr "Es wurde versucht auf eine Variable zuzugreifen, die es (noch) nicht gibt. Variablen immer zuerst Zuweisen!"
#: py/vm.c:1142
msgid "no active exception to reraise"
@@ -2163,16 +2159,16 @@ msgstr "Es müssen 8 oder 16 bits_per_sample sein"
msgid ""
"sample_source buffer must be a bytearray or array of type 'h', 'H', 'b' or "
"'B'"
-msgstr ""
+msgstr "sample_source buffer muss ein Bytearray oder ein Array vom Typ 'h', 'H', 'b' oder 'B' sein"
#: shared-bindings/audioio/RawSample.c:101
msgid "buffer must be a bytes-like object"
-msgstr ""
+msgstr "Puffer muss ein bytes-artiges Objekt sein"
#: shared-bindings/audioio/WaveFile.c:78
-#: shared-bindings/displayio/OnDiskBitmap.c:85
+#: shared-bindings/displayio/OnDiskBitmap.c:87
msgid "file must be a file opened in byte mode"
-msgstr ""
+msgstr "Die Datei muss eine im Byte-Modus geöffnete Datei sein"
#: shared-bindings/bitbangio/I2C.c:109 shared-bindings/bitbangio/SPI.c:119
#: shared-bindings/busio/SPI.c:130
@@ -2223,12 +2219,8 @@ msgid "timeout must be >= 0.0"
msgstr "timeout muss >= 0.0 sein"
#: shared-bindings/bleio/CharacteristicBuffer.c:79
-#: shared-bindings/displayio/Group.c:63 shared-bindings/displayio/Group.c:68
-#: shared-bindings/displayio/Group.c:100 shared-bindings/displayio/Shape.c:69
-#: shared-bindings/displayio/Shape.c:73
-#, fuzzy
-msgid "%q must be >= 1"
-msgstr "Puffergröße muss >= 1 sein"
+msgid "%q must be >= 1"
+msgstr "%q muss >= 1 sein"
#: shared-bindings/bleio/CharacteristicBuffer.c:83
msgid "Expected a Characteristic"
@@ -2276,15 +2268,15 @@ msgstr ""
#: shared-bindings/bleio/UUID.c:66
msgid "UUID integer value not in range 0 to 0xffff"
-msgstr ""
+msgstr "UUID-Integer nicht im Bereich 0 bis 0xffff"
#: shared-bindings/bleio/UUID.c:91
msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'"
-msgstr ""
+msgstr "UUID Zeichenfolge ist nicht 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'"
#: shared-bindings/bleio/UUID.c:103
msgid "UUID value is not str, int or byte buffer"
-msgstr ""
+msgstr "Der UUID-Wert ist kein str-, int- oder Byte-Puffer"
#: shared-bindings/bleio/UUID.c:107
msgid "Byte buffer must be 16 bytes."
@@ -2292,7 +2284,7 @@ msgstr "Der Puffer muss 16 Bytes lang sein"
#: shared-bindings/bleio/UUID.c:151
msgid "not a 128-bit UUID"
-msgstr ""
+msgstr "keine 128-bit UUID"
#: shared-bindings/busio/I2C.c:117
msgid "Function requires lock."
@@ -2300,11 +2292,11 @@ msgstr "Die Funktion erwartet, dass der 'lock'-Befehl zuvor ausgeführt wurde"
#: shared-bindings/busio/UART.c:103
msgid "bits must be 7, 8 or 9"
-msgstr ""
+msgstr "bits muss 7, 8 oder 9 sein"
#: shared-bindings/busio/UART.c:115
msgid "stop must be 1 or 2"
-msgstr ""
+msgstr "stop muss 1 oder 2 sein"
#: shared-bindings/busio/UART.c:120
msgid "timeout >100 (units are now seconds, not msecs)"
@@ -2332,15 +2324,6 @@ msgstr ""
msgid "Unsupported pull value."
msgstr ""
-#: shared-bindings/displayio/Bitmap.c:131 shared-bindings/pulseio/PulseIn.c:272
-msgid "Cannot delete values"
-msgstr ""
-
-#: shared-bindings/displayio/Bitmap.c:139 shared-bindings/displayio/Group.c:253
-#: shared-bindings/pulseio/PulseIn.c:278
-msgid "Slices not supported"
-msgstr ""
-
#: shared-bindings/displayio/Bitmap.c:156
msgid "pixel coordinates out of bounds"
msgstr ""
@@ -2353,55 +2336,59 @@ msgstr ""
msgid "%q should be an int"
msgstr ""
-#: shared-bindings/displayio/ColorConverter.c:70
+#: shared-bindings/displayio/ColorConverter.c:72
msgid "color should be an int"
msgstr ""
-#: shared-bindings/displayio/Display.c:129
+#: shared-bindings/displayio/Display.c:131
msgid "Display rotation must be in 90 degree increments"
msgstr ""
-#: shared-bindings/displayio/Display.c:141
+#: shared-bindings/displayio/Display.c:143
msgid "Too many displays"
msgstr ""
-#: shared-bindings/displayio/Display.c:165
+#: shared-bindings/displayio/Display.c:167
msgid "Must be a Group subclass."
msgstr ""
-#: shared-bindings/displayio/Display.c:207
-#: shared-bindings/displayio/Display.c:217
+#: shared-bindings/displayio/Display.c:209
+#: shared-bindings/displayio/Display.c:219
msgid "Brightness not adjustable"
msgstr ""
-#: shared-bindings/displayio/FourWire.c:91
-#: shared-bindings/displayio/ParallelBus.c:96
+#: shared-bindings/displayio/FourWire.c:93
+#: shared-bindings/displayio/ParallelBus.c:98
msgid "Too many display busses"
msgstr ""
-#: shared-bindings/displayio/FourWire.c:107
-#: shared-bindings/displayio/ParallelBus.c:111
+#: shared-bindings/displayio/FourWire.c:109
+#: shared-bindings/displayio/ParallelBus.c:113
msgid "Command must be an int between 0 and 255"
msgstr ""
-#: shared-bindings/displayio/Palette.c:91
+#: shared-bindings/displayio/Group.c:62
+msgid "Group must have size at least 1"
+msgstr ""
+
+#: shared-bindings/displayio/Palette.c:93
msgid "color buffer must be a bytearray or array of type 'b' or 'B'"
msgstr ""
-#: shared-bindings/displayio/Palette.c:97
+#: shared-bindings/displayio/Palette.c:99
msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)"
msgstr ""
-#: shared-bindings/displayio/Palette.c:101
+#: shared-bindings/displayio/Palette.c:103
msgid "color must be between 0x000000 and 0xffffff"
msgstr ""
-#: shared-bindings/displayio/Palette.c:105
+#: shared-bindings/displayio/Palette.c:107
msgid "color buffer must be a buffer or int"
msgstr ""
-#: shared-bindings/displayio/Palette.c:118
-#: shared-bindings/displayio/Palette.c:132
+#: shared-bindings/displayio/Palette.c:120
+#: shared-bindings/displayio/Palette.c:134
msgid "palette_index should be an int"
msgstr ""
@@ -2409,11 +2396,11 @@ msgstr ""
msgid "y should be an int"
msgstr ""
-#: shared-bindings/displayio/Shape.c:101
+#: shared-bindings/displayio/Shape.c:92
msgid "start_x should be an int"
msgstr ""
-#: shared-bindings/displayio/Shape.c:105
+#: shared-bindings/displayio/Shape.c:96
msgid "end_x should be an int"
msgstr ""
@@ -2421,25 +2408,25 @@ msgstr ""
msgid "position must be 2-tuple"
msgstr ""
-#: shared-bindings/displayio/TileGrid.c:115
+#: shared-bindings/displayio/TileGrid.c:117
msgid "unsupported bitmap type"
msgstr "Nicht unterstützter Bitmap-Typ"
-#: shared-bindings/displayio/TileGrid.c:126
+#: shared-bindings/displayio/TileGrid.c:128
msgid "Tile width must exactly divide bitmap width"
msgstr ""
-#: shared-bindings/displayio/TileGrid.c:129
+#: shared-bindings/displayio/TileGrid.c:131
msgid "Tile height must exactly divide bitmap height"
msgstr ""
-#: shared-bindings/displayio/TileGrid.c:196
+#: shared-bindings/displayio/TileGrid.c:198
msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
msgstr ""
#: shared-bindings/gamepad/GamePad.c:100
msgid "too many arguments"
-msgstr ""
+msgstr "zu viele Argumente"
#: shared-bindings/gamepad/GamePad.c:104
msgid "expected a DigitalInOut"
@@ -2447,73 +2434,84 @@ msgstr ""
#: shared-bindings/i2cslave/I2CSlave.c:95
msgid "can't convert address to int"
-msgstr ""
+msgstr "kann Adresse nicht in int konvertieren"
#: shared-bindings/i2cslave/I2CSlave.c:98
msgid "address out of bounds"
-msgstr ""
+msgstr "Adresse außerhalb der Grenzen"
#: shared-bindings/i2cslave/I2CSlave.c:104
msgid "addresses is empty"
-msgstr ""
+msgstr "adresses ist leer"
#: shared-bindings/microcontroller/Pin.c:89
#: shared-bindings/neopixel_write/__init__.c:67
#: shared-bindings/pulseio/PulseOut.c:76
#: shared-bindings/terminalio/Terminal.c:63
-#: shared-bindings/terminalio/Terminal.c:68
msgid "Expected a %q"
-msgstr ""
+msgstr "Erwartet ein(e) %q"
#: shared-bindings/microcontroller/Pin.c:100
msgid "%q in use"
-msgstr ""
+msgstr "%q in Benutzung"
#: shared-bindings/microcontroller/__init__.c:126
msgid "Invalid run mode."
-msgstr ""
+msgstr "Ungültiger Ausführungsmodus"
#: shared-bindings/multiterminal/__init__.c:68
msgid "Stream missing readinto() or write() method."
-msgstr ""
+msgstr "Stream fehlt readinto() oder write() Methode."
#: shared-bindings/nvm/ByteArray.c:99
msgid "Slice and value different lengths."
-msgstr ""
+msgstr "Slice und Wert (value) haben unterschiedliche Längen."
#: shared-bindings/nvm/ByteArray.c:104
msgid "Array values should be single bytes."
-msgstr ""
+msgstr "Array-Werte sollten aus Einzelbytes bestehen."
#: shared-bindings/nvm/ByteArray.c:111 shared-bindings/nvm/ByteArray.c:141
msgid "Unable to write to nvm."
-msgstr ""
+msgstr "Schreiben in nvm nicht möglich."
#: shared-bindings/nvm/ByteArray.c:137
msgid "Bytes must be between 0 and 255."
-msgstr ""
+msgstr "Ein Bytes kann nur Werte zwischen 0 und 255 annehmen."
#: shared-bindings/os/__init__.c:200
msgid "No hardware random available"
-msgstr ""
+msgstr "Kein hardware random verfügbar"
#: shared-bindings/pulseio/PWMOut.c:117
msgid "All timers for this pin are in use"
-msgstr "Alle timer für diesen Pin werden benutzt"
+msgstr "Alle timer für diesen Pin werden bereits benutzt"
#: shared-bindings/pulseio/PWMOut.c:171
msgid ""
"PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)"
-msgstr ""
+msgstr "PWM duty_cycle muss zwischen 0 und 65535 (16 Bit Auflösung) liegen"
#: shared-bindings/pulseio/PWMOut.c:202
msgid ""
"PWM frequency not writable when variable_frequency is False on construction."
-msgstr ""
+msgstr "Die PWM-Frequenz ist nicht schreibbar wenn variable_Frequenz = False."
+
+#: shared-bindings/pulseio/PulseIn.c:272
+msgid "Cannot delete values"
+msgstr "Kann Werte nicht löschen"
+
+#: shared-bindings/pulseio/PulseIn.c:278
+msgid "Slices not supported"
+msgstr "Slices werden nicht unterstützt"
+
+#: shared-bindings/pulseio/PulseIn.c:284
+msgid "index must be int"
+msgstr "index muss ein int sein"
-#: shared-bindings/pulseio/PulseIn.c:285
+#: shared-bindings/pulseio/PulseIn.c:290
msgid "Read-only"
-msgstr ""
+msgstr "Nur lesen möglich, da Schreibgeschützt"
#: shared-bindings/pulseio/PulseOut.c:135
msgid "Array must contain halfwords (type 'H')"
@@ -2521,28 +2519,28 @@ msgstr ""
#: shared-bindings/random/__init__.c:92 shared-bindings/random/__init__.c:100
msgid "stop not reachable from start"
-msgstr ""
+msgstr "stop ist von start aus nicht erreichbar"
#: shared-bindings/random/__init__.c:111
msgid "step must be non-zero"
-msgstr ""
+msgstr "Schritt (step) darf nicht Null sein"
#: shared-bindings/random/__init__.c:114
msgid "invalid step"
-msgstr ""
+msgstr "ungültiger Schritt (step)"
#: shared-bindings/random/__init__.c:146
msgid "empty sequence"
-msgstr ""
+msgstr "leere Sequenz"
#: shared-bindings/rtc/RTC.c:40 shared-bindings/rtc/RTC.c:44
#: shared-bindings/time/__init__.c:190
msgid "RTC is not supported on this board"
-msgstr ""
+msgstr "Eine RTC wird auf diesem Board nicht unterstützt"
#: shared-bindings/rtc/RTC.c:52
msgid "RTC calibration is not supported on this board"
-msgstr ""
+msgstr "Die RTC-Kalibrierung wird auf diesem Board nicht unterstützt"
#: shared-bindings/socket/__init__.c:516 shared-module/network/__init__.c:81
msgid "no available NIC"
@@ -2550,15 +2548,20 @@ msgstr ""
#: shared-bindings/storage/__init__.c:77
msgid "filesystem must provide mount method"
-msgstr ""
+msgstr "Das Dateisystem muss eine Mount-Methode bereitstellen"
#: shared-bindings/supervisor/__init__.c:93
msgid "Brightness must be between 0 and 255"
-msgstr ""
+msgstr "Die Helligkeit muss zwischen 0 und 255 liegen"
#: shared-bindings/supervisor/__init__.c:119
msgid "Stack size must be at least 256"
-msgstr ""
+msgstr "Die Stackgröße sollte mindestens 256 sein"
+
+#: shared-bindings/terminalio/Terminal.c:68
+#, fuzzy
+msgid "unicode_characters must be a string"
+msgstr "unicode_characters muss eine Zeichenfolge sein"
#: shared-bindings/time/__init__.c:78
msgid "sleep length must be non-negative"
@@ -2586,17 +2589,17 @@ msgstr ""
#: shared-bindings/touchio/TouchIn.c:173
msgid "threshold must be in the range 0-65536"
-msgstr ""
+msgstr "threshold muss im Intervall 0-65536 liegen"
#: shared-bindings/util.c:38
msgid ""
"Object has been deinitialized and can no longer be used. Create a new object."
-msgstr ""
+msgstr "Objekt wurde deinitialisiert und kann nicht mehr verwendet werden. Erstelle ein neues Objekt."
#: shared-module/_pixelbuf/PixelBuf.c:69
#, c-format
msgid "Expected tuple of length %d, got %d"
-msgstr ""
+msgstr "Habe ein Tupel der Länge %d erwartet aber %d erhalten"
#: shared-module/audioio/Mixer.c:47 shared-module/audioio/WaveFile.c:117
msgid "Couldn't allocate first buffer"
@@ -2678,27 +2681,30 @@ msgstr ""
msgid "Only bit maps of 8 bit color or less are supported"
msgstr ""
-#: shared-module/displayio/Bitmap.c:81
+#: shared-module/displayio/Bitmap.c:69
msgid "row must be packed and word aligned"
msgstr ""
#: shared-module/displayio/Bitmap.c:118
-#, fuzzy
msgid "Read-only object"
-msgstr "Schreibgeschützte Dateisystem"
+msgstr "Schreibgeschützte Objekt"
#: shared-module/displayio/Display.c:67
msgid "Unsupported display bus type"
msgstr "Nicht unterstützter display bus type"
-#: shared-module/displayio/Group.c:66
+#: shared-module/displayio/Group.c:39
msgid "Group full"
msgstr ""
-#: shared-module/displayio/Group.c:73
+#: shared-module/displayio/Group.c:46
msgid "Layer must be a Group or TileGrid subclass."
msgstr ""
+#: shared-module/displayio/Group.c:55
+msgid "Group empty"
+msgstr ""
+
#: shared-module/displayio/OnDiskBitmap.c:49
msgid "Invalid BMP file"
msgstr "Ungültige BMP-Datei"
@@ -2740,12 +2746,12 @@ msgstr ""
#: shared-module/struct/__init__.c:179
msgid "buffer size must match format"
-msgstr "Buffergröße muss zum Format passen"
+msgstr "Die Puffergröße muss zum Format passen"
#: shared-module/usb_hid/Device.c:45
#, c-format
msgid "Buffer incorrect size. Should be %d bytes."
-msgstr "Buffergröße falsch, sollte %d bytes sein."
+msgstr "Der Puffergröße ist inkorrekt. Sie sollte %d bytes haben."
#: shared-module/usb_hid/Device.c:53
msgid "USB Busy"
@@ -2840,22 +2846,8 @@ msgstr ""
"Die Reset-Taste wurde beim Booten von CircuitPython gedrückt. Drücke sie "
"erneut um den abgesicherten Modus zu verlassen. \n"
-#~ msgid "buffer_size must be >= 1"
-#~ msgstr "Puffergröße muss >= 1 sein"
-
-#, fuzzy
-#~ msgid "Group must have %q at least 1"
-#~ msgstr "Der Puffer muss eine Mindestenslänge von 1 haben"
-
-#, fuzzy
-#~ msgid "unicode_characters must be a string"
-#~ msgstr "name muss ein String sein"
-
-#~ msgid "All PWM peripherals are in use"
-#~ msgstr "Alle PWM-Peripheriegeräte werden verwendet"
-
-#~ msgid "busio.UART not available"
-#~ msgstr "busio.UART nicht verfügbar"
+msgid "All UART peripherals are in use"
+msgstr "Alle UART-Peripheriegeräte sind in Benutzung"
-#~ msgid "Not enough pins available"
-#~ msgstr "Nicht genug Pins vorhanden"
+msgid "offset out of bounds"
+msgstr ""
diff --git a/locale/en_US.po b/locale/en_US.po
index 11d9d062b..d4003af19 100644
--- a/locale/en_US.po
+++ b/locale/en_US.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-02-15 19:19-0500\n"
+"POT-Creation-Date: 2019-02-17 23:36-0500\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -1302,7 +1302,7 @@ msgstr ""
msgid "3-arg pow() not supported"
msgstr ""
-#: py/modbuiltins.c:517
+#: py/modbuiltins.c:521
msgid "must use keyword argument for key function"
msgstr ""
@@ -2667,7 +2667,7 @@ msgstr ""
msgid "Group full"
msgstr ""
-#: shared-module/displayio/Group.c:73
+#: shared-module/displayio/Group.c:73 shared-module/displayio/Group.c:112
msgid "Layer must be a Group or TileGrid subclass."
msgstr ""
diff --git a/locale/es.po b/locale/es.po
index 7693b8c8d..2c88c1613 100644
--- a/locale/es.po
+++ b/locale/es.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-02-15 19:19-0500\n"
+"POT-Creation-Date: 2019-02-17 23:36-0500\n"
"PO-Revision-Date: 2018-08-24 22:56-0500\n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -1339,7 +1339,7 @@ msgstr "ord() espera un carácter, pero encontró un string de longitud %d"
msgid "3-arg pow() not supported"
msgstr "pow() con 3 argumentos no soportado"
-#: py/modbuiltins.c:517
+#: py/modbuiltins.c:521
msgid "must use keyword argument for key function"
msgstr "debe utilizar argumento de palabra clave para la función clave"
@@ -2737,7 +2737,7 @@ msgstr "tipo de bitmap no soportado"
msgid "Group full"
msgstr "Group lleno"
-#: shared-module/displayio/Group.c:73
+#: shared-module/displayio/Group.c:73 shared-module/displayio/Group.c:112
msgid "Layer must be a Group or TileGrid subclass."
msgstr ""
@@ -2881,102 +2881,102 @@ msgstr ""
"El botón reset fue presionado mientras arrancaba CircuitPython. Presiona "
"otra vez para salir del modo seguro.\n"
-#, fuzzy
-#~ msgid "buffer_size must be >= 1"
-#~ msgstr "los buffers deben de tener la misma longitud"
+#~ msgid "Not enough pins available"
+#~ msgstr "No hay suficientes pines disponibles"
-#, fuzzy
-#~ msgid "Group must have %q at least 1"
-#~ msgstr "Group debe tener size de minimo 1"
+#~ msgid "busio.UART not available"
+#~ msgstr "busio.UART no disponible"
-#~ msgid "Baud rate too high for this SPI peripheral"
-#~ msgstr "Baud rate demasiado alto para este periférico SPI"
+#~ msgid "Can not apply advertisement data. status: 0x%02x"
+#~ msgstr "No se puede aplicar los datos de anuncio. status: 0x%02x"
-#~ msgid "Invalid UUID parameter"
-#~ msgstr "Parámetro UUID inválido"
+#, fuzzy
+#~ msgid ""
+#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n"
+#~ msgstr ""
+#~ "Por favor registra un issue en la siguiente URL con el contenidos de tu "
+#~ "unidad de almacenamiento CIRCUITPY:\n"
-#~ msgid "row buffer must be a bytearray or array of type 'b' or 'B'"
-#~ msgstr "row buffer deberia ser un bytearray o array de tipo 'b' o 'B'"
+#~ msgid "Cannot set PPCP parameters."
+#~ msgstr "No se pueden establecer los parámetros PPCP."
-#~ msgid "row data must be a buffer"
-#~ msgstr "row data debe ser un buffer"
+#~ msgid "Can not apply device name in the stack."
+#~ msgstr "No se puede aplicar el nombre del dispositivo en el stack."
-#, fuzzy
-#~ msgid "unicode_characters must be a string"
-#~ msgstr "palabras clave deben ser strings"
+#~ msgid "Cannot apply GAP parameters."
+#~ msgstr "No se pueden aplicar los parámetros GAP."
-#~ msgid "index must be int"
-#~ msgstr "indice debe ser int"
+#~ msgid "Wrong number of bytes provided"
+#~ msgstr "Numero erroneo de bytes dados"
-#~ msgid "Can not query for the device address."
-#~ msgstr "No se puede consultar la dirección del dispositivo."
+#~ msgid "Can not encode UUID, to check length."
+#~ msgstr "No se puede codificar el UUID, para revisar la longitud."
-#~ msgid "All PWM peripherals are in use"
-#~ msgstr "Todos los periféricos PWM en uso"
+#, fuzzy
+#~ msgid "unpack requires a buffer of %d bytes"
+#~ msgstr "Falló la asignación del buffer RX de %d bytes"
-#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
+#~ msgid ""
+#~ "enough power for the whole circuit and press reset (after ejecting "
+#~ "CIRCUITPY).\n"
#~ msgstr ""
-#~ "Parece que nuestro código CircuitPython dejó de funcionar. Whoops!\n"
+#~ "suficiente poder para todo el circuito y presiona reset (después de "
+#~ "expulsar CIRCUITPY).\n"
-#~ msgid "Group empty"
-#~ msgstr "Group vacío"
+#~ msgid "displayio is a work in progress"
+#~ msgstr "displayio todavia esta en desarrollo"
-#~ msgid "Wrong address length"
-#~ msgstr "Longitud de address erronea"
+#~ msgid "Can not add Service."
+#~ msgstr "No se puede agregar el Servicio."
-#~ msgid "Can encode UUID into the advertisement packet."
-#~ msgstr "Se puede codificar el UUID en el paquete de anuncio."
+#~ msgid "Invalid UUID string length"
+#~ msgstr "Longitud de string UUID inválida"
#~ msgid "Invalid Service type"
#~ msgstr "Tipo de Servicio inválido"
-#~ msgid "Invalid UUID string length"
-#~ msgstr "Longitud de string UUID inválida"
+#~ msgid "Can encode UUID into the advertisement packet."
+#~ msgstr "Se puede codificar el UUID en el paquete de anuncio."
-#~ msgid "Can not add Service."
-#~ msgstr "No se puede agregar el Servicio."
+#~ msgid "Wrong address length"
+#~ msgstr "Longitud de address erronea"
-#~ msgid "displayio is a work in progress"
-#~ msgstr "displayio todavia esta en desarrollo"
+#~ msgid "Group empty"
+#~ msgstr "Group vacío"
-#~ msgid ""
-#~ "enough power for the whole circuit and press reset (after ejecting "
-#~ "CIRCUITPY).\n"
+#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
#~ msgstr ""
-#~ "suficiente poder para todo el circuito y presiona reset (después de "
-#~ "expulsar CIRCUITPY).\n"
+#~ "Parece que nuestro código CircuitPython dejó de funcionar. Whoops!\n"
-#, fuzzy
-#~ msgid "unpack requires a buffer of %d bytes"
-#~ msgstr "Falló la asignación del buffer RX de %d bytes"
+#~ msgid "All PWM peripherals are in use"
+#~ msgstr "Todos los periféricos PWM en uso"
-#~ msgid "Can not encode UUID, to check length."
-#~ msgstr "No se puede codificar el UUID, para revisar la longitud."
+#~ msgid "Can not query for the device address."
+#~ msgstr "No se puede consultar la dirección del dispositivo."
-#~ msgid "Wrong number of bytes provided"
-#~ msgstr "Numero erroneo de bytes dados"
+#~ msgid "index must be int"
+#~ msgstr "indice debe ser int"
-#~ msgid "Cannot apply GAP parameters."
-#~ msgstr "No se pueden aplicar los parámetros GAP."
+#, fuzzy
+#~ msgid "unicode_characters must be a string"
+#~ msgstr "palabras clave deben ser strings"
-#~ msgid "Can not apply device name in the stack."
-#~ msgstr "No se puede aplicar el nombre del dispositivo en el stack."
+#~ msgid "row data must be a buffer"
+#~ msgstr "row data debe ser un buffer"
-#~ msgid "Cannot set PPCP parameters."
-#~ msgstr "No se pueden establecer los parámetros PPCP."
+#~ msgid "row buffer must be a bytearray or array of type 'b' or 'B'"
+#~ msgstr "row buffer deberia ser un bytearray o array de tipo 'b' o 'B'"
-#, fuzzy
-#~ msgid ""
-#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n"
-#~ msgstr ""
-#~ "Por favor registra un issue en la siguiente URL con el contenidos de tu "
-#~ "unidad de almacenamiento CIRCUITPY:\n"
+#~ msgid "Invalid UUID parameter"
+#~ msgstr "Parámetro UUID inválido"
-#~ msgid "Can not apply advertisement data. status: 0x%02x"
-#~ msgstr "No se puede aplicar los datos de anuncio. status: 0x%02x"
+#~ msgid "Baud rate too high for this SPI peripheral"
+#~ msgstr "Baud rate demasiado alto para este periférico SPI"
-#~ msgid "busio.UART not available"
-#~ msgstr "busio.UART no disponible"
+#, fuzzy
+#~ msgid "Group must have %q at least 1"
+#~ msgstr "Group debe tener size de minimo 1"
-#~ msgid "Not enough pins available"
-#~ msgstr "No hay suficientes pines disponibles"
+#, fuzzy
+#~ msgid "buffer_size must be >= 1"
+#~ msgstr "los buffers deben de tener la misma longitud"
diff --git a/locale/fil.po b/locale/fil.po
index 60c8ea076..ce192f4e1 100644
--- a/locale/fil.po
+++ b/locale/fil.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-02-15 19:19-0500\n"
+"POT-Creation-Date: 2019-02-17 23:36-0500\n"
"PO-Revision-Date: 2018-12-20 22:15-0800\n"
"Last-Translator: Timothy <me@timothygarcia.ca>\n"
"Language-Team: fil\n"
@@ -1340,7 +1340,7 @@ msgstr "ord() umaasa ng character pero string ng %d haba ang nakita"
msgid "3-arg pow() not supported"
msgstr "3-arg pow() hindi suportado"
-#: py/modbuiltins.c:517
+#: py/modbuiltins.c:521
msgid "must use keyword argument for key function"
msgstr "dapat gumamit ng keyword argument para sa key function"
@@ -2743,7 +2743,7 @@ msgstr "Hindi supportadong tipo ng bitmap"
msgid "Group full"
msgstr "Puno ang group"
-#: shared-module/displayio/Group.c:73
+#: shared-module/displayio/Group.c:73 shared-module/displayio/Group.c:112
msgid "Layer must be a Group or TileGrid subclass."
msgstr ""
@@ -2887,102 +2887,102 @@ msgstr ""
"Ang reset button ay pinindot habang nag boot ang CircuitPython. Pindutin "
"ulit para lumabas sa safe mode.\n"
-#, fuzzy
-#~ msgid "buffer_size must be >= 1"
-#~ msgstr "aarehas na haba dapat ang buffer slices"
+#~ msgid "Not enough pins available"
+#~ msgstr "Hindi sapat ang magagamit na pins"
-#, fuzzy
-#~ msgid "Group must have %q at least 1"
-#~ msgstr "Group dapat ay hindi baba sa 1 na haba"
+#~ msgid "busio.UART not available"
+#~ msgstr "busio.UART hindi available"
-#, fuzzy
-#~ msgid "palette must be displayio.Palette"
-#~ msgstr "ang palette ay dapat 32 bytes ang haba"
+#~ msgid "Can not apply advertisement data. status: 0x%02x"
+#~ msgstr "Hindi ma i-apply ang advertisement data. status: 0x%02x"
-#~ msgid "Invalid UUID parameter"
-#~ msgstr "Mali ang UUID parameter"
+#~ msgid ""
+#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n"
+#~ msgstr ""
+#~ "Mag-file ng isang isyu dito gamit ang mga nilalaman ng iyong CIRCUITPY "
+#~ "drive:\n"
-#~ msgid "row buffer must be a bytearray or array of type 'b' or 'B'"
-#~ msgstr "ang row buffer ay dapat bytearray o array na type ‘b’ or ‘B’"
+#~ msgid "Cannot set PPCP parameters."
+#~ msgstr "Hindi ma-set ang PPCP parameters."
-#~ msgid "row data must be a buffer"
-#~ msgstr "row data ay dapat na buffer"
+#~ msgid "Can not apply device name in the stack."
+#~ msgstr "Hindi maaaring ma-aplay ang device name sa stack."
-#, fuzzy
-#~ msgid "unicode_characters must be a string"
-#~ msgstr "ang keywords dapat strings"
+#~ msgid "Cannot apply GAP parameters."
+#~ msgstr "Hindi ma-apply ang GAP parameters."
-#~ msgid "index must be int"
-#~ msgstr "index ay dapat int"
+#~ msgid "Wrong number of bytes provided"
+#~ msgstr "Mali ang bilang ng bytes"
-#~ msgid "Can not query for the device address."
-#~ msgstr "Hindi maaaring mag-query para sa address ng device."
+#~ msgid "Can not encode UUID, to check length."
+#~ msgstr "Hindi ma-encode UUID, para suriin ang haba."
-#~ msgid "All PWM peripherals are in use"
-#~ msgstr "Lahat ng PWM peripherals ay ginagamit"
+#, fuzzy
+#~ msgid "unpack requires a buffer of %d bytes"
+#~ msgstr "Nabigong ilaan ang RX buffer ng %d bytes"
-#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
+#~ msgid ""
+#~ "enough power for the whole circuit and press reset (after ejecting "
+#~ "CIRCUITPY).\n"
#~ msgstr ""
-#~ "Mukhang ang core CircuitPython code ay nag-crash ng malakas. Aray!\n"
+#~ "ay nagbibigay ng sapat na power para sa buong circuit at i-press ang "
+#~ "reset (pagkatapos i-eject ang CIRCUITPY).\n"
-#~ msgid "Group empty"
-#~ msgstr "Walang laman ang group"
+#~ msgid "displayio is a work in progress"
+#~ msgstr "displayio ay nasa gitna ng konstruksiyon"
-#~ msgid "Wrong address length"
-#~ msgstr "Mali ang address length"
+#~ msgid "Can not add Service."
+#~ msgstr "Hindi maidaragdag ang serbisyo."
-#~ msgid "Can encode UUID into the advertisement packet."
-#~ msgstr "Maaring i-encode ang UUID sa advertisement packet."
+#~ msgid "Invalid UUID string length"
+#~ msgstr "Mali ang UUID string length"
#~ msgid "Invalid Service type"
#~ msgstr "Mali ang tipo ng serbisyo"
-#~ msgid "Invalid UUID string length"
-#~ msgstr "Mali ang UUID string length"
+#~ msgid "Can encode UUID into the advertisement packet."
+#~ msgstr "Maaring i-encode ang UUID sa advertisement packet."
-#~ msgid "Can not add Service."
-#~ msgstr "Hindi maidaragdag ang serbisyo."
+#~ msgid "Wrong address length"
+#~ msgstr "Mali ang address length"
-#~ msgid "displayio is a work in progress"
-#~ msgstr "displayio ay nasa gitna ng konstruksiyon"
+#~ msgid "Group empty"
+#~ msgstr "Walang laman ang group"
-#~ msgid ""
-#~ "enough power for the whole circuit and press reset (after ejecting "
-#~ "CIRCUITPY).\n"
+#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
#~ msgstr ""
-#~ "ay nagbibigay ng sapat na power para sa buong circuit at i-press ang "
-#~ "reset (pagkatapos i-eject ang CIRCUITPY).\n"
+#~ "Mukhang ang core CircuitPython code ay nag-crash ng malakas. Aray!\n"
-#, fuzzy
-#~ msgid "unpack requires a buffer of %d bytes"
-#~ msgstr "Nabigong ilaan ang RX buffer ng %d bytes"
+#~ msgid "All PWM peripherals are in use"
+#~ msgstr "Lahat ng PWM peripherals ay ginagamit"
-#~ msgid "Can not encode UUID, to check length."
-#~ msgstr "Hindi ma-encode UUID, para suriin ang haba."
+#~ msgid "Can not query for the device address."
+#~ msgstr "Hindi maaaring mag-query para sa address ng device."
-#~ msgid "Wrong number of bytes provided"
-#~ msgstr "Mali ang bilang ng bytes"
+#~ msgid "index must be int"
+#~ msgstr "index ay dapat int"
-#~ msgid "Cannot apply GAP parameters."
-#~ msgstr "Hindi ma-apply ang GAP parameters."
+#, fuzzy
+#~ msgid "unicode_characters must be a string"
+#~ msgstr "ang keywords dapat strings"
-#~ msgid "Can not apply device name in the stack."
-#~ msgstr "Hindi maaaring ma-aplay ang device name sa stack."
+#~ msgid "row data must be a buffer"
+#~ msgstr "row data ay dapat na buffer"
-#~ msgid "Cannot set PPCP parameters."
-#~ msgstr "Hindi ma-set ang PPCP parameters."
+#~ msgid "row buffer must be a bytearray or array of type 'b' or 'B'"
+#~ msgstr "ang row buffer ay dapat bytearray o array na type ‘b’ or ‘B’"
-#~ msgid ""
-#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n"
-#~ msgstr ""
-#~ "Mag-file ng isang isyu dito gamit ang mga nilalaman ng iyong CIRCUITPY "
-#~ "drive:\n"
+#~ msgid "Invalid UUID parameter"
+#~ msgstr "Mali ang UUID parameter"
-#~ msgid "Can not apply advertisement data. status: 0x%02x"
-#~ msgstr "Hindi ma i-apply ang advertisement data. status: 0x%02x"
+#, fuzzy
+#~ msgid "palette must be displayio.Palette"
+#~ msgstr "ang palette ay dapat 32 bytes ang haba"
-#~ msgid "busio.UART not available"
-#~ msgstr "busio.UART hindi available"
+#, fuzzy
+#~ msgid "Group must have %q at least 1"
+#~ msgstr "Group dapat ay hindi baba sa 1 na haba"
-#~ msgid "Not enough pins available"
-#~ msgstr "Hindi sapat ang magagamit na pins"
+#, fuzzy
+#~ msgid "buffer_size must be >= 1"
+#~ msgstr "aarehas na haba dapat ang buffer slices"
diff --git a/locale/fr.po b/locale/fr.po
index dba65e29e..b24abeb5d 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: 2019-02-15 19:19-0500\n"
+"POT-Creation-Date: 2019-02-17 23:36-0500\n"
"PO-Revision-Date: 2018-12-23 20:05+0100\n"
"Last-Translator: Pierrick Couturier <arofarn@arofarn.info>\n"
"Language-Team: fr\n"
@@ -1337,7 +1337,7 @@ msgstr "ord() attend un caractère mais une chaîne de longueur %d a été trouv
msgid "3-arg pow() not supported"
msgstr "pow() avec 3 arguments non supporté"
-#: py/modbuiltins.c:517
+#: py/modbuiltins.c:521
msgid "must use keyword argument for key function"
msgstr "il faut utiliser un argument nommé pour une fonction key"
@@ -2759,7 +2759,7 @@ msgstr "type de bitmap non supporté"
msgid "Group full"
msgstr "Groupe plein"
-#: shared-module/displayio/Group.c:73
+#: shared-module/displayio/Group.c:73 shared-module/displayio/Group.c:112
msgid "Layer must be a Group or TileGrid subclass."
msgstr ""
@@ -2909,109 +2909,109 @@ msgstr ""
"Le bouton 'reset' a été appuyé pendant le démarrage de CircuitPython. "
"Appuyer denouveau pour quitter de le mode sans-échec.\n"
-#, fuzzy
-#~ msgid "buffer_size must be >= 1"
-#~ msgstr "les slices de tampon doivent être de longueurs égales"
+#~ msgid "Not enough pins available"
+#~ msgstr "Pas assez de broches disponibles"
#, fuzzy
-#~ msgid "Group must have %q at least 1"
-#~ msgstr "Le tampon doit être de longueur au moins 1"
+#~ msgid "busio.UART not available"
+#~ msgstr "busio.UART n'est pas disponible"
-#~ msgid "Cannot set PPCP parameters."
-#~ msgstr "Impossible d'appliquer les paramètres PPCP"
+#~ msgid "Can not query for the device address."
+#~ msgstr "Impossible d'obtenir l'adresse du périphérique"
-#~ msgid "Invalid UUID parameter"
-#~ msgstr "Paramètre UUID invalide"
+#~ msgid "Can not encode UUID, to check length."
+#~ msgstr "Impossible d'encoder l'UUID pour vérifier la longueur."
-#, fuzzy
-#~ msgid "row buffer must be a bytearray or array of type 'b' or 'B'"
+#~ msgid "Cannot apply GAP parameters."
+#~ msgstr "Impossible d'appliquer les paramètres GAP"
+
+#~ msgid ""
+#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n"
#~ msgstr ""
-#~ "le tampon de ligne doit être un bytearray ou un tableau de type 'b' ou 'B'"
+#~ "SVP, remontez le problème là avec le contenu du lecteur CIRCUITPY:\n"
-#, fuzzy
-#~ msgid "row data must be a buffer"
-#~ msgstr "les données de ligne doivent être un tampon"
+#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
+#~ msgstr ""
+#~ "Il semblerait que votre code CircuitPython a durement planté. Oups!\n"
#, fuzzy
-#~ msgid "unicode_characters must be a string"
-#~ msgstr "les noms doivent être des chaînes de caractère"
-
-#~ msgid "index must be int"
-#~ msgstr "l'index doit être un entier"
+#~ msgid "Wrong number of bytes provided"
+#~ msgstr "mauvais nombre d'octets fourni'"
-#, fuzzy
-#~ msgid "palette must be displayio.Palette"
-#~ msgstr "la palette doit être une displayio.Palette"
+#~ msgid ""
+#~ "enough power for the whole circuit and press reset (after ejecting "
+#~ "CIRCUITPY).\n"
+#~ msgstr ""
+#~ "assez de puissance pour l'ensemble du circuit et appuyez sur "
+#~ "'reset' (après avoir éjecter CIRCUITPY).\n"
#, fuzzy
-#~ msgid "All PWM peripherals are in use"
-#~ msgstr "Tous les périphériques PWM sont utilisés"
+#~ msgid "unpack requires a buffer of %d bytes"
+#~ msgstr "Echec de l'allocation de %d octets du tampon RX"
-#, fuzzy
-#~ msgid "value_size must be power of two"
-#~ msgstr "value_size doit être une puissance de 2"
+#~ msgid "Invalid Service type"
+#~ msgstr "Type de service invalide"
-#, fuzzy
-#~ msgid "Group empty"
-#~ msgstr "Groupe vide"
+#~ msgid "displayio is a work in progress"
+#~ msgstr "displayio est en cours de développement"
-#~ msgid "Wrong address length"
-#~ msgstr "Mauvaise longueur d'adresse"
+#~ msgid "Can not apply device name in the stack."
+#~ msgstr "Impossible d'appliquer le nom de périphérique dans la pile"
-#~ msgid "Can not add Service."
-#~ msgstr "Impossible d'ajouter le Service"
+#~ msgid "Invalid UUID string length"
+#~ msgstr "Longeur de chaîne UUID invalide"
#~ msgid "Can not add Characteristic."
#~ msgstr "Impossible d'ajouter la Characteristic."
-#~ msgid "Invalid UUID string length"
-#~ msgstr "Longeur de chaîne UUID invalide"
+#~ msgid "Can not add Service."
+#~ msgstr "Impossible d'ajouter le Service"
-#~ msgid "Can not apply device name in the stack."
-#~ msgstr "Impossible d'appliquer le nom de périphérique dans la pile"
+#~ msgid "Wrong address length"
+#~ msgstr "Mauvaise longueur d'adresse"
-#~ msgid "displayio is a work in progress"
-#~ msgstr "displayio est en cours de développement"
+#, fuzzy
+#~ msgid "Group empty"
+#~ msgstr "Groupe vide"
-#~ msgid "Invalid Service type"
-#~ msgstr "Type de service invalide"
+#, fuzzy
+#~ msgid "value_size must be power of two"
+#~ msgstr "value_size doit être une puissance de 2"
#, fuzzy
-#~ msgid "unpack requires a buffer of %d bytes"
-#~ msgstr "Echec de l'allocation de %d octets du tampon RX"
+#~ msgid "All PWM peripherals are in use"
+#~ msgstr "Tous les périphériques PWM sont utilisés"
-#~ msgid ""
-#~ "enough power for the whole circuit and press reset (after ejecting "
-#~ "CIRCUITPY).\n"
-#~ msgstr ""
-#~ "assez de puissance pour l'ensemble du circuit et appuyez sur "
-#~ "'reset' (après avoir éjecter CIRCUITPY).\n"
+#, fuzzy
+#~ msgid "palette must be displayio.Palette"
+#~ msgstr "la palette doit être une displayio.Palette"
+
+#~ msgid "index must be int"
+#~ msgstr "l'index doit être un entier"
#, fuzzy
-#~ msgid "Wrong number of bytes provided"
-#~ msgstr "mauvais nombre d'octets fourni'"
+#~ msgid "unicode_characters must be a string"
+#~ msgstr "les noms doivent être des chaînes de caractère"
-#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
-#~ msgstr ""
-#~ "Il semblerait que votre code CircuitPython a durement planté. Oups!\n"
+#, fuzzy
+#~ msgid "row data must be a buffer"
+#~ msgstr "les données de ligne doivent être un tampon"
-#~ msgid ""
-#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n"
+#, fuzzy
+#~ msgid "row buffer must be a bytearray or array of type 'b' or 'B'"
#~ msgstr ""
-#~ "SVP, remontez le problème là avec le contenu du lecteur CIRCUITPY:\n"
-
-#~ msgid "Cannot apply GAP parameters."
-#~ msgstr "Impossible d'appliquer les paramètres GAP"
+#~ "le tampon de ligne doit être un bytearray ou un tableau de type 'b' ou 'B'"
-#~ msgid "Can not encode UUID, to check length."
-#~ msgstr "Impossible d'encoder l'UUID pour vérifier la longueur."
+#~ msgid "Invalid UUID parameter"
+#~ msgstr "Paramètre UUID invalide"
-#~ msgid "Can not query for the device address."
-#~ msgstr "Impossible d'obtenir l'adresse du périphérique"
+#~ msgid "Cannot set PPCP parameters."
+#~ msgstr "Impossible d'appliquer les paramètres PPCP"
#, fuzzy
-#~ msgid "busio.UART not available"
-#~ msgstr "busio.UART n'est pas disponible"
+#~ msgid "Group must have %q at least 1"
+#~ msgstr "Le tampon doit être de longueur au moins 1"
-#~ msgid "Not enough pins available"
-#~ msgstr "Pas assez de broches disponibles"
+#, fuzzy
+#~ msgid "buffer_size must be >= 1"
+#~ msgstr "les slices de tampon doivent être de longueurs égales"
diff --git a/locale/it_IT.po b/locale/it_IT.po
index 7aa4e3b43..d4e68f098 100644
--- a/locale/it_IT.po
+++ b/locale/it_IT.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-02-15 19:19-0500\n"
+"POT-Creation-Date: 2019-02-17 23:36-0500\n"
"PO-Revision-Date: 2018-10-02 16:27+0200\n"
"Last-Translator: Enrico Paganin <enrico.paganin@mail.com>\n"
"Language-Team: \n"
@@ -1337,7 +1337,7 @@ msgstr ""
msgid "3-arg pow() not supported"
msgstr "pow() con tre argmomenti non supportata"
-#: py/modbuiltins.c:517
+#: py/modbuiltins.c:521
msgid "must use keyword argument for key function"
msgstr ""
@@ -2747,7 +2747,7 @@ msgstr "tipo di bitmap non supportato"
msgid "Group full"
msgstr "Gruppo pieno"
-#: shared-module/displayio/Group.c:73
+#: shared-module/displayio/Group.c:73 shared-module/displayio/Group.c:112
msgid "Layer must be a Group or TileGrid subclass."
msgstr ""
@@ -2883,100 +2883,100 @@ msgid ""
"exit safe mode.\n"
msgstr ""
-#, fuzzy
-#~ msgid "buffer_size must be >= 1"
-#~ msgstr "slice del buffer devono essere della stessa lunghezza"
-
-#~ msgid "row data must be a buffer"
-#~ msgstr "valori della riga devono essere un buffer"
+#~ msgid "Not enough pins available"
+#~ msgstr "Non sono presenti abbastanza pin"
#, fuzzy
-#~ msgid "Group must have %q at least 1"
-#~ msgstr "Il gruppo deve avere dimensione almeno 1"
-
-#~ msgid "Invalid UUID parameter"
-#~ msgstr "Parametro UUID non valido"
+#~ msgid "busio.UART not available"
+#~ msgstr "busio.UART non ancora implementato"
-#~ msgid "Group empty"
-#~ msgstr "Gruppo vuoto"
+#~ msgid "Can not encode UUID, to check length."
+#~ msgstr "Non è possibile codificare l'UUID, lunghezza da controllare."
#, fuzzy
-#~ msgid "All PWM peripherals are in use"
-#~ msgstr "Tutte le periferiche SPI sono in uso"
+#~ msgid "unpack requires a buffer of %d bytes"
+#~ msgstr "Fallita allocazione del buffer RX di %d byte"
-#~ msgid "row buffer must be a bytearray or array of type 'b' or 'B'"
+#~ msgid "Invalid UUID string length"
+#~ msgstr "Lunghezza della stringa UUID non valida"
+
+#~ msgid ""
+#~ "enough power for the whole circuit and press reset (after ejecting "
+#~ "CIRCUITPY).\n"
#~ msgstr ""
-#~ "buffer di riga deve essere un bytearray o un array di tipo 'b' o 'B'"
+#~ "abbastanza potenza per l'intero circuito e premere reset (dopo aver "
+#~ "espulso CIRCUITPY).\n"
-#, fuzzy
-#~ msgid "unicode_characters must be a string"
-#~ msgstr "argomenti nominati devono essere stringhe"
+#~ msgid "Can not add Service."
+#~ msgstr "Non è possibile aggiungere Service."
-#~ msgid "index must be int"
-#~ msgstr "l'indice deve essere int"
+#~ msgid "Can encode UUID into the advertisement packet."
+#~ msgstr "È possibile codificare l'UUID nel pacchetto di advertisement."
-#~ msgid "Invalid Service type"
-#~ msgstr "Tipo di servizio non valido"
+#~ msgid "Can not apply device name in the stack."
+#~ msgstr "Non è possibile inserire il nome del dipositivo nella lista."
-#, fuzzy
-#~ msgid "Wrong number of bytes provided"
-#~ msgstr "numero di argomenti errato"
+#~ msgid "Cannot set PPCP parameters."
+#~ msgstr "Impossibile impostare i parametri PPCP."
-#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
+#~ msgid "Can not query for the device address."
+#~ msgstr "Non è possibile trovare l'indirizzo del dispositivo."
+
+#~ msgid ""
+#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n"
#~ msgstr ""
-#~ "Sembra che il codice del core di CircuitPython sia crashato malamente. "
-#~ "Whoops!\n"
+#~ "Ti preghiamo di compilare una issue con il contenuto del tuo drie "
+#~ "CIRCUITPY:\n"
-#~ msgid "Can not add Characteristic."
-#~ msgstr "Non è possibile aggiungere Characteristic."
+#~ msgid "Can not apply advertisement data. status: 0x%02x"
+#~ msgstr "Impossible inserire dati advertisement. status: 0x%02x"
#~ msgid "Cannot apply GAP parameters."
#~ msgstr "Impossibile applicare i parametri GAP."
-#~ msgid "Can not apply advertisement data. status: 0x%02x"
-#~ msgstr "Impossible inserire dati advertisement. status: 0x%02x"
+#~ msgid "Can not add Characteristic."
+#~ msgstr "Non è possibile aggiungere Characteristic."
-#~ msgid ""
-#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n"
+#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
#~ msgstr ""
-#~ "Ti preghiamo di compilare una issue con il contenuto del tuo drie "
-#~ "CIRCUITPY:\n"
-
-#~ msgid "Can not query for the device address."
-#~ msgstr "Non è possibile trovare l'indirizzo del dispositivo."
+#~ "Sembra che il codice del core di CircuitPython sia crashato malamente. "
+#~ "Whoops!\n"
-#~ msgid "Cannot set PPCP parameters."
-#~ msgstr "Impossibile impostare i parametri PPCP."
+#, fuzzy
+#~ msgid "Wrong number of bytes provided"
+#~ msgstr "numero di argomenti errato"
-#~ msgid "Can not apply device name in the stack."
-#~ msgstr "Non è possibile inserire il nome del dipositivo nella lista."
+#~ msgid "Invalid Service type"
+#~ msgstr "Tipo di servizio non valido"
-#~ msgid "Can encode UUID into the advertisement packet."
-#~ msgstr "È possibile codificare l'UUID nel pacchetto di advertisement."
+#~ msgid "index must be int"
+#~ msgstr "l'indice deve essere int"
-#~ msgid "Can not add Service."
-#~ msgstr "Non è possibile aggiungere Service."
+#, fuzzy
+#~ msgid "unicode_characters must be a string"
+#~ msgstr "argomenti nominati devono essere stringhe"
-#~ msgid ""
-#~ "enough power for the whole circuit and press reset (after ejecting "
-#~ "CIRCUITPY).\n"
+#~ msgid "row buffer must be a bytearray or array of type 'b' or 'B'"
#~ msgstr ""
-#~ "abbastanza potenza per l'intero circuito e premere reset (dopo aver "
-#~ "espulso CIRCUITPY).\n"
-
-#~ msgid "Invalid UUID string length"
-#~ msgstr "Lunghezza della stringa UUID non valida"
+#~ "buffer di riga deve essere un bytearray o un array di tipo 'b' o 'B'"
#, fuzzy
-#~ msgid "unpack requires a buffer of %d bytes"
-#~ msgstr "Fallita allocazione del buffer RX di %d byte"
+#~ msgid "All PWM peripherals are in use"
+#~ msgstr "Tutte le periferiche SPI sono in uso"
-#~ msgid "Can not encode UUID, to check length."
-#~ msgstr "Non è possibile codificare l'UUID, lunghezza da controllare."
+#~ msgid "Group empty"
+#~ msgstr "Gruppo vuoto"
+
+#~ msgid "Invalid UUID parameter"
+#~ msgstr "Parametro UUID non valido"
#, fuzzy
-#~ msgid "busio.UART not available"
-#~ msgstr "busio.UART non ancora implementato"
+#~ msgid "Group must have %q at least 1"
+#~ msgstr "Il gruppo deve avere dimensione almeno 1"
-#~ msgid "Not enough pins available"
-#~ msgstr "Non sono presenti abbastanza pin"
+#~ msgid "row data must be a buffer"
+#~ msgstr "valori della riga devono essere un buffer"
+
+#, fuzzy
+#~ msgid "buffer_size must be >= 1"
+#~ msgstr "slice del buffer devono essere della stessa lunghezza"
diff --git a/locale/pt_BR.po b/locale/pt_BR.po
index 1e204a42f..deca76daf 100644
--- a/locale/pt_BR.po
+++ b/locale/pt_BR.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-02-15 19:19-0500\n"
+"POT-Creation-Date: 2019-02-17 23:36-0500\n"
"PO-Revision-Date: 2018-10-02 21:14-0000\n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -1320,7 +1320,7 @@ msgstr ""
msgid "3-arg pow() not supported"
msgstr ""
-#: py/modbuiltins.c:517
+#: py/modbuiltins.c:521
msgid "must use keyword argument for key function"
msgstr ""
@@ -2703,7 +2703,7 @@ msgstr "Taxa de transmissão não suportada"
msgid "Group full"
msgstr "Grupo cheio"
-#: shared-module/displayio/Group.c:73
+#: shared-module/displayio/Group.c:73 shared-module/displayio/Group.c:112
msgid "Layer must be a Group or TileGrid subclass."
msgstr ""
@@ -2831,64 +2831,64 @@ msgid ""
"exit safe mode.\n"
msgstr ""
-#, fuzzy
-#~ msgid "buffer_size must be >= 1"
-#~ msgstr "buffers devem ser o mesmo tamanho"
+#~ msgid "Not enough pins available"
+#~ msgstr "Não há pinos suficientes disponíveis"
-#~ msgid "index must be int"
-#~ msgstr "index deve ser int"
+#~ msgid "busio.UART not available"
+#~ msgstr "busio.UART não disponível"
#, fuzzy
-#~ msgid "Group must have %q at least 1"
-#~ msgstr "Grupo deve ter tamanho pelo menos 1"
+#~ msgid "All PWM peripherals are in use"
+#~ msgstr "Todos os temporizadores em uso"
-#~ msgid "Group empty"
-#~ msgstr "Grupo vazio"
+#~ msgid "Can not add Characteristic."
+#~ msgstr "Não é possível adicionar Característica."
-#, fuzzy
-#~ msgid "unicode_characters must be a string"
-#~ msgstr "heap deve ser uma lista"
+#~ msgid "Can not apply advertisement data. status: 0x%02x"
+#~ msgstr "Não é possível aplicar dados de anúncio. status: 0x%02x"
-#~ msgid "Invalid UUID parameter"
-#~ msgstr "Parâmetro UUID inválido"
+#~ msgid "Cannot apply GAP parameters."
+#~ msgstr "Não é possível aplicar parâmetros GAP."
-#~ msgid "Baud rate too high for this SPI peripheral"
-#~ msgstr "Taxa de transmissão muito alta para esse periférico SPI"
+#~ msgid "Can not apply device name in the stack."
+#~ msgstr "Não é possível aplicar o nome do dispositivo na pilha."
-#~ msgid "Can encode UUID into the advertisement packet."
-#~ msgstr "Pode codificar o UUID no pacote de anúncios."
+#~ msgid "Cannot set PPCP parameters."
+#~ msgstr "Não é possível definir parâmetros PPCP."
-#, fuzzy
-#~ msgid "unpack requires a buffer of %d bytes"
-#~ msgstr "Falha ao alocar buffer RX de %d bytes"
+#~ msgid "Invalid Service type"
+#~ msgstr "Tipo de serviço inválido"
#~ msgid "Can not query for the device address."
#~ msgstr "Não é possível consultar o endereço do dispositivo."
-#~ msgid "Invalid Service type"
-#~ msgstr "Tipo de serviço inválido"
+#, fuzzy
+#~ msgid "unpack requires a buffer of %d bytes"
+#~ msgstr "Falha ao alocar buffer RX de %d bytes"
-#~ msgid "Cannot set PPCP parameters."
-#~ msgstr "Não é possível definir parâmetros PPCP."
+#~ msgid "Can encode UUID into the advertisement packet."
+#~ msgstr "Pode codificar o UUID no pacote de anúncios."
-#~ msgid "Can not apply device name in the stack."
-#~ msgstr "Não é possível aplicar o nome do dispositivo na pilha."
+#~ msgid "Baud rate too high for this SPI peripheral"
+#~ msgstr "Taxa de transmissão muito alta para esse periférico SPI"
-#~ msgid "Cannot apply GAP parameters."
-#~ msgstr "Não é possível aplicar parâmetros GAP."
+#~ msgid "Invalid UUID parameter"
+#~ msgstr "Parâmetro UUID inválido"
-#~ msgid "Can not apply advertisement data. status: 0x%02x"
-#~ msgstr "Não é possível aplicar dados de anúncio. status: 0x%02x"
+#, fuzzy
+#~ msgid "unicode_characters must be a string"
+#~ msgstr "heap deve ser uma lista"
-#~ msgid "Can not add Characteristic."
-#~ msgstr "Não é possível adicionar Característica."
+#~ msgid "Group empty"
+#~ msgstr "Grupo vazio"
#, fuzzy
-#~ msgid "All PWM peripherals are in use"
-#~ msgstr "Todos os temporizadores em uso"
+#~ msgid "Group must have %q at least 1"
+#~ msgstr "Grupo deve ter tamanho pelo menos 1"
-#~ msgid "busio.UART not available"
-#~ msgstr "busio.UART não disponível"
+#~ msgid "index must be int"
+#~ msgstr "index deve ser int"
-#~ msgid "Not enough pins available"
-#~ msgstr "Não há pinos suficientes disponíveis"
+#, fuzzy
+#~ msgid "buffer_size must be >= 1"
+#~ msgstr "buffers devem ser o mesmo tamanho"
diff --git a/main.c b/main.c
index fac9864e3..f0913db6e 100755
--- a/main.c
+++ b/main.c
@@ -127,6 +127,20 @@ void stop_mp(void) {
#if CIRCUITPY_NETWORK
network_module_deinit();
#endif
+
+ #if MICROPY_VFS
+ mp_vfs_mount_t *vfs = MP_STATE_VM(vfs_mount_table);
+
+ // Unmount all heap allocated vfs mounts.
+ while (gc_nbytes(vfs) > 0) {
+ vfs = vfs->next;
+ }
+ MP_STATE_VM(vfs_mount_table) = vfs;
+ MP_STATE_VM(vfs_cur) = vfs;
+ #endif
+
+ // Run any finalizers before we stop using the heap.
+ gc_sweep_all();
}
#define STRING_LIST(...) {__VA_ARGS__, ""}
@@ -309,12 +323,12 @@ void __attribute__ ((noinline)) run_boot_py(safe_mode_t safe_mode) {
mp_hal_delay_ms(1500);
// USB isn't up, so we can write the file.
- filesystem_writable_by_python(true);
+ filesystem_set_internal_writable_by_usb(false);
f_open(fs, boot_output_file, CIRCUITPY_BOOT_OUTPUT_FILE, FA_WRITE | FA_CREATE_ALWAYS);
// Switch the filesystem back to non-writable by Python now instead of later,
// since boot.py might change it back to writable.
- filesystem_writable_by_python(false);
+ filesystem_set_internal_writable_by_usb(true);
// Write version info to boot_out.txt.
mp_hal_stdout_tx_str(MICROPY_FULL_VERSION_INFO);
@@ -402,7 +416,8 @@ int __attribute__((used)) main(void) {
// By default our internal flash is readonly to local python code and
// writable over USB. Set it here so that boot.py can change it.
- filesystem_writable_by_python(false);
+ filesystem_set_internal_concurrent_write_protection(true);
+ filesystem_set_internal_writable_by_usb(true);
run_boot_py(safe_mode);
diff --git a/ports/atmel-samd/Makefile b/ports/atmel-samd/Makefile
index b608f3a20..0851b6bbb 100644
--- a/ports/atmel-samd/Makefile
+++ b/ports/atmel-samd/Makefile
@@ -102,9 +102,9 @@ ifeq ($(DEBUG), 1)
# Turn on Python modules useful for debugging (e.g. uheap, ustack).
CFLAGS += -ggdb
# You may want to disable -flto if it interferes with debugging.
- # CFLAGS += -flto
+ CFLAGS += -flto
# You may want to enable these flags to make setting breakpoints easier.
- CFLAGS += -fno-inline -fno-ipa-sra
+ # CFLAGS += -fno-inline -fno-ipa-sra
ifeq ($(CHIP_FAMILY), samd21)
CFLAGS += -DENABLE_MICRO_TRACE_BUFFER
endif
@@ -112,7 +112,7 @@ else
# -finline-limit can shrink the image size.
# -finline-limit=80 or so is similar to not having it on.
# There is no simple default value, though.
- ifdef INTERNAL_FLASH_FILESYSTEM
+ ifeq ($(INTERNAL_FLASH_FILESYSTEM),1)
CFLAGS += -finline-limit=50
endif
ifdef CFLAGS_INLINE_LIMIT
@@ -245,6 +245,7 @@ SRC_C = \
reset.c \
supervisor/shared/memory.c \
tick.c \
+ timer_handler.c \
ifeq ($(CIRCUITPY_NETWORK),1)
diff --git a/ports/atmel-samd/boards/pirkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/pirkey_m0/mpconfigboard.mk
index 6b252e89b..8bac35604 100644
--- a/ports/atmel-samd/boards/pirkey_m0/mpconfigboard.mk
+++ b/ports/atmel-samd/boards/pirkey_m0/mpconfigboard.mk
@@ -13,7 +13,7 @@ LONGINT_IMPL = NONE
CIRCUITPY_ANALOGIO = 0
CIRCUITPY_MATH = 0
CIRCUITPY_NEOPIXEL_WRITE = 0
-#CIRCUITPY_RTC = 0
+CIRCUITPY_RTC = 0
CIRCUITPY_SAMD = 0
CIRCUITPY_USB_MIDI = 0
CIRCUITPY_SMALL_BUILD = 1
diff --git a/ports/atmel-samd/boards/pyportal/board.c b/ports/atmel-samd/boards/pyportal/board.c
index d9631e2dc..d2c328850 100644
--- a/ports/atmel-samd/boards/pyportal/board.c
+++ b/ports/atmel-samd/boards/pyportal/board.c
@@ -48,7 +48,7 @@ uint8_t display_init_sequence[] = {
0xc1, 1, 0x10, // Power control SAP[2:0];BT[3:0]
0xc5, 2, 0x3e, 0x28, // VCM control
0xc7, 1, 0x86, // VCM control2
- 0x36, 1, 0x08, // Memory Access Control
+ 0x36, 1, 0xa8, // Memory Access Control
0x37, 1, 0x00, // Vertical scroll zero
0x3a, 1, 0x55, // COLMOD: Pixel Format Set
0xb1, 2, 0x00, 0x18, // Frame Rate Control (In Normal Mode/Full Colors)
@@ -82,7 +82,7 @@ void board_init(void) {
240, // Height
0, // column start
0, // row start
- 270, // rotation
+ 0, // rotation
16, // Color depth
MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command
MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command
diff --git a/ports/atmel-samd/boards/pyportal/pins.c b/ports/atmel-samd/boards/pyportal/pins.c
index b2827b133..a653e76a4 100644
--- a/ports/atmel-samd/boards/pyportal/pins.c
+++ b/ports/atmel-samd/boards/pyportal/pins.c
@@ -31,6 +31,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_OBJ_NEW_QSTR(MP_QSTR_TFT_CS), MP_ROM_PTR(&pin_PB06) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_TFT_TE), MP_ROM_PTR(&pin_PB07) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_TFT_WR), MP_ROM_PTR(&pin_PB09) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_TFT_DC), MP_ROM_PTR(&pin_PB09) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_TFT_BACKLIGHT), MP_ROM_PTR(&pin_PB31) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_LCD_DATA0), MP_ROM_PTR(&pin_PA16) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_LCD_DATA1), MP_ROM_PTR(&pin_PA17) },
diff --git a/ports/atmel-samd/boards/sam32/mpconfigboard.mk b/ports/atmel-samd/boards/sam32/mpconfigboard.mk
index c41f45456..d76696b39 100644
--- a/ports/atmel-samd/boards/sam32/mpconfigboard.mk
+++ b/ports/atmel-samd/boards/sam32/mpconfigboard.mk
@@ -4,7 +4,6 @@ USB_PID = 0xEDBE
USB_PRODUCT = "SAM32"
USB_MANUFACTURER = "maholli"
-QSPI_FLASH_FILESYSTEM = 0
INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = MPZ
diff --git a/ports/atmel-samd/common-hal/analogio/AnalogOut.c b/ports/atmel-samd/common-hal/analogio/AnalogOut.c
index 19475e00b..9ac1f7bd1 100644
--- a/ports/atmel-samd/common-hal/analogio/AnalogOut.c
+++ b/ports/atmel-samd/common-hal/analogio/AnalogOut.c
@@ -31,6 +31,7 @@
#include "py/runtime.h"
#include "shared-bindings/analogio/AnalogOut.h"
+#include "shared-bindings/audioio/AudioOut.h"
#include "shared-bindings/microcontroller/Pin.h"
#include "supervisor/shared/translate.h"
@@ -138,5 +139,17 @@ void common_hal_analogio_analogout_set_value(analogio_analogout_obj_t *self,
}
void analogout_reset(void) {
- // AudioOut resets the DAC in case its been used for audio which requires special handling.
+ // audioout_reset also resets the DAC, and does a smooth ramp down to avoid clicks
+ // if it was enabled, so do that instead if AudioOut is enabled.
+#if CIRCUITPY_AUDIOIO
+ audioout_reset();
+#else
+ #ifdef SAMD21
+ while (DAC->STATUS.reg & DAC_STATUS_SYNCBUSY) {}
+ #endif
+ #ifdef SAMD51
+ while (DAC->SYNCBUSY.reg & DAC_SYNCBUSY_SWRST) {}
+ #endif
+ DAC->CTRLA.reg |= DAC_CTRLA_SWRST;
+#endif
}
diff --git a/ports/atmel-samd/common-hal/audioio/AudioOut.c b/ports/atmel-samd/common-hal/audioio/AudioOut.c
index 596f3214a..a75abd324 100644
--- a/ports/atmel-samd/common-hal/audioio/AudioOut.c
+++ b/ports/atmel-samd/common-hal/audioio/AudioOut.c
@@ -47,6 +47,7 @@
#endif
#include "audio_dma.h"
+#include "timer_handler.h"
#include "samd/dma.h"
#include "samd/events.h"
@@ -251,6 +252,7 @@ void common_hal_audioio_audioout_construct(audioio_audioout_obj_t* self,
tc_gclk = 1;
#endif
+ set_timer_handler(true, tc_index, TC_HANDLER_NO_INTERRUPT);
turn_on_clocks(true, tc_index, tc_gclk);
// Don't bother setting the period. We set it before you playback anything.
diff --git a/ports/atmel-samd/common-hal/pulseio/PWMOut.c b/ports/atmel-samd/common-hal/pulseio/PWMOut.c
index 2740a9e55..19daaa14f 100644
--- a/ports/atmel-samd/common-hal/pulseio/PWMOut.c
+++ b/ports/atmel-samd/common-hal/pulseio/PWMOut.c
@@ -31,6 +31,7 @@
#include "common-hal/pulseio/PWMOut.h"
#include "shared-bindings/pulseio/PWMOut.h"
#include "shared-bindings/microcontroller/Processor.h"
+#include "timer_handler.h"
#include "atmel_start_pins.h"
#include "hal/utils/include/utils_repeat_macro.h"
@@ -234,6 +235,7 @@ pwmout_result_t common_hal_pulseio_pwmout_construct(pulseio_pwmout_obj_t* self,
}
}
+ set_timer_handler(timer->is_tc, timer->index, TC_HANDLER_NO_INTERRUPT);
// We use the zeroeth clock on either port to go full speed.
turn_on_clocks(timer->is_tc, timer->index, 0);
diff --git a/ports/atmel-samd/common-hal/pulseio/PulseOut.c b/ports/atmel-samd/common-hal/pulseio/PulseOut.c
index 8c9f28eb8..528a5c808 100644
--- a/ports/atmel-samd/common-hal/pulseio/PulseOut.c
+++ b/ports/atmel-samd/common-hal/pulseio/PulseOut.c
@@ -37,6 +37,7 @@
#include "py/runtime.h"
#include "shared-bindings/pulseio/PulseOut.h"
#include "supervisor/shared/translate.h"
+#include "timer_handler.h"
// This timer is shared amongst all PulseOut objects under the assumption that
// the code is single threaded.
@@ -112,6 +113,7 @@ void common_hal_pulseio_pulseout_construct(pulseio_pulseout_obj_t* self,
pulseout_tc_index = index;
+ set_timer_handler(true, index, TC_HANDLER_PULSEOUT);
// We use GCLK0 for SAMD21 and GCLK1 for SAMD51 because they both run at 48mhz making our
// math the same across the boards.
#ifdef SAMD21
diff --git a/ports/atmel-samd/mpconfigport.h b/ports/atmel-samd/mpconfigport.h
index 0b62baa5a..dbf1c93f3 100644
--- a/ports/atmel-samd/mpconfigport.h
+++ b/ports/atmel-samd/mpconfigport.h
@@ -36,8 +36,6 @@
#define SPI_FLASH_MAX_BAUDRATE 8000000
#define CIRCUITPY_DEFAULT_STACK_SIZE 4096
-#define CIRCUITPY_I2C_SLAVE (0)
-
#define MICROPY_CPYTHON_COMPAT (0)
#define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (0)
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (0)
@@ -81,11 +79,10 @@
#include "peripherals/samd/dma.h"
+#include "py/circuitpy_mpconfig.h"
+
#define MICROPY_PORT_ROOT_POINTERS \
CIRCUITPY_COMMON_ROOT_POINTERS \
- mp_obj_t playing_audio[AUDIO_DMA_CHANNEL_COUNT] \
- ;
-
-#include "py/circuitpy_mpconfig.h"
+ mp_obj_t playing_audio[AUDIO_DMA_CHANNEL_COUNT];
#endif // __INCLUDED_MPCONFIGPORT_H
diff --git a/ports/atmel-samd/mpconfigport.mk b/ports/atmel-samd/mpconfigport.mk
index 7db581dd6..bb5e222f0 100644
--- a/ports/atmel-samd/mpconfigport.mk
+++ b/ports/atmel-samd/mpconfigport.mk
@@ -14,6 +14,11 @@ ifeq ($(LONGINT_IMPL),LONGLONG)
MPY_TOOL_LONGINT_IMPL = -mlongint-impl=longlong
endif
+# Put samd51-only choices here.
+ifeq ($(CHIP_FAMILY),samd51)
+CIRCUITPY_SAMD = 1
+endif
+
INTERNAL_LIBM = 1
USB_SERIAL_NUMBER_LENGTH = 32
diff --git a/ports/atmel-samd/peripherals b/ports/atmel-samd/peripherals
-Subproject 235cb97d72648ec2889aba25ff4a34c4f32e2ac
+Subproject 6416828bb6821779d4c62fa3c7d41c95634173c
diff --git a/ports/atmel-samd/supervisor/port.c b/ports/atmel-samd/supervisor/port.c
index 282cbf8ff..aee082de0 100644
--- a/ports/atmel-samd/supervisor/port.c
+++ b/ports/atmel-samd/supervisor/port.c
@@ -194,20 +194,23 @@ safe_mode_t port_init(void) {
void reset_port(void) {
reset_sercoms();
-#if defined(EXPRESS_BOARD) && !defined(__SAMR21G18A__)
+#if CIRCUITPY_AUDIOIO
audio_dma_reset();
audioout_reset();
- #if !defined(__SAMD51G19A__) && !defined(__SAMD51G18A__)
+#endif
+#if CIRCUITPY_AUDIOBUSIO
i2sout_reset();
- #endif
//pdmin_reset();
#endif
-#ifdef SAMD21
+
+#if CIRCUITPY_TOUCHIO
touchin_reset();
#endif
eic_reset();
+#if CIRCUITPY_PULSEIO
pulseout_reset();
pwmout_reset();
+#endif
#if CIRCUITPY_ANALOGIO
analogin_reset();
diff --git a/ports/atmel-samd/timer_handler.c b/ports/atmel-samd/timer_handler.c
new file mode 100644
index 000000000..26f984d96
--- /dev/null
+++ b/ports/atmel-samd/timer_handler.c
@@ -0,0 +1,51 @@
+/*
+ * 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 <stdbool.h>
+#include <stdint.h>
+
+#include "timer_handler.h"
+
+#include "common-hal/pulseio/PulseOut.h"
+
+static uint8_t tc_handler[TC_INST_NUM];
+
+void set_timer_handler(bool is_tc, uint8_t index, uint8_t timer_handler) {
+ if (is_tc) {
+ tc_handler[index] = timer_handler;
+ }
+}
+
+void shared_timer_handler(bool is_tc, uint8_t index) {
+ // Add calls to interrupt handlers for specific functionality here.
+ // Make sure to add the handler #define to timer_handler.h
+ if (is_tc) {
+ uint8_t handler = tc_handler[index];
+ if (handler == TC_HANDLER_PULSEOUT) {
+ pulseout_interrupt_handler(index);
+ }
+ }
+}
diff --git a/ports/atmel-samd/timer_handler.h b/ports/atmel-samd/timer_handler.h
new file mode 100644
index 000000000..f7a6e6e0e
--- /dev/null
+++ b/ports/atmel-samd/timer_handler.h
@@ -0,0 +1,35 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2018 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.
+ */
+#ifndef MICROPY_INCLUDED_ATMEL_SAMD_TIMER_HANDLER_H
+#define MICROPY_INCLUDED_ATMEL_SAMD_TIMER_HANDLER_H
+
+#define TC_HANDLER_NO_INTERRUPT 0x0
+#define TC_HANDLER_PULSEOUT 0x1
+
+void set_timer_handler(bool is_tc, uint8_t index, uint8_t timer_handler);
+void shared_timer_handler(bool is_tc, uint8_t index);
+
+#endif // MICROPY_INCLUDED_ATMEL_SAMD_TIMER_HANDLER_H
diff --git a/ports/nrf/bluetooth/ble_drv.c b/ports/nrf/bluetooth/ble_drv.c
index 4e7523691..bb395ce4c 100644
--- a/ports/nrf/bluetooth/ble_drv.c
+++ b/ports/nrf/bluetooth/ble_drv.c
@@ -35,27 +35,20 @@
#include "nrf_soc.h"
#include "nrfx_power.h"
#include "py/misc.h"
+#include "py/mpstate.h"
nrf_nvic_state_t nrf_nvic_state = { 0 };
__attribute__((aligned(4)))
static uint8_t m_ble_evt_buf[sizeof(ble_evt_t) + (BLE_GATT_ATT_MTU_DEFAULT)];
-typedef struct event_handler {
- struct event_handler *next;
- void *param;
- ble_drv_evt_handler_t func;
-} event_handler_t;
-
-static event_handler_t *m_event_handlers = NULL;
-
void ble_drv_reset() {
// Linked list items will be gc'd.
- m_event_handlers = NULL;
+ MP_STATE_VM(ble_drv_evt_handler_entries) = NULL;
}
void ble_drv_add_event_handler(ble_drv_evt_handler_t func, void *param) {
- event_handler_t *it = m_event_handlers;
+ ble_drv_evt_handler_entry_t *it = MP_STATE_VM(ble_drv_evt_handler_entries);
while (it != NULL) {
// If event handler and its corresponding param are already on the list, don't add again.
if ((it->func == func) && (it->param == param)) {
@@ -65,17 +58,17 @@ void ble_drv_add_event_handler(ble_drv_evt_handler_t func, void *param) {
}
// Add a new handler to the front of the list
- event_handler_t *handler = m_new_ll(event_handler_t, 1);
- handler->next = m_event_handlers;
+ ble_drv_evt_handler_entry_t *handler = m_new_ll(ble_drv_evt_handler_entry_t, 1);
+ handler->next = MP_STATE_VM(ble_drv_evt_handler_entries);
handler->param = param;
handler->func = func;
- m_event_handlers = handler;
+ MP_STATE_VM(ble_drv_evt_handler_entries) = handler;
}
void ble_drv_remove_event_handler(ble_drv_evt_handler_t func, void *param) {
- event_handler_t *it = m_event_handlers;
- event_handler_t **prev = &m_event_handlers;
+ ble_drv_evt_handler_entry_t *it = MP_STATE_VM(ble_drv_evt_handler_entries);
+ ble_drv_evt_handler_entry_t **prev = &MP_STATE_VM(ble_drv_evt_handler_entries);
while (it != NULL) {
if ((it->func == func) && (it->param == param)) {
// Splice out the matching handler.
@@ -122,7 +115,7 @@ void SD_EVT_IRQHandler(void) {
break;
}
- event_handler_t *it = m_event_handlers;
+ ble_drv_evt_handler_entry_t *it = MP_STATE_VM(ble_drv_evt_handler_entries);
while (it != NULL) {
it->func((ble_evt_t *)m_ble_evt_buf, it->param);
it = it->next;
diff --git a/ports/nrf/bluetooth/ble_drv.h b/ports/nrf/bluetooth/ble_drv.h
index a6f7b9033..8d3846a7b 100644
--- a/ports/nrf/bluetooth/ble_drv.h
+++ b/ports/nrf/bluetooth/ble_drv.h
@@ -50,6 +50,12 @@
typedef void (*ble_drv_evt_handler_t)(ble_evt_t*, void*);
+typedef struct ble_drv_evt_handler_entry {
+ struct ble_drv_evt_handler_entry *next;
+ void *param;
+ ble_drv_evt_handler_t func;
+} ble_drv_evt_handler_entry_t;
+
void ble_drv_reset(void);
void ble_drv_add_event_handler(ble_drv_evt_handler_t func, void *param);
void ble_drv_remove_event_handler(ble_drv_evt_handler_t func, void *param);
diff --git a/ports/nrf/boards/feather_nrf52840_express/mpconfigboard.h b/ports/nrf/boards/feather_nrf52840_express/mpconfigboard.h
index 764decbca..eb8be7608 100644
--- a/ports/nrf/boards/feather_nrf52840_express/mpconfigboard.h
+++ b/ports/nrf/boards/feather_nrf52840_express/mpconfigboard.h
@@ -37,7 +37,7 @@
#define MICROPY_HW_LED_STATUS (&pin_P1_15)
-#ifdef QSPI_FLASH_FILESYSTEM
+#if QSPI_FLASH_FILESYSTEM
#define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(0, 17)
#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 22)
#define MICROPY_QSPI_DATA2 NRF_GPIO_PIN_MAP(0, 23)
@@ -46,7 +46,7 @@
#define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(0, 20)
#endif
-#ifdef SPI_FLASH_FILESYSTEM
+#if SPI_FLASH_FILESYSTEM
#define SPI_FLASH_MOSI_PIN &pin_P0_17
#define SPI_FLASH_MISO_PIN &pin_P0_22
#define SPI_FLASH_SCK_PIN &pin_P0_19
diff --git a/ports/nrf/boards/particle_argon/mpconfigboard.h b/ports/nrf/boards/particle_argon/mpconfigboard.h
index 902f0c2e7..0ee785c31 100644
--- a/ports/nrf/boards/particle_argon/mpconfigboard.h
+++ b/ports/nrf/boards/particle_argon/mpconfigboard.h
@@ -39,7 +39,7 @@
#define MICROPY_HW_RGB_LED_GREEN (&pin_P0_14)
#define MICROPY_HW_RGB_LED_BLUE (&pin_P0_15)
-#ifdef QSPI_FLASH_FILESYSTEM
+#if QSPI_FLASH_FILESYSTEM
#define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(0, 20)
#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 21)
#define MICROPY_QSPI_DATA2 NRF_GPIO_PIN_MAP(0, 22)
@@ -48,7 +48,7 @@
#define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(0, 17)
#endif
-#ifdef SPI_FLASH_FILESYSTEM
+#if SPI_FLASH_FILESYSTEM
#define SPI_FLASH_MOSI_PIN &pin_P0_20
#define SPI_FLASH_MISO_PIN &pin_P0_21
#define SPI_FLASH_SCK_PIN &pin_P0_19
diff --git a/ports/nrf/boards/particle_boron/mpconfigboard.h b/ports/nrf/boards/particle_boron/mpconfigboard.h
index 1e9b78b45..b814fc694 100644
--- a/ports/nrf/boards/particle_boron/mpconfigboard.h
+++ b/ports/nrf/boards/particle_boron/mpconfigboard.h
@@ -39,7 +39,7 @@
#define MICROPY_HW_RGB_LED_GREEN (&pin_P0_14)
#define MICROPY_HW_RGB_LED_BLUE (&pin_P0_15)
-#ifdef QSPI_FLASH_FILESYSTEM
+#if QSPI_FLASH_FILESYSTEM
#define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(0, 20)
#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 21)
#define MICROPY_QSPI_DATA2 NRF_GPIO_PIN_MAP(0, 22)
@@ -48,7 +48,7 @@
#define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(0, 17)
#endif
-#ifdef SPI_FLASH_FILESYSTEM
+#if SPI_FLASH_FILESYSTEM
#define SPI_FLASH_MOSI_PIN &pin_P0_20
#define SPI_FLASH_MISO_PIN &pin_P0_21
#define SPI_FLASH_SCK_PIN &pin_P0_19
diff --git a/ports/nrf/boards/particle_xenon/mpconfigboard.h b/ports/nrf/boards/particle_xenon/mpconfigboard.h
index 7c0f238a3..41551d2e1 100644
--- a/ports/nrf/boards/particle_xenon/mpconfigboard.h
+++ b/ports/nrf/boards/particle_xenon/mpconfigboard.h
@@ -39,7 +39,7 @@
#define MICROPY_HW_RGB_LED_GREEN (&pin_P0_14)
#define MICROPY_HW_RGB_LED_BLUE (&pin_P0_15)
-#ifdef QSPI_FLASH_FILESYSTEM
+#if QSPI_FLASH_FILESYSTEM
#define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(0, 20)
#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 21)
#define MICROPY_QSPI_DATA2 NRF_GPIO_PIN_MAP(0, 22)
@@ -48,7 +48,7 @@
#define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(0, 17)
#endif
-#ifdef SPI_FLASH_FILESYSTEM
+#if SPI_FLASH_FILESYSTEM
#define SPI_FLASH_MOSI_PIN &pin_P0_20
#define SPI_FLASH_MISO_PIN &pin_P0_21
#define SPI_FLASH_SCK_PIN &pin_P0_19
diff --git a/ports/nrf/boards/pca10056/mpconfigboard.h b/ports/nrf/boards/pca10056/mpconfigboard.h
index c083b329d..48ef7f1c3 100644
--- a/ports/nrf/boards/pca10056/mpconfigboard.h
+++ b/ports/nrf/boards/pca10056/mpconfigboard.h
@@ -49,7 +49,7 @@
// Quad mode: If all DATA0 --> DATA3 are valid
// Dual mode: If DATA0 and DATA1 are valid while either DATA2 and/or DATA3 are invalid
// Single mode: If only DATA0 is valid
-#ifdef QSPI_FLASH_FILESYSTEM
+#if QSPI_FLASH_FILESYSTEM
#define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(0, 20)
#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 21)
#define MICROPY_QSPI_DATA2 NRF_GPIO_PIN_MAP(0, 22)
@@ -58,7 +58,7 @@
#define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(0, 17)
#endif
-#ifdef SPI_FLASH_FILESYSTEM
+#if SPI_FLASH_FILESYSTEM
#define SPI_FLASH_MOSI_PIN &pin_P0_20
#define SPI_FLASH_MISO_PIN &pin_P0_21
#define SPI_FLASH_SCK_PIN &pin_P0_19
diff --git a/ports/nrf/boards/sparkfun_nrf52840_mini/mpconfigboard.h b/ports/nrf/boards/sparkfun_nrf52840_mini/mpconfigboard.h
index 3c13a4ad5..a5ed69b2b 100644
--- a/ports/nrf/boards/sparkfun_nrf52840_mini/mpconfigboard.h
+++ b/ports/nrf/boards/sparkfun_nrf52840_mini/mpconfigboard.h
@@ -49,7 +49,7 @@
// Quad mode: If all DATA0 --> DATA3 are valid
// Dual mode: If DATA0 and DATA1 are valid while either DATA2 and/or DATA3 are invalid
// Single mode: If only DATA0 is valid
-/*#ifdef QSPI_FLASH_FILESYSTEM
+/*#if QSPI_FLASH_FILESYSTEM
#define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(0, 20)
#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 21)
#define MICROPY_QSPI_DATA2 NRF_GPIO_PIN_MAP(0, 22)
@@ -58,7 +58,7 @@
#define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(0, 17)
#endif
-#ifdef SPI_FLASH_FILESYSTEM
+#if SPI_FLASH_FILESYSTEM
#define SPI_FLASH_MOSI_PIN &pin_P0_20
#define SPI_FLASH_MISO_PIN &pin_P0_21
#define SPI_FLASH_SCK_PIN &pin_P0_19
diff --git a/ports/nrf/boards/sparkfun_nrf52840_mini/mpconfigboard.mk b/ports/nrf/boards/sparkfun_nrf52840_mini/mpconfigboard.mk
index 73b9ad767..212a85d57 100644
--- a/ports/nrf/boards/sparkfun_nrf52840_mini/mpconfigboard.mk
+++ b/ports/nrf/boards/sparkfun_nrf52840_mini/mpconfigboard.mk
@@ -21,6 +21,4 @@ endif
NRF_DEFINES += -DNRF52840_XXAA -DNRF52840
-QSPI_FLASH_FILESYSTEM = 0
-EXTERNAL_FLASH_DEVICE_COUNT = 0
-EXTERNAL_FLASH_DEVICES =
+INTERNAL_FLASH_FILESYSTEM = 1
diff --git a/ports/nrf/common-hal/bleio/CharacteristicBuffer.c b/ports/nrf/common-hal/bleio/CharacteristicBuffer.c
index 42e45abdf..19b3b85ea 100644
--- a/ports/nrf/common-hal/bleio/CharacteristicBuffer.c
+++ b/ports/nrf/common-hal/bleio/CharacteristicBuffer.c
@@ -29,7 +29,7 @@
#include "ble_drv.h"
#include "ble_gatts.h"
-#include "sd_mutex.h"
+#include "nrf_nvic.h"
#include "lib/utils/interrupt_char.h"
#include "py/runtime.h"
@@ -47,14 +47,14 @@ STATIC void characteristic_buffer_on_ble_evt(ble_evt_t *ble_evt, void *param) {
ble_gatts_evt_write_t *evt_write = &ble_evt->evt.gatts_evt.params.write;
// Event handle must match the handle for my characteristic.
if (evt_write->handle == self->characteristic->handle) {
- // Push all the data onto the ring buffer, but wait for any reads to finish.
- sd_mutex_acquire_wait_no_vm(&self->ringbuf_mutex);
+ // Push all the data onto the ring buffer.
+ uint8_t is_nested_critical_region;
+ sd_nvic_critical_region_enter(&is_nested_critical_region);
for (size_t i = 0; i < evt_write->len; i++) {
ringbuf_put(&self->ringbuf, evt_write->data[i]);
}
- // Don't check for errors: we're in an event handler.
- sd_mutex_release(&self->ringbuf_mutex);
- break;
+ sd_nvic_critical_region_exit(is_nested_critical_region);
+ break;
}
}
}
@@ -72,7 +72,6 @@ void common_hal_bleio_characteristic_buffer_construct(bleio_characteristic_buffe
// This is a macro.
// true means long-lived, so it won't be moved.
ringbuf_alloc(&self->ringbuf, buffer_size, true);
- sd_mutex_new(&self->ringbuf_mutex);
ble_drv_add_event_handler(characteristic_buffer_on_ble_evt, self);
@@ -92,8 +91,9 @@ int common_hal_bleio_characteristic_buffer_read(bleio_characteristic_buffer_obj_
#endif
}
- // Copy received data. Lock out writes while copying.
- sd_mutex_acquire_wait(&self->ringbuf_mutex);
+ // Copy received data. Lock out write interrupt handler while copying.
+ uint8_t is_nested_critical_region;
+ sd_nvic_critical_region_enter(&is_nested_critical_region);
size_t rx_bytes = MIN(ringbuf_count(&self->ringbuf), len);
for ( size_t i = 0; i < rx_bytes; i++ ) {
@@ -101,20 +101,25 @@ int common_hal_bleio_characteristic_buffer_read(bleio_characteristic_buffer_obj_
}
// Writes now OK.
- sd_mutex_release_check(&self->ringbuf_mutex);
+ sd_nvic_critical_region_exit(is_nested_critical_region);
return rx_bytes;
}
uint32_t common_hal_bleio_characteristic_buffer_rx_characters_available(bleio_characteristic_buffer_obj_t *self) {
- return ringbuf_count(&self->ringbuf);
+ uint8_t is_nested_critical_region;
+ sd_nvic_critical_region_enter(&is_nested_critical_region);
+ uint16_t count = ringbuf_count(&self->ringbuf);
+ sd_nvic_critical_region_exit(is_nested_critical_region);
+ return count;
}
void common_hal_bleio_characteristic_buffer_clear_rx_buffer(bleio_characteristic_buffer_obj_t *self) {
// prevent conflict with uart irq
- sd_mutex_acquire_wait(&self->ringbuf_mutex);
+ uint8_t is_nested_critical_region;
+ sd_nvic_critical_region_enter(&is_nested_critical_region);
ringbuf_clear(&self->ringbuf);
- sd_mutex_release_check(&self->ringbuf_mutex);
+ sd_nvic_critical_region_exit(is_nested_critical_region);
}
bool common_hal_bleio_characteristic_buffer_deinited(bleio_characteristic_buffer_obj_t *self) {
diff --git a/ports/nrf/common-hal/bleio/CharacteristicBuffer.h b/ports/nrf/common-hal/bleio/CharacteristicBuffer.h
index f5c715154..b36f63fec 100644
--- a/ports/nrf/common-hal/bleio/CharacteristicBuffer.h
+++ b/ports/nrf/common-hal/bleio/CharacteristicBuffer.h
@@ -38,7 +38,6 @@ typedef struct {
uint32_t timeout_ms;
// Ring buffer storing consecutive incoming values.
ringbuf_t ringbuf;
- nrf_mutex_t ringbuf_mutex;
} bleio_characteristic_buffer_obj_t;
#endif // MICROPY_INCLUDED_COMMON_HAL_BLEIO_CHARACTERISTICBUFFER_H
diff --git a/ports/nrf/mpconfigport.h b/ports/nrf/mpconfigport.h
index cb6e2e350..1d863ed72 100644
--- a/ports/nrf/mpconfigport.h
+++ b/ports/nrf/mpconfigport.h
@@ -28,6 +28,8 @@
#ifndef NRF5_MPCONFIGPORT_H__
#define NRF5_MPCONFIGPORT_H__
+#include "ble_drv.h"
+
#define MICROPY_CPYTHON_COMPAT (1)
//#define MICROPY_MODULE_BUILTIN_INIT (1) // TODO check this
//#define MICROPY_MODULE_WEAK_LINKS (1) // TODO check this
@@ -52,10 +54,11 @@
// 24kiB stack
#define CIRCUITPY_DEFAULT_STACK_SIZE 0x6000
+#include "py/circuitpy_mpconfig.h"
+
#define MICROPY_PORT_ROOT_POINTERS \
CIRCUITPY_COMMON_ROOT_POINTERS \
- ;
+ ble_drv_evt_handler_entry_t* ble_drv_evt_handler_entries; \
-#include "py/circuitpy_mpconfig.h"
#endif // NRF5_MPCONFIGPORT_H__
diff --git a/ports/nrf/mpconfigport.mk b/ports/nrf/mpconfigport.mk
index 29b36ada8..c90734c63 100644
--- a/ports/nrf/mpconfigport.mk
+++ b/ports/nrf/mpconfigport.mk
@@ -7,6 +7,9 @@ INTERNAL_LIBM = 1
USB_SERIAL_NUMBER_LENGTH = 16
+# All nRF ports have longints.
+LONGINT_IMPL = MPZ
+
# No DAC, so no regular audio.
CIRCUITPY_AUDIOIO = 0
diff --git a/ports/unix/Makefile b/ports/unix/Makefile
index 99b65ec1b..05b1fcaf8 100644
--- a/ports/unix/Makefile
+++ b/ports/unix/Makefile
@@ -149,6 +149,7 @@ SRC_C = \
alloc.c \
coverage.c \
fatfs_port.c \
+ supervisor/stub/filesystem.c \
supervisor/stub/serial.c \
supervisor/stub/stack.c \
supervisor/shared/translate.c \
diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h
index 721b3c538..6f9705485 100644
--- a/py/circuitpy_mpconfig.h
+++ b/py/circuitpy_mpconfig.h
@@ -33,6 +33,9 @@
#ifndef __INCLUDED_MPCONFIG_CIRCUITPY_H
#define __INCLUDED_MPCONFIG_CIRCUITPY_H
+// This is CircuitPython.
+#define CIRCUITPY 1
+
// REPR_C encodes qstrs, 31-bit ints, and 30-bit floats in a single 32-bit word.
#define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_C)
@@ -123,7 +126,6 @@
#define MICROPY_FATFS_USE_LABEL (1)
#define MICROPY_FATFS_RPATH (2)
#define MICROPY_FATFS_MULTI_PARTITION (1)
-#define MICROPY_FATFS_NUM_PERSISTENT (1)
// Only enable this if you really need it. It allocates a byte cache of this size.
// #define MICROPY_FATFS_MAX_SS (4096)
@@ -168,7 +170,6 @@ typedef long mp_off_t;
{ MP_OBJ_NEW_QSTR(MP_QSTR_input), (mp_obj_t)&mp_builtin_input_obj }, \
{ MP_OBJ_NEW_QSTR(MP_QSTR_open), (mp_obj_t)&mp_builtin_open_obj },
-
// board specific definitions
#include "mpconfigboard.h"
@@ -176,20 +177,21 @@ typedef long mp_off_t;
// Remove some lesser-used functionality to make small builds fit.
#define MICROPY_BUILTIN_METHOD_CHECK_SELF_ARG (CIRCUITPY_FULL_BUILD)
-#define MICROPY_PY_ALL_SPECIAL_METHODS (CIRCUITPY_FULL_BUILD)
-#define MICROPY_PY_BUILTINS_COMPLEX (CIRCUITPY_FULL_BUILD)
-#define MICROPY_PY_BUILTINS_FROZENSET (CIRCUITPY_FULL_BUILD)
-#define MICROPY_PY_BUILTINS_REVERSED (CIRCUITPY_FULL_BUILD)
-#define MICROPY_PY_BUILTINS_STR_CENTER (CIRCUITPY_FULL_BUILD)
-#define MICROPY_PY_BUILTINS_STR_PARTITION (CIRCUITPY_FULL_BUILD)
-#define MICROPY_PY_BUILTINS_STR_SPLITLINES (CIRCUITPY_FULL_BUILD)
-#define MICROPY_PY_UERRNO (CIRCUITPY_FULL_BUILD)
+#define MICROPY_MODULE_WEAK_LINKS (CIRCUITPY_FULL_BUILD)
+#define MICROPY_PY_ALL_SPECIAL_METHODS (CIRCUITPY_FULL_BUILD)
+#define MICROPY_PY_BUILTINS_COMPLEX (CIRCUITPY_FULL_BUILD)
+#define MICROPY_PY_BUILTINS_FROZENSET (CIRCUITPY_FULL_BUILD)
+#define MICROPY_PY_BUILTINS_REVERSED (CIRCUITPY_FULL_BUILD)
+#define MICROPY_PY_BUILTINS_STR_CENTER (CIRCUITPY_FULL_BUILD)
+#define MICROPY_PY_BUILTINS_STR_PARTITION (CIRCUITPY_FULL_BUILD)
+#define MICROPY_PY_BUILTINS_STR_SPLITLINES (CIRCUITPY_FULL_BUILD)
+#define MICROPY_PY_UERRNO (CIRCUITPY_FULL_BUILD)
// Opposite setting is deliberate.
-#define MICROPY_PY_UERRNO_ERRORCODE (!CIRCUITPY_FULL_BUILD)
-#define MICROPY_PY_URE (CIRCUITPY_FULL_BUILD)
-#define MICROPY_PY_URE_MATCH_GROUPS (CIRCUITPY_FULL_BUILD)
-#define MICROPY_PY_URE_MATCH_SPAN_START_END (CIRCUITPY_FULL_BUILD)
-#define MICROPY_PY_URE_SUB (CIRCUITPY_FULL_BUILD)
+#define MICROPY_PY_UERRNO_ERRORCODE (!CIRCUITPY_FULL_BUILD)
+#define MICROPY_PY_URE (CIRCUITPY_FULL_BUILD)
+#define MICROPY_PY_URE_MATCH_GROUPS (CIRCUITPY_FULL_BUILD)
+#define MICROPY_PY_URE_MATCH_SPAN_START_END (CIRCUITPY_FULL_BUILD)
+#define MICROPY_PY_URE_SUB (CIRCUITPY_FULL_BUILD)
// LONGINT_IMPL_xxx are defined in the Makefile.
//
@@ -204,6 +206,7 @@ typedef long mp_off_t;
#ifdef LONGINT_IMPL_LONGLONG
#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_LONGLONG)
+#define MP_SSIZE_MAX (0x7fffffff)
#endif
@@ -340,8 +343,10 @@ extern const struct _mp_obj_module_t nvm_module;
#if CIRCUITPY_OS
extern const struct _mp_obj_module_t os_module;
#define OS_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_os), (mp_obj_t)&os_module },
+#define OS_MODULE_ALT_NAME { MP_OBJ_NEW_QSTR(MP_QSTR__os), (mp_obj_t)&os_module },
#else
#define OS_MODULE
+#define OS_MODULE_ALT_NAME
#endif
#if CIRCUITPY_PIXELBUF
@@ -417,8 +422,10 @@ extern const struct _mp_obj_module_t supervisor_module;
#if CIRCUITPY_TIME
extern const struct _mp_obj_module_t time_module;
#define TIME_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_time), (mp_obj_t)&time_module },
+#define TIME_MODULE_ALT_NAME { MP_OBJ_NEW_QSTR(MP_QSTR__time), (mp_obj_t)&time_module },
#else
#define TIME_MODULE
+#define TIME_MODULE_ALT_NAME
#endif
#if CIRCUITPY_TOUCHIO
@@ -456,17 +463,44 @@ extern const struct _mp_obj_module_t ustack_module;
#define USTACK_MODULE
#endif
+// These modules are not yet in shared-bindings, but we prefer the non-uxxx names.
+#if MICROPY_PY_UERRNO
+#define ERRNO_MODULE { MP_ROM_QSTR(MP_QSTR_errno), MP_ROM_PTR(&mp_module_uerrno) },
+#else
+#define ERRNO_MODULE
+#endif
+
#if MICROPY_PY_UJSON
-#define JSON_MODULE { MP_ROM_QSTR(MP_QSTR_json), MP_ROM_PTR(&mp_module_ujson) },
+#define JSON_MODULE { MP_ROM_QSTR(MP_QSTR_json), MP_ROM_PTR(&mp_module_ujson) },
#else
#define JSON_MODULE
#endif
+#if MICROPY_PY_URE
+#define RE_MODULE { MP_ROM_QSTR(MP_QSTR_re), MP_ROM_PTR(&mp_module_ure) },
+#else
+#define RE_MODULE
+#endif
+
+// Define certain native modules with weak links so they can be replaced with Python
+// implementations. This list may grow over time.
+#define MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS \
+ OS_MODULE \
+ TIME_MODULE \
+
+// Native modules that are weak links can be accessed directly
+// by prepending their name with an underscore. This list should correspond to
+// MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS, assuming you want the native modules
+// to be accessible when overriden.
+#define MICROPY_PORT_BUILTIN_MODULE_ALT_NAMES \
+ OS_MODULE_ALT_NAME \
+ TIME_MODULE_ALT_NAME \
+
// This is an inclusive list that should correspond to the CIRCUITPY_XXX list above,
-// including dependendencies such as TERMINALIO depending on DISPLAYIO (shown by indentation).
+// including dependencies such as TERMINALIO depending on DISPLAYIO (shown by indentation).
// Some of these definitions will be blank depending on what is turned on and off.
-//
-#define MICROPY_PORT_BUILTIN_MODULES \
+// Some are omitted because they're in MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS above.
+#define MICROPY_PORT_BUILTIN_MODULES_STRONG_LINKS \
ANALOGIO_MODULE \
AUDIOBUSIO_MODULE \
AUDIOIO_MODULE \
@@ -477,6 +511,7 @@ extern const struct _mp_obj_module_t ustack_module;
DIGITALIO_MODULE \
TERMINALIO_MODULE \
DISPLAYIO_MODULE \
+ ERRNO_MODULE \
GAMEPAD_MODULE \
I2CSLAVE_MODULE \
JSON_MODULE \
@@ -486,23 +521,35 @@ extern const struct _mp_obj_module_t ustack_module;
NETWORK_MODULE \
SOCKET_MODULE \
WIZNET_MODULE \
- OS_MODULE \
PIXELBUF_MODULE \
PULSEIO_MODULE \
RANDOM_MODULE \
+ RE_MODULE \
RTC_MODULE \
SAMD_MODULE \
STAGE_MODULE \
STORAGE_MODULE \
STRUCT_MODULE \
SUPERVISOR_MODULE \
- TIME_MODULE \
TOUCHIO_MODULE \
UHEAP_MODULE \
USB_HID_MODULE \
USB_MIDI_MODULE \
USTACK_MODULE \
+// If weak links are enabled, just include strong links in the main list of modules,
+// and also include the underscore alternate names.
+#if MICROPY_MODULE_WEAK_LINKS
+#define MICROPY_PORT_BUILTIN_MODULES \
+ MICROPY_PORT_BUILTIN_MODULES_STRONG_LINKS \
+ MICROPY_PORT_BUILTIN_MODULE_ALT_NAMES
+#else
+// If weak links are disabled, included both strong and potentially weak lines
+#define MICROPY_PORT_BUILTIN_MODULES \
+ MICROPY_PORT_BUILTIN_MODULES_STRONG_LINKS \
+ MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS
+#endif
+
// We need to provide a declaration/definition of alloca()
#include <alloca.h>
diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk
index 30d5a7554..a4a59170f 100644
--- a/py/circuitpy_mpconfig.mk
+++ b/py/circuitpy_mpconfig.mk
@@ -158,15 +158,12 @@ CIRCUITPY_RTC = 1
endif
CFLAGS += -DCIRCUITPY_RTC=$(CIRCUITPY_RTC)
+# CIRCUITPY_SAMD is handled in the atmel-samd tree.
# Only for SAMD chips.
+# Assume not a SAMD build.
ifndef CIRCUITPY_SAMD
-ifneq ($(findstring sam,$(CHIP_FAMILY)),)
-CIRCUITPY_SAMD = $(CIRCUITPY_FULL_BUILD)
-else
-# Not a SAMD build.
CIRCUITPY_SAMD = 0
endif
-endif
CFLAGS += -DCIRCUITPY_SAMD=$(CIRCUITPY_SAMD)
# Currently always off.
diff --git a/py/moduerrno.c b/py/moduerrno.c
index 7ec6699e7..7915603e4 100644
--- a/py/moduerrno.c
+++ b/py/moduerrno.c
@@ -84,7 +84,11 @@ STATIC const mp_obj_dict_t errorcode_dict = {
#endif
STATIC const mp_rom_map_elem_t mp_module_uerrno_globals_table[] = {
+#if CIRCUITPY
+ { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_errno) },
+#else
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uerrno) },
+#endif
#if MICROPY_PY_UERRNO_ERRORCODE
{ MP_ROM_QSTR(MP_QSTR_errorcode), MP_ROM_PTR(&errorcode_dict) },
#endif
diff --git a/py/mpconfig.h b/py/mpconfig.h
index bb7952a8b..3ec383817 100755
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -45,6 +45,11 @@
#include <mpconfigport.h>
#endif
+// Is this a CircuitPython build?
+#ifndef CIRCUITPY
+#define CIRCUITPY 0
+#endif
+
// Any options not explicitly set in mpconfigport.h will get default
// values below.
diff --git a/py/objmodule.c b/py/objmodule.c
index 828f556f3..469a95976 100644
--- a/py/objmodule.c
+++ b/py/objmodule.c
@@ -148,11 +148,16 @@ STATIC const mp_rom_map_elem_t mp_builtin_module_table[] = {
{ MP_ROM_QSTR(MP_QSTR_array), MP_ROM_PTR(&mp_module_array) },
#endif
#if MICROPY_PY_IO
+#if CIRCUITPY
+ { MP_ROM_QSTR(MP_QSTR_io), MP_ROM_PTR(&mp_module_io) },
+#else
{ MP_ROM_QSTR(MP_QSTR_uio), MP_ROM_PTR(&mp_module_io) },
#endif
+#endif
#if MICROPY_PY_COLLECTIONS
{ MP_ROM_QSTR(MP_QSTR_collections), MP_ROM_PTR(&mp_module_collections) },
#endif
+// CircuitPython: Now in shared-bindings/, so not defined here.
#if MICROPY_PY_STRUCT
{ MP_ROM_QSTR(MP_QSTR_ustruct), MP_ROM_PTR(&mp_module_ustruct) },
#endif
@@ -178,8 +183,13 @@ STATIC const mp_rom_map_elem_t mp_builtin_module_table[] = {
// extmod modules
#if MICROPY_PY_UERRNO
+#if CIRCUITPY
+// CircuitPython: Defined in MICROPY_PORT_BUILTIN_MODULES, so not defined here.
+// TODO: move to shared-bindings/
+#else
{ MP_ROM_QSTR(MP_QSTR_uerrno), MP_ROM_PTR(&mp_module_uerrno) },
#endif
+#endif
#if MICROPY_PY_UCTYPES
{ MP_ROM_QSTR(MP_QSTR_uctypes), MP_ROM_PTR(&mp_module_uctypes) },
#endif
@@ -187,11 +197,21 @@ STATIC const mp_rom_map_elem_t mp_builtin_module_table[] = {
{ MP_ROM_QSTR(MP_QSTR_uzlib), MP_ROM_PTR(&mp_module_uzlib) },
#endif
#if MICROPY_PY_UJSON
+#if CIRCUITPY
+// CircuitPython: Defined in MICROPY_PORT_BUILTIN_MODULES, so not defined here.
+// TODO: move to shared-bindings/
+#else
{ MP_ROM_QSTR(MP_QSTR_ujson), MP_ROM_PTR(&mp_module_ujson) },
#endif
+#endif
#if MICROPY_PY_URE
+#if CIRCUITPY
+// CircuitPython: Defined in MICROPY_PORT_BUILTIN_MODULES, so not defined here.
+// TODO: move to shared-bindings/
+#else
{ MP_ROM_QSTR(MP_QSTR_ure), MP_ROM_PTR(&mp_module_ure) },
#endif
+#endif
#if MICROPY_PY_UHEAPQ
{ MP_ROM_QSTR(MP_QSTR_uheapq), MP_ROM_PTR(&mp_module_uheapq) },
#endif
diff --git a/py/runtime.c b/py/runtime.c
index fb62edf73..060748f1b 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -131,31 +131,6 @@ void mp_init(void) {
sizeof(MP_STATE_VM(fs_user_mount)) - MICROPY_FATFS_NUM_PERSISTENT);
#endif
- #if MICROPY_VFS
- #if MICROPY_FATFS_NUM_PERSISTENT > 0
- // We preserve the last MICROPY_FATFS_NUM_PERSISTENT mounts because newer
- // mounts are put at the front of the list.
- mp_vfs_mount_t *vfs = MP_STATE_VM(vfs_mount_table);
- // Count how many mounts we have.
- uint8_t count = 0;
- while (vfs != NULL) {
- vfs = vfs->next;
- count++;
- }
- // Find the vfs MICROPY_FATFS_NUM_PERSISTENT mounts from the end.
- vfs = MP_STATE_VM(vfs_mount_table);
- for (uint8_t j = 0; j < count - MICROPY_FATFS_NUM_PERSISTENT; j++) {
- vfs = vfs->next;
- }
- MP_STATE_VM(vfs_mount_table) = vfs;
- MP_STATE_VM(vfs_cur) = vfs;
- #else
- // initialise the VFS sub-system
- MP_STATE_VM(vfs_cur) = NULL;
- MP_STATE_VM(vfs_mount_table) = NULL;
- #endif
- #endif
-
#if MICROPY_PY_THREAD_GIL
mp_thread_mutex_init(&MP_STATE_VM(gil_mutex));
#endif
diff --git a/shared-bindings/audiobusio/PDMIn.c b/shared-bindings/audiobusio/PDMIn.c
index 40f2147b5..5dca3fa59 100644
--- a/shared-bindings/audiobusio/PDMIn.c
+++ b/shared-bindings/audiobusio/PDMIn.c
@@ -129,8 +129,8 @@ STATIC mp_obj_t audiobusio_pdmin_make_new(const mp_obj_type_t *type, size_t n_ar
}
bool mono = args[ARG_mono].u_bool;
- float startup_delay = (args[ARG_startup_delay].u_obj == MP_OBJ_NULL)
- ? STARTUP_DELAY_DEFAULT
+ mp_float_t startup_delay = (args[ARG_startup_delay].u_obj == MP_OBJ_NULL)
+ ? (mp_float_t)STARTUP_DELAY_DEFAULT
: mp_obj_get_float(args[ARG_startup_delay].u_obj);
if (startup_delay < 0.0 || startup_delay > 1.0) {
mp_raise_ValueError(translate("Microphone startup delay must be in range 0.0 to 1.0"));
diff --git a/shared-bindings/busio/UART.c b/shared-bindings/busio/UART.c
index 85bf498a4..b40f3fa03 100644
--- a/shared-bindings/busio/UART.c
+++ b/shared-bindings/busio/UART.c
@@ -116,7 +116,7 @@ STATIC mp_obj_t busio_uart_make_new(const mp_obj_type_t *type, size_t n_args, co
}
mp_float_t timeout = mp_obj_get_float(args[ARG_timeout].u_obj);
- if (timeout > 100.0f) {
+ if (timeout > (mp_float_t)100.0) {
mp_raise_ValueError(translate("timeout >100 (units are now seconds, not msecs)"));
}
diff --git a/shared-bindings/storage/__init__.c b/shared-bindings/storage/__init__.c
index 3484b9af8..4db3a9fec 100644
--- a/shared-bindings/storage/__init__.c
+++ b/shared-bindings/storage/__init__.c
@@ -54,10 +54,12 @@
//|
//| This is the CircuitPython analog to the UNIX ``mount`` command.
//|
+//| :param bool readonly: True when the filesystem should be readonly to CircuitPython.
+//|
mp_obj_t storage_mount(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
enum { ARG_readonly };
static const mp_arg_t allowed_args[] = {
- { MP_QSTR_readonly, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_false} },
+ { MP_QSTR_readonly, MP_ARG_KW_ONLY | MP_ARG_BOOL, {.u_bool = false} },
};
// parse args
@@ -77,7 +79,7 @@ mp_obj_t storage_mount(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_arg
mp_raise_ValueError(translate("filesystem must provide mount method"));
}
- common_hal_storage_mount(vfs_obj, mnt_str, mp_obj_is_true(args[ARG_readonly].u_obj));
+ common_hal_storage_mount(vfs_obj, mnt_str, args[ARG_readonly].u_bool);
return mp_const_none;
}
@@ -101,14 +103,21 @@ mp_obj_t storage_umount(mp_obj_t mnt_in) {
}
MP_DEFINE_CONST_FUN_OBJ_1(storage_umount_obj, storage_umount);
-//| .. function:: remount(mount_path, readonly=False)
+//| .. function:: remount(mount_path, readonly=False, *, disable_concurrent_write_protection=False)
//|
//| Remounts the given path with new parameters.
//|
+//| :param bool readonly: True when the filesystem should be readonly to CircuitPython.
+//| :param bool disable_concurrent_write_protection: When True, the check that makes sure the
+//| underlying filesystem data is written by one computer is disabled. Disabling the protection
+//| allows CircuitPython and a host to write to the same filesystem with the risk that the
+//| filesystem will be corrupted.
+//|
mp_obj_t storage_remount(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
- enum { ARG_readonly };
+ enum { ARG_readonly, ARG_disable_concurrent_write_protection };
static const mp_arg_t allowed_args[] = {
- { MP_QSTR_readonly, MP_ARG_BOOL | MP_ARG_REQUIRED, {.u_bool = false} },
+ { MP_QSTR_readonly, MP_ARG_BOOL, {.u_bool = false} },
+ { MP_QSTR_disable_concurrent_write_protection, MP_ARG_KW_ONLY | MP_ARG_BOOL, {.u_bool = false} },
};
// get the mount point
@@ -118,7 +127,7 @@ mp_obj_t storage_remount(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_a
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
- common_hal_storage_remount(mnt_str, args[ARG_readonly].u_bool);
+ common_hal_storage_remount(mnt_str, args[ARG_readonly].u_bool, args[ARG_disable_concurrent_write_protection].u_bool);
return mp_const_none;
}
diff --git a/shared-bindings/storage/__init__.h b/shared-bindings/storage/__init__.h
index 6a0cb9fc7..7851b9e29 100644
--- a/shared-bindings/storage/__init__.h
+++ b/shared-bindings/storage/__init__.h
@@ -33,7 +33,7 @@
void common_hal_storage_mount(mp_obj_t vfs_obj, const char* path, bool readonly);
void common_hal_storage_umount_path(const char* path);
void common_hal_storage_umount_object(mp_obj_t vfs_obj);
-void common_hal_storage_remount(const char* path, bool readonly);
+void common_hal_storage_remount(const char* path, bool readonly, bool disable_concurrent_write_protection);
mp_obj_t common_hal_storage_getmount(const char* path);
void common_hal_storage_erase_filesystem(void);
diff --git a/shared-module/displayio/Display.c b/shared-module/displayio/Display.c
index f14a27b78..da3424a36 100644
--- a/shared-module/displayio/Display.c
+++ b/shared-module/displayio/Display.c
@@ -121,7 +121,7 @@ void common_hal_displayio_display_construct(displayio_display_obj_t* self,
// Always set the backlight type in case we're reusing memory.
self->backlight_inout.base.type = &mp_type_NoneType;
if (backlight_pin != NULL && common_hal_mcu_pin_is_free(backlight_pin)) {
- pwmout_result_t result = common_hal_pulseio_pwmout_construct(&self->backlight_pwm, backlight_pin, 0, 5000, false);
+ pwmout_result_t result = common_hal_pulseio_pwmout_construct(&self->backlight_pwm, backlight_pin, 0, 50000, false);
if (result != PWMOUT_OK) {
self->backlight_inout.base.type = &digitalio_digitalinout_type;
common_hal_digitalio_digitalinout_construct(&self->backlight_inout, backlight_pin);
diff --git a/shared-module/displayio/__init__.c b/shared-module/displayio/__init__.c
index c4f9cbeb7..0d35abf0f 100644
--- a/shared-module/displayio/__init__.c
+++ b/shared-module/displayio/__init__.c
@@ -2,10 +2,12 @@
#include <string.h>
#include "shared-module/displayio/__init__.h"
+#include "py/reload.h"
#include "shared-bindings/displayio/Bitmap.h"
#include "shared-bindings/displayio/Display.h"
#include "shared-bindings/displayio/Group.h"
#include "shared-bindings/displayio/Palette.h"
+#include "supervisor/shared/autoreload.h"
#include "supervisor/shared/display.h"
#include "supervisor/memory.h"
#include "supervisor/usb.h"
@@ -18,7 +20,19 @@ static inline void swap(uint16_t* a, uint16_t* b) {
*b = temp;
}
+bool refreshing_displays = false;
+
void displayio_refresh_displays(void) {
+ // Somehow reloads from the sdcard are being lost. So, cheat and reraise.
+ if (reload_requested) {
+ mp_raise_reload_exception();
+ return;
+ }
+
+ if (refreshing_displays) {
+ return;
+ }
+ refreshing_displays = true;
for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) {
if (displays[i].display.base.type == NULL || displays[i].display.base.type == &mp_type_NoneType) {
continue;
@@ -27,6 +41,7 @@ void displayio_refresh_displays(void) {
displayio_display_update_backlight(display);
if (!displayio_display_frame_queued(display)) {
+ refreshing_displays = false;
return;
}
if (displayio_display_refresh_queued(display)) {
@@ -89,8 +104,9 @@ void displayio_refresh_displays(void) {
index += 1;
// The buffer is full, send it.
if (index >= buffer_size) {
- if (!displayio_display_send_pixels(display, buffer, buffer_size / 2)) {
+ if (!displayio_display_send_pixels(display, buffer, buffer_size / 2) || reload_requested) {
displayio_display_finish_region_update(display);
+ refreshing_displays = false;
return;
}
// TODO(tannewt): Make refresh displays faster so we don't starve other
@@ -103,12 +119,14 @@ void displayio_refresh_displays(void) {
// Send the remaining data.
if (index && !displayio_display_send_pixels(display, buffer, index * 2)) {
displayio_display_finish_region_update(display);
+ refreshing_displays = false;
return;
}
displayio_display_finish_region_update(display);
}
displayio_display_finish_refresh(display);
}
+ refreshing_displays = false;
}
void common_hal_displayio_release_displays(void) {
diff --git a/shared-module/storage/__init__.c b/shared-module/storage/__init__.c
index f09edd785..215e1356a 100644
--- a/shared-module/storage/__init__.c
+++ b/shared-module/storage/__init__.c
@@ -143,7 +143,7 @@ mp_obj_t common_hal_storage_getmount(const char *mount_path) {
return storage_object_from_path(mount_path);
}
-void common_hal_storage_remount(const char *mount_path, bool readonly) {
+void common_hal_storage_remount(const char *mount_path, bool readonly, bool disable_concurrent_write_protection) {
if (strcmp(mount_path, "/") != 0) {
mp_raise_OSError(MP_EINVAL);
}
@@ -156,7 +156,8 @@ void common_hal_storage_remount(const char *mount_path, bool readonly) {
}
#endif
- supervisor_flash_set_usb_writable(readonly);
+ filesystem_set_internal_writable_by_usb(readonly);
+ filesystem_set_internal_concurrent_write_protection(!disable_concurrent_write_protection);
}
void common_hal_storage_erase_filesystem(void) {
diff --git a/supervisor/filesystem.h b/supervisor/filesystem.h
index eb9e65c09..76f235f47 100644
--- a/supervisor/filesystem.h
+++ b/supervisor/filesystem.h
@@ -29,9 +29,16 @@
#include <stdbool.h>
+#include "extmod/vfs_fat.h"
+
void filesystem_init(bool create_allowed, bool force_create);
void filesystem_flush(void);
-void filesystem_writable_by_python(bool writable);
bool filesystem_present(void);
+void filesystem_set_internal_writable_by_usb(bool usb_writable);
+void filesystem_set_internal_concurrent_write_protection(bool concurrent_write_protection);
+void filesystem_set_writable_by_usb(fs_user_mount_t *vfs, bool usb_writable);
+void filesystem_set_concurrent_write_protection(fs_user_mount_t *vfs, bool concurrent_write_protection);
+bool filesystem_is_writable_by_python(fs_user_mount_t *vfs);
+bool filesystem_is_writable_by_usb(fs_user_mount_t *vfs);
#endif // MICROPY_INCLUDED_SUPERVISOR_FILESYSTEM_H
diff --git a/supervisor/flash.h b/supervisor/flash.h
index ae6a44fd0..edf43f4b1 100644
--- a/supervisor/flash.h
+++ b/supervisor/flash.h
@@ -37,7 +37,6 @@
#include "supervisor/internal_flash.h"
#endif
-void supervisor_flash_set_usb_writable(bool usb_writable);
void supervisor_flash_init(void);
uint32_t supervisor_flash_get_block_size(void);
uint32_t supervisor_flash_get_block_count(void);
diff --git a/supervisor/shared/filesystem.c b/supervisor/shared/filesystem.c
index d968f4798..0ef978ef2 100644
--- a/supervisor/shared/filesystem.c
+++ b/supervisor/shared/filesystem.c
@@ -24,6 +24,8 @@
* THE SOFTWARE.
*/
+#include "supervisor/filesystem.h"
+
#include "extmod/vfs_fat.h"
#include "lib/oofatfs/ff.h"
#include "lib/oofatfs/diskio.h"
@@ -92,16 +94,42 @@ void filesystem_flush(void) {
supervisor_flash_flush();
}
-void filesystem_writable_by_python(bool writable) {
+void filesystem_set_internal_writable_by_usb(bool writable) {
fs_user_mount_t *vfs = &_internal_vfs;
- if (writable) {
+ filesystem_set_writable_by_usb(vfs, writable);
+}
+
+void filesystem_set_writable_by_usb(fs_user_mount_t *vfs, bool usb_writable) {
+ if (usb_writable) {
vfs->flags |= FSUSER_USB_WRITABLE;
} else {
vfs->flags &= ~FSUSER_USB_WRITABLE;
}
}
+bool filesystem_is_writable_by_python(fs_user_mount_t *vfs) {
+ return (vfs->flags & FSUSER_CONCURRENT_WRITE_PROTECTED) == 0 ||
+ (vfs->flags & FSUSER_USB_WRITABLE) == 0;
+}
+
+bool filesystem_is_writable_by_usb(fs_user_mount_t *vfs) {
+ return (vfs->flags & FSUSER_CONCURRENT_WRITE_PROTECTED) == 0 ||
+ (vfs->flags & FSUSER_USB_WRITABLE) != 0;
+}
+
+void filesystem_set_internal_concurrent_write_protection(bool concurrent_write_protection) {
+ filesystem_set_concurrent_write_protection(&_internal_vfs, concurrent_write_protection);
+}
+
+void filesystem_set_concurrent_write_protection(fs_user_mount_t *vfs, bool concurrent_write_protection) {
+ if (concurrent_write_protection) {
+ vfs->flags |= FSUSER_CONCURRENT_WRITE_PROTECTED;
+ } else {
+ vfs->flags &= ~FSUSER_CONCURRENT_WRITE_PROTECTED;
+ }
+}
+
bool filesystem_present(void) {
return true;
}
diff --git a/supervisor/shared/flash.c b/supervisor/shared/flash.c
index 8be21e5d0..6b1f24b4b 100644
--- a/supervisor/shared/flash.c
+++ b/supervisor/shared/flash.c
@@ -33,26 +33,6 @@
#define PART1_START_BLOCK (0x1)
-void supervisor_flash_set_usb_writable(bool usb_writable) {
- mp_vfs_mount_t* current_mount = MP_STATE_VM(vfs_mount_table);
- for (uint8_t i = 0; current_mount != NULL; i++) {
- if (i == VFS_INDEX) {
- break;
- }
- current_mount = current_mount->next;
- }
- if (current_mount == NULL) {
- return;
- }
- fs_user_mount_t *vfs = (fs_user_mount_t *) current_mount->obj;
-
- if (usb_writable) {
- vfs->flags |= FSUSER_USB_WRITABLE;
- } else {
- vfs->flags &= ~FSUSER_USB_WRITABLE;
- }
-}
-
// there is a singleton Flash object
const mp_obj_type_t supervisor_flash_type;
STATIC const mp_obj_base_t supervisor_flash_obj = {&supervisor_flash_type};
diff --git a/supervisor/shared/usb/usb_msc_flash.c b/supervisor/shared/usb/usb_msc_flash.c
index 658aab0d8..f6f0fa9c3 100644
--- a/supervisor/shared/usb/usb_msc_flash.c
+++ b/supervisor/shared/usb/usb_msc_flash.c
@@ -34,6 +34,7 @@
#include "lib/oofatfs/ff.h"
#include "py/mpstate.h"
+#include "supervisor/filesystem.h"
#include "supervisor/shared/autoreload.h"
#define MSC_FLASH_BLOCK_SIZE 512
@@ -148,8 +149,7 @@ bool tud_msc_is_writable_cb(uint8_t lun) {
if (vfs == NULL) {
return false;
}
- if (vfs->writeblocks[0] == MP_OBJ_NULL ||
- (vfs->flags & FSUSER_USB_WRITABLE) == 0) {
+ if (vfs->writeblocks[0] == MP_OBJ_NULL || !filesystem_is_writable_by_usb(vfs)) {
return false;
}
return true;
diff --git a/supervisor/stub/filesystem.c b/supervisor/stub/filesystem.c
index 12fe9fb10..1c4a3e12d 100644
--- a/supervisor/stub/filesystem.c
+++ b/supervisor/stub/filesystem.c
@@ -26,13 +26,17 @@
#include "supervisor/filesystem.h"
-void filesystem_init(void) {
+void filesystem_init(bool create_allowed, bool force_create) {
+ (void) create_allowed;
+ (void) force_create;
}
void filesystem_flush(void) {
}
-void filesystem_writable_by_python(bool writable) {
+bool filesystem_is_writable_by_python(fs_user_mount_t *vfs) {
+ (void) vfs;
+ return true;
}
bool filesystem_present(void) {
diff --git a/supervisor/supervisor.mk b/supervisor/supervisor.mk
index f21365d2a..6815fba57 100644
--- a/supervisor/supervisor.mk
+++ b/supervisor/supervisor.mk
@@ -17,6 +17,17 @@ ifndef $(NO_USB)
NO_USB = $(wildcard supervisor/usb.c)
endif
+ifneq ($(INTERNAL_FLASH_FILESYSTEM),)
+ CFLAGS += -DINTERNAL_FLASH_FILESYSTEM=$(INTERNAL_FLASH_FILESYSTEM)
+endif
+ifneq ($(QSPI_FLASH_FILESYSTEM),)
+# EXPRESS_BOARD is obsolete and should be removed when samd-peripherals is updated.
+ CFLAGS += -DQSPI_FLASH_FILESYSTEM=$(QSPI_FLASH_FILESYSTEM) -DEXPRESS_BOARD
+endif
+ifneq ($(SPI_FLASH_FILESYSTEM),)
+# EXPRESS_BOARD is obsolete and should be removed when samd-peripherals is updated.
+ CFLAGS += -DSPI_FLASH_FILESYSTEM=$(SPI_FLASH_FILESYSTEM) -DEXPRESS_BOARD
+endif
# Choose which flash filesystem impl to use.
# (Right now INTERNAL_FLASH_FILESYSTEM and SPI_FLASH_FILESYSTEM are mutually exclusive.
@@ -27,11 +38,10 @@ ifdef EXTERNAL_FLASH_DEVICES
SRC_SUPERVISOR += supervisor/shared/external_flash/external_flash.c
ifeq ($(SPI_FLASH_FILESYSTEM),1)
- CFLAGS += -DSPI_FLASH_FILESYSTEM
SRC_SUPERVISOR += supervisor/shared/external_flash/spi_flash.c
+ else
endif
ifeq ($(QSPI_FLASH_FILESYSTEM),1)
- CFLAGS += -DQSPI_FLASH_FILESYSTEM
SRC_SUPERVISOR += supervisor/qspi_flash.c supervisor/shared/external_flash/qspi_flash.c
endif
else