Commit Graph

10374 Commits

Author SHA1 Message Date
Limor "Ladyada" Fried
c966976591 update light/lux and eCO2 + TVOC 2017-10-25 12:32:39 -04:00
Scott Shawcroft
00766e43a0 Merge commit 'f57be61' into nrf2_merge 2017-10-24 23:26:41 -07:00
Scott Shawcroft
60e9b8f70a tools: Correct ports directory name 2017-10-24 23:06:02 -07:00
Scott Shawcroft
d665334e94 esp8266: Fix includes 2017-10-24 23:05:20 -07:00
Scott Shawcroft
2c26f35429 Re-add atmel submodules. 2017-10-24 22:39:08 -07:00
Scott Shawcroft
73c15dcf8b Merge commit 'f869d6b2e339c04469c6c9ea3fb2fabd7bbb2d8c' into nrf2_merge
This is prep for merging in the NRF5 pull request.
2017-10-24 22:31:16 -07:00
Paul Sokolovsky
9a7e3469b2 unix/modusocket: Remove #if MICROPY_SOCKET_EXTRA code blocks.
These defined couple of functions added during initial experimentation,
which aren't part of MicroPython API and no longer used or needed.
2017-10-24 23:13:19 +03:00
Scott Shawcroft
d43564f854 atmel-samd: Use our own CDC output cache because the internal (#366)
atmel-samd: Use our own CDC output cache because the internal
cache is only used when the memory isn't aligned even if we're
going to change the memory immediately after.
2017-10-24 12:57:03 -07:00
Scott Shawcroft
ee1092fcaf atmel-samd: Update metro m4 USB PID. (#365) 2017-10-24 14:47:43 -04:00
Damien George
f4059dcc0c all: Use NULL instead of "" when calling mp_raise exception helpers.
This is the established way of doing it and reduces code size by a little
bit.
2017-10-24 22:39:36 +11:00
Dan Halbert
6df99b5d0e Merge 2.1.0 changes into master. 2017-10-23 15:26:36 -07:00
Paul Sokolovsky
cfff12612f unix: Rename modsocket.c to modusocket.c.
Unix naming is historical, before current conventions were established.
All other ports however have it as "modusocket.c", so rename for
consistency and to avoid confusion.
2017-10-23 12:09:37 +03:00
Dave Astels
e08241de41 Supersized Feather M0 Express for 2.x (replace the 2Mbyte SPI flash with an 8Mbyte chip) (#355)
Add supersized (8Mbyte SPI flash) FeatherM0Express support
2017-10-22 20:56:10 -07:00
Radomir Dopieralski
1c97b7f4df Gracefully reset the gamepad module
If a soft reset happens while the gamepad module is scanning for button
presses, there is a moment when the pins get de-initialized, but the
gamepad module is still trying to read them, which ends in a crash.
We can avoid it by disabling scanning on reset.

(cherry picked from commit 470a23d4c9)

Conflicts:
	atmel-samd/main.c
2017-10-22 20:54:10 -07:00
Scott Shawcroft
a1be272b1e atmel-samd: Correct the UF2 bootloader offset when converting the bin to uf2. 2017-10-22 12:39:01 -07:00
Radomir Dopieralski
9bcc1057ca Gracefully reset the gamepad module (#356)
If a soft reset happens while the gamepad module is scanning for button
presses, there is a moment when the pins get de-initialized, but the
gamepad module is still trying to read them, which ends in a crash.
We can avoid it by disabling scanning on reset.
2017-10-21 22:39:20 -04:00
mrmcwethy
bb008cdbc9 First attempt to move py/modmath.c to shared-bindings/math 2017-10-21 10:34:25 -07:00
Paul Sokolovsky
9956fd0710 py/objtype: Fit qstrs for special methods in byte type.
Update makeqstrdata.py to sort strings starting with "__" to the beginning
of qstr list, so they get low qstr id's, guaranteedly fitting in 8 bits.
Then use this property to further compact op_id => qstr mapping arrays.
2017-10-21 11:06:32 +03:00
Scott Shawcroft
536bcb42c9 atmel-samd: Re-enable pin reset. Fixes #352 (#353) 2017-10-20 07:49:33 -04:00
Scott Shawcroft
a800a25e88 atmel-samd: Switch Metro M4 Express to SAMD51J19. (#351) 2017-10-19 22:39:16 -04:00
Josh Gadeken
3ba5ba6e66 shared-bindings/storage/__init__.c: Change remount() readonly to kw arg (#286).
The readonly arg to storage.remount() is now a keyword arg that
defaults to False. To maintain backwards compatibility, readonly
can be passed as a positional arg or keyword arg.
2017-10-19 17:11:30 -07:00
Paul Sokolovsky
f2baa9ec24 py/objtype: Use CPython compatible method name for sizeof.
Per https://docs.python.org/3/library/sys.html#sys.getsizeof:

getsizeof() calls the object’s __sizeof__ method. Previously, "getsizeof"
was used mostly to save on new qstr, as we don't really support calling
this method on arbitrary objects (so it was used only for reporting).
However, normalize it all now.
2017-10-19 12:44:53 +03:00
Damien George
93ce125abe py/argcheck: Remove #if guard around terse error message helper func.
Not all compilers/analysers are smart enough to realise that this function
is never called if MICROPY_ERROR_REPORTING is not TERSE, because the logic
in the code uses if statements rather than #if to select whether to call
this function or not (MSC in debug mode is an example of this, but there
are others).  So just unconditionally compile this helper function.  The
code-base anyway relies on the linker to remove unused functions.
2017-10-19 18:57:26 +11:00
Damien George
d6bf3658f4 stm32: Make uos.dupterm() conform to specs by using extmod version.
The legacy function pyb.repl_uart() is still provided and retains its
original behaviour (it only accepts a UART object).  uos.dupterm() will now
accept any object with write/readinto methods.  At the moment there is just
1 dupterm slot.
2017-10-19 14:16:42 +11:00
Damien George
0eb333e3cf stm32/mphalport: Improve efficiency of mp_hal_stdout_tx_strn_cooked.
Also simplifies the code by removing the specialised (and inefficient)
cooked functions from UART and USB_VCP.
2017-10-19 14:15:32 +11:00
Damien George
9725a654bd extmod/uos_dupterm: Swallow any errors from dupterm closing the stream.
Without this the board will crash when deactivating a stream that doesn't
have a close() method (eg UART) or that raises an exception within the
method (eg user-defined function).
2017-10-19 14:10:17 +11:00
Damien George
c53ca32561 README: Add gcc and arm-none-eabi-newlib to list of required components.
gcc is required for mpy-cross, and arm-none-eabi-newlib for ports using
arm-none-eabi-gcc.
2017-10-19 12:38:28 +11:00
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