Dave Hylands
c08f50bcf7
stmhal: Disable network and usocket for ESPRUINO_PICO
2016-10-06 11:47:45 +11:00
Scott Shawcroft
90bf13efd5
atmel-samd: Correct USB PIDs.
...
Arduino and Adafruit convention is for user programs to have PIDs
starting with 8 and bootloaders starting with 0.
2016-10-05 12:55:48 -07:00
Tony DiCola
9c67605233
atmel-samd: Add low level neopixel_write module & function for WS281x/neopixel RGB LEDs.
2016-10-05 12:35:23 -07:00
Scott Shawcroft
7e08347d5c
atmel-samd: Support composite CDC and mass storage USB device.
...
Be careful to not use the flash file system while using mass storage
because both pieces of code attempting to change the fs can corrupt it.
2016-10-05 11:07:29 -07:00
stijn
7f19b1c3eb
tests: Fix expected output of verbose cmdline test
...
The output might contain more than one line ending in 5b so properly skip
everything until the next known point.
This fixes test failures in appveyor debug builds.
2016-10-05 12:58:50 +02:00
Damien George
b89ac9db78
stmhal/moduos: Implement total-number-of-blocks field in statvfs.
2016-10-05 15:52:36 +11:00
Damien George
b1537a5752
stmhal/mphalport: Change pin obj type to const pointer, to avoid casts.
2016-10-05 15:51:40 +11:00
puuu
bcf60b43ee
esp8266/modpybrtc.c: Implement machine.RTC.alarm_left()
...
Implementation of machine.RTC.alarm_left(), like described in the
documentation.
2016-10-05 12:20:30 +11:00
Dave Hylands
7a9c183c20
stmhal: Fix ESPRUINO_PICO by adding ld scripts with correct flash size.
2016-10-05 11:42:50 +11:00
Scott Shawcroft
1fa4c20c27
atmel-samd: Add Micro Trace Buffer support to the debug build.
...
The Micro Trace Buffer records the history of the pc and can be used
to debug hard faults even when the stack trace is useless.
2016-10-04 16:13:33 -07:00
Scott Shawcroft
98458c56cc
atmel-samd: Remove debug flashes and comments.
2016-10-04 16:01:14 -07:00
Paul Sokolovsky
cecf6bee97
tools: Upgrade upip to 1.0.
...
Fully self-hosted release (without fallbacks), and uses stream gzip
decompression (step towards support for limited-heap baremetal systems).
2016-10-05 00:34:09 +03:00
Paul Sokolovsky
161e9f4115
esp8266/main: Put /lib before / in sys.path.
...
upip will use first non-empty component in sys.path as an install path
(if MICROPYPATH envvar is not set, like it will be for baremetal targets).
2016-10-05 00:02:51 +03:00
Paul Sokolovsky
52784bf595
esp8266/modmachine: idle(): Return number of CPU cycles spent idling.
...
Useful to better understand esp8266 inner workings and compare behavior
in different cases.
2016-10-04 21:20:47 +03:00
Alex March
addd1d3db1
tests/extmod/btree1: Checks for put, seq, string print and unsupported binary op.
2016-10-05 00:17:22 +11:00
Pavol Rusnak
99d62c4def
stmhal/usb: Use real packet size (not maximum) in HID receive.
2016-10-04 15:39:31 +11:00
Pavol Rusnak
8f3cf6e6a8
stmhal/usb: Use correct ClassData structure for HID receive.
2016-10-04 15:38:32 +11:00
Philip Potter
eb239b8398
stmhal/usb: Add support to receive USB HID messages from host.
2016-10-04 15:38:01 +11:00
Philip Potter
03de5a13cf
stmhal/usbdev: Add OUT endpoint to HID interface.
2016-10-04 15:20:11 +11:00
Damien George
cd20027f56
tests/run-tests: Disable cmdline/cmd_showbc test on Windows.
...
Disabled until a proper fix is found.
2016-10-04 14:42:51 +11:00
Dave Hylands
1f433c719b
stmhal: Fix linker map for STM32L476 chips.
...
In particular, this makes the L4 .isr_vector section 16K in size so it's
the same as the F4/F7 MCUs. The patch also moves the L4 filesystem to
the end of flash, which allows for 512K filesystem on the 1Mb devices
like the STM32L476DISC.
2016-10-04 14:31:19 +11:00
Damien George
bd925b59c3
stmhal/spi: Enable use of fast software SPI.
2016-10-04 13:51:30 +11:00
Damien George
b0eb0d6153
extmod/machine_spi: Add optional support for fast software SPI.
...
If a port defines MICROPY_PY_MACHINE_SPI_MIN_DELAY then it can use a
faster software SPI loop that does not make calls to the delay_us
function.
2016-10-04 13:46:40 +11:00
Damien George
b932b2dd1f
extmod/machine_spi: Use delay_half, not baudrate, for internal timing.
...
The delay_half parameter must be specified by the port to set up the
timing of the software SPI. This allows the port to adjust the timing
value to better suit its timing characteristics, as well as provide a
more accurate printing of the baudrate.
2016-10-04 13:43:02 +11:00
Damien George
9f1e395c16
stmhal/spi: Use software SPI if no periph id given, even if pins given.
...
It's simpler to just default to always using software SPI if no specific
peripheral id/name is given. To use hardware SPI users must specify a
hardware peripheral id as the first parameter to the SPI constructor.
2016-10-04 13:38:11 +11:00
Scott Shawcroft
0a10d17c28
atmel-samd: Update bossac_osx with one that works.
...
Add info to the README on how to get into bootloader on feathers. Fixes #6 .
2016-10-03 12:57:06 -04:00
Damien George
bd87375202
esp8266/moduos: Move stat/statvfs funcs to sit within #if VFS guard.
2016-10-03 21:48:32 +11:00
Damien George
5deedd6685
stmhal/mphalport: Fix mp_hal_pin_write to use correct pin_mask.
2016-10-03 18:06:58 +11:00
Damien George
d4a5ca5056
stmhal/spi: Make machine.SPI class conform to correct API.
...
Includes both software and hardware SPI implementations.
2016-10-03 17:12:43 +11:00
Damien George
077dbf4a86
stmhal/mphalport: Implement mp_hal_pin_{input,output,write}.
2016-10-03 16:44:34 +11:00
Damien George
d434ce3fca
extmod/machine_spi: Factor out software SPI code from esp8266 to extmod.
2016-10-03 16:43:44 +11:00
Damien George
a22a67661a
stmhal/spi: Simplify spi_transfer function to take only one buf len arg.
2016-10-03 12:47:56 +11:00
Damien George
5bb28c7f10
extmod/machine_spi: Simplify SPI xfer function to only take one buf len.
...
There is no need to take src_len and dest_len arguments. The case of
reading-only with a single output byte (originally src_len=1, dest_len>1)
is now handled by using the output buffer as the input buffer, and using
memset to fill the output byte into this buffer. This simplifies the
implementations of the spi_transfer protocol function.
2016-10-03 12:39:31 +11:00
daniel
a0d97fe408
cc3200: Add ssl_version argument to ssl.wrap_socket().
...
This resolves issue #2343 .
2016-10-01 21:35:09 +02:00
Damien George
8de270b4fc
py/objbool: Make a slight simplification of bool constructor.
...
Reduces code size for some archs.
2016-09-30 17:02:07 +10:00
Damien George
eca1408f16
py/objbool: Defer bool's unary op implementation to small int.
...
Similar to how binary op already works. Common unary operations already
have fast paths for bool so there's no need to have explicit handling of
ops in bool_unary_op, especially since they have the same behaviour as
integers.
2016-09-30 17:02:06 +10:00
Damien George
3be4f886ce
py/argcheck: Simplify if-chain so that the last one is the default.
2016-09-30 16:45:43 +10:00
Damien George
9f72a14920
tests/basics: Add test for printing OSError when errno is unknown.
2016-09-30 16:45:10 +10:00
Krzysztof Blazewicz
b04d4a5b13
lib/cmsis: upgrade CMSIS-CORE to V4.30
2016-09-30 16:19:03 +10:00
Krzysztof Blazewicz
fa6f774b2c
lib/cmsis: remove CMSIS-DSP headers, they are unused
2016-09-30 16:19:03 +10:00
Krzysztof Blazewicz
6aea34ad89
lib/cmsis: move CMSIS headers to lib/
...
Files in lib/cmsis are generic for all Cortex-M MCU's
files left in stmhal/cmsis are all STM32 specific.
2016-09-30 16:19:03 +10:00
Damien George
17b4509564
tests/basics: Add test constructing a set from a non-trivial expression.
2016-09-30 15:00:15 +10:00
Damien George
3c582bc7cb
tests/import: Add test for compiling "import a.b as c".
2016-09-30 14:48:22 +10:00
Damien George
216a711cd4
py/compile: Fix typo when checking for parse-node kind.
2016-09-30 14:48:06 +10:00
Damien George
6cf2a3966e
tests/basics: Add further tests for nonlocal scoping and closures.
2016-09-30 14:20:55 +10:00
Damien George
0d10517a45
py/scope: Factor common code to find locals and close over them.
...
Saves 50-100 bytes of code.
2016-09-30 13:53:00 +10:00
Damien George
d5495966ce
py/scope: Shrink scope_t struct by 1 machine word.
...
On 32-bit archs this makes the scope_t struct 48 bytes in size, which fits
in 3 GC blocks (previously it used 4 GC blocks). This will lead to some
savings when compiling scripts because there are usually quite a few scopes,
one for each function and class.
Note that qstrs will fit in 16 bits, this assumption is made in a few other
places.
2016-09-30 12:45:00 +10:00
Damien George
3dea8c9e92
py/scope: Use lookup-table to determine a scope's simple name.
...
Generates slightly smaller and more efficient code.
2016-09-30 12:34:05 +10:00
Paul Sokolovsky
6ab2c5e6cc
lib/interrupt_char: Factor out typical Ctrl+C handling from esp8266 port.
...
Utility functions for keyboard interrupt handling, to be reused across
(baremetal) ports.
2016-09-29 10:15:38 -07:00
Damien George
53bfcc9e84
stmhal: Remove CMSIS STM32F2xx files, they are unused/unsupported.
2016-09-28 15:09:03 +10:00