Merge branch 'new_master' into new_freq_in
This commit is contained in:
commit
a1060747f8
@ -4,7 +4,7 @@ language: c
|
|||||||
compiler:
|
compiler:
|
||||||
- gcc
|
- gcc
|
||||||
git:
|
git:
|
||||||
depth: 1
|
depth: 6
|
||||||
|
|
||||||
# Each item under 'env' is a separate Travis job to execute.
|
# Each item under 'env' is a separate Travis job to execute.
|
||||||
# They run in separate environments, so each one must take the time
|
# They run in separate environments, so each one must take the time
|
||||||
@ -56,7 +56,6 @@ notifications:
|
|||||||
before_script:
|
before_script:
|
||||||
# Expand the git tree back to 4.0.0-alpha.1 and then fetch the latest tag.
|
# 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`
|
- 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 fetch --depth 1 origin $LAST_TAG:$LAST_TAG
|
||||||
- git describe --dirty --always --tags
|
- git describe --dirty --always --tags
|
||||||
- function var_search () { case "$1" in *$2*) true;; *) false;; esac; }
|
- function var_search () { case "$1" in *$2*) true;; *) false;; esac; }
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
//! <2012/12/20> V1.1.0
|
//! <2012/12/20> V1.1.0
|
||||||
//! 1. Optimize code
|
//! 1. Optimize code
|
||||||
//! 2. Add reg_dhcp_cbfunc()
|
//! 2. Add reg_dhcp_cbfunc()
|
||||||
//! 3. Add DHCP_stop()
|
//! 3. Add DHCP_stop()
|
||||||
//! 4. Integrate check_DHCP_state() & DHCP_run() to DHCP_run()
|
//! 4. Integrate check_DHCP_state() & DHCP_run() to DHCP_run()
|
||||||
//! 5. Don't care system endian
|
//! 5. Don't care system endian
|
||||||
//! 6. Add comments
|
//! 6. Add comments
|
||||||
@ -22,30 +22,30 @@
|
|||||||
//!
|
//!
|
||||||
//! Copyright (c) 2013, WIZnet Co., LTD.
|
//! Copyright (c) 2013, WIZnet Co., LTD.
|
||||||
//! All rights reserved.
|
//! All rights reserved.
|
||||||
//!
|
//!
|
||||||
//! Redistribution and use in source and binary forms, with or without
|
//! Redistribution and use in source and binary forms, with or without
|
||||||
//! modification, are permitted provided that the following conditions
|
//! modification, are permitted provided that the following conditions
|
||||||
//! are met:
|
//! are met:
|
||||||
//!
|
//!
|
||||||
//! * Redistributions of source code must retain the above copyright
|
//! * Redistributions of source code must retain the above copyright
|
||||||
//! notice, this list of conditions and the following disclaimer.
|
//! notice, this list of conditions and the following disclaimer.
|
||||||
//! * Redistributions in binary form must reproduce the above copyright
|
//! * Redistributions in binary form must reproduce the above copyright
|
||||||
//! notice, this list of conditions and the following disclaimer in the
|
//! notice, this list of conditions and the following disclaimer in the
|
||||||
//! documentation and/or other materials provided with the distribution.
|
//! documentation and/or other materials provided with the distribution.
|
||||||
//! * Neither the name of the <ORGANIZATION> nor the names of its
|
//! * Neither the name of the <ORGANIZATION> nor the names of its
|
||||||
//! contributors may be used to endorse or promote products derived
|
//! contributors may be used to endorse or promote products derived
|
||||||
//! from this software without specific prior written permission.
|
//! from this software without specific prior written permission.
|
||||||
//!
|
//!
|
||||||
//! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
//! 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
|
//! IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
//! ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
//! ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
//! LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
//! LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
//! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
//! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
//! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
//! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
//! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
//! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
//! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
//! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
//! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
//! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
//! THE POSSIBILITY OF SUCH DAMAGE.
|
//! THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
//
|
//
|
||||||
//*****************************************************************************
|
//*****************************************************************************
|
||||||
@ -59,7 +59,7 @@
|
|||||||
|
|
||||||
#ifdef _DHCP_DEBUG_
|
#ifdef _DHCP_DEBUG_
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* DHCP state machine. */
|
/* DHCP state machine. */
|
||||||
#define STATE_DHCP_INIT 0 ///< Initialize
|
#define STATE_DHCP_INIT 0 ///< Initialize
|
||||||
@ -70,7 +70,7 @@
|
|||||||
#define STATE_DHCP_RELEASE 5 ///< No use
|
#define STATE_DHCP_RELEASE 5 ///< No use
|
||||||
#define STATE_DHCP_STOP 6 ///< Stop processing DHCP
|
#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
|
#define DHCP_FLAGSUNICAST 0x0000 ///< The unicast value of flags in @ref RIP_MSG
|
||||||
|
|
||||||
/* DHCP message OP code */
|
/* DHCP message OP code */
|
||||||
@ -99,7 +99,7 @@
|
|||||||
#define OPT_SIZE 312 /// Max OPT size of @ref RIP_MSG
|
#define OPT_SIZE 312 /// Max OPT size of @ref RIP_MSG
|
||||||
#define RIP_MSG_SIZE (236+OPT_SIZE) /// Max 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)
|
* @brief DHCP option and value (cf. RFC1533)
|
||||||
*/
|
*/
|
||||||
enum
|
enum
|
||||||
@ -171,7 +171,7 @@ enum
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* @brief DHCP message format
|
* @brief DHCP message format
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint8_t op; ///< @ref DHCP_BOOTREQUEST or @ref DHCP_BOOTREPLY
|
uint8_t op; ///< @ref DHCP_BOOTREQUEST or @ref DHCP_BOOTREPLY
|
||||||
uint8_t htype; ///< @ref DHCP_HTYPE10MB or @ref DHCP_HTYPE100MB
|
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
|
uint16_t flags; ///< @ref DHCP_FLAGSBROADCAST or @ref DHCP_FLAGSUNICAST
|
||||||
uint8_t ciaddr[4]; ///< @ref Request IP to DHCP sever
|
uint8_t ciaddr[4]; ///< @ref Request IP to DHCP sever
|
||||||
uint8_t yiaddr[4]; ///< @ref Offered IP from DHCP server
|
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 giaddr[4]; ///< No use
|
||||||
uint8_t chaddr[16]; ///< DHCP client 6bytes MAC address. Others is filled to zero
|
uint8_t chaddr[16]; ///< DHCP client 6bytes MAC address. Others is filled to zero
|
||||||
uint8_t sname[64]; ///< No use
|
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_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;
|
uint32_t dhcp_lease_time = INFINITE_LEASETIME;
|
||||||
volatile uint32_t dhcp_tick_1s = 0; // unit 1 second
|
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
|
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.
|
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+0) = (uint8_t)((DHCP_XID & 0xFF000000) >> 24);
|
||||||
*(ptmp+1) = (uint8_t)((DHCP_XID & 0x00FF0000) >> 16);
|
*(ptmp+1) = (uint8_t)((DHCP_XID & 0x00FF0000) >> 16);
|
||||||
*(ptmp+2) = (uint8_t)((DHCP_XID & 0x0000FF00) >> 8);
|
*(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;
|
pDHCPMSG->secs = DHCP_SECS;
|
||||||
ptmp = (uint8_t*)(&pDHCPMSG->flags);
|
ptmp = (uint8_t*)(&pDHCPMSG->flags);
|
||||||
*(ptmp+0) = (uint8_t)((DHCP_FLAGSBROADCAST & 0xFF00) >> 8);
|
*(ptmp+0) = (uint8_t)((DHCP_FLAGSBROADCAST & 0xFF00) >> 8);
|
||||||
*(ptmp+1) = (uint8_t)((DHCP_FLAGSBROADCAST & 0x00FF) >> 0);
|
*(ptmp+1) = (uint8_t)((DHCP_FLAGSBROADCAST & 0x00FF) >> 0);
|
||||||
|
|
||||||
@ -356,16 +356,16 @@ void send_DHCP_DISCOVER(void)
|
|||||||
uint16_t i;
|
uint16_t i;
|
||||||
uint8_t ip[4];
|
uint8_t ip[4];
|
||||||
uint16_t k = 0;
|
uint16_t k = 0;
|
||||||
|
|
||||||
makeDHCPMSG();
|
makeDHCPMSG();
|
||||||
|
|
||||||
k = 4; // because MAGIC_COOKIE already made by makeDHCPMSG()
|
k = 4; // because MAGIC_COOKIE already made by makeDHCPMSG()
|
||||||
|
|
||||||
// Option Request Param
|
// Option Request Param
|
||||||
pDHCPMSG->OPT[k++] = dhcpMessageType;
|
pDHCPMSG->OPT[k++] = dhcpMessageType;
|
||||||
pDHCPMSG->OPT[k++] = 0x01;
|
pDHCPMSG->OPT[k++] = 0x01;
|
||||||
pDHCPMSG->OPT[k++] = DHCP_DISCOVER;
|
pDHCPMSG->OPT[k++] = DHCP_DISCOVER;
|
||||||
|
|
||||||
// Client identifier
|
// Client identifier
|
||||||
pDHCPMSG->OPT[k++] = dhcpClientIdentifier;
|
pDHCPMSG->OPT[k++] = dhcpClientIdentifier;
|
||||||
pDHCPMSG->OPT[k++] = 0x07;
|
pDHCPMSG->OPT[k++] = 0x07;
|
||||||
@ -376,10 +376,10 @@ void send_DHCP_DISCOVER(void)
|
|||||||
pDHCPMSG->OPT[k++] = DHCP_CHADDR[3];
|
pDHCPMSG->OPT[k++] = DHCP_CHADDR[3];
|
||||||
pDHCPMSG->OPT[k++] = DHCP_CHADDR[4];
|
pDHCPMSG->OPT[k++] = DHCP_CHADDR[4];
|
||||||
pDHCPMSG->OPT[k++] = DHCP_CHADDR[5];
|
pDHCPMSG->OPT[k++] = DHCP_CHADDR[5];
|
||||||
|
|
||||||
// host name
|
// host name
|
||||||
pDHCPMSG->OPT[k++] = hostName;
|
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++)
|
for(i = 0 ; HOST_NAME[i] != 0; i++)
|
||||||
pDHCPMSG->OPT[k++] = HOST_NAME[i];
|
pDHCPMSG->OPT[k++] = HOST_NAME[i];
|
||||||
pDHCPMSG->OPT[k++] = DHCP_CHADDR[3];
|
pDHCPMSG->OPT[k++] = DHCP_CHADDR[3];
|
||||||
@ -432,18 +432,18 @@ void send_DHCP_REQUEST(void)
|
|||||||
ip[0] = DHCP_SIP[0];
|
ip[0] = DHCP_SIP[0];
|
||||||
ip[1] = DHCP_SIP[1];
|
ip[1] = DHCP_SIP[1];
|
||||||
ip[2] = DHCP_SIP[2];
|
ip[2] = DHCP_SIP[2];
|
||||||
ip[3] = DHCP_SIP[3];
|
ip[3] = DHCP_SIP[3];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ip[0] = 255;
|
ip[0] = 255;
|
||||||
ip[1] = 255;
|
ip[1] = 255;
|
||||||
ip[2] = 255;
|
ip[2] = 255;
|
||||||
ip[3] = 255;
|
ip[3] = 255;
|
||||||
}
|
}
|
||||||
|
|
||||||
k = 4; // because MAGIC_COOKIE already made by makeDHCPMSG()
|
k = 4; // because MAGIC_COOKIE already made by makeDHCPMSG()
|
||||||
|
|
||||||
// Option Request Param.
|
// Option Request Param.
|
||||||
pDHCPMSG->OPT[k++] = dhcpMessageType;
|
pDHCPMSG->OPT[k++] = dhcpMessageType;
|
||||||
pDHCPMSG->OPT[k++] = 0x01;
|
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[1];
|
||||||
pDHCPMSG->OPT[k++] = DHCP_allocated_ip[2];
|
pDHCPMSG->OPT[k++] = DHCP_allocated_ip[2];
|
||||||
pDHCPMSG->OPT[k++] = DHCP_allocated_ip[3];
|
pDHCPMSG->OPT[k++] = DHCP_allocated_ip[3];
|
||||||
|
|
||||||
pDHCPMSG->OPT[k++] = dhcpServerIdentifier;
|
pDHCPMSG->OPT[k++] = dhcpServerIdentifier;
|
||||||
pDHCPMSG->OPT[k++] = 0x04;
|
pDHCPMSG->OPT[k++] = 0x04;
|
||||||
pDHCPMSG->OPT[k++] = DHCP_SIP[0];
|
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[4];
|
||||||
pDHCPMSG->OPT[k++] = DHCP_CHADDR[5];
|
pDHCPMSG->OPT[k++] = DHCP_CHADDR[5];
|
||||||
pDHCPMSG->OPT[k - (i+3+1)] = i+3; // length of hostname
|
pDHCPMSG->OPT[k - (i+3+1)] = i+3; // length of hostname
|
||||||
|
|
||||||
pDHCPMSG->OPT[k++] = dhcpParamRequest;
|
pDHCPMSG->OPT[k++] = dhcpParamRequest;
|
||||||
pDHCPMSG->OPT[k++] = 0x08;
|
pDHCPMSG->OPT[k++] = 0x08;
|
||||||
pDHCPMSG->OPT[k++] = subnetMask;
|
pDHCPMSG->OPT[k++] = subnetMask;
|
||||||
@ -503,7 +503,7 @@ void send_DHCP_REQUEST(void)
|
|||||||
#ifdef _DHCP_DEBUG_
|
#ifdef _DHCP_DEBUG_
|
||||||
printf("> Send DHCP_REQUEST\r\n");
|
printf("> Send DHCP_REQUEST\r\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
WIZCHIP_EXPORT(sendto)(DHCP_SOCKET, (uint8_t *)pDHCPMSG, RIP_MSG_SIZE, ip, DHCP_SERVER_PORT);
|
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;
|
int i;
|
||||||
uint8_t ip[4];
|
uint8_t ip[4];
|
||||||
uint16_t k = 0;
|
uint16_t k = 0;
|
||||||
|
|
||||||
makeDHCPMSG();
|
makeDHCPMSG();
|
||||||
|
|
||||||
k = 4; // because MAGIC_COOKIE already made by makeDHCPMSG()
|
k = 4; // because MAGIC_COOKIE already made by makeDHCPMSG()
|
||||||
|
|
||||||
*((uint8_t*)(&pDHCPMSG->flags)) = ((DHCP_FLAGSUNICAST & 0xFF00)>> 8);
|
*((uint8_t*)(&pDHCPMSG->flags)) = ((DHCP_FLAGSUNICAST & 0xFF00)>> 8);
|
||||||
*((uint8_t*)(&pDHCPMSG->flags)+1) = (DHCP_FLAGSUNICAST & 0x00FF);
|
*((uint8_t*)(&pDHCPMSG->flags)+1) = (DHCP_FLAGSUNICAST & 0x00FF);
|
||||||
|
|
||||||
@ -577,15 +577,15 @@ int8_t parseDHCPMSG(void)
|
|||||||
|
|
||||||
uint8_t * p;
|
uint8_t * p;
|
||||||
uint8_t * e;
|
uint8_t * e;
|
||||||
uint8_t type;
|
uint8_t type = 0;
|
||||||
uint8_t opt_len;
|
uint8_t opt_len;
|
||||||
|
|
||||||
if((len = getSn_RX_RSR(DHCP_SOCKET)) > 0)
|
if((len = getSn_RX_RSR(DHCP_SOCKET)) > 0)
|
||||||
{
|
{
|
||||||
len = WIZCHIP_EXPORT(recvfrom)(DHCP_SOCKET, (uint8_t *)pDHCPMSG, len, svr_addr, &svr_port);
|
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);
|
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;
|
else return 0;
|
||||||
if (svr_port == DHCP_SERVER_PORT) {
|
if (svr_port == DHCP_SERVER_PORT) {
|
||||||
@ -624,7 +624,7 @@ int8_t parseDHCPMSG(void)
|
|||||||
break;
|
break;
|
||||||
case routersOnSubnet :
|
case routersOnSubnet :
|
||||||
p++;
|
p++;
|
||||||
opt_len = *p++;
|
opt_len = *p++;
|
||||||
DHCP_allocated_gw[0] = *p++;
|
DHCP_allocated_gw[0] = *p++;
|
||||||
DHCP_allocated_gw[1] = *p++;
|
DHCP_allocated_gw[1] = *p++;
|
||||||
DHCP_allocated_gw[2] = *p++;
|
DHCP_allocated_gw[2] = *p++;
|
||||||
@ -632,8 +632,8 @@ int8_t parseDHCPMSG(void)
|
|||||||
p = p + (opt_len - 4);
|
p = p + (opt_len - 4);
|
||||||
break;
|
break;
|
||||||
case dns :
|
case dns :
|
||||||
p++;
|
p++;
|
||||||
opt_len = *p++;
|
opt_len = *p++;
|
||||||
DHCP_allocated_dns[0] = *p++;
|
DHCP_allocated_dns[0] = *p++;
|
||||||
DHCP_allocated_dns[1] = *p++;
|
DHCP_allocated_dns[1] = *p++;
|
||||||
DHCP_allocated_dns[2] = *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++;
|
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;
|
dhcp_lease_time = 10;
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
@ -740,7 +740,7 @@ uint8_t DHCP_run(void)
|
|||||||
case STATE_DHCP_LEASED :
|
case STATE_DHCP_LEASED :
|
||||||
ret = DHCP_IP_LEASED;
|
ret = DHCP_IP_LEASED;
|
||||||
if ((dhcp_lease_time != INFINITE_LEASETIME) && ((dhcp_lease_time/2) < dhcp_tick_1s)) {
|
if ((dhcp_lease_time != INFINITE_LEASETIME) && ((dhcp_lease_time/2) < dhcp_tick_1s)) {
|
||||||
|
|
||||||
#ifdef _DHCP_DEBUG_
|
#ifdef _DHCP_DEBUG_
|
||||||
printf("> Maintains the IP address \r\n");
|
printf("> Maintains the IP address \r\n");
|
||||||
#endif
|
#endif
|
||||||
@ -750,7 +750,7 @@ uint8_t DHCP_run(void)
|
|||||||
OLD_allocated_ip[1] = DHCP_allocated_ip[1];
|
OLD_allocated_ip[1] = DHCP_allocated_ip[1];
|
||||||
OLD_allocated_ip[2] = DHCP_allocated_ip[2];
|
OLD_allocated_ip[2] = DHCP_allocated_ip[2];
|
||||||
OLD_allocated_ip[3] = DHCP_allocated_ip[3];
|
OLD_allocated_ip[3] = DHCP_allocated_ip[3];
|
||||||
|
|
||||||
DHCP_XID++;
|
DHCP_XID++;
|
||||||
|
|
||||||
send_DHCP_REQUEST();
|
send_DHCP_REQUEST();
|
||||||
@ -765,21 +765,21 @@ uint8_t DHCP_run(void)
|
|||||||
ret = DHCP_IP_LEASED;
|
ret = DHCP_IP_LEASED;
|
||||||
if (type == DHCP_ACK) {
|
if (type == DHCP_ACK) {
|
||||||
dhcp_retry_count = 0;
|
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[1] != DHCP_allocated_ip[1] ||
|
||||||
OLD_allocated_ip[2] != DHCP_allocated_ip[2] ||
|
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;
|
ret = DHCP_IP_CHANGED;
|
||||||
dhcp_ip_update();
|
dhcp_ip_update();
|
||||||
#ifdef _DHCP_DEBUG_
|
#ifdef _DHCP_DEBUG_
|
||||||
printf(">IP changed.\r\n");
|
printf(">IP changed.\r\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
#ifdef _DHCP_DEBUG_
|
#ifdef _DHCP_DEBUG_
|
||||||
else printf(">IP is continued.\r\n");
|
else printf(">IP is continued.\r\n");
|
||||||
#endif
|
#endif
|
||||||
reset_DHCP_timeout();
|
reset_DHCP_timeout();
|
||||||
dhcp_state = STATE_DHCP_LEASED;
|
dhcp_state = STATE_DHCP_LEASED;
|
||||||
} else if (type == DHCP_NAK) {
|
} else if (type == DHCP_NAK) {
|
||||||
@ -809,7 +809,7 @@ void DHCP_stop(void)
|
|||||||
uint8_t check_DHCP_timeout(void)
|
uint8_t check_DHCP_timeout(void)
|
||||||
{
|
{
|
||||||
uint8_t ret = DHCP_RUNNING;
|
uint8_t ret = DHCP_RUNNING;
|
||||||
|
|
||||||
if (dhcp_retry_count < MAX_DHCP_RETRY) {
|
if (dhcp_retry_count < MAX_DHCP_RETRY) {
|
||||||
if (dhcp_tick_next < dhcp_tick_1s) {
|
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");
|
// printf("<<timeout>> state : STATE_DHCP_DISCOVER\r\n");
|
||||||
send_DHCP_DISCOVER();
|
send_DHCP_DISCOVER();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STATE_DHCP_REQUEST :
|
case STATE_DHCP_REQUEST :
|
||||||
// printf("<<timeout>> state : STATE_DHCP_REQUEST\r\n");
|
// printf("<<timeout>> state : STATE_DHCP_REQUEST\r\n");
|
||||||
|
|
||||||
@ -827,10 +827,10 @@ uint8_t check_DHCP_timeout(void)
|
|||||||
|
|
||||||
case STATE_DHCP_REREQUEST :
|
case STATE_DHCP_REREQUEST :
|
||||||
// printf("<<timeout>> state : STATE_DHCP_REREQUEST\r\n");
|
// printf("<<timeout>> state : STATE_DHCP_REREQUEST\r\n");
|
||||||
|
|
||||||
send_DHCP_REQUEST();
|
send_DHCP_REQUEST();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default :
|
default :
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -892,7 +892,7 @@ int8_t check_DHCP_leasedIP(void)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DHCP_init(uint8_t s, DHCP_INIT_BUFFER_TYPE* buf)
|
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.
|
// assign temporary mac address, you should be set SHAR before call this function.
|
||||||
DHCP_CHADDR[0] = 0x00;
|
DHCP_CHADDR[0] = 0x00;
|
||||||
DHCP_CHADDR[1] = 0x08;
|
DHCP_CHADDR[1] = 0x08;
|
||||||
DHCP_CHADDR[2] = 0xdc;
|
DHCP_CHADDR[2] = 0xdc;
|
||||||
DHCP_CHADDR[3] = 0x00;
|
DHCP_CHADDR[3] = 0x00;
|
||||||
DHCP_CHADDR[4] = 0x00;
|
DHCP_CHADDR[4] = 0x00;
|
||||||
DHCP_CHADDR[5] = 0x00;
|
DHCP_CHADDR[5] = 0x00;
|
||||||
setSHAR(DHCP_CHADDR);
|
setSHAR(DHCP_CHADDR);
|
||||||
}
|
}
|
||||||
|
|
||||||
DHCP_SOCKET = s; // SOCK_DHCP
|
DHCP_SOCKET = s; // SOCK_DHCP
|
||||||
@ -941,7 +941,7 @@ void getIPfromDHCP(uint8_t* ip)
|
|||||||
{
|
{
|
||||||
ip[0] = DHCP_allocated_ip[0];
|
ip[0] = DHCP_allocated_ip[0];
|
||||||
ip[1] = DHCP_allocated_ip[1];
|
ip[1] = DHCP_allocated_ip[1];
|
||||||
ip[2] = DHCP_allocated_ip[2];
|
ip[2] = DHCP_allocated_ip[2];
|
||||||
ip[3] = DHCP_allocated_ip[3];
|
ip[3] = DHCP_allocated_ip[3];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -950,7 +950,7 @@ void getGWfromDHCP(uint8_t* ip)
|
|||||||
ip[0] =DHCP_allocated_gw[0];
|
ip[0] =DHCP_allocated_gw[0];
|
||||||
ip[1] =DHCP_allocated_gw[1];
|
ip[1] =DHCP_allocated_gw[1];
|
||||||
ip[2] =DHCP_allocated_gw[2];
|
ip[2] =DHCP_allocated_gw[2];
|
||||||
ip[3] =DHCP_allocated_gw[3];
|
ip[3] =DHCP_allocated_gw[3];
|
||||||
}
|
}
|
||||||
|
|
||||||
void getSNfromDHCP(uint8_t* ip)
|
void getSNfromDHCP(uint8_t* ip)
|
||||||
@ -958,7 +958,7 @@ void getSNfromDHCP(uint8_t* ip)
|
|||||||
ip[0] = DHCP_allocated_sn[0];
|
ip[0] = DHCP_allocated_sn[0];
|
||||||
ip[1] = DHCP_allocated_sn[1];
|
ip[1] = DHCP_allocated_sn[1];
|
||||||
ip[2] = DHCP_allocated_sn[2];
|
ip[2] = DHCP_allocated_sn[2];
|
||||||
ip[3] = DHCP_allocated_sn[3];
|
ip[3] = DHCP_allocated_sn[3];
|
||||||
}
|
}
|
||||||
|
|
||||||
void getDNSfromDHCP(uint8_t* ip)
|
void getDNSfromDHCP(uint8_t* ip)
|
||||||
@ -966,14 +966,10 @@ void getDNSfromDHCP(uint8_t* ip)
|
|||||||
ip[0] = DHCP_allocated_dns[0];
|
ip[0] = DHCP_allocated_dns[0];
|
||||||
ip[1] = DHCP_allocated_dns[1];
|
ip[1] = DHCP_allocated_dns[1];
|
||||||
ip[2] = DHCP_allocated_dns[2];
|
ip[2] = DHCP_allocated_dns[2];
|
||||||
ip[3] = DHCP_allocated_dns[3];
|
ip[3] = DHCP_allocated_dns[3];
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t getDHCPLeasetime(void)
|
uint32_t getDHCPLeasetime(void)
|
||||||
{
|
{
|
||||||
return dhcp_lease_time;
|
return dhcp_lease_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -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 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[] = {
|
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) },
|
{ 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_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_dumps), MP_ROM_PTR(&mod_ujson_dumps_obj) },
|
||||||
{ MP_ROM_QSTR(MP_QSTR_load), MP_ROM_PTR(&mod_ujson_load_obj) },
|
{ MP_ROM_QSTR(MP_QSTR_load), MP_ROM_PTR(&mod_ujson_load_obj) },
|
||||||
|
@ -405,7 +405,11 @@ STATIC MP_DEFINE_CONST_DICT(re_locals_dict, re_locals_dict_table);
|
|||||||
|
|
||||||
STATIC const mp_obj_type_t re_type = {
|
STATIC const mp_obj_type_t re_type = {
|
||||||
{ &mp_type_type },
|
{ &mp_type_type },
|
||||||
|
#if CIRCUITPY
|
||||||
|
.name = MP_QSTR_re,
|
||||||
|
#else
|
||||||
.name = MP_QSTR_ure,
|
.name = MP_QSTR_ure,
|
||||||
|
#endif
|
||||||
.print = re_print,
|
.print = re_print,
|
||||||
.locals_dict = (void*)&re_locals_dict,
|
.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
|
#endif
|
||||||
|
|
||||||
STATIC const mp_rom_map_elem_t mp_module_re_globals_table[] = {
|
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) },
|
{ 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_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_match), MP_ROM_PTR(&mod_re_match_obj) },
|
||||||
{ MP_ROM_QSTR(MP_QSTR_search), MP_ROM_PTR(&mod_re_search_obj) },
|
{ MP_ROM_QSTR(MP_QSTR_search), MP_ROM_PTR(&mod_re_search_obj) },
|
||||||
|
@ -38,6 +38,8 @@
|
|||||||
#define FSUSER_NO_FILESYSTEM (0x0008) // the block device has no filesystem on it
|
#define FSUSER_NO_FILESYSTEM (0x0008) // the block device has no filesystem on it
|
||||||
// Device is writable over USB and read-only to MicroPython.
|
// Device is writable over USB and read-only to MicroPython.
|
||||||
#define FSUSER_USB_WRITABLE (0x0010)
|
#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 {
|
typedef struct _fs_user_mount_t {
|
||||||
mp_obj_base_t base;
|
mp_obj_base_t base;
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
#include "py/mperrno.h"
|
#include "py/mperrno.h"
|
||||||
#include "lib/oofatfs/ff.h"
|
#include "lib/oofatfs/ff.h"
|
||||||
#include "extmod/vfs_fat.h"
|
#include "extmod/vfs_fat.h"
|
||||||
|
#include "supervisor/filesystem.h"
|
||||||
|
|
||||||
// this table converts from FRESULT to POSIX errno
|
// this table converts from FRESULT to POSIX errno
|
||||||
const byte fresult_to_errno_table[20] = {
|
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;
|
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);
|
pyb_file_obj_t *o = m_new_obj_with_finaliser(pyb_file_obj_t);
|
||||||
o->base.type = type;
|
o->base.type = type;
|
||||||
|
|
||||||
const char *fname = mp_obj_str_get_str(args[0].u_obj);
|
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);
|
FRESULT res = f_open(&vfs->fatfs, &o->fp, fname, mode);
|
||||||
if (res != FR_OK) {
|
if (res != FR_OK) {
|
||||||
m_del_obj(pyb_file_obj_t, o);
|
m_del_obj(pyb_file_obj_t, o);
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit d86fc7e81d51465ca1eae6f8c1141f81f065f5aa
|
Subproject commit 3e6bf71c75c9ed4ada51ab69f8bd196dad18c0c1
|
@ -1 +1 @@
|
|||||||
Subproject commit f4ee725fb93fd1a31666d3f71d10c94eb96df7c8
|
Subproject commit 1d38fd81edd30f1bd70c0cfe77819ab610ea89a3
|
@ -1 +1 @@
|
|||||||
Subproject commit 412392c8bdb6b4378e007eb7974c76b92fa9ff1d
|
Subproject commit a1686803566793ec2de7e043bf6822e47cfa31d1
|
@ -1 +1 @@
|
|||||||
Subproject commit 03c24157d46672c723021686f7a838cfeb2db2ba
|
Subproject commit 409e90902ac49720c4add985e8e1a1660bbe63a0
|
@ -1 +1 @@
|
|||||||
Subproject commit f5e70e09250f2a25ebb6487a30a763041644c5d3
|
Subproject commit dbfabac857123443506a3a1de9b5917d58248820
|
@ -1 +1 @@
|
|||||||
Subproject commit ec11164ec6682094a48d0f9848d2c4c89c08f3bc
|
Subproject commit aa4428f304b982aa19a5800822e78c47dc8a3b6c
|
@ -1 +1 @@
|
|||||||
Subproject commit 6298cd363811ad6ac10d4325c898be87a70d7bb2
|
Subproject commit a03f9011279f9e630549432589463912831fcee1
|
@ -1 +1 @@
|
|||||||
Subproject commit 4421e79661002ff8da6c0c4f22940ec843ee300b
|
Subproject commit a8894480283e3b81f39a3db5716b443963abc56f
|
@ -1 +1 @@
|
|||||||
Subproject commit 72e8f3855ecd136641d536a49311c38ee4f76f33
|
Subproject commit 6e35cd2b40575a20e2904b096508325cef4a71d3
|
@ -1 +1 @@
|
|||||||
Subproject commit eae584918e72ff5fa323825470f276b31829ef9f
|
Subproject commit 893c5ec6a9aeef38284985074c2058e87754ad3d
|
@ -1 +1 @@
|
|||||||
Subproject commit c92c22ff029ee05bd392299cf25887e9af48903a
|
Subproject commit 2df8a671a5a3d055b75df278fb354b558718b56d
|
@ -1 +1 @@
|
|||||||
Subproject commit 29b49199beb8e9b5fead83e5cd36105f8746f1d7
|
Subproject commit 55874813f82157b7509729b1a0c66e68f86e2d07
|
@ -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
|
// source is a lexer, parse and compile the script
|
||||||
qstr source_name = lex->source_name;
|
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);
|
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);
|
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.
|
// Clear the parse tree because it has a heap pointer we don't need anymore.
|
||||||
|
62
locale/ID.po
62
locale/ID.po
@ -8,7 +8,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \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"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@ -1336,7 +1336,7 @@ msgstr ""
|
|||||||
msgid "3-arg pow() not supported"
|
msgid "3-arg pow() not supported"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: py/modbuiltins.c:517
|
#: py/modbuiltins.c:521
|
||||||
msgid "must use keyword argument for key function"
|
msgid "must use keyword argument for key function"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -2709,7 +2709,7 @@ msgstr "Baudrate tidak didukung"
|
|||||||
msgid "Group full"
|
msgid "Group full"
|
||||||
msgstr ""
|
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."
|
msgid "Layer must be a Group or TileGrid subclass."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -2843,19 +2843,27 @@ msgid ""
|
|||||||
"exit safe mode.\n"
|
"exit safe mode.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, fuzzy
|
#~ msgid "Not enough pins available"
|
||||||
#~ msgid "buffer_size must be >= 1"
|
#~ msgstr "Pin yang tersedia tidak cukup"
|
||||||
#~ msgstr "buffers harus mempunyai panjang yang sama"
|
|
||||||
|
#~ msgid "busio.UART not available"
|
||||||
|
#~ msgstr "busio.UART tidak tersedia"
|
||||||
|
|
||||||
|
#~ msgid ""
|
||||||
|
#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n"
|
||||||
|
#~ msgstr ""
|
||||||
|
#~ "Silahkan taruh masalah disini dengan isi dari CIRCUITPY drive: anda \n"
|
||||||
|
|
||||||
|
#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
|
||||||
|
#~ msgstr ""
|
||||||
|
#~ "Sepertinya inti kode CircuitPython kita crash dengan sangat keras. Ups!\n"
|
||||||
|
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#~ msgid "unicode_characters must be a string"
|
#~ msgid "unpack requires a buffer of %d bytes"
|
||||||
#~ msgstr "keyword harus berupa string"
|
#~ msgstr "Gagal untuk megalokasikan buffer RX dari %d byte"
|
||||||
|
|
||||||
#~ msgid "All PWM peripherals are in use"
|
#~ msgid "Invalid UUID parameter"
|
||||||
#~ msgstr "Semua perangkat PWM sedang digunakan"
|
#~ msgstr "Parameter UUID tidak valid"
|
||||||
|
|
||||||
#~ msgid "Invalid UUID string length"
|
|
||||||
#~ msgstr "Panjang string UUID tidak valid"
|
|
||||||
|
|
||||||
#~ msgid ""
|
#~ msgid ""
|
||||||
#~ "enough power for the whole circuit and press reset (after ejecting "
|
#~ "enough power for the whole circuit and press reset (after ejecting "
|
||||||
@ -2864,24 +2872,16 @@ msgstr ""
|
|||||||
#~ "tegangan cukup untuk semua sirkuit dan tekan reset (setelah mencabut "
|
#~ "tegangan cukup untuk semua sirkuit dan tekan reset (setelah mencabut "
|
||||||
#~ "CIRCUITPY).\n"
|
#~ "CIRCUITPY).\n"
|
||||||
|
|
||||||
#~ msgid "Invalid UUID parameter"
|
#~ msgid "Invalid UUID string length"
|
||||||
#~ msgstr "Parameter UUID tidak valid"
|
#~ msgstr "Panjang string UUID tidak valid"
|
||||||
|
|
||||||
|
#~ msgid "All PWM peripherals are in use"
|
||||||
|
#~ msgstr "Semua perangkat PWM sedang digunakan"
|
||||||
|
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#~ msgid "unpack requires a buffer of %d bytes"
|
#~ msgid "unicode_characters must be a string"
|
||||||
#~ msgstr "Gagal untuk megalokasikan buffer RX dari %d byte"
|
#~ msgstr "keyword harus berupa string"
|
||||||
|
|
||||||
#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
|
#, fuzzy
|
||||||
#~ msgstr ""
|
#~ msgid "buffer_size must be >= 1"
|
||||||
#~ "Sepertinya inti kode CircuitPython kita crash dengan sangat keras. Ups!\n"
|
#~ msgstr "buffers harus mempunyai panjang yang sama"
|
||||||
|
|
||||||
#~ msgid ""
|
|
||||||
#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n"
|
|
||||||
#~ msgstr ""
|
|
||||||
#~ "Silahkan taruh masalah disini dengan isi dari CIRCUITPY drive: anda \n"
|
|
||||||
|
|
||||||
#~ msgid "busio.UART not available"
|
|
||||||
#~ msgstr "busio.UART tidak tersedia"
|
|
||||||
|
|
||||||
#~ msgid "Not enough pins available"
|
|
||||||
#~ msgstr "Pin yang tersedia tidak cukup"
|
|
||||||
|
@ -8,7 +8,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \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"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@ -1302,7 +1302,7 @@ msgstr ""
|
|||||||
msgid "3-arg pow() not supported"
|
msgid "3-arg pow() not supported"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: py/modbuiltins.c:517
|
#: py/modbuiltins.c:521
|
||||||
msgid "must use keyword argument for key function"
|
msgid "must use keyword argument for key function"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -2667,7 +2667,7 @@ msgstr ""
|
|||||||
msgid "Group full"
|
msgid "Group full"
|
||||||
msgstr ""
|
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."
|
msgid "Layer must be a Group or TileGrid subclass."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
500
locale/de_DE.po
500
locale/de_DE.po
File diff suppressed because it is too large
Load Diff
@ -7,7 +7,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"Report-Msgid-Bugs-To: \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"
|
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
|
||||||
"Last-Translator: \n"
|
"Last-Translator: \n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
@ -1302,7 +1302,7 @@ msgstr ""
|
|||||||
msgid "3-arg pow() not supported"
|
msgid "3-arg pow() not supported"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: py/modbuiltins.c:517
|
#: py/modbuiltins.c:521
|
||||||
msgid "must use keyword argument for key function"
|
msgid "must use keyword argument for key function"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -2667,7 +2667,7 @@ msgstr ""
|
|||||||
msgid "Group full"
|
msgid "Group full"
|
||||||
msgstr ""
|
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."
|
msgid "Layer must be a Group or TileGrid subclass."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
180
locale/es.po
180
locale/es.po
@ -8,7 +8,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"Report-Msgid-Bugs-To: \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"
|
"PO-Revision-Date: 2018-08-24 22:56-0500\n"
|
||||||
"Last-Translator: \n"
|
"Last-Translator: \n"
|
||||||
"Language-Team: \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"
|
msgid "3-arg pow() not supported"
|
||||||
msgstr "pow() con 3 argumentos no soportado"
|
msgstr "pow() con 3 argumentos no soportado"
|
||||||
|
|
||||||
#: py/modbuiltins.c:517
|
#: py/modbuiltins.c:521
|
||||||
msgid "must use keyword argument for key function"
|
msgid "must use keyword argument for key function"
|
||||||
msgstr "debe utilizar argumento de palabra clave para la función clave"
|
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"
|
msgid "Group full"
|
||||||
msgstr "Group lleno"
|
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."
|
msgid "Layer must be a Group or TileGrid subclass."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -2881,89 +2881,14 @@ msgstr ""
|
|||||||
"El botón reset fue presionado mientras arrancaba CircuitPython. Presiona "
|
"El botón reset fue presionado mientras arrancaba CircuitPython. Presiona "
|
||||||
"otra vez para salir del modo seguro.\n"
|
"otra vez para salir del modo seguro.\n"
|
||||||
|
|
||||||
#, fuzzy
|
#~ msgid "Not enough pins available"
|
||||||
#~ msgid "buffer_size must be >= 1"
|
#~ msgstr "No hay suficientes pines disponibles"
|
||||||
#~ msgstr "los buffers deben de tener la misma longitud"
|
|
||||||
|
|
||||||
#, fuzzy
|
#~ msgid "busio.UART not available"
|
||||||
#~ msgid "Group must have %q at least 1"
|
#~ msgstr "busio.UART no disponible"
|
||||||
#~ msgstr "Group debe tener size de minimo 1"
|
|
||||||
|
|
||||||
#~ msgid "Baud rate too high for this SPI peripheral"
|
#~ msgid "Can not apply advertisement data. status: 0x%02x"
|
||||||
#~ msgstr "Baud rate demasiado alto para este periférico SPI"
|
#~ msgstr "No se puede aplicar los datos de anuncio. status: 0x%02x"
|
||||||
|
|
||||||
#~ msgid "Invalid UUID parameter"
|
|
||||||
#~ msgstr "Parámetro UUID inválido"
|
|
||||||
|
|
||||||
#~ 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 "row data must be a buffer"
|
|
||||||
#~ msgstr "row data debe ser un buffer"
|
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
#~ msgid "unicode_characters must be a string"
|
|
||||||
#~ msgstr "palabras clave deben ser strings"
|
|
||||||
|
|
||||||
#~ msgid "index must be int"
|
|
||||||
#~ msgstr "indice debe ser int"
|
|
||||||
|
|
||||||
#~ msgid "Can not query for the device address."
|
|
||||||
#~ msgstr "No se puede consultar la dirección del dispositivo."
|
|
||||||
|
|
||||||
#~ msgid "All PWM peripherals are in use"
|
|
||||||
#~ msgstr "Todos los periféricos PWM en uso"
|
|
||||||
|
|
||||||
#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
|
|
||||||
#~ msgstr ""
|
|
||||||
#~ "Parece que nuestro código CircuitPython dejó de funcionar. Whoops!\n"
|
|
||||||
|
|
||||||
#~ msgid "Group empty"
|
|
||||||
#~ msgstr "Group vacío"
|
|
||||||
|
|
||||||
#~ msgid "Wrong address length"
|
|
||||||
#~ msgstr "Longitud de address erronea"
|
|
||||||
|
|
||||||
#~ msgid "Can encode UUID into the advertisement packet."
|
|
||||||
#~ msgstr "Se puede codificar el UUID en el paquete de anuncio."
|
|
||||||
|
|
||||||
#~ msgid "Invalid Service type"
|
|
||||||
#~ msgstr "Tipo de Servicio inválido"
|
|
||||||
|
|
||||||
#~ msgid "Invalid UUID string length"
|
|
||||||
#~ msgstr "Longitud de string UUID inválida"
|
|
||||||
|
|
||||||
#~ msgid "Can not add Service."
|
|
||||||
#~ msgstr "No se puede agregar el Servicio."
|
|
||||||
|
|
||||||
#~ msgid "displayio is a work in progress"
|
|
||||||
#~ msgstr "displayio todavia esta en desarrollo"
|
|
||||||
|
|
||||||
#~ msgid ""
|
|
||||||
#~ "enough power for the whole circuit and press reset (after ejecting "
|
|
||||||
#~ "CIRCUITPY).\n"
|
|
||||||
#~ msgstr ""
|
|
||||||
#~ "suficiente poder para todo el circuito y presiona reset (después de "
|
|
||||||
#~ "expulsar CIRCUITPY).\n"
|
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
#~ msgid "unpack requires a buffer of %d bytes"
|
|
||||||
#~ msgstr "Falló la asignación del buffer RX de %d bytes"
|
|
||||||
|
|
||||||
#~ msgid "Can not encode UUID, to check length."
|
|
||||||
#~ msgstr "No se puede codificar el UUID, para revisar la longitud."
|
|
||||||
|
|
||||||
#~ msgid "Wrong number of bytes provided"
|
|
||||||
#~ msgstr "Numero erroneo de bytes dados"
|
|
||||||
|
|
||||||
#~ msgid "Cannot apply GAP parameters."
|
|
||||||
#~ msgstr "No se pueden aplicar los parámetros GAP."
|
|
||||||
|
|
||||||
#~ msgid "Can not apply device name in the stack."
|
|
||||||
#~ msgstr "No se puede aplicar el nombre del dispositivo en el stack."
|
|
||||||
|
|
||||||
#~ msgid "Cannot set PPCP parameters."
|
|
||||||
#~ msgstr "No se pueden establecer los parámetros PPCP."
|
|
||||||
|
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#~ msgid ""
|
#~ msgid ""
|
||||||
@ -2972,11 +2897,86 @@ msgstr ""
|
|||||||
#~ "Por favor registra un issue en la siguiente URL con el contenidos de tu "
|
#~ "Por favor registra un issue en la siguiente URL con el contenidos de tu "
|
||||||
#~ "unidad de almacenamiento CIRCUITPY:\n"
|
#~ "unidad de almacenamiento CIRCUITPY:\n"
|
||||||
|
|
||||||
#~ msgid "Can not apply advertisement data. status: 0x%02x"
|
#~ msgid "Cannot set PPCP parameters."
|
||||||
#~ msgstr "No se puede aplicar los datos de anuncio. status: 0x%02x"
|
#~ msgstr "No se pueden establecer los parámetros PPCP."
|
||||||
|
|
||||||
#~ msgid "busio.UART not available"
|
#~ msgid "Can not apply device name in the stack."
|
||||||
#~ msgstr "busio.UART no disponible"
|
#~ msgstr "No se puede aplicar el nombre del dispositivo en el stack."
|
||||||
|
|
||||||
#~ msgid "Not enough pins available"
|
#~ msgid "Cannot apply GAP parameters."
|
||||||
#~ msgstr "No hay suficientes pines disponibles"
|
#~ msgstr "No se pueden aplicar los parámetros GAP."
|
||||||
|
|
||||||
|
#~ msgid "Wrong number of bytes provided"
|
||||||
|
#~ msgstr "Numero erroneo de bytes dados"
|
||||||
|
|
||||||
|
#~ msgid "Can not encode UUID, to check length."
|
||||||
|
#~ msgstr "No se puede codificar el UUID, para revisar la longitud."
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "unpack requires a buffer of %d bytes"
|
||||||
|
#~ msgstr "Falló la asignación del buffer RX de %d bytes"
|
||||||
|
|
||||||
|
#~ msgid ""
|
||||||
|
#~ "enough power for the whole circuit and press reset (after ejecting "
|
||||||
|
#~ "CIRCUITPY).\n"
|
||||||
|
#~ msgstr ""
|
||||||
|
#~ "suficiente poder para todo el circuito y presiona reset (después de "
|
||||||
|
#~ "expulsar CIRCUITPY).\n"
|
||||||
|
|
||||||
|
#~ msgid "displayio is a work in progress"
|
||||||
|
#~ msgstr "displayio todavia esta en desarrollo"
|
||||||
|
|
||||||
|
#~ msgid "Can not add Service."
|
||||||
|
#~ msgstr "No se puede agregar el Servicio."
|
||||||
|
|
||||||
|
#~ msgid "Invalid UUID string length"
|
||||||
|
#~ msgstr "Longitud de string UUID inválida"
|
||||||
|
|
||||||
|
#~ msgid "Invalid Service type"
|
||||||
|
#~ msgstr "Tipo de Servicio inválido"
|
||||||
|
|
||||||
|
#~ msgid "Can encode UUID into the advertisement packet."
|
||||||
|
#~ msgstr "Se puede codificar el UUID en el paquete de anuncio."
|
||||||
|
|
||||||
|
#~ msgid "Wrong address length"
|
||||||
|
#~ msgstr "Longitud de address erronea"
|
||||||
|
|
||||||
|
#~ msgid "Group empty"
|
||||||
|
#~ msgstr "Group vacío"
|
||||||
|
|
||||||
|
#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
|
||||||
|
#~ msgstr ""
|
||||||
|
#~ "Parece que nuestro código CircuitPython dejó de funcionar. Whoops!\n"
|
||||||
|
|
||||||
|
#~ msgid "All PWM peripherals are in use"
|
||||||
|
#~ msgstr "Todos los periféricos PWM en uso"
|
||||||
|
|
||||||
|
#~ msgid "Can not query for the device address."
|
||||||
|
#~ msgstr "No se puede consultar la dirección del dispositivo."
|
||||||
|
|
||||||
|
#~ msgid "index must be int"
|
||||||
|
#~ msgstr "indice debe ser int"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "unicode_characters must be a string"
|
||||||
|
#~ msgstr "palabras clave deben ser strings"
|
||||||
|
|
||||||
|
#~ msgid "row data must be a buffer"
|
||||||
|
#~ msgstr "row data debe ser un buffer"
|
||||||
|
|
||||||
|
#~ 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 "Invalid UUID parameter"
|
||||||
|
#~ msgstr "Parámetro UUID inválido"
|
||||||
|
|
||||||
|
#~ msgid "Baud rate too high for this SPI peripheral"
|
||||||
|
#~ msgstr "Baud rate demasiado alto para este periférico SPI"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "Group must have %q at least 1"
|
||||||
|
#~ msgstr "Group debe tener size de minimo 1"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "buffer_size must be >= 1"
|
||||||
|
#~ msgstr "los buffers deben de tener la misma longitud"
|
||||||
|
148
locale/fil.po
148
locale/fil.po
@ -7,7 +7,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"Report-Msgid-Bugs-To: \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"
|
"PO-Revision-Date: 2018-12-20 22:15-0800\n"
|
||||||
"Last-Translator: Timothy <me@timothygarcia.ca>\n"
|
"Last-Translator: Timothy <me@timothygarcia.ca>\n"
|
||||||
"Language-Team: fil\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"
|
msgid "3-arg pow() not supported"
|
||||||
msgstr "3-arg pow() hindi suportado"
|
msgstr "3-arg pow() hindi suportado"
|
||||||
|
|
||||||
#: py/modbuiltins.c:517
|
#: py/modbuiltins.c:521
|
||||||
msgid "must use keyword argument for key function"
|
msgid "must use keyword argument for key function"
|
||||||
msgstr "dapat gumamit ng keyword argument para sa 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"
|
msgid "Group full"
|
||||||
msgstr "Puno ang group"
|
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."
|
msgid "Layer must be a Group or TileGrid subclass."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -2887,64 +2887,39 @@ msgstr ""
|
|||||||
"Ang reset button ay pinindot habang nag boot ang CircuitPython. Pindutin "
|
"Ang reset button ay pinindot habang nag boot ang CircuitPython. Pindutin "
|
||||||
"ulit para lumabas sa safe mode.\n"
|
"ulit para lumabas sa safe mode.\n"
|
||||||
|
|
||||||
#, fuzzy
|
#~ msgid "Not enough pins available"
|
||||||
#~ msgid "buffer_size must be >= 1"
|
#~ msgstr "Hindi sapat ang magagamit na pins"
|
||||||
#~ msgstr "aarehas na haba dapat ang buffer slices"
|
|
||||||
|
|
||||||
#, fuzzy
|
#~ msgid "busio.UART not available"
|
||||||
#~ msgid "Group must have %q at least 1"
|
#~ msgstr "busio.UART hindi available"
|
||||||
#~ msgstr "Group dapat ay hindi baba sa 1 na haba"
|
|
||||||
|
|
||||||
#, fuzzy
|
#~ msgid "Can not apply advertisement data. status: 0x%02x"
|
||||||
#~ msgid "palette must be displayio.Palette"
|
#~ msgstr "Hindi ma i-apply ang advertisement data. status: 0x%02x"
|
||||||
#~ msgstr "ang palette ay dapat 32 bytes ang haba"
|
|
||||||
|
|
||||||
#~ msgid "Invalid UUID parameter"
|
#~ msgid ""
|
||||||
#~ msgstr "Mali ang UUID parameter"
|
#~ "Please file an issue here with the contents of your 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 "row data must be a buffer"
|
|
||||||
#~ msgstr "row data ay dapat na buffer"
|
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
#~ msgid "unicode_characters must be a string"
|
|
||||||
#~ msgstr "ang keywords dapat strings"
|
|
||||||
|
|
||||||
#~ msgid "index must be int"
|
|
||||||
#~ msgstr "index ay dapat int"
|
|
||||||
|
|
||||||
#~ msgid "Can not query for the device address."
|
|
||||||
#~ msgstr "Hindi maaaring mag-query para sa address ng device."
|
|
||||||
|
|
||||||
#~ msgid "All PWM peripherals are in use"
|
|
||||||
#~ msgstr "Lahat ng PWM peripherals ay ginagamit"
|
|
||||||
|
|
||||||
#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
|
|
||||||
#~ msgstr ""
|
#~ msgstr ""
|
||||||
#~ "Mukhang ang core CircuitPython code ay nag-crash ng malakas. Aray!\n"
|
#~ "Mag-file ng isang isyu dito gamit ang mga nilalaman ng iyong CIRCUITPY "
|
||||||
|
#~ "drive:\n"
|
||||||
|
|
||||||
#~ msgid "Group empty"
|
#~ msgid "Cannot set PPCP parameters."
|
||||||
#~ msgstr "Walang laman ang group"
|
#~ msgstr "Hindi ma-set ang PPCP parameters."
|
||||||
|
|
||||||
#~ msgid "Wrong address length"
|
#~ msgid "Can not apply device name in the stack."
|
||||||
#~ msgstr "Mali ang address length"
|
#~ msgstr "Hindi maaaring ma-aplay ang device name sa stack."
|
||||||
|
|
||||||
#~ msgid "Can encode UUID into the advertisement packet."
|
#~ msgid "Cannot apply GAP parameters."
|
||||||
#~ msgstr "Maaring i-encode ang UUID sa advertisement packet."
|
#~ msgstr "Hindi ma-apply ang GAP parameters."
|
||||||
|
|
||||||
#~ msgid "Invalid Service type"
|
#~ msgid "Wrong number of bytes provided"
|
||||||
#~ msgstr "Mali ang tipo ng serbisyo"
|
#~ msgstr "Mali ang bilang ng bytes"
|
||||||
|
|
||||||
#~ msgid "Invalid UUID string length"
|
#~ msgid "Can not encode UUID, to check length."
|
||||||
#~ msgstr "Mali ang UUID string length"
|
#~ msgstr "Hindi ma-encode UUID, para suriin ang haba."
|
||||||
|
|
||||||
#~ msgid "Can not add Service."
|
#, fuzzy
|
||||||
#~ msgstr "Hindi maidaragdag ang serbisyo."
|
#~ msgid "unpack requires a buffer of %d bytes"
|
||||||
|
#~ msgstr "Nabigong ilaan ang RX buffer ng %d bytes"
|
||||||
#~ msgid "displayio is a work in progress"
|
|
||||||
#~ msgstr "displayio ay nasa gitna ng konstruksiyon"
|
|
||||||
|
|
||||||
#~ msgid ""
|
#~ msgid ""
|
||||||
#~ "enough power for the whole circuit and press reset (after ejecting "
|
#~ "enough power for the whole circuit and press reset (after ejecting "
|
||||||
@ -2953,36 +2928,61 @@ msgstr ""
|
|||||||
#~ "ay nagbibigay ng sapat na power para sa buong circuit at i-press ang "
|
#~ "ay nagbibigay ng sapat na power para sa buong circuit at i-press ang "
|
||||||
#~ "reset (pagkatapos i-eject ang CIRCUITPY).\n"
|
#~ "reset (pagkatapos i-eject ang CIRCUITPY).\n"
|
||||||
|
|
||||||
#, fuzzy
|
#~ msgid "displayio is a work in progress"
|
||||||
#~ msgid "unpack requires a buffer of %d bytes"
|
#~ msgstr "displayio ay nasa gitna ng konstruksiyon"
|
||||||
#~ msgstr "Nabigong ilaan ang RX buffer ng %d bytes"
|
|
||||||
|
|
||||||
#~ msgid "Can not encode UUID, to check length."
|
#~ msgid "Can not add Service."
|
||||||
#~ msgstr "Hindi ma-encode UUID, para suriin ang haba."
|
#~ msgstr "Hindi maidaragdag ang serbisyo."
|
||||||
|
|
||||||
#~ msgid "Wrong number of bytes provided"
|
#~ msgid "Invalid UUID string length"
|
||||||
#~ msgstr "Mali ang bilang ng bytes"
|
#~ msgstr "Mali ang UUID string length"
|
||||||
|
|
||||||
#~ msgid "Cannot apply GAP parameters."
|
#~ msgid "Invalid Service type"
|
||||||
#~ msgstr "Hindi ma-apply ang GAP parameters."
|
#~ msgstr "Mali ang tipo ng serbisyo"
|
||||||
|
|
||||||
#~ msgid "Can not apply device name in the stack."
|
#~ msgid "Can encode UUID into the advertisement packet."
|
||||||
#~ msgstr "Hindi maaaring ma-aplay ang device name sa stack."
|
#~ msgstr "Maaring i-encode ang UUID sa advertisement packet."
|
||||||
|
|
||||||
#~ msgid "Cannot set PPCP parameters."
|
#~ msgid "Wrong address length"
|
||||||
#~ msgstr "Hindi ma-set ang PPCP parameters."
|
#~ msgstr "Mali ang address length"
|
||||||
|
|
||||||
#~ msgid ""
|
#~ msgid "Group empty"
|
||||||
#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n"
|
#~ msgstr "Walang laman ang group"
|
||||||
|
|
||||||
|
#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
|
||||||
#~ msgstr ""
|
#~ msgstr ""
|
||||||
#~ "Mag-file ng isang isyu dito gamit ang mga nilalaman ng iyong CIRCUITPY "
|
#~ "Mukhang ang core CircuitPython code ay nag-crash ng malakas. Aray!\n"
|
||||||
#~ "drive:\n"
|
|
||||||
|
|
||||||
#~ msgid "Can not apply advertisement data. status: 0x%02x"
|
#~ msgid "All PWM peripherals are in use"
|
||||||
#~ msgstr "Hindi ma i-apply ang advertisement data. status: 0x%02x"
|
#~ msgstr "Lahat ng PWM peripherals ay ginagamit"
|
||||||
|
|
||||||
#~ msgid "busio.UART not available"
|
#~ msgid "Can not query for the device address."
|
||||||
#~ msgstr "busio.UART hindi available"
|
#~ msgstr "Hindi maaaring mag-query para sa address ng device."
|
||||||
|
|
||||||
#~ msgid "Not enough pins available"
|
#~ msgid "index must be int"
|
||||||
#~ msgstr "Hindi sapat ang magagamit na pins"
|
#~ msgstr "index ay dapat int"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "unicode_characters must be a string"
|
||||||
|
#~ msgstr "ang keywords dapat strings"
|
||||||
|
|
||||||
|
#~ msgid "row data must be a buffer"
|
||||||
|
#~ msgstr "row data ay dapat na buffer"
|
||||||
|
|
||||||
|
#~ 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 "Invalid UUID parameter"
|
||||||
|
#~ msgstr "Mali ang UUID parameter"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "palette must be displayio.Palette"
|
||||||
|
#~ msgstr "ang palette ay dapat 32 bytes ang haba"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "Group must have %q at least 1"
|
||||||
|
#~ msgstr "Group dapat ay hindi baba sa 1 na haba"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "buffer_size must be >= 1"
|
||||||
|
#~ msgstr "aarehas na haba dapat ang buffer slices"
|
||||||
|
168
locale/fr.po
168
locale/fr.po
@ -7,7 +7,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: 0.1\n"
|
"Project-Id-Version: 0.1\n"
|
||||||
"Report-Msgid-Bugs-To: \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"
|
"PO-Revision-Date: 2018-12-23 20:05+0100\n"
|
||||||
"Last-Translator: Pierrick Couturier <arofarn@arofarn.info>\n"
|
"Last-Translator: Pierrick Couturier <arofarn@arofarn.info>\n"
|
||||||
"Language-Team: fr\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"
|
msgid "3-arg pow() not supported"
|
||||||
msgstr "pow() avec 3 arguments non supporté"
|
msgstr "pow() avec 3 arguments non supporté"
|
||||||
|
|
||||||
#: py/modbuiltins.c:517
|
#: py/modbuiltins.c:521
|
||||||
msgid "must use keyword argument for key function"
|
msgid "must use keyword argument for key function"
|
||||||
msgstr "il faut utiliser un argument nommé pour une fonction key"
|
msgstr "il faut utiliser un argument nommé pour une fonction key"
|
||||||
|
|
||||||
@ -2759,7 +2759,7 @@ msgstr "type de bitmap non supporté"
|
|||||||
msgid "Group full"
|
msgid "Group full"
|
||||||
msgstr "Groupe plein"
|
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."
|
msgid "Layer must be a Group or TileGrid subclass."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -2909,76 +2909,34 @@ msgstr ""
|
|||||||
"Le bouton 'reset' a été appuyé pendant le démarrage de CircuitPython. "
|
"Le bouton 'reset' a été appuyé pendant le démarrage de CircuitPython. "
|
||||||
"Appuyer denouveau pour quitter de le mode sans-échec.\n"
|
"Appuyer denouveau pour quitter de le mode sans-échec.\n"
|
||||||
|
|
||||||
#, fuzzy
|
#~ msgid "Not enough pins available"
|
||||||
#~ msgid "buffer_size must be >= 1"
|
#~ msgstr "Pas assez de broches disponibles"
|
||||||
#~ msgstr "les slices de tampon doivent être de longueurs égales"
|
|
||||||
|
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#~ msgid "Group must have %q at least 1"
|
#~ msgid "busio.UART not available"
|
||||||
#~ msgstr "Le tampon doit être de longueur au moins 1"
|
#~ msgstr "busio.UART n'est pas disponible"
|
||||||
|
|
||||||
#~ msgid "Cannot set PPCP parameters."
|
#~ msgid "Can not query for the device address."
|
||||||
#~ msgstr "Impossible d'appliquer les paramètres PPCP"
|
#~ msgstr "Impossible d'obtenir l'adresse du périphérique"
|
||||||
|
|
||||||
#~ msgid "Invalid UUID parameter"
|
#~ msgid "Can not encode UUID, to check length."
|
||||||
#~ msgstr "Paramètre UUID invalide"
|
#~ msgstr "Impossible d'encoder l'UUID pour vérifier la longueur."
|
||||||
|
|
||||||
#, fuzzy
|
#~ msgid "Cannot apply GAP parameters."
|
||||||
#~ msgid "row buffer must be a bytearray or array of type 'b' or 'B'"
|
#~ msgstr "Impossible d'appliquer les paramètres GAP"
|
||||||
|
|
||||||
|
#~ msgid ""
|
||||||
|
#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n"
|
||||||
#~ msgstr ""
|
#~ 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"
|
||||||
|
|
||||||
|
#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
|
||||||
|
#~ msgstr ""
|
||||||
|
#~ "Il semblerait que votre code CircuitPython a durement planté. Oups!\n"
|
||||||
|
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#~ msgid "row data must be a buffer"
|
#~ msgid "Wrong number of bytes provided"
|
||||||
#~ msgstr "les données de ligne doivent être un tampon"
|
#~ msgstr "mauvais nombre d'octets fourni'"
|
||||||
|
|
||||||
#, 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"
|
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
#~ msgid "palette must be displayio.Palette"
|
|
||||||
#~ msgstr "la palette doit être une displayio.Palette"
|
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
#~ msgid "All PWM peripherals are in use"
|
|
||||||
#~ msgstr "Tous les périphériques PWM sont utilisés"
|
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
#~ msgid "value_size must be power of two"
|
|
||||||
#~ msgstr "value_size doit être une puissance de 2"
|
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
#~ msgid "Group empty"
|
|
||||||
#~ msgstr "Groupe vide"
|
|
||||||
|
|
||||||
#~ msgid "Wrong address length"
|
|
||||||
#~ msgstr "Mauvaise longueur d'adresse"
|
|
||||||
|
|
||||||
#~ msgid "Can not add Service."
|
|
||||||
#~ msgstr "Impossible d'ajouter le Service"
|
|
||||||
|
|
||||||
#~ 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 apply device name in the stack."
|
|
||||||
#~ msgstr "Impossible d'appliquer le nom de périphérique dans la pile"
|
|
||||||
|
|
||||||
#~ msgid "displayio is a work in progress"
|
|
||||||
#~ msgstr "displayio est en cours de développement"
|
|
||||||
|
|
||||||
#~ msgid "Invalid Service type"
|
|
||||||
#~ msgstr "Type de service invalide"
|
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
#~ msgid "unpack requires a buffer of %d bytes"
|
|
||||||
#~ msgstr "Echec de l'allocation de %d octets du tampon RX"
|
|
||||||
|
|
||||||
#~ msgid ""
|
#~ msgid ""
|
||||||
#~ "enough power for the whole circuit and press reset (after ejecting "
|
#~ "enough power for the whole circuit and press reset (after ejecting "
|
||||||
@ -2988,30 +2946,72 @@ msgstr ""
|
|||||||
#~ "'reset' (après avoir éjecter CIRCUITPY).\n"
|
#~ "'reset' (après avoir éjecter CIRCUITPY).\n"
|
||||||
|
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#~ msgid "Wrong number of bytes provided"
|
#~ msgid "unpack requires a buffer of %d bytes"
|
||||||
#~ msgstr "mauvais nombre d'octets fourni'"
|
#~ msgstr "Echec de l'allocation de %d octets du tampon RX"
|
||||||
|
|
||||||
#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
|
#~ msgid "Invalid Service type"
|
||||||
#~ msgstr ""
|
#~ msgstr "Type de service invalide"
|
||||||
#~ "Il semblerait que votre code CircuitPython a durement planté. Oups!\n"
|
|
||||||
|
|
||||||
#~ msgid ""
|
#~ msgid "displayio is a work in progress"
|
||||||
#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n"
|
#~ msgstr "displayio est en cours de développement"
|
||||||
#~ msgstr ""
|
|
||||||
#~ "SVP, remontez le problème là avec le contenu du lecteur CIRCUITPY:\n"
|
|
||||||
|
|
||||||
#~ msgid "Cannot apply GAP parameters."
|
#~ msgid "Can not apply device name in the stack."
|
||||||
#~ msgstr "Impossible d'appliquer les paramètres GAP"
|
#~ msgstr "Impossible d'appliquer le nom de périphérique dans la pile"
|
||||||
|
|
||||||
#~ msgid "Can not encode UUID, to check length."
|
#~ msgid "Invalid UUID string length"
|
||||||
#~ msgstr "Impossible d'encoder l'UUID pour vérifier la longueur."
|
#~ msgstr "Longeur de chaîne UUID invalide"
|
||||||
|
|
||||||
#~ msgid "Can not query for the device address."
|
#~ msgid "Can not add Characteristic."
|
||||||
#~ msgstr "Impossible d'obtenir l'adresse du périphérique"
|
#~ msgstr "Impossible d'ajouter la Characteristic."
|
||||||
|
|
||||||
|
#~ msgid "Can not add Service."
|
||||||
|
#~ msgstr "Impossible d'ajouter le Service"
|
||||||
|
|
||||||
|
#~ msgid "Wrong address length"
|
||||||
|
#~ msgstr "Mauvaise longueur d'adresse"
|
||||||
|
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#~ msgid "busio.UART not available"
|
#~ msgid "Group empty"
|
||||||
#~ msgstr "busio.UART n'est pas disponible"
|
#~ msgstr "Groupe vide"
|
||||||
|
|
||||||
#~ msgid "Not enough pins available"
|
#, fuzzy
|
||||||
#~ msgstr "Pas assez de broches disponibles"
|
#~ msgid "value_size must be power of two"
|
||||||
|
#~ msgstr "value_size doit être une puissance de 2"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "All PWM peripherals are in use"
|
||||||
|
#~ msgstr "Tous les périphériques PWM sont utilisés"
|
||||||
|
|
||||||
|
#, 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 "unicode_characters must be a string"
|
||||||
|
#~ msgstr "les noms doivent être des chaînes de caractère"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "row data must be a buffer"
|
||||||
|
#~ msgstr "les données de ligne doivent être un tampon"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "row buffer must be a bytearray or array of type 'b' or 'B'"
|
||||||
|
#~ msgstr ""
|
||||||
|
#~ "le tampon de ligne doit être un bytearray ou un tableau de type 'b' ou 'B'"
|
||||||
|
|
||||||
|
#~ msgid "Invalid UUID parameter"
|
||||||
|
#~ msgstr "Paramètre UUID invalide"
|
||||||
|
|
||||||
|
#~ msgid "Cannot set PPCP parameters."
|
||||||
|
#~ msgstr "Impossible d'appliquer les paramètres PPCP"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "Group must have %q at least 1"
|
||||||
|
#~ msgstr "Le tampon doit être de longueur au moins 1"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "buffer_size must be >= 1"
|
||||||
|
#~ msgstr "les slices de tampon doivent être de longueurs égales"
|
||||||
|
160
locale/it_IT.po
160
locale/it_IT.po
@ -8,7 +8,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \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"
|
"PO-Revision-Date: 2018-10-02 16:27+0200\n"
|
||||||
"Last-Translator: Enrico Paganin <enrico.paganin@mail.com>\n"
|
"Last-Translator: Enrico Paganin <enrico.paganin@mail.com>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
@ -1337,7 +1337,7 @@ msgstr ""
|
|||||||
msgid "3-arg pow() not supported"
|
msgid "3-arg pow() not supported"
|
||||||
msgstr "pow() con tre argmomenti non supportata"
|
msgstr "pow() con tre argmomenti non supportata"
|
||||||
|
|
||||||
#: py/modbuiltins.c:517
|
#: py/modbuiltins.c:521
|
||||||
msgid "must use keyword argument for key function"
|
msgid "must use keyword argument for key function"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -2747,7 +2747,7 @@ msgstr "tipo di bitmap non supportato"
|
|||||||
msgid "Group full"
|
msgid "Group full"
|
||||||
msgstr "Gruppo pieno"
|
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."
|
msgid "Layer must be a Group or TileGrid subclass."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -2883,79 +2883,22 @@ msgid ""
|
|||||||
"exit safe mode.\n"
|
"exit safe mode.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, fuzzy
|
#~ msgid "Not enough pins available"
|
||||||
#~ msgid "buffer_size must be >= 1"
|
#~ msgstr "Non sono presenti abbastanza pin"
|
||||||
#~ msgstr "slice del buffer devono essere della stessa lunghezza"
|
|
||||||
|
|
||||||
#~ msgid "row data must be a buffer"
|
|
||||||
#~ msgstr "valori della riga devono essere un buffer"
|
|
||||||
|
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#~ msgid "Group must have %q at least 1"
|
#~ msgid "busio.UART not available"
|
||||||
#~ msgstr "Il gruppo deve avere dimensione almeno 1"
|
#~ msgstr "busio.UART non ancora implementato"
|
||||||
|
|
||||||
#~ msgid "Invalid UUID parameter"
|
#~ msgid "Can not encode UUID, to check length."
|
||||||
#~ msgstr "Parametro UUID non valido"
|
#~ msgstr "Non è possibile codificare l'UUID, lunghezza da controllare."
|
||||||
|
|
||||||
#~ msgid "Group empty"
|
|
||||||
#~ msgstr "Gruppo vuoto"
|
|
||||||
|
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#~ msgid "All PWM peripherals are in use"
|
#~ msgid "unpack requires a buffer of %d bytes"
|
||||||
#~ msgstr "Tutte le periferiche SPI sono in uso"
|
#~ 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 ""
|
#~ msgstr "Lunghezza della stringa UUID non valida"
|
||||||
#~ "buffer di riga deve essere un bytearray o un array di tipo 'b' o 'B'"
|
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
#~ msgid "unicode_characters must be a string"
|
|
||||||
#~ msgstr "argomenti nominati devono essere stringhe"
|
|
||||||
|
|
||||||
#~ msgid "index must be int"
|
|
||||||
#~ msgstr "l'indice deve essere int"
|
|
||||||
|
|
||||||
#~ msgid "Invalid Service type"
|
|
||||||
#~ msgstr "Tipo di servizio non valido"
|
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
#~ msgid "Wrong number of bytes provided"
|
|
||||||
#~ msgstr "numero di argomenti errato"
|
|
||||||
|
|
||||||
#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
|
|
||||||
#~ msgstr ""
|
|
||||||
#~ "Sembra che il codice del core di CircuitPython sia crashato malamente. "
|
|
||||||
#~ "Whoops!\n"
|
|
||||||
|
|
||||||
#~ msgid "Can not add Characteristic."
|
|
||||||
#~ msgstr "Non è possibile aggiungere Characteristic."
|
|
||||||
|
|
||||||
#~ 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 ""
|
|
||||||
#~ "Please file an issue here with the contents of your CIRCUITPY drive:\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."
|
|
||||||
|
|
||||||
#~ msgid "Cannot set PPCP parameters."
|
|
||||||
#~ msgstr "Impossibile impostare i parametri PPCP."
|
|
||||||
|
|
||||||
#~ msgid "Can not apply device name in the stack."
|
|
||||||
#~ msgstr "Non è possibile inserire il nome del dipositivo nella lista."
|
|
||||||
|
|
||||||
#~ msgid "Can encode UUID into the advertisement packet."
|
|
||||||
#~ msgstr "È possibile codificare l'UUID nel pacchetto di advertisement."
|
|
||||||
|
|
||||||
#~ msgid "Can not add Service."
|
|
||||||
#~ msgstr "Non è possibile aggiungere Service."
|
|
||||||
|
|
||||||
#~ msgid ""
|
#~ msgid ""
|
||||||
#~ "enough power for the whole circuit and press reset (after ejecting "
|
#~ "enough power for the whole circuit and press reset (after ejecting "
|
||||||
@ -2964,19 +2907,76 @@ msgstr ""
|
|||||||
#~ "abbastanza potenza per l'intero circuito e premere reset (dopo aver "
|
#~ "abbastanza potenza per l'intero circuito e premere reset (dopo aver "
|
||||||
#~ "espulso CIRCUITPY).\n"
|
#~ "espulso CIRCUITPY).\n"
|
||||||
|
|
||||||
#~ msgid "Invalid UUID string length"
|
#~ msgid "Can not add Service."
|
||||||
#~ msgstr "Lunghezza della stringa UUID non valida"
|
#~ msgstr "Non è possibile aggiungere Service."
|
||||||
|
|
||||||
|
#~ msgid "Can encode UUID into the advertisement packet."
|
||||||
|
#~ msgstr "È possibile codificare l'UUID nel pacchetto di advertisement."
|
||||||
|
|
||||||
|
#~ msgid "Can not apply device name in the stack."
|
||||||
|
#~ msgstr "Non è possibile inserire il nome del dipositivo nella lista."
|
||||||
|
|
||||||
|
#~ msgid "Cannot set PPCP parameters."
|
||||||
|
#~ msgstr "Impossibile impostare i parametri PPCP."
|
||||||
|
|
||||||
|
#~ 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 ""
|
||||||
|
#~ "Ti preghiamo di compilare una issue con il contenuto del tuo drie "
|
||||||
|
#~ "CIRCUITPY:\n"
|
||||||
|
|
||||||
|
#~ 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 add Characteristic."
|
||||||
|
#~ msgstr "Non è possibile aggiungere Characteristic."
|
||||||
|
|
||||||
|
#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
|
||||||
|
#~ msgstr ""
|
||||||
|
#~ "Sembra che il codice del core di CircuitPython sia crashato malamente. "
|
||||||
|
#~ "Whoops!\n"
|
||||||
|
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#~ msgid "unpack requires a buffer of %d bytes"
|
#~ msgid "Wrong number of bytes provided"
|
||||||
#~ msgstr "Fallita allocazione del buffer RX di %d byte"
|
#~ msgstr "numero di argomenti errato"
|
||||||
|
|
||||||
#~ msgid "Can not encode UUID, to check length."
|
#~ msgid "Invalid Service type"
|
||||||
#~ msgstr "Non è possibile codificare l'UUID, lunghezza da controllare."
|
#~ msgstr "Tipo di servizio non valido"
|
||||||
|
|
||||||
|
#~ msgid "index must be int"
|
||||||
|
#~ msgstr "l'indice deve essere int"
|
||||||
|
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#~ msgid "busio.UART not available"
|
#~ msgid "unicode_characters must be a string"
|
||||||
#~ msgstr "busio.UART non ancora implementato"
|
#~ msgstr "argomenti nominati devono essere stringhe"
|
||||||
|
|
||||||
#~ msgid "Not enough pins available"
|
#~ msgid "row buffer must be a bytearray or array of type 'b' or 'B'"
|
||||||
#~ msgstr "Non sono presenti abbastanza pin"
|
#~ msgstr ""
|
||||||
|
#~ "buffer di riga deve essere un bytearray o un array di tipo 'b' o 'B'"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "All PWM peripherals are in use"
|
||||||
|
#~ msgstr "Tutte le periferiche SPI sono in uso"
|
||||||
|
|
||||||
|
#~ msgid "Group empty"
|
||||||
|
#~ msgstr "Gruppo vuoto"
|
||||||
|
|
||||||
|
#~ msgid "Invalid UUID parameter"
|
||||||
|
#~ msgstr "Parametro UUID non valido"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "Group must have %q at least 1"
|
||||||
|
#~ msgstr "Il gruppo deve avere dimensione almeno 1"
|
||||||
|
|
||||||
|
#~ 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"
|
||||||
|
114
locale/pt_BR.po
114
locale/pt_BR.po
@ -8,7 +8,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \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"
|
"PO-Revision-Date: 2018-10-02 21:14-0000\n"
|
||||||
"Last-Translator: \n"
|
"Last-Translator: \n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
@ -1320,7 +1320,7 @@ msgstr ""
|
|||||||
msgid "3-arg pow() not supported"
|
msgid "3-arg pow() not supported"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: py/modbuiltins.c:517
|
#: py/modbuiltins.c:521
|
||||||
msgid "must use keyword argument for key function"
|
msgid "must use keyword argument for key function"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -2703,7 +2703,7 @@ msgstr "Taxa de transmissão não suportada"
|
|||||||
msgid "Group full"
|
msgid "Group full"
|
||||||
msgstr "Grupo cheio"
|
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."
|
msgid "Layer must be a Group or TileGrid subclass."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -2831,64 +2831,64 @@ msgid ""
|
|||||||
"exit safe mode.\n"
|
"exit safe mode.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, fuzzy
|
#~ msgid "Not enough pins available"
|
||||||
#~ msgid "buffer_size must be >= 1"
|
#~ msgstr "Não há pinos suficientes disponíveis"
|
||||||
#~ msgstr "buffers devem ser o mesmo tamanho"
|
|
||||||
|
|
||||||
#~ msgid "index must be int"
|
#~ msgid "busio.UART not available"
|
||||||
#~ msgstr "index deve ser int"
|
#~ 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 "Group empty"
|
|
||||||
#~ msgstr "Grupo vazio"
|
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
#~ msgid "unicode_characters must be a string"
|
|
||||||
#~ msgstr "heap deve ser uma lista"
|
|
||||||
|
|
||||||
#~ msgid "Invalid UUID parameter"
|
|
||||||
#~ msgstr "Parâmetro UUID inválido"
|
|
||||||
|
|
||||||
#~ msgid "Baud rate too high for this SPI peripheral"
|
|
||||||
#~ msgstr "Taxa de transmissão muito alta para esse periférico SPI"
|
|
||||||
|
|
||||||
#~ msgid "Can encode UUID into the advertisement packet."
|
|
||||||
#~ msgstr "Pode codificar o UUID no pacote de anúncios."
|
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
#~ msgid "unpack requires a buffer of %d bytes"
|
|
||||||
#~ msgstr "Falha ao alocar buffer RX de %d bytes"
|
|
||||||
|
|
||||||
#~ 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"
|
|
||||||
|
|
||||||
#~ msgid "Cannot set PPCP parameters."
|
|
||||||
#~ msgstr "Não é possível definir parâmetros PPCP."
|
|
||||||
|
|
||||||
#~ msgid "Can not apply device name in the stack."
|
|
||||||
#~ msgstr "Não é possível aplicar o nome do dispositivo na pilha."
|
|
||||||
|
|
||||||
#~ msgid "Cannot apply GAP parameters."
|
|
||||||
#~ msgstr "Não é possível aplicar parâmetros GAP."
|
|
||||||
|
|
||||||
#~ msgid "Can not apply advertisement data. status: 0x%02x"
|
|
||||||
#~ msgstr "Não é possível aplicar dados de anúncio. status: 0x%02x"
|
|
||||||
|
|
||||||
#~ msgid "Can not add Characteristic."
|
|
||||||
#~ msgstr "Não é possível adicionar Característica."
|
|
||||||
|
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#~ msgid "All PWM peripherals are in use"
|
#~ msgid "All PWM peripherals are in use"
|
||||||
#~ msgstr "Todos os temporizadores em uso"
|
#~ msgstr "Todos os temporizadores em uso"
|
||||||
|
|
||||||
#~ msgid "busio.UART not available"
|
#~ msgid "Can not add Characteristic."
|
||||||
#~ msgstr "busio.UART não disponível"
|
#~ msgstr "Não é possível adicionar Característica."
|
||||||
|
|
||||||
#~ msgid "Not enough pins available"
|
#~ msgid "Can not apply advertisement data. status: 0x%02x"
|
||||||
#~ msgstr "Não há pinos suficientes disponíveis"
|
#~ msgstr "Não é possível aplicar dados de anúncio. status: 0x%02x"
|
||||||
|
|
||||||
|
#~ msgid "Cannot apply GAP parameters."
|
||||||
|
#~ msgstr "Não é possível aplicar parâmetros GAP."
|
||||||
|
|
||||||
|
#~ msgid "Can not apply device name in the stack."
|
||||||
|
#~ msgstr "Não é possível aplicar o nome do dispositivo na pilha."
|
||||||
|
|
||||||
|
#~ msgid "Cannot set PPCP parameters."
|
||||||
|
#~ msgstr "Não é possível definir parâmetros PPCP."
|
||||||
|
|
||||||
|
#~ 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."
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "unpack requires a buffer of %d bytes"
|
||||||
|
#~ msgstr "Falha ao alocar buffer RX de %d bytes"
|
||||||
|
|
||||||
|
#~ msgid "Can encode UUID into the advertisement packet."
|
||||||
|
#~ msgstr "Pode codificar o UUID no pacote de anúncios."
|
||||||
|
|
||||||
|
#~ msgid "Baud rate too high for this SPI peripheral"
|
||||||
|
#~ msgstr "Taxa de transmissão muito alta para esse periférico SPI"
|
||||||
|
|
||||||
|
#~ msgid "Invalid UUID parameter"
|
||||||
|
#~ msgstr "Parâmetro UUID inválido"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "unicode_characters must be a string"
|
||||||
|
#~ msgstr "heap deve ser uma lista"
|
||||||
|
|
||||||
|
#~ msgid "Group empty"
|
||||||
|
#~ msgstr "Grupo vazio"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "Group must have %q at least 1"
|
||||||
|
#~ msgstr "Grupo deve ter tamanho pelo menos 1"
|
||||||
|
|
||||||
|
#~ msgid "index must be int"
|
||||||
|
#~ msgstr "index deve ser int"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~ msgid "buffer_size must be >= 1"
|
||||||
|
#~ msgstr "buffers devem ser o mesmo tamanho"
|
||||||
|
21
main.c
21
main.c
@ -127,6 +127,20 @@ void stop_mp(void) {
|
|||||||
#if CIRCUITPY_NETWORK
|
#if CIRCUITPY_NETWORK
|
||||||
network_module_deinit();
|
network_module_deinit();
|
||||||
#endif
|
#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__, ""}
|
#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);
|
mp_hal_delay_ms(1500);
|
||||||
|
|
||||||
// USB isn't up, so we can write the file.
|
// 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);
|
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,
|
// Switch the filesystem back to non-writable by Python now instead of later,
|
||||||
// since boot.py might change it back to writable.
|
// 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.
|
// Write version info to boot_out.txt.
|
||||||
mp_hal_stdout_tx_str(MICROPY_FULL_VERSION_INFO);
|
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
|
// 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.
|
// 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);
|
run_boot_py(safe_mode);
|
||||||
|
|
||||||
|
@ -102,9 +102,9 @@ ifeq ($(DEBUG), 1)
|
|||||||
# Turn on Python modules useful for debugging (e.g. uheap, ustack).
|
# Turn on Python modules useful for debugging (e.g. uheap, ustack).
|
||||||
CFLAGS += -ggdb
|
CFLAGS += -ggdb
|
||||||
# You may want to disable -flto if it interferes with debugging.
|
# 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.
|
# 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)
|
ifeq ($(CHIP_FAMILY), samd21)
|
||||||
CFLAGS += -DENABLE_MICRO_TRACE_BUFFER
|
CFLAGS += -DENABLE_MICRO_TRACE_BUFFER
|
||||||
endif
|
endif
|
||||||
@ -112,7 +112,7 @@ else
|
|||||||
# -finline-limit can shrink the image size.
|
# -finline-limit can shrink the image size.
|
||||||
# -finline-limit=80 or so is similar to not having it on.
|
# -finline-limit=80 or so is similar to not having it on.
|
||||||
# There is no simple default value, though.
|
# There is no simple default value, though.
|
||||||
ifdef INTERNAL_FLASH_FILESYSTEM
|
ifeq ($(INTERNAL_FLASH_FILESYSTEM),1)
|
||||||
CFLAGS += -finline-limit=50
|
CFLAGS += -finline-limit=50
|
||||||
endif
|
endif
|
||||||
ifdef CFLAGS_INLINE_LIMIT
|
ifdef CFLAGS_INLINE_LIMIT
|
||||||
@ -245,6 +245,7 @@ SRC_C = \
|
|||||||
reset.c \
|
reset.c \
|
||||||
supervisor/shared/memory.c \
|
supervisor/shared/memory.c \
|
||||||
tick.c \
|
tick.c \
|
||||||
|
timer_handler.c \
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(CIRCUITPY_NETWORK),1)
|
ifeq ($(CIRCUITPY_NETWORK),1)
|
||||||
|
@ -13,7 +13,7 @@ LONGINT_IMPL = NONE
|
|||||||
CIRCUITPY_ANALOGIO = 0
|
CIRCUITPY_ANALOGIO = 0
|
||||||
CIRCUITPY_MATH = 0
|
CIRCUITPY_MATH = 0
|
||||||
CIRCUITPY_NEOPIXEL_WRITE = 0
|
CIRCUITPY_NEOPIXEL_WRITE = 0
|
||||||
#CIRCUITPY_RTC = 0
|
CIRCUITPY_RTC = 0
|
||||||
CIRCUITPY_SAMD = 0
|
CIRCUITPY_SAMD = 0
|
||||||
CIRCUITPY_USB_MIDI = 0
|
CIRCUITPY_USB_MIDI = 0
|
||||||
CIRCUITPY_SMALL_BUILD = 1
|
CIRCUITPY_SMALL_BUILD = 1
|
||||||
|
@ -48,7 +48,7 @@ uint8_t display_init_sequence[] = {
|
|||||||
0xc1, 1, 0x10, // Power control SAP[2:0];BT[3:0]
|
0xc1, 1, 0x10, // Power control SAP[2:0];BT[3:0]
|
||||||
0xc5, 2, 0x3e, 0x28, // VCM control
|
0xc5, 2, 0x3e, 0x28, // VCM control
|
||||||
0xc7, 1, 0x86, // VCM control2
|
0xc7, 1, 0x86, // VCM control2
|
||||||
0x36, 1, 0x08, // Memory Access Control
|
0x36, 1, 0xa8, // Memory Access Control
|
||||||
0x37, 1, 0x00, // Vertical scroll zero
|
0x37, 1, 0x00, // Vertical scroll zero
|
||||||
0x3a, 1, 0x55, // COLMOD: Pixel Format Set
|
0x3a, 1, 0x55, // COLMOD: Pixel Format Set
|
||||||
0xb1, 2, 0x00, 0x18, // Frame Rate Control (In Normal Mode/Full Colors)
|
0xb1, 2, 0x00, 0x18, // Frame Rate Control (In Normal Mode/Full Colors)
|
||||||
@ -82,7 +82,7 @@ void board_init(void) {
|
|||||||
240, // Height
|
240, // Height
|
||||||
0, // column start
|
0, // column start
|
||||||
0, // row start
|
0, // row start
|
||||||
270, // rotation
|
0, // rotation
|
||||||
16, // Color depth
|
16, // Color depth
|
||||||
MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command
|
MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command
|
||||||
MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command
|
MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command
|
||||||
|
@ -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_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_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_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_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_DATA0), MP_ROM_PTR(&pin_PA16) },
|
||||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_LCD_DATA1), MP_ROM_PTR(&pin_PA17) },
|
{ MP_OBJ_NEW_QSTR(MP_QSTR_LCD_DATA1), MP_ROM_PTR(&pin_PA17) },
|
||||||
|
@ -4,7 +4,6 @@ USB_PID = 0xEDBE
|
|||||||
USB_PRODUCT = "SAM32"
|
USB_PRODUCT = "SAM32"
|
||||||
USB_MANUFACTURER = "maholli"
|
USB_MANUFACTURER = "maholli"
|
||||||
|
|
||||||
QSPI_FLASH_FILESYSTEM = 0
|
|
||||||
INTERNAL_FLASH_FILESYSTEM = 1
|
INTERNAL_FLASH_FILESYSTEM = 1
|
||||||
LONGINT_IMPL = MPZ
|
LONGINT_IMPL = MPZ
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#include "py/runtime.h"
|
#include "py/runtime.h"
|
||||||
|
|
||||||
#include "shared-bindings/analogio/AnalogOut.h"
|
#include "shared-bindings/analogio/AnalogOut.h"
|
||||||
|
#include "shared-bindings/audioio/AudioOut.h"
|
||||||
#include "shared-bindings/microcontroller/Pin.h"
|
#include "shared-bindings/microcontroller/Pin.h"
|
||||||
#include "supervisor/shared/translate.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) {
|
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
|
||||||
}
|
}
|
||||||
|
@ -47,6 +47,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "audio_dma.h"
|
#include "audio_dma.h"
|
||||||
|
#include "timer_handler.h"
|
||||||
|
|
||||||
#include "samd/dma.h"
|
#include "samd/dma.h"
|
||||||
#include "samd/events.h"
|
#include "samd/events.h"
|
||||||
@ -251,6 +252,7 @@ void common_hal_audioio_audioout_construct(audioio_audioout_obj_t* self,
|
|||||||
tc_gclk = 1;
|
tc_gclk = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
set_timer_handler(true, tc_index, TC_HANDLER_NO_INTERRUPT);
|
||||||
turn_on_clocks(true, tc_index, tc_gclk);
|
turn_on_clocks(true, tc_index, tc_gclk);
|
||||||
|
|
||||||
// Don't bother setting the period. We set it before you playback anything.
|
// Don't bother setting the period. We set it before you playback anything.
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#include "common-hal/pulseio/PWMOut.h"
|
#include "common-hal/pulseio/PWMOut.h"
|
||||||
#include "shared-bindings/pulseio/PWMOut.h"
|
#include "shared-bindings/pulseio/PWMOut.h"
|
||||||
#include "shared-bindings/microcontroller/Processor.h"
|
#include "shared-bindings/microcontroller/Processor.h"
|
||||||
|
#include "timer_handler.h"
|
||||||
|
|
||||||
#include "atmel_start_pins.h"
|
#include "atmel_start_pins.h"
|
||||||
#include "hal/utils/include/utils_repeat_macro.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.
|
// We use the zeroeth clock on either port to go full speed.
|
||||||
turn_on_clocks(timer->is_tc, timer->index, 0);
|
turn_on_clocks(timer->is_tc, timer->index, 0);
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
#include "py/runtime.h"
|
#include "py/runtime.h"
|
||||||
#include "shared-bindings/pulseio/PulseOut.h"
|
#include "shared-bindings/pulseio/PulseOut.h"
|
||||||
#include "supervisor/shared/translate.h"
|
#include "supervisor/shared/translate.h"
|
||||||
|
#include "timer_handler.h"
|
||||||
|
|
||||||
// This timer is shared amongst all PulseOut objects under the assumption that
|
// This timer is shared amongst all PulseOut objects under the assumption that
|
||||||
// the code is single threaded.
|
// the code is single threaded.
|
||||||
@ -112,6 +113,7 @@ void common_hal_pulseio_pulseout_construct(pulseio_pulseout_obj_t* self,
|
|||||||
|
|
||||||
pulseout_tc_index = index;
|
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
|
// We use GCLK0 for SAMD21 and GCLK1 for SAMD51 because they both run at 48mhz making our
|
||||||
// math the same across the boards.
|
// math the same across the boards.
|
||||||
#ifdef SAMD21
|
#ifdef SAMD21
|
||||||
|
@ -36,8 +36,6 @@
|
|||||||
#define SPI_FLASH_MAX_BAUDRATE 8000000
|
#define SPI_FLASH_MAX_BAUDRATE 8000000
|
||||||
#define CIRCUITPY_DEFAULT_STACK_SIZE 4096
|
#define CIRCUITPY_DEFAULT_STACK_SIZE 4096
|
||||||
|
|
||||||
#define CIRCUITPY_I2C_SLAVE (0)
|
|
||||||
|
|
||||||
#define MICROPY_CPYTHON_COMPAT (0)
|
#define MICROPY_CPYTHON_COMPAT (0)
|
||||||
#define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (0)
|
#define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (0)
|
||||||
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (0)
|
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (0)
|
||||||
@ -81,11 +79,10 @@
|
|||||||
|
|
||||||
#include "peripherals/samd/dma.h"
|
#include "peripherals/samd/dma.h"
|
||||||
|
|
||||||
#define MICROPY_PORT_ROOT_POINTERS \
|
|
||||||
CIRCUITPY_COMMON_ROOT_POINTERS \
|
|
||||||
mp_obj_t playing_audio[AUDIO_DMA_CHANNEL_COUNT] \
|
|
||||||
;
|
|
||||||
|
|
||||||
#include "py/circuitpy_mpconfig.h"
|
#include "py/circuitpy_mpconfig.h"
|
||||||
|
|
||||||
|
#define MICROPY_PORT_ROOT_POINTERS \
|
||||||
|
CIRCUITPY_COMMON_ROOT_POINTERS \
|
||||||
|
mp_obj_t playing_audio[AUDIO_DMA_CHANNEL_COUNT];
|
||||||
|
|
||||||
#endif // __INCLUDED_MPCONFIGPORT_H
|
#endif // __INCLUDED_MPCONFIGPORT_H
|
||||||
|
@ -14,6 +14,11 @@ ifeq ($(LONGINT_IMPL),LONGLONG)
|
|||||||
MPY_TOOL_LONGINT_IMPL = -mlongint-impl=longlong
|
MPY_TOOL_LONGINT_IMPL = -mlongint-impl=longlong
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Put samd51-only choices here.
|
||||||
|
ifeq ($(CHIP_FAMILY),samd51)
|
||||||
|
CIRCUITPY_SAMD = 1
|
||||||
|
endif
|
||||||
|
|
||||||
INTERNAL_LIBM = 1
|
INTERNAL_LIBM = 1
|
||||||
|
|
||||||
USB_SERIAL_NUMBER_LENGTH = 32
|
USB_SERIAL_NUMBER_LENGTH = 32
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 235cb97d72648ec2889aba25ff4a34c4f32e2ac3
|
Subproject commit 6416828bb6821779d4c62fa3c7d41c95634173c0
|
@ -194,20 +194,23 @@ safe_mode_t port_init(void) {
|
|||||||
void reset_port(void) {
|
void reset_port(void) {
|
||||||
reset_sercoms();
|
reset_sercoms();
|
||||||
|
|
||||||
#if defined(EXPRESS_BOARD) && !defined(__SAMR21G18A__)
|
#if CIRCUITPY_AUDIOIO
|
||||||
audio_dma_reset();
|
audio_dma_reset();
|
||||||
audioout_reset();
|
audioout_reset();
|
||||||
#if !defined(__SAMD51G19A__) && !defined(__SAMD51G18A__)
|
#endif
|
||||||
|
#if CIRCUITPY_AUDIOBUSIO
|
||||||
i2sout_reset();
|
i2sout_reset();
|
||||||
#endif
|
|
||||||
//pdmin_reset();
|
//pdmin_reset();
|
||||||
#endif
|
#endif
|
||||||
#ifdef SAMD21
|
|
||||||
|
#if CIRCUITPY_TOUCHIO
|
||||||
touchin_reset();
|
touchin_reset();
|
||||||
#endif
|
#endif
|
||||||
eic_reset();
|
eic_reset();
|
||||||
|
#if CIRCUITPY_PULSEIO
|
||||||
pulseout_reset();
|
pulseout_reset();
|
||||||
pwmout_reset();
|
pwmout_reset();
|
||||||
|
#endif
|
||||||
|
|
||||||
#if CIRCUITPY_ANALOGIO
|
#if CIRCUITPY_ANALOGIO
|
||||||
analogin_reset();
|
analogin_reset();
|
||||||
|
51
ports/atmel-samd/timer_handler.c
Normal file
51
ports/atmel-samd/timer_handler.c
Normal file
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
35
ports/atmel-samd/timer_handler.h
Normal file
35
ports/atmel-samd/timer_handler.h
Normal file
@ -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
|
@ -35,27 +35,20 @@
|
|||||||
#include "nrf_soc.h"
|
#include "nrf_soc.h"
|
||||||
#include "nrfx_power.h"
|
#include "nrfx_power.h"
|
||||||
#include "py/misc.h"
|
#include "py/misc.h"
|
||||||
|
#include "py/mpstate.h"
|
||||||
|
|
||||||
nrf_nvic_state_t nrf_nvic_state = { 0 };
|
nrf_nvic_state_t nrf_nvic_state = { 0 };
|
||||||
|
|
||||||
__attribute__((aligned(4)))
|
__attribute__((aligned(4)))
|
||||||
static uint8_t m_ble_evt_buf[sizeof(ble_evt_t) + (BLE_GATT_ATT_MTU_DEFAULT)];
|
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() {
|
void ble_drv_reset() {
|
||||||
// Linked list items will be gc'd.
|
// 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) {
|
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) {
|
while (it != NULL) {
|
||||||
// If event handler and its corresponding param are already on the list, don't add again.
|
// If event handler and its corresponding param are already on the list, don't add again.
|
||||||
if ((it->func == func) && (it->param == param)) {
|
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
|
// Add a new handler to the front of the list
|
||||||
event_handler_t *handler = m_new_ll(event_handler_t, 1);
|
ble_drv_evt_handler_entry_t *handler = m_new_ll(ble_drv_evt_handler_entry_t, 1);
|
||||||
handler->next = m_event_handlers;
|
handler->next = MP_STATE_VM(ble_drv_evt_handler_entries);
|
||||||
handler->param = param;
|
handler->param = param;
|
||||||
handler->func = func;
|
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) {
|
void ble_drv_remove_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);
|
||||||
event_handler_t **prev = &m_event_handlers;
|
ble_drv_evt_handler_entry_t **prev = &MP_STATE_VM(ble_drv_evt_handler_entries);
|
||||||
while (it != NULL) {
|
while (it != NULL) {
|
||||||
if ((it->func == func) && (it->param == param)) {
|
if ((it->func == func) && (it->param == param)) {
|
||||||
// Splice out the matching handler.
|
// Splice out the matching handler.
|
||||||
@ -122,7 +115,7 @@ void SD_EVT_IRQHandler(void) {
|
|||||||
break;
|
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) {
|
while (it != NULL) {
|
||||||
it->func((ble_evt_t *)m_ble_evt_buf, it->param);
|
it->func((ble_evt_t *)m_ble_evt_buf, it->param);
|
||||||
it = it->next;
|
it = it->next;
|
||||||
|
@ -50,6 +50,12 @@
|
|||||||
|
|
||||||
typedef void (*ble_drv_evt_handler_t)(ble_evt_t*, void*);
|
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_reset(void);
|
||||||
void ble_drv_add_event_handler(ble_drv_evt_handler_t func, void *param);
|
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);
|
void ble_drv_remove_event_handler(ble_drv_evt_handler_t func, void *param);
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
#define MICROPY_HW_LED_STATUS (&pin_P1_15)
|
#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_DATA0 NRF_GPIO_PIN_MAP(0, 17)
|
||||||
#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 22)
|
#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 22)
|
||||||
#define MICROPY_QSPI_DATA2 NRF_GPIO_PIN_MAP(0, 23)
|
#define MICROPY_QSPI_DATA2 NRF_GPIO_PIN_MAP(0, 23)
|
||||||
@ -46,7 +46,7 @@
|
|||||||
#define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(0, 20)
|
#define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(0, 20)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SPI_FLASH_FILESYSTEM
|
#if SPI_FLASH_FILESYSTEM
|
||||||
#define SPI_FLASH_MOSI_PIN &pin_P0_17
|
#define SPI_FLASH_MOSI_PIN &pin_P0_17
|
||||||
#define SPI_FLASH_MISO_PIN &pin_P0_22
|
#define SPI_FLASH_MISO_PIN &pin_P0_22
|
||||||
#define SPI_FLASH_SCK_PIN &pin_P0_19
|
#define SPI_FLASH_SCK_PIN &pin_P0_19
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
#define MICROPY_HW_RGB_LED_GREEN (&pin_P0_14)
|
#define MICROPY_HW_RGB_LED_GREEN (&pin_P0_14)
|
||||||
#define MICROPY_HW_RGB_LED_BLUE (&pin_P0_15)
|
#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_DATA0 NRF_GPIO_PIN_MAP(0, 20)
|
||||||
#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 21)
|
#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 21)
|
||||||
#define MICROPY_QSPI_DATA2 NRF_GPIO_PIN_MAP(0, 22)
|
#define MICROPY_QSPI_DATA2 NRF_GPIO_PIN_MAP(0, 22)
|
||||||
@ -48,7 +48,7 @@
|
|||||||
#define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(0, 17)
|
#define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(0, 17)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SPI_FLASH_FILESYSTEM
|
#if SPI_FLASH_FILESYSTEM
|
||||||
#define SPI_FLASH_MOSI_PIN &pin_P0_20
|
#define SPI_FLASH_MOSI_PIN &pin_P0_20
|
||||||
#define SPI_FLASH_MISO_PIN &pin_P0_21
|
#define SPI_FLASH_MISO_PIN &pin_P0_21
|
||||||
#define SPI_FLASH_SCK_PIN &pin_P0_19
|
#define SPI_FLASH_SCK_PIN &pin_P0_19
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
#define MICROPY_HW_RGB_LED_GREEN (&pin_P0_14)
|
#define MICROPY_HW_RGB_LED_GREEN (&pin_P0_14)
|
||||||
#define MICROPY_HW_RGB_LED_BLUE (&pin_P0_15)
|
#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_DATA0 NRF_GPIO_PIN_MAP(0, 20)
|
||||||
#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 21)
|
#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 21)
|
||||||
#define MICROPY_QSPI_DATA2 NRF_GPIO_PIN_MAP(0, 22)
|
#define MICROPY_QSPI_DATA2 NRF_GPIO_PIN_MAP(0, 22)
|
||||||
@ -48,7 +48,7 @@
|
|||||||
#define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(0, 17)
|
#define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(0, 17)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SPI_FLASH_FILESYSTEM
|
#if SPI_FLASH_FILESYSTEM
|
||||||
#define SPI_FLASH_MOSI_PIN &pin_P0_20
|
#define SPI_FLASH_MOSI_PIN &pin_P0_20
|
||||||
#define SPI_FLASH_MISO_PIN &pin_P0_21
|
#define SPI_FLASH_MISO_PIN &pin_P0_21
|
||||||
#define SPI_FLASH_SCK_PIN &pin_P0_19
|
#define SPI_FLASH_SCK_PIN &pin_P0_19
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
#define MICROPY_HW_RGB_LED_GREEN (&pin_P0_14)
|
#define MICROPY_HW_RGB_LED_GREEN (&pin_P0_14)
|
||||||
#define MICROPY_HW_RGB_LED_BLUE (&pin_P0_15)
|
#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_DATA0 NRF_GPIO_PIN_MAP(0, 20)
|
||||||
#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 21)
|
#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 21)
|
||||||
#define MICROPY_QSPI_DATA2 NRF_GPIO_PIN_MAP(0, 22)
|
#define MICROPY_QSPI_DATA2 NRF_GPIO_PIN_MAP(0, 22)
|
||||||
@ -48,7 +48,7 @@
|
|||||||
#define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(0, 17)
|
#define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(0, 17)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SPI_FLASH_FILESYSTEM
|
#if SPI_FLASH_FILESYSTEM
|
||||||
#define SPI_FLASH_MOSI_PIN &pin_P0_20
|
#define SPI_FLASH_MOSI_PIN &pin_P0_20
|
||||||
#define SPI_FLASH_MISO_PIN &pin_P0_21
|
#define SPI_FLASH_MISO_PIN &pin_P0_21
|
||||||
#define SPI_FLASH_SCK_PIN &pin_P0_19
|
#define SPI_FLASH_SCK_PIN &pin_P0_19
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
// Quad mode: If all DATA0 --> DATA3 are valid
|
// Quad mode: If all DATA0 --> DATA3 are valid
|
||||||
// Dual mode: If DATA0 and DATA1 are valid while either DATA2 and/or DATA3 are invalid
|
// Dual mode: If DATA0 and DATA1 are valid while either DATA2 and/or DATA3 are invalid
|
||||||
// Single mode: If only DATA0 is valid
|
// 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_DATA0 NRF_GPIO_PIN_MAP(0, 20)
|
||||||
#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 21)
|
#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 21)
|
||||||
#define MICROPY_QSPI_DATA2 NRF_GPIO_PIN_MAP(0, 22)
|
#define MICROPY_QSPI_DATA2 NRF_GPIO_PIN_MAP(0, 22)
|
||||||
@ -58,7 +58,7 @@
|
|||||||
#define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(0, 17)
|
#define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(0, 17)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SPI_FLASH_FILESYSTEM
|
#if SPI_FLASH_FILESYSTEM
|
||||||
#define SPI_FLASH_MOSI_PIN &pin_P0_20
|
#define SPI_FLASH_MOSI_PIN &pin_P0_20
|
||||||
#define SPI_FLASH_MISO_PIN &pin_P0_21
|
#define SPI_FLASH_MISO_PIN &pin_P0_21
|
||||||
#define SPI_FLASH_SCK_PIN &pin_P0_19
|
#define SPI_FLASH_SCK_PIN &pin_P0_19
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
// Quad mode: If all DATA0 --> DATA3 are valid
|
// Quad mode: If all DATA0 --> DATA3 are valid
|
||||||
// Dual mode: If DATA0 and DATA1 are valid while either DATA2 and/or DATA3 are invalid
|
// Dual mode: If DATA0 and DATA1 are valid while either DATA2 and/or DATA3 are invalid
|
||||||
// Single mode: If only DATA0 is valid
|
// 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_DATA0 NRF_GPIO_PIN_MAP(0, 20)
|
||||||
#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 21)
|
#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 21)
|
||||||
#define MICROPY_QSPI_DATA2 NRF_GPIO_PIN_MAP(0, 22)
|
#define MICROPY_QSPI_DATA2 NRF_GPIO_PIN_MAP(0, 22)
|
||||||
@ -58,7 +58,7 @@
|
|||||||
#define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(0, 17)
|
#define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(0, 17)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SPI_FLASH_FILESYSTEM
|
#if SPI_FLASH_FILESYSTEM
|
||||||
#define SPI_FLASH_MOSI_PIN &pin_P0_20
|
#define SPI_FLASH_MOSI_PIN &pin_P0_20
|
||||||
#define SPI_FLASH_MISO_PIN &pin_P0_21
|
#define SPI_FLASH_MISO_PIN &pin_P0_21
|
||||||
#define SPI_FLASH_SCK_PIN &pin_P0_19
|
#define SPI_FLASH_SCK_PIN &pin_P0_19
|
||||||
|
@ -21,6 +21,4 @@ endif
|
|||||||
|
|
||||||
NRF_DEFINES += -DNRF52840_XXAA -DNRF52840
|
NRF_DEFINES += -DNRF52840_XXAA -DNRF52840
|
||||||
|
|
||||||
QSPI_FLASH_FILESYSTEM = 0
|
INTERNAL_FLASH_FILESYSTEM = 1
|
||||||
EXTERNAL_FLASH_DEVICE_COUNT = 0
|
|
||||||
EXTERNAL_FLASH_DEVICES =
|
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
#include "ble_drv.h"
|
#include "ble_drv.h"
|
||||||
#include "ble_gatts.h"
|
#include "ble_gatts.h"
|
||||||
#include "sd_mutex.h"
|
#include "nrf_nvic.h"
|
||||||
|
|
||||||
#include "lib/utils/interrupt_char.h"
|
#include "lib/utils/interrupt_char.h"
|
||||||
#include "py/runtime.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;
|
ble_gatts_evt_write_t *evt_write = &ble_evt->evt.gatts_evt.params.write;
|
||||||
// Event handle must match the handle for my characteristic.
|
// Event handle must match the handle for my characteristic.
|
||||||
if (evt_write->handle == self->characteristic->handle) {
|
if (evt_write->handle == self->characteristic->handle) {
|
||||||
// Push all the data onto the ring buffer, but wait for any reads to finish.
|
// Push all the data onto the ring buffer.
|
||||||
sd_mutex_acquire_wait_no_vm(&self->ringbuf_mutex);
|
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++) {
|
for (size_t i = 0; i < evt_write->len; i++) {
|
||||||
ringbuf_put(&self->ringbuf, evt_write->data[i]);
|
ringbuf_put(&self->ringbuf, evt_write->data[i]);
|
||||||
}
|
}
|
||||||
// Don't check for errors: we're in an event handler.
|
sd_nvic_critical_region_exit(is_nested_critical_region);
|
||||||
sd_mutex_release(&self->ringbuf_mutex);
|
break;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -72,7 +72,6 @@ void common_hal_bleio_characteristic_buffer_construct(bleio_characteristic_buffe
|
|||||||
// This is a macro.
|
// This is a macro.
|
||||||
// true means long-lived, so it won't be moved.
|
// true means long-lived, so it won't be moved.
|
||||||
ringbuf_alloc(&self->ringbuf, buffer_size, true);
|
ringbuf_alloc(&self->ringbuf, buffer_size, true);
|
||||||
sd_mutex_new(&self->ringbuf_mutex);
|
|
||||||
|
|
||||||
ble_drv_add_event_handler(characteristic_buffer_on_ble_evt, self);
|
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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy received data. Lock out writes while copying.
|
// Copy received data. Lock out write interrupt handler while copying.
|
||||||
sd_mutex_acquire_wait(&self->ringbuf_mutex);
|
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);
|
size_t rx_bytes = MIN(ringbuf_count(&self->ringbuf), len);
|
||||||
for ( size_t i = 0; i < rx_bytes; i++ ) {
|
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.
|
// Writes now OK.
|
||||||
sd_mutex_release_check(&self->ringbuf_mutex);
|
sd_nvic_critical_region_exit(is_nested_critical_region);
|
||||||
|
|
||||||
return rx_bytes;
|
return rx_bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t common_hal_bleio_characteristic_buffer_rx_characters_available(bleio_characteristic_buffer_obj_t *self) {
|
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) {
|
void common_hal_bleio_characteristic_buffer_clear_rx_buffer(bleio_characteristic_buffer_obj_t *self) {
|
||||||
// prevent conflict with uart irq
|
// 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);
|
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) {
|
bool common_hal_bleio_characteristic_buffer_deinited(bleio_characteristic_buffer_obj_t *self) {
|
||||||
|
@ -38,7 +38,6 @@ typedef struct {
|
|||||||
uint32_t timeout_ms;
|
uint32_t timeout_ms;
|
||||||
// Ring buffer storing consecutive incoming values.
|
// Ring buffer storing consecutive incoming values.
|
||||||
ringbuf_t ringbuf;
|
ringbuf_t ringbuf;
|
||||||
nrf_mutex_t ringbuf_mutex;
|
|
||||||
} bleio_characteristic_buffer_obj_t;
|
} bleio_characteristic_buffer_obj_t;
|
||||||
|
|
||||||
#endif // MICROPY_INCLUDED_COMMON_HAL_BLEIO_CHARACTERISTICBUFFER_H
|
#endif // MICROPY_INCLUDED_COMMON_HAL_BLEIO_CHARACTERISTICBUFFER_H
|
||||||
|
@ -28,6 +28,8 @@
|
|||||||
#ifndef NRF5_MPCONFIGPORT_H__
|
#ifndef NRF5_MPCONFIGPORT_H__
|
||||||
#define NRF5_MPCONFIGPORT_H__
|
#define NRF5_MPCONFIGPORT_H__
|
||||||
|
|
||||||
|
#include "ble_drv.h"
|
||||||
|
|
||||||
#define MICROPY_CPYTHON_COMPAT (1)
|
#define MICROPY_CPYTHON_COMPAT (1)
|
||||||
//#define MICROPY_MODULE_BUILTIN_INIT (1) // TODO check this
|
//#define MICROPY_MODULE_BUILTIN_INIT (1) // TODO check this
|
||||||
//#define MICROPY_MODULE_WEAK_LINKS (1) // TODO check this
|
//#define MICROPY_MODULE_WEAK_LINKS (1) // TODO check this
|
||||||
@ -52,10 +54,11 @@
|
|||||||
// 24kiB stack
|
// 24kiB stack
|
||||||
#define CIRCUITPY_DEFAULT_STACK_SIZE 0x6000
|
#define CIRCUITPY_DEFAULT_STACK_SIZE 0x6000
|
||||||
|
|
||||||
#define MICROPY_PORT_ROOT_POINTERS \
|
|
||||||
CIRCUITPY_COMMON_ROOT_POINTERS \
|
|
||||||
;
|
|
||||||
|
|
||||||
#include "py/circuitpy_mpconfig.h"
|
#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; \
|
||||||
|
|
||||||
|
|
||||||
#endif // NRF5_MPCONFIGPORT_H__
|
#endif // NRF5_MPCONFIGPORT_H__
|
||||||
|
@ -7,6 +7,9 @@ INTERNAL_LIBM = 1
|
|||||||
|
|
||||||
USB_SERIAL_NUMBER_LENGTH = 16
|
USB_SERIAL_NUMBER_LENGTH = 16
|
||||||
|
|
||||||
|
# All nRF ports have longints.
|
||||||
|
LONGINT_IMPL = MPZ
|
||||||
|
|
||||||
# No DAC, so no regular audio.
|
# No DAC, so no regular audio.
|
||||||
CIRCUITPY_AUDIOIO = 0
|
CIRCUITPY_AUDIOIO = 0
|
||||||
|
|
||||||
|
@ -149,6 +149,7 @@ SRC_C = \
|
|||||||
alloc.c \
|
alloc.c \
|
||||||
coverage.c \
|
coverage.c \
|
||||||
fatfs_port.c \
|
fatfs_port.c \
|
||||||
|
supervisor/stub/filesystem.c \
|
||||||
supervisor/stub/serial.c \
|
supervisor/stub/serial.c \
|
||||||
supervisor/stub/stack.c \
|
supervisor/stub/stack.c \
|
||||||
supervisor/shared/translate.c \
|
supervisor/shared/translate.c \
|
||||||
|
@ -33,6 +33,9 @@
|
|||||||
#ifndef __INCLUDED_MPCONFIG_CIRCUITPY_H
|
#ifndef __INCLUDED_MPCONFIG_CIRCUITPY_H
|
||||||
#define __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.
|
// 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)
|
#define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_C)
|
||||||
|
|
||||||
@ -123,7 +126,6 @@
|
|||||||
#define MICROPY_FATFS_USE_LABEL (1)
|
#define MICROPY_FATFS_USE_LABEL (1)
|
||||||
#define MICROPY_FATFS_RPATH (2)
|
#define MICROPY_FATFS_RPATH (2)
|
||||||
#define MICROPY_FATFS_MULTI_PARTITION (1)
|
#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.
|
// Only enable this if you really need it. It allocates a byte cache of this size.
|
||||||
// #define MICROPY_FATFS_MAX_SS (4096)
|
// #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_input), (mp_obj_t)&mp_builtin_input_obj }, \
|
||||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_open), (mp_obj_t)&mp_builtin_open_obj },
|
{ MP_OBJ_NEW_QSTR(MP_QSTR_open), (mp_obj_t)&mp_builtin_open_obj },
|
||||||
|
|
||||||
|
|
||||||
// board specific definitions
|
// board specific definitions
|
||||||
#include "mpconfigboard.h"
|
#include "mpconfigboard.h"
|
||||||
|
|
||||||
@ -176,20 +177,21 @@ typedef long mp_off_t;
|
|||||||
|
|
||||||
// Remove some lesser-used functionality to make small builds fit.
|
// Remove some lesser-used functionality to make small builds fit.
|
||||||
#define MICROPY_BUILTIN_METHOD_CHECK_SELF_ARG (CIRCUITPY_FULL_BUILD)
|
#define MICROPY_BUILTIN_METHOD_CHECK_SELF_ARG (CIRCUITPY_FULL_BUILD)
|
||||||
#define MICROPY_PY_ALL_SPECIAL_METHODS (CIRCUITPY_FULL_BUILD)
|
#define MICROPY_MODULE_WEAK_LINKS (CIRCUITPY_FULL_BUILD)
|
||||||
#define MICROPY_PY_BUILTINS_COMPLEX (CIRCUITPY_FULL_BUILD)
|
#define MICROPY_PY_ALL_SPECIAL_METHODS (CIRCUITPY_FULL_BUILD)
|
||||||
#define MICROPY_PY_BUILTINS_FROZENSET (CIRCUITPY_FULL_BUILD)
|
#define MICROPY_PY_BUILTINS_COMPLEX (CIRCUITPY_FULL_BUILD)
|
||||||
#define MICROPY_PY_BUILTINS_REVERSED (CIRCUITPY_FULL_BUILD)
|
#define MICROPY_PY_BUILTINS_FROZENSET (CIRCUITPY_FULL_BUILD)
|
||||||
#define MICROPY_PY_BUILTINS_STR_CENTER (CIRCUITPY_FULL_BUILD)
|
#define MICROPY_PY_BUILTINS_REVERSED (CIRCUITPY_FULL_BUILD)
|
||||||
#define MICROPY_PY_BUILTINS_STR_PARTITION (CIRCUITPY_FULL_BUILD)
|
#define MICROPY_PY_BUILTINS_STR_CENTER (CIRCUITPY_FULL_BUILD)
|
||||||
#define MICROPY_PY_BUILTINS_STR_SPLITLINES (CIRCUITPY_FULL_BUILD)
|
#define MICROPY_PY_BUILTINS_STR_PARTITION (CIRCUITPY_FULL_BUILD)
|
||||||
#define MICROPY_PY_UERRNO (CIRCUITPY_FULL_BUILD)
|
#define MICROPY_PY_BUILTINS_STR_SPLITLINES (CIRCUITPY_FULL_BUILD)
|
||||||
|
#define MICROPY_PY_UERRNO (CIRCUITPY_FULL_BUILD)
|
||||||
// Opposite setting is deliberate.
|
// Opposite setting is deliberate.
|
||||||
#define MICROPY_PY_UERRNO_ERRORCODE (!CIRCUITPY_FULL_BUILD)
|
#define MICROPY_PY_UERRNO_ERRORCODE (!CIRCUITPY_FULL_BUILD)
|
||||||
#define MICROPY_PY_URE (CIRCUITPY_FULL_BUILD)
|
#define MICROPY_PY_URE (CIRCUITPY_FULL_BUILD)
|
||||||
#define MICROPY_PY_URE_MATCH_GROUPS (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_MATCH_SPAN_START_END (CIRCUITPY_FULL_BUILD)
|
||||||
#define MICROPY_PY_URE_SUB (CIRCUITPY_FULL_BUILD)
|
#define MICROPY_PY_URE_SUB (CIRCUITPY_FULL_BUILD)
|
||||||
|
|
||||||
// LONGINT_IMPL_xxx are defined in the Makefile.
|
// LONGINT_IMPL_xxx are defined in the Makefile.
|
||||||
//
|
//
|
||||||
@ -204,6 +206,7 @@ typedef long mp_off_t;
|
|||||||
|
|
||||||
#ifdef LONGINT_IMPL_LONGLONG
|
#ifdef LONGINT_IMPL_LONGLONG
|
||||||
#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_LONGLONG)
|
#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_LONGLONG)
|
||||||
|
#define MP_SSIZE_MAX (0x7fffffff)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -340,8 +343,10 @@ extern const struct _mp_obj_module_t nvm_module;
|
|||||||
#if CIRCUITPY_OS
|
#if CIRCUITPY_OS
|
||||||
extern const struct _mp_obj_module_t os_module;
|
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 { 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
|
#else
|
||||||
#define OS_MODULE
|
#define OS_MODULE
|
||||||
|
#define OS_MODULE_ALT_NAME
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CIRCUITPY_PIXELBUF
|
#if CIRCUITPY_PIXELBUF
|
||||||
@ -417,8 +422,10 @@ extern const struct _mp_obj_module_t supervisor_module;
|
|||||||
#if CIRCUITPY_TIME
|
#if CIRCUITPY_TIME
|
||||||
extern const struct _mp_obj_module_t time_module;
|
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 { 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
|
#else
|
||||||
#define TIME_MODULE
|
#define TIME_MODULE
|
||||||
|
#define TIME_MODULE_ALT_NAME
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CIRCUITPY_TOUCHIO
|
#if CIRCUITPY_TOUCHIO
|
||||||
@ -456,17 +463,44 @@ extern const struct _mp_obj_module_t ustack_module;
|
|||||||
#define USTACK_MODULE
|
#define USTACK_MODULE
|
||||||
#endif
|
#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
|
#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
|
#else
|
||||||
#define JSON_MODULE
|
#define JSON_MODULE
|
||||||
#endif
|
#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,
|
// 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.
|
// Some of these definitions will be blank depending on what is turned on and off.
|
||||||
//
|
// Some are omitted because they're in MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS above.
|
||||||
#define MICROPY_PORT_BUILTIN_MODULES \
|
#define MICROPY_PORT_BUILTIN_MODULES_STRONG_LINKS \
|
||||||
ANALOGIO_MODULE \
|
ANALOGIO_MODULE \
|
||||||
AUDIOBUSIO_MODULE \
|
AUDIOBUSIO_MODULE \
|
||||||
AUDIOIO_MODULE \
|
AUDIOIO_MODULE \
|
||||||
@ -477,6 +511,7 @@ extern const struct _mp_obj_module_t ustack_module;
|
|||||||
DIGITALIO_MODULE \
|
DIGITALIO_MODULE \
|
||||||
TERMINALIO_MODULE \
|
TERMINALIO_MODULE \
|
||||||
DISPLAYIO_MODULE \
|
DISPLAYIO_MODULE \
|
||||||
|
ERRNO_MODULE \
|
||||||
GAMEPAD_MODULE \
|
GAMEPAD_MODULE \
|
||||||
I2CSLAVE_MODULE \
|
I2CSLAVE_MODULE \
|
||||||
JSON_MODULE \
|
JSON_MODULE \
|
||||||
@ -486,23 +521,35 @@ extern const struct _mp_obj_module_t ustack_module;
|
|||||||
NETWORK_MODULE \
|
NETWORK_MODULE \
|
||||||
SOCKET_MODULE \
|
SOCKET_MODULE \
|
||||||
WIZNET_MODULE \
|
WIZNET_MODULE \
|
||||||
OS_MODULE \
|
|
||||||
PIXELBUF_MODULE \
|
PIXELBUF_MODULE \
|
||||||
PULSEIO_MODULE \
|
PULSEIO_MODULE \
|
||||||
RANDOM_MODULE \
|
RANDOM_MODULE \
|
||||||
|
RE_MODULE \
|
||||||
RTC_MODULE \
|
RTC_MODULE \
|
||||||
SAMD_MODULE \
|
SAMD_MODULE \
|
||||||
STAGE_MODULE \
|
STAGE_MODULE \
|
||||||
STORAGE_MODULE \
|
STORAGE_MODULE \
|
||||||
STRUCT_MODULE \
|
STRUCT_MODULE \
|
||||||
SUPERVISOR_MODULE \
|
SUPERVISOR_MODULE \
|
||||||
TIME_MODULE \
|
|
||||||
TOUCHIO_MODULE \
|
TOUCHIO_MODULE \
|
||||||
UHEAP_MODULE \
|
UHEAP_MODULE \
|
||||||
USB_HID_MODULE \
|
USB_HID_MODULE \
|
||||||
USB_MIDI_MODULE \
|
USB_MIDI_MODULE \
|
||||||
USTACK_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()
|
// We need to provide a declaration/definition of alloca()
|
||||||
#include <alloca.h>
|
#include <alloca.h>
|
||||||
|
|
||||||
|
@ -158,15 +158,12 @@ CIRCUITPY_RTC = 1
|
|||||||
endif
|
endif
|
||||||
CFLAGS += -DCIRCUITPY_RTC=$(CIRCUITPY_RTC)
|
CFLAGS += -DCIRCUITPY_RTC=$(CIRCUITPY_RTC)
|
||||||
|
|
||||||
|
# CIRCUITPY_SAMD is handled in the atmel-samd tree.
|
||||||
# Only for SAMD chips.
|
# Only for SAMD chips.
|
||||||
|
# Assume not a SAMD build.
|
||||||
ifndef CIRCUITPY_SAMD
|
ifndef CIRCUITPY_SAMD
|
||||||
ifneq ($(findstring sam,$(CHIP_FAMILY)),)
|
|
||||||
CIRCUITPY_SAMD = $(CIRCUITPY_FULL_BUILD)
|
|
||||||
else
|
|
||||||
# Not a SAMD build.
|
|
||||||
CIRCUITPY_SAMD = 0
|
CIRCUITPY_SAMD = 0
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
CFLAGS += -DCIRCUITPY_SAMD=$(CIRCUITPY_SAMD)
|
CFLAGS += -DCIRCUITPY_SAMD=$(CIRCUITPY_SAMD)
|
||||||
|
|
||||||
# Currently always off.
|
# Currently always off.
|
||||||
|
@ -84,7 +84,11 @@ STATIC const mp_obj_dict_t errorcode_dict = {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
STATIC const mp_rom_map_elem_t mp_module_uerrno_globals_table[] = {
|
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) },
|
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uerrno) },
|
||||||
|
#endif
|
||||||
#if MICROPY_PY_UERRNO_ERRORCODE
|
#if MICROPY_PY_UERRNO_ERRORCODE
|
||||||
{ MP_ROM_QSTR(MP_QSTR_errorcode), MP_ROM_PTR(&errorcode_dict) },
|
{ MP_ROM_QSTR(MP_QSTR_errorcode), MP_ROM_PTR(&errorcode_dict) },
|
||||||
#endif
|
#endif
|
||||||
|
@ -45,6 +45,11 @@
|
|||||||
#include <mpconfigport.h>
|
#include <mpconfigport.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Is this a CircuitPython build?
|
||||||
|
#ifndef CIRCUITPY
|
||||||
|
#define CIRCUITPY 0
|
||||||
|
#endif
|
||||||
|
|
||||||
// Any options not explicitly set in mpconfigport.h will get default
|
// Any options not explicitly set in mpconfigport.h will get default
|
||||||
// values below.
|
// values below.
|
||||||
|
|
||||||
|
@ -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) },
|
{ MP_ROM_QSTR(MP_QSTR_array), MP_ROM_PTR(&mp_module_array) },
|
||||||
#endif
|
#endif
|
||||||
#if MICROPY_PY_IO
|
#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) },
|
{ MP_ROM_QSTR(MP_QSTR_uio), MP_ROM_PTR(&mp_module_io) },
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#if MICROPY_PY_COLLECTIONS
|
#if MICROPY_PY_COLLECTIONS
|
||||||
{ MP_ROM_QSTR(MP_QSTR_collections), MP_ROM_PTR(&mp_module_collections) },
|
{ MP_ROM_QSTR(MP_QSTR_collections), MP_ROM_PTR(&mp_module_collections) },
|
||||||
#endif
|
#endif
|
||||||
|
// CircuitPython: Now in shared-bindings/, so not defined here.
|
||||||
#if MICROPY_PY_STRUCT
|
#if MICROPY_PY_STRUCT
|
||||||
{ MP_ROM_QSTR(MP_QSTR_ustruct), MP_ROM_PTR(&mp_module_ustruct) },
|
{ MP_ROM_QSTR(MP_QSTR_ustruct), MP_ROM_PTR(&mp_module_ustruct) },
|
||||||
#endif
|
#endif
|
||||||
@ -178,8 +183,13 @@ STATIC const mp_rom_map_elem_t mp_builtin_module_table[] = {
|
|||||||
// extmod modules
|
// extmod modules
|
||||||
|
|
||||||
#if MICROPY_PY_UERRNO
|
#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) },
|
{ MP_ROM_QSTR(MP_QSTR_uerrno), MP_ROM_PTR(&mp_module_uerrno) },
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#if MICROPY_PY_UCTYPES
|
#if MICROPY_PY_UCTYPES
|
||||||
{ MP_ROM_QSTR(MP_QSTR_uctypes), MP_ROM_PTR(&mp_module_uctypes) },
|
{ MP_ROM_QSTR(MP_QSTR_uctypes), MP_ROM_PTR(&mp_module_uctypes) },
|
||||||
#endif
|
#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) },
|
{ MP_ROM_QSTR(MP_QSTR_uzlib), MP_ROM_PTR(&mp_module_uzlib) },
|
||||||
#endif
|
#endif
|
||||||
#if MICROPY_PY_UJSON
|
#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) },
|
{ MP_ROM_QSTR(MP_QSTR_ujson), MP_ROM_PTR(&mp_module_ujson) },
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#if MICROPY_PY_URE
|
#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) },
|
{ MP_ROM_QSTR(MP_QSTR_ure), MP_ROM_PTR(&mp_module_ure) },
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#if MICROPY_PY_UHEAPQ
|
#if MICROPY_PY_UHEAPQ
|
||||||
{ MP_ROM_QSTR(MP_QSTR_uheapq), MP_ROM_PTR(&mp_module_uheapq) },
|
{ MP_ROM_QSTR(MP_QSTR_uheapq), MP_ROM_PTR(&mp_module_uheapq) },
|
||||||
#endif
|
#endif
|
||||||
|
25
py/runtime.c
25
py/runtime.c
@ -131,31 +131,6 @@ void mp_init(void) {
|
|||||||
sizeof(MP_STATE_VM(fs_user_mount)) - MICROPY_FATFS_NUM_PERSISTENT);
|
sizeof(MP_STATE_VM(fs_user_mount)) - MICROPY_FATFS_NUM_PERSISTENT);
|
||||||
#endif
|
#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
|
#if MICROPY_PY_THREAD_GIL
|
||||||
mp_thread_mutex_init(&MP_STATE_VM(gil_mutex));
|
mp_thread_mutex_init(&MP_STATE_VM(gil_mutex));
|
||||||
#endif
|
#endif
|
||||||
|
@ -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;
|
bool mono = args[ARG_mono].u_bool;
|
||||||
|
|
||||||
float startup_delay = (args[ARG_startup_delay].u_obj == MP_OBJ_NULL)
|
mp_float_t startup_delay = (args[ARG_startup_delay].u_obj == MP_OBJ_NULL)
|
||||||
? STARTUP_DELAY_DEFAULT
|
? (mp_float_t)STARTUP_DELAY_DEFAULT
|
||||||
: mp_obj_get_float(args[ARG_startup_delay].u_obj);
|
: mp_obj_get_float(args[ARG_startup_delay].u_obj);
|
||||||
if (startup_delay < 0.0 || startup_delay > 1.0) {
|
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"));
|
mp_raise_ValueError(translate("Microphone startup delay must be in range 0.0 to 1.0"));
|
||||||
|
@ -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);
|
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)"));
|
mp_raise_ValueError(translate("timeout >100 (units are now seconds, not msecs)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,10 +54,12 @@
|
|||||||
//|
|
//|
|
||||||
//| This is the CircuitPython analog to the UNIX ``mount`` command.
|
//| 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) {
|
mp_obj_t storage_mount(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
|
||||||
enum { ARG_readonly };
|
enum { ARG_readonly };
|
||||||
static const mp_arg_t allowed_args[] = {
|
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
|
// 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"));
|
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;
|
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);
|
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.
|
//| 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) {
|
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[] = {
|
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
|
// 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_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);
|
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;
|
return mp_const_none;
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
void common_hal_storage_mount(mp_obj_t vfs_obj, const char* path, bool readonly);
|
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_path(const char* path);
|
||||||
void common_hal_storage_umount_object(mp_obj_t vfs_obj);
|
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);
|
mp_obj_t common_hal_storage_getmount(const char* path);
|
||||||
void common_hal_storage_erase_filesystem(void);
|
void common_hal_storage_erase_filesystem(void);
|
||||||
|
|
||||||
|
@ -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.
|
// Always set the backlight type in case we're reusing memory.
|
||||||
self->backlight_inout.base.type = &mp_type_NoneType;
|
self->backlight_inout.base.type = &mp_type_NoneType;
|
||||||
if (backlight_pin != NULL && common_hal_mcu_pin_is_free(backlight_pin)) {
|
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) {
|
if (result != PWMOUT_OK) {
|
||||||
self->backlight_inout.base.type = &digitalio_digitalinout_type;
|
self->backlight_inout.base.type = &digitalio_digitalinout_type;
|
||||||
common_hal_digitalio_digitalinout_construct(&self->backlight_inout, backlight_pin);
|
common_hal_digitalio_digitalinout_construct(&self->backlight_inout, backlight_pin);
|
||||||
|
@ -2,10 +2,12 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "shared-module/displayio/__init__.h"
|
#include "shared-module/displayio/__init__.h"
|
||||||
|
|
||||||
|
#include "py/reload.h"
|
||||||
#include "shared-bindings/displayio/Bitmap.h"
|
#include "shared-bindings/displayio/Bitmap.h"
|
||||||
#include "shared-bindings/displayio/Display.h"
|
#include "shared-bindings/displayio/Display.h"
|
||||||
#include "shared-bindings/displayio/Group.h"
|
#include "shared-bindings/displayio/Group.h"
|
||||||
#include "shared-bindings/displayio/Palette.h"
|
#include "shared-bindings/displayio/Palette.h"
|
||||||
|
#include "supervisor/shared/autoreload.h"
|
||||||
#include "supervisor/shared/display.h"
|
#include "supervisor/shared/display.h"
|
||||||
#include "supervisor/memory.h"
|
#include "supervisor/memory.h"
|
||||||
#include "supervisor/usb.h"
|
#include "supervisor/usb.h"
|
||||||
@ -18,7 +20,19 @@ static inline void swap(uint16_t* a, uint16_t* b) {
|
|||||||
*b = temp;
|
*b = temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool refreshing_displays = false;
|
||||||
|
|
||||||
void displayio_refresh_displays(void) {
|
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++) {
|
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) {
|
if (displays[i].display.base.type == NULL || displays[i].display.base.type == &mp_type_NoneType) {
|
||||||
continue;
|
continue;
|
||||||
@ -27,6 +41,7 @@ void displayio_refresh_displays(void) {
|
|||||||
displayio_display_update_backlight(display);
|
displayio_display_update_backlight(display);
|
||||||
|
|
||||||
if (!displayio_display_frame_queued(display)) {
|
if (!displayio_display_frame_queued(display)) {
|
||||||
|
refreshing_displays = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (displayio_display_refresh_queued(display)) {
|
if (displayio_display_refresh_queued(display)) {
|
||||||
@ -89,8 +104,9 @@ void displayio_refresh_displays(void) {
|
|||||||
index += 1;
|
index += 1;
|
||||||
// The buffer is full, send it.
|
// The buffer is full, send it.
|
||||||
if (index >= buffer_size) {
|
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);
|
displayio_display_finish_region_update(display);
|
||||||
|
refreshing_displays = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// TODO(tannewt): Make refresh displays faster so we don't starve other
|
// 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.
|
// Send the remaining data.
|
||||||
if (index && !displayio_display_send_pixels(display, buffer, index * 2)) {
|
if (index && !displayio_display_send_pixels(display, buffer, index * 2)) {
|
||||||
displayio_display_finish_region_update(display);
|
displayio_display_finish_region_update(display);
|
||||||
|
refreshing_displays = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
displayio_display_finish_region_update(display);
|
displayio_display_finish_region_update(display);
|
||||||
}
|
}
|
||||||
displayio_display_finish_refresh(display);
|
displayio_display_finish_refresh(display);
|
||||||
}
|
}
|
||||||
|
refreshing_displays = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void common_hal_displayio_release_displays(void) {
|
void common_hal_displayio_release_displays(void) {
|
||||||
|
@ -143,7 +143,7 @@ mp_obj_t common_hal_storage_getmount(const char *mount_path) {
|
|||||||
return storage_object_from_path(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) {
|
if (strcmp(mount_path, "/") != 0) {
|
||||||
mp_raise_OSError(MP_EINVAL);
|
mp_raise_OSError(MP_EINVAL);
|
||||||
}
|
}
|
||||||
@ -156,7 +156,8 @@ void common_hal_storage_remount(const char *mount_path, bool readonly) {
|
|||||||
}
|
}
|
||||||
#endif
|
#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) {
|
void common_hal_storage_erase_filesystem(void) {
|
||||||
|
@ -29,9 +29,16 @@
|
|||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
#include "extmod/vfs_fat.h"
|
||||||
|
|
||||||
void filesystem_init(bool create_allowed, bool force_create);
|
void filesystem_init(bool create_allowed, bool force_create);
|
||||||
void filesystem_flush(void);
|
void filesystem_flush(void);
|
||||||
void filesystem_writable_by_python(bool writable);
|
|
||||||
bool filesystem_present(void);
|
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
|
#endif // MICROPY_INCLUDED_SUPERVISOR_FILESYSTEM_H
|
||||||
|
@ -37,7 +37,6 @@
|
|||||||
#include "supervisor/internal_flash.h"
|
#include "supervisor/internal_flash.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void supervisor_flash_set_usb_writable(bool usb_writable);
|
|
||||||
void supervisor_flash_init(void);
|
void supervisor_flash_init(void);
|
||||||
uint32_t supervisor_flash_get_block_size(void);
|
uint32_t supervisor_flash_get_block_size(void);
|
||||||
uint32_t supervisor_flash_get_block_count(void);
|
uint32_t supervisor_flash_get_block_count(void);
|
||||||
|
@ -24,6 +24,8 @@
|
|||||||
* THE SOFTWARE.
|
* THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "supervisor/filesystem.h"
|
||||||
|
|
||||||
#include "extmod/vfs_fat.h"
|
#include "extmod/vfs_fat.h"
|
||||||
#include "lib/oofatfs/ff.h"
|
#include "lib/oofatfs/ff.h"
|
||||||
#include "lib/oofatfs/diskio.h"
|
#include "lib/oofatfs/diskio.h"
|
||||||
@ -92,16 +94,42 @@ void filesystem_flush(void) {
|
|||||||
supervisor_flash_flush();
|
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;
|
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;
|
vfs->flags |= FSUSER_USB_WRITABLE;
|
||||||
} else {
|
} else {
|
||||||
vfs->flags &= ~FSUSER_USB_WRITABLE;
|
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) {
|
bool filesystem_present(void) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -33,26 +33,6 @@
|
|||||||
|
|
||||||
#define PART1_START_BLOCK (0x1)
|
#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
|
// there is a singleton Flash object
|
||||||
const mp_obj_type_t supervisor_flash_type;
|
const mp_obj_type_t supervisor_flash_type;
|
||||||
STATIC const mp_obj_base_t supervisor_flash_obj = {&supervisor_flash_type};
|
STATIC const mp_obj_base_t supervisor_flash_obj = {&supervisor_flash_type};
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
#include "lib/oofatfs/ff.h"
|
#include "lib/oofatfs/ff.h"
|
||||||
#include "py/mpstate.h"
|
#include "py/mpstate.h"
|
||||||
|
|
||||||
|
#include "supervisor/filesystem.h"
|
||||||
#include "supervisor/shared/autoreload.h"
|
#include "supervisor/shared/autoreload.h"
|
||||||
|
|
||||||
#define MSC_FLASH_BLOCK_SIZE 512
|
#define MSC_FLASH_BLOCK_SIZE 512
|
||||||
@ -148,8 +149,7 @@ bool tud_msc_is_writable_cb(uint8_t lun) {
|
|||||||
if (vfs == NULL) {
|
if (vfs == NULL) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (vfs->writeblocks[0] == MP_OBJ_NULL ||
|
if (vfs->writeblocks[0] == MP_OBJ_NULL || !filesystem_is_writable_by_usb(vfs)) {
|
||||||
(vfs->flags & FSUSER_USB_WRITABLE) == 0) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -26,13 +26,17 @@
|
|||||||
|
|
||||||
#include "supervisor/filesystem.h"
|
#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_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) {
|
bool filesystem_present(void) {
|
||||||
|
@ -17,6 +17,17 @@ ifndef $(NO_USB)
|
|||||||
NO_USB = $(wildcard supervisor/usb.c)
|
NO_USB = $(wildcard supervisor/usb.c)
|
||||||
endif
|
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.
|
# Choose which flash filesystem impl to use.
|
||||||
# (Right now INTERNAL_FLASH_FILESYSTEM and SPI_FLASH_FILESYSTEM are mutually exclusive.
|
# (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
|
SRC_SUPERVISOR += supervisor/shared/external_flash/external_flash.c
|
||||||
ifeq ($(SPI_FLASH_FILESYSTEM),1)
|
ifeq ($(SPI_FLASH_FILESYSTEM),1)
|
||||||
CFLAGS += -DSPI_FLASH_FILESYSTEM
|
|
||||||
SRC_SUPERVISOR += supervisor/shared/external_flash/spi_flash.c
|
SRC_SUPERVISOR += supervisor/shared/external_flash/spi_flash.c
|
||||||
|
else
|
||||||
endif
|
endif
|
||||||
ifeq ($(QSPI_FLASH_FILESYSTEM),1)
|
ifeq ($(QSPI_FLASH_FILESYSTEM),1)
|
||||||
CFLAGS += -DQSPI_FLASH_FILESYSTEM
|
|
||||||
SRC_SUPERVISOR += supervisor/qspi_flash.c supervisor/shared/external_flash/qspi_flash.c
|
SRC_SUPERVISOR += supervisor/qspi_flash.c supervisor/shared/external_flash/qspi_flash.c
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user