Commit Graph

11838 Commits

Author SHA1 Message Date
Scott Shawcroft
b0fba2864c
Merge pull request #814 from larsks/feature/utime-compile-only
esp8266/modutime.c: remove symbol conflicts between time and utime modules
2018-05-07 13:53:05 -07:00
Lars Kellogg-Stedman
56bf411d21 esp8266/modutime.c: remove symbol conflicts between time and utime modules
this renames symbols in modutime.c so that it no longer conflicts with
the time module.  This commit does not enable the utime module; it
simply makes it easier for a local developer to do so.
2018-05-07 11:55:20 -04:00
Dan Halbert
bca5aec5f4
Merge pull request #813 from jerryneedell/patch-2
Update mpconfigport.h
2018-05-07 10:19:39 -04:00
jerryneedell
b617271191
Update mpconfigport.h
comment out define of CIRCUITPYTHON_BOOT_OUTPUT_FILE  for NRF52  --  it does not work properly
2018-05-07 08:59:24 -04:00
Scott Shawcroft
d42c83ff41
Merge pull request #806 from jepler/hashlib-py3
Rename uhashlib->hashlib, improve python3 compatibility
2018-05-06 22:36:52 -07:00
Scott Shawcroft
c4cfd1170e
Merge pull request #811 from dhalbert/3.0_filesystem_writability_on_boot
3.0: boot.py change of filesystem writability would get overridden.
2018-05-06 22:27:54 -07:00
Dan Halbert
224e245e05 clarify comment 2018-05-07 00:08:26 -04:00
Dan Halbert
fc214fb320 boot.py change of filesystem writability would get overridden. 2018-05-06 23:48:11 -04:00
Jeff Epler
2955ada22f docs: fix references to uhashlib 2018-05-06 12:31:54 -05:00
Jeff Epler
11a97bdffe uhashlib: masquerade as hashlib for python3 compatibility 2018-05-06 12:31:54 -05:00
Jeff Epler
005226ae54 uhashlib: some functions should refuse unicode for python3 compatibility
.. this maybe should be subject to MICROPY_CPYTHON_COMPAT, except that
is not defined in the main circuitpython ports so it would be a change
that makes no difference.
2018-05-06 12:31:54 -05:00
Jeff Epler
b2084d37d6 tests: add new tests for uhashlib differences
.. these tests currently fail, but a subsequent commit will
fix them
2018-05-06 12:31:53 -05:00
Noralf Trønnes
2893e795fc atmel-samd/samd21: Use XOSC32K on boards with a crystal
Use XOSC32K on boards that have BOARD_HAS_CRYSTAL defined and set to 1.
2018-05-05 18:45:15 +02:00
Noralf Trønnes
4adba51569 atmel-samd/samd21: Rework clock setup
Make clock setup explicit instead of using the convoluted asf4 macro setup.

enable_clock_generator():
- Add GCLK_GENCTRL_OE to stick with the current setup.
- Handle divisor larger than 31 for generator 2
- Change the source argument so it can take the GCLK_GENCTRL_SRC_XXXX_Val
  macros without casting to uint8_t.

This patch should not introduce any functional changes except keeping
GCLK_GENCTRL_OE enabled when the I2S clock is enabled.
2018-05-05 18:01:13 +02:00
Scott Shawcroft
d32349cee8
Merge pull request #804 from dhalbert/boot_out_fixes
3.0: Handle bad power on reset.
2018-05-04 10:06:35 -07:00
Scott Shawcroft
034b189c75
Merge pull request #805 from dhalbert/3.0_cpx_freeze_hid_cpx
3.0: add CircuitPlayground and HID to CPX frozen modules
2018-05-04 09:59:16 -07:00
Dan Halbert
32363b801b 3.0: add CircuitPlayground and HID to CPX frozen modules 2018-05-04 08:44:33 -04:00
Damien George
74ab341d3a tests/cpydiff: Remove working cases from types_float_rounding. 2018-05-04 22:30:50 +10:00
Dan Halbert
f73e06d910 minor function API improvement 2018-05-04 08:28:05 -04:00
Damien George
cd9d71edc8 tests/cpydiff: Remove types_str_decodeerror now that it succeeds.
Commit 68c28174d0 implemented checking for
valid utf-8 data.
2018-05-04 22:27:14 +10:00
Damien George
4b5111f8e1 tests/cpydiff: Remove core_function_unpacking now that it succeeds.
Commit 1e70fda69f fixes this difference.
2018-05-04 22:19:50 +10:00
Noralf Trønnes
f21c2494cb atmel-samd/samd21: Enable OSC32K
Enable OSC32K which is used by the RTC.
For some reason the RTC worked without enabling it.
2018-05-04 13:34:30 +02:00
Noralf Trønnes
4a2a553647 atmel-samd/clocks: Split out samd21_clocks.c and samd51_clocks.c
Enhance readability by separating the samd21 and samd51 clock code.

This patch should not introduce any functional changes.
2018-05-04 13:32:56 +02:00
Damien George
3cf02be4e0 py/emitnx86: Fix 32-bit x86 native emitter build by including header. 2018-05-04 20:39:16 +10:00
Damien George
aea71dbde0 stm32/Makefile: Use -O2 to optimise compilation of lib/libc/string0.c. 2018-05-04 15:53:51 +10:00
Damien George
cb3456ddfe stm32: Don't use %lu or %lx for formatting, use just %u or %x.
On this 32-bit arch there's no need to use the long version of the format
specifier.  It's only there to appease the compiler which checks the type
of the args passed to printf.  Removing the "l" saves a bit of code space.
2018-05-04 15:52:03 +10:00
Damien George
b614dc73b0 stm32/dma: Fix duplicate typedef of struct, it's typedef'd in dma.h. 2018-05-04 15:35:43 +10:00
Damien George
318f874cda extmod/modlwip: In ioctl handle case when socket is in an error state.
Using MP_STREAM_POLL_HUP for ERR_RST state follows how *nix handles this
case.
2018-05-04 15:15:04 +10:00
Dan Halbert
f486ead84a Handle bad power on reset. 2018-05-03 23:43:02 -04:00
Scott Shawcroft
a8bd37f14d
Merge pull request #799 from larsks/feature/circuitpython/station-ssid
esp8266/modnetwork: Allow to get ESSID of AP that STA is connected to.
2018-05-03 10:12:50 -07:00
Scott Shawcroft
2fe552694b
Merge pull request #796 from larsks/bug/795
try both binascii and ubinascii in inisetup.py
2018-05-03 10:04:37 -07:00
Scott Shawcroft
37bf61f6ac
Merge pull request #797 from jepler/binascii-doc
docs: fix references to ubinascii
2018-05-03 10:02:37 -07:00
Lars Kellogg-Stedman
1e0353e2db esp8266/modnetwork: Allow to get ESSID of AP that STA is connected to.
This patch enables iface.config('essid') to work for both AP and STA
interfaces.

(cherry picked from commit d8fdb77ac9)
2018-05-03 11:49:37 -04:00
Jeff Epler
647ff387d9 docs: fix references to ubinascii 2018-05-03 09:34:43 -05:00
Lars Kellogg-Stedman
ad1b16a3ec ports/esp8266: try both binascii and ubinascii in inisetup.py
in recent circuitpython builds, `ubinascii` is available as
`binascii`.  This modifies `modules/inisetup.py` to use the same
import semantics as `modules/websocket_helper.py`: first try importing
`ubinascii`, and if that fails, fall back to importing `binascii`.

Closes adafruit/circuitpython#795
2018-05-03 09:23:54 -04:00
Dan Halbert
9d484c4935
Merge pull request #789 from tannewt/pdmin3
Re-enable PDMIn without ASF
2018-05-02 19:59:20 -04:00
Scott Shawcroft
04f75b8903 Reduce the buffer size back to what 2.x has. Increase was leftover
from debugging.
2018-05-02 15:21:43 -07:00
Scott Shawcroft
22b7cd3d51 Fix 8 bit recordings on CPX.
The DMA trigger source was incorrect when using serializer 1 on
the SAMD21.

Playback register was incorrect for 8 bit as well. Now fixed.
2018-05-02 15:15:25 -07:00
Scott Shawcroft
449385b250
Merge pull request #790 from dhalbert/cpu_temp
Implement microcontroller.cpu.temperature.
2018-05-02 12:23:03 -07:00
Dan Halbert
33b9c39f58 peripherals.c should include peripherals.h 2018-05-02 13:50:34 -04:00
Scott Shawcroft
3d36f63f9e
Merge pull request #788 from jepler/binascii-py3
(u)binascii: better python3 compatibility
2018-05-02 10:15:31 -07:00
Scott Shawcroft
41101bc2c6
Merge pull request #794 from larsks/bug/793
allow esptool.py invocation to be set via make vars
2018-05-02 10:02:32 -07:00
Scott Shawcroft
61d3dd85ec
Merge pull request #792 from larsks/bug/791
correct path to conf.py in makeversionhdr.py
2018-05-02 09:57:05 -07:00
Damien George
12a3fccc7e esp32/modsocket: Check for pending events during blocking socket calls. 2018-05-03 00:09:25 +10:00
Lars Kellogg-Stedman
3e35cbcd5b allow esptool.py invocation to be set via make vars
This commit replaces the literal calls to `esptool.py` with the
`$(ESPTOOL)` Makefile variable. This allows one to set the esptool
invocation on the Make command line:

    make ESPTOOL="python2 $(which esptool.py)"

(or via the environment, an include file, etc)

Closes #793
2018-05-02 09:47:01 -04:00
Damien George
5936168150 extmod/uzlib: Fix C-language sequencing error with uzlib_get_byte calls.
The order of function calls in an arithmetic expression is undefined and so
they must be written out as sequential statements.

Thanks to @dv-extrarius for reporting this issue, see issue #3690.
2018-05-02 23:16:22 +10:00
Lars Kellogg-Stedman
4e977aafe4 correct path to conf.py in makeversionhdr.py
the py/makeversionhdr.py script was looking for `conf.py` in the
`docs/` directory, but this was relocated in 46e7f8e.  This is used by
the fallback `get_version_info_from_docs_conf` method, which is only
consulted if `git` is unavailable in the build environment.

Closes #791.
2018-05-02 08:50:17 -04:00
Damien George
4fa7d36cee esp32: Use mp_rom_map_elem_t and MP_ROM_xxx macros for const dicts. 2018-05-02 22:33:41 +10:00
Damien George
6681eb809a esp32/modsocket: Correctly handle reading from a peer-closed socket.
If a socket is cleanly shut down by the peer then reads on this socket
should continue to return zero bytes.  The lwIP socket API does not have
this behaviour (it only returns zero once, then blocks on subsequent calls)
so this patch adds explicit checks and logic for peer closed sockets.
2018-05-02 22:31:00 +10:00
Torwag
fb7dabb971 esp32/README: Add --init to submodule update command.
Add --init to the submodule update example, thus, all submodules get
initialised including the nested (--recursive) ones.  Without it there
might not be a submodule init.
2018-05-02 17:24:17 +10:00