Scott Shawcroft
535c0059d7
atmel-samd: Turn on SAMD51 bootloader build layout. ( #348 )
2017-10-18 16:07:38 -04:00
Michael McWethy
b41cbe9256
CircuitPython now has struct instead of ustruct ( #302 )
...
Added struct module to shared-bindings and shared-module. removed ustruct
2017-10-18 12:50:20 -07:00
Scott Shawcroft
88c6d2349b
atmel-samd: Update asf4 to include USB fix for SAMD51.
2017-10-18 15:46:26 -04:00
Scott Shawcroft
f31a7b70e8
atmel-samd: Fix CDC now that its clear its async.
2017-10-18 15:46:26 -04:00
Scott Shawcroft
51cd4da76e
atmel-samd: Add mass storage support.
...
Fixes #260
2017-10-18 11:52:51 -07:00
Andon
c80e1908c5
Added Trinket to README.md ( #344 )
...
Added Trinket to README.md
Despite shipping with CircuitPython pre-installed, the Trinket M0 is
absent from the README.md file. This fixes that issue.
2017-10-17 13:00:10 -07:00
Dan Halbert
a1409d1432
redo time.monotonic() to avoid double precision
2017-10-17 10:02:16 -07:00
Damien George
8fa3d2996c
stm32/modnwwiznet5k: Implement stream ioctl for the Wiznet driver.
...
Now supports polling for read and write ability.
2017-10-17 16:34:10 +11:00
Damien George
285ac58532
stm32/modnwwiznet5k: Increase SPI bus speed to 42MHz.
...
The W5200 and W5500 can support up to 80MHz so 42MHz (the maximum the
pyboard can do in its standard configuration) should be safe.
Tested to give around 1050000 kbytes/sec TCP download speed on a W5500,
which is about 10% more than with the previous SPI speed of 21MHz.
2017-10-17 16:31:12 +11:00
Dan Halbert
4f4ddf00dc
Set DRVSTR on output pins to strong (more current capability).
2017-10-16 22:13:09 -07:00
jerryneedell
c6a15f76ad
esp8266: add neopixel_write - remove neopixel.py ( #339 )
...
For ESP8266, remove frozen module neopixel.py and add neopixel_write to mpconfigport.h. Use [Adafruit_CircuitPython_Neopixel/neopixel.py](https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel ) instead.
2017-10-16 18:29:42 -07:00
Dan Halbert
e2ce87e250
Merge pull request #336 from tannewt/2.x
...
esp8266: Correct SPI functionality when write_value is provided.
2017-10-16 18:43:28 -04:00
Dan Halbert
2148211314
Merge pull request #337 from tannewt/fix_pin_reset
...
esp8266: Actually disable pins when reset on reload.
2017-10-16 18:42:22 -04:00
Scott Shawcroft
c216c2876f
esp8266: Actually disable pins when reset on reload.
2017-10-16 15:13:09 -07:00
Scott Shawcroft
6c7d35c40c
esp8266: Correct SPI functionality when write_value is provided.
...
It used to introduce extra clocks to the bus rather than changing the
value output.
This fixes SD cards.
2017-10-16 14:54:23 -07:00
Dan Halbert
5f6df7f54a
More io capability on non-Express boards, so call *_reset() routines
...
appropriately to match board capabilities.
2017-10-16 12:51:55 -07:00
Dan Halbert
1709fbb65a
Turn on pulseio now that there's room.
...
https://github.com/adafruit/circuitpython/issues/325#issuecomment-336733842
2017-10-16 12:51:55 -07:00
Dan Halbert
274fff4226
Use internal libm for all atmel-samd boards.
2017-10-16 12:20:33 -07:00
Dan Halbert
dbd3f15168
1. Use lib/libm for small (non-Express builds) to gain back a lot of flash space.
...
2. Add flag INTERNAL_LIBM to mpconfigboard.mk files to signal using lib/libm.
3. Fix floating-point warnings in lib/libm
4. Turn off -finline-limit, no longer needed due to 1.
5. Add explicit flags for SPI_FLASH_FILESYSTEM and INTERNAL_FLASH_FILESYSTEM
to mpconfigboard.mk files, so they don't need to know the name of the .c file
that implements those. Makefile takes care of checking the flags and including
the right files.
2017-10-16 12:20:33 -07:00
Damien George
d90ade5e3e
docs/library/network: Update docs to state that W5500 is supported.
2017-10-16 15:51:56 +11:00
Damien George
06f2fdbe61
travis: Update build command now that stm32 Wiznet config has changed.
2017-10-16 15:51:32 +11:00
Damien George
e36821a766
stm32/modnwwiznet5k: Add support for W5500 Ethernet chip.
...
Which Wiznet chip to use is a compile-time option: MICROPY_PY_WIZNET5K
should be set to either 5200 or 5500 to support either one of these
Ethernet chips. The driver is called network.WIZNET5K in both cases.
Note that this commit introduces a breaking-change at the build level
because previously the valid values for MICROPY_PY_WIZNET5K were 0 and 1
but now they are 0, 5200 and 5500.
2017-10-16 15:36:57 +11:00
Damien George
c0ea91bc89
drivers/wiznet5k: Get low-level W5500 driver working.
...
This patch implements the basic SPI read/write functions for the W5500
chip. It also allows _WIZCHIP_ to be configured externally to select the
specific Wiznet chip.
2017-10-16 15:34:08 +11:00
Li Weiwei
73e387cff6
drivers/wiznet5k: Improve the performance of socket ops with threading.
...
Use MICROPY_THREAD_YIELD() instead of HAL_Delay in busy waiting to improve
the performance of connect, send, recv, sento and recvfrom.
2017-10-16 13:32:34 +11:00
Li Weiwei
5c437963d7
stm32/mpconfigport.h: Add MICROPY_THREAD_YIELD() macro.
2017-10-16 13:32:26 +11:00
Damien George
0a30ad96c8
stm32/modusocket: Return OSError(-2) if getaddrinfo fails.
...
This matches the behaviour of getaddrinfo in extmod/modlwip.c.
2017-10-16 13:19:11 +11:00
Damien George
5d7b0b237b
stm32/modusocket: Make getaddrinfo() work when passed an IP address.
2017-10-16 13:17:15 +11:00
Damien George
65ba481cb0
stm32/modnwwiznet5k: Implement WIZNET5K.isconnected() method.
2017-10-16 13:16:00 +11:00
Dan Halbert
8f3be0a037
Reinit ADC completely on each call to AnalogIn.value.
2017-10-15 16:59:23 -07:00
Dan Halbert
cfd1809b2b
Suppress A0 (PA02) as a TouchIn-capable pin on CPX.
2017-10-15 16:57:37 -07:00
Paul Sokolovsky
829c329daf
README: Add explicit section on contributing.
...
To increase visibility of Contributors' Guidelines and Code Conventions
docs.
2017-10-15 10:17:24 +03:00
Dan Halbert
6e8fa8b3c9
Merge pull request #320 from dhalbert/master
...
merge 2.x changes into master; touch up Makefile CFLAGS logic
2017-10-13 14:51:09 -04:00
Ayke van Laethem
f57be619fc
ports/nrf: Add compile switch to disable VFS.
...
This saves about 17kB.
2017-10-13 18:29:41 +02:00
Damien George
37282f8fc1
extmod/uos_dupterm: Update uos.dupterm() and helper funcs to have index.
...
The uos.dupterm() signature and behaviour is updated to reflect the latest
enhancements in the docs. It has minor backwards incompatibility in that
it no longer accepts zero arguments.
The dupterm_rx helper function is moved from esp8266 to extmod and
generalised to support multiple dupterm slots.
A port can specify multiple slots by defining the MICROPY_PY_OS_DUPTERM
config macro to an integer, being the number of slots it wants to have;
0 means to disable the dupterm feature altogether.
The unix and esp8266 ports are updated to work with the new interface and
are otherwise unchanged with respect to functionality.
2017-10-13 20:01:57 +11:00
Dan Halbert
3c54e2c03c
TEMPORARY changes to get build to work on all boards. Make space on CPX; turn off -finline-limit
2017-10-12 21:54:38 -04:00
Li Weiwei
e39fcda8eb
stm32/usbd_cdc_interface.h: Fix code comments after recent refactor.
2017-10-13 12:45:16 +11:00
Damien George
7c7c7b161d
stm32/usbd_cdc_interface: Don't reset CDC output buf on initialisation.
...
So that characters can be buffered before the USB device is connected
(restoring behviour of the driver before recent state refactoring).
2017-10-13 12:00:47 +11:00
Dan Halbert
fabaa2ec30
merge 2.x changes into master; touch up Makefile CFLAGS logic
2017-10-12 20:10:31 -04:00
Ayke van Laethem
61b6faed15
ports/nrf: Use --gc-sections to reduce code size
...
This saves about 6-7kB.
2017-10-12 21:44:55 +02:00
Dan Halbert
922006dd59
Don't create a new filesystem if we restart in safe mode. ( #319 )
2017-10-12 14:35:39 -04:00
Dan Halbert
b7591cfd19
Replace asf4 tree with submodule repo adafruit/asf4, branch circuitpython.
2017-10-12 10:55:15 -07:00
Damien George
c59fc1419d
py/emitnative: Simplify binary op emitter, no need to check inplace ops.
2017-10-12 12:26:49 +11:00
Damien George
a3afa8cfc4
py/emitnative: Implement floor-division and modulo for viper emitter.
2017-10-11 18:54:34 +11:00
Vitor Massaru Iha
1b7d6a7951
esp8266/modules/webrepl_setup: Add info about allowed password length.
...
This patch also makes the code more concise by combining the checks for the
password length.
2017-10-11 11:37:01 +11:00
Mike Causer
b1457db002
docs/library: Add missing cross-ref links for classes in pyb module.
2017-10-11 11:30:16 +11:00
Damien George
69da74e538
py/modbuiltins: Use existing utf8_get_char helper in builtin ord func.
2017-10-11 11:25:20 +11:00
Scott Shawcroft
80654779e1
atmel-samd: Add support for internal filesystems. ( #311 )
...
* atmel-samd: Add support for internal filesystems.
This allows us to re-enable `os`. `random` is also enabled because
it solely depends on `os`.
Fixes #266 . Its also a pre-requisite for #260 .
* atmel-samd: Update SAMD51 linker script comments and MICROPY_MAX_STACK_USAGE enabling.
2017-10-10 14:36:00 -04:00
Damien George
dc948e4d54
py/formatfloat: Use standard isinf, isnan funcs instead of custom ones.
...
Reduces code size by a tiny bit.
2017-10-10 16:27:54 +11:00
Damien George
08a196697c
py/formatfloat: Don't print the negative sign of a NaN value.
...
NaN may have the sign bit set but it has no meaning, so don't print it out.
2017-10-10 16:01:13 +11:00
Damien George
81a06d2c9c
lib/libm: Remove implementation of log2f, use MP_NEED_LOG2 instead.
2017-10-10 16:01:13 +11:00