Commit Graph

8747 Commits

Author SHA1 Message Date
Glenn Ruben Bakke ad1076b206 nrf5/modules/machine: Removing unused code from uart module. 2017-06-02 19:18:21 +02:00
Glenn Ruben Bakke 45303796d7 nrf5/hal/rtc: Updating hal driver to calculate prescaler a bit more verbose. Using 1 second interval ticks. 2017-06-02 19:04:19 +02:00
Glenn Ruben Bakke b785e145d2 nrf5/modules/machine: Fixing type in RTC. 2017-06-02 18:41:13 +02:00
Glenn Ruben Bakke 5cfd6d166c nrf5/modules/machine: Update rtc init to set default IRQ priority before initializing RTC instance. 2017-06-02 18:35:04 +02:00
Damien George 7400d88762 tests/basics/string_rsplit: Add tests for negative "maxsplit" argument. 2017-06-02 13:08:18 +10:00
Damien George 9f85c4fe48 py/objstr: Catch case of negative "maxsplit" arg to str.rsplit().
Negative values mean no limit on the number of splits so should delegate to
the .split() method.
2017-06-02 13:07:22 +10:00
Damien George ab954ed513 lib/utils/interrupt_char: Remove support for KBD_EXCEPTION disabled.
If a port is using interrupt_char.c then it must enable
MICROPY_KBD_EXCEPTION.  This is the case for all official ports.
2017-06-02 12:03:57 +10:00
Glenn Ruben Bakke 147e579e28 nrf5/hal/rtc: Aligning RTC (real-time counter) HAL driver with Timer HAL driver. To make api's symetric. Also updating modules/rtc to get aligned with new HAL api. 2017-06-01 23:05:42 +02:00
Damien George 00e4f05907 windows: Convert to use core-provided version of built-in import(). 2017-06-01 16:29:02 +10:00
Damien George d92898a35a unix: Convert to use core-provided version of built-in import(). 2017-06-01 16:02:49 +10:00
Damien George 6ff0ecfffc ports: Convert from using stmhal's input() to core provided version. 2017-06-01 16:02:49 +10:00
Damien George bc76302eab py/modbuiltins: Add core-provided version of input() function.
The implementation is taken from stmhal/input.c, with code added to handle
ctrl-C.  This built-in is controlled by MICROPY_PY_BUILTINS_INPUT and is
disabled by default.  It uses readline() to capture input but this can be
overridden by defining the mp_hal_readline macro.
2017-06-01 16:02:49 +10:00
Damien George b53a63517a lib/libm: Use isfinite instead of finitef, for C99 compatibility. 2017-05-31 11:34:29 +10:00
Glenn Ruben Bakke a81de242c5 nrf5/drivers/bluetooth: Moving stop condition initialization before call to bluetooth stack write function is done, to make sure that its not overwritten after reception of the write event in case of with_response writes. 2017-05-30 23:23:31 +02:00
Glenn Ruben Bakke b17665b8ad nrf5/drivers/bluetooth: Removing duplicate static variable declaration. 2017-05-30 23:19:34 +02:00
Glenn Ruben Bakke 1eb8792fa5 nrf5/modules/ubluepy: Updating characteristic write method to take in an additional keyword, 'with_response'. Default value is False. Only activated in central role. 2017-05-30 19:32:26 +02:00
Glenn Ruben Bakke 66db079192 nrf5/drivers/bluetooth: Updating ble_drv_attr_c_write with possibility to do client write with response. Blocking call. 2017-05-30 19:29:46 +02:00
Damien George 821dc27eec stmhal/boards: Enable DAC for NUCLEO_F767ZI board. 2017-05-30 18:31:55 +10:00
Paul Sokolovsky 272a5d95e0 docs/esp8266: Consistently replace Pin.high/low methods with .on/off. 2017-05-30 07:36:25 +03:00
Glenn Ruben Bakke e07088ce23 nrf5/examples: Adding some notes on which pin layout that has been used in the seeed_tft.py ILI9341 driver for driving the display. 2017-05-29 23:09:53 +02:00
Glenn Ruben Bakke 94b94d7ff4 nrf5/examples: Shorten name on seeedstudio_tft_shield_v2.py to seeed_tft.py. 2017-05-29 23:09:53 +02:00
Glenn Ruben Bakke 0bce2ea74a nrf5/examples: Updating ili9341 example to use new Frambuffer object instead of legacy Framebuffer1. 2017-05-29 23:09:53 +02:00
Glenn Ruben Bakke 8b9f14244d nrf5/examples: Removing seeed.py which used a lcd mono framebuffer has been removed. 2017-05-29 22:03:18 +02:00
Matt Trentini 7dac28575d Adding a README for the nRF5 port 2017-05-29 21:37:39 +02:00
Paul Sokolovsky d5b8825d5f docs/machine.Pin: Add on() and off() methods. 2017-05-29 20:56:13 +03:00
Paul Sokolovsky 3496d9e4bd docs/machine.Pin: Remove out_value() method.
This method isn't implemented in any port. It seemed to have originated
in cc3200 port, but actually never was implemented there either. In
general case, it's impossible to implement this method (for example, for
a perfect GPO, which has only output latch without any feedback look
into a CPU).
2017-05-29 20:51:30 +03:00
Ville Skyttä ca16c38210 various: Spelling fixes 2017-05-29 11:36:05 +03:00
Glenn Ruben Bakke 95b01db098 nrf5/examples: Updating documentation in SDCard module example. Correcting typo and adding SD card wireing documentation for direct SPI connection. 2017-05-28 22:42:45 +02:00
Glenn Ruben Bakke 5fb937f147 nrf5/modules/pin: Adding on() and off() methods to Pin object to be forward compatible with upstream master. Legacy high() and low() methods are kept. 2017-05-28 21:11:03 +02:00
Glenn Ruben Bakke 933507e980 Merge remote-tracking branch 'upstream/master' into nrf5_no_sdk 2017-05-28 20:56:40 +02:00
Glenn Ruben Bakke f3909c49f5 nrf5/modules/spi: Remove pyb abstraction from SPI module, as there was a bug in transfer of bytes due to casting errors. The update removes the pyb_spi_obj_t wrapper going directly on the machine_hard_spi_obj_t as base for machine SPI objects. SDCard mounting is also tested. 2017-05-28 19:35:07 +02:00
Damien George e5e49bedcb qemu-arm/Makefile: Adjust object-file lists to get correct dependencies.
With this change both the "run" and "test" targets can be built with -j
passed to make.
2017-05-26 22:51:14 +10:00
Damien George 825460a093 docs: Bump version to 1.9. 2017-05-26 19:07:37 +10:00
Damien George d77862279e unix/Makefile: Don't add frozen bytecode to minimal build. 2017-05-26 18:12:30 +10:00
Paul Sokolovsky 011684bd4f zephyr/modusocket: Use DEBUG_PRINT macro name as other modules do.
Indeed, just "DEBUG" is too generic.
2017-05-26 10:20:25 +03:00
Damien George 22fdb91571 esp8266/mpconfigport.h: Remove duplicate link to lwip module.
It's already included in the core when MICROPY_PY_LWIP is defined.
2017-05-26 17:06:31 +10:00
Damien George eea584860d esp8266/modules: Mount filesystem at root when creating for first time. 2017-05-26 17:05:58 +10:00
Tom Collins e26fb3ad73 py/objstringio: Catch mp_uint_t overflow of stream position in write(). 2017-05-26 13:40:08 +10:00
Damien George ed6d2547df mpy-cross/Makefile: Guard "override undefine" by test for make feature.
make v3.81 doesn't have "undefine" so we can't use it with that version.
2017-05-26 13:16:55 +10:00
Damien George 85f7b0b468 py/mkrules.mk: Fix auto-qstr generation when "make -B" is used.
For make v3.81, using "make -B" can set $? to empty and in this case the
auto-qstr generation needs to pass all args (ie $^) to cpp.  The previous
fix for this (which was removed in 23a693ec2d)
used if statements in the shell command, which gave very long lines that
didn't work on certain systems (eg cygwin).

The fix in this patch is to use an $if(...) expression, which will evaluate
to $? (only newer prerequisites) if it's non empty, otherwise it will use
$^ (all prerequisites).
2017-05-26 13:12:42 +10:00
Glenn Ruben Bakke cb9ed6bb55 nrf5/drivers/bluetooth: Enable ubluepy central by default if running nrf52/s132 bluetooth stack. Maturity of the module is pretty OK now. 2017-05-25 22:20:17 +02:00
Glenn Ruben Bakke 44673de114 nrf5/boards/feather52: Updating pins.csv for the feather52 board. 2017-05-25 22:16:46 +02:00
Glenn Ruben Bakke cb7a0aefa0 nrf5/boards/feather52: Updating LED pull to low. 2017-05-25 22:16:46 +02:00
Glenn Ruben Bakke 88b4ebc715 nrf5/boards/feather52: Update SPI pinout. 2017-05-25 22:16:46 +02:00
Damien George 8b13cd7e19 tests/basics: Add more tests for unwind jumps from within a try-finally.
These tests excercise cases that are fixed by the previous two commits.
2017-05-25 20:48:16 +10:00
Damien George 8f064e469d py/emitbc: Fix bug with BC emitter computing Python stack size.
Previous to this patch the mp_emit_bc_adjust_stack_size function would
adjust the current stack size but would not increase the maximum stack size
if the current size went above it.  This meant that certain Python code
(eg a try-finally block with no statements inside it) would not have enough
Python stack allocated to it.

This patch fixes the problem by always checking if the current stack size
goes above the maximum, and adjusting the latter if it does.
2017-05-25 20:42:30 +10:00
Damien George 04d05db27e py/vm: Fix bug with unwind jump popping the iterator from a for loop.
This patch fixes a regression introduced by
088740ecc4
2017-05-25 20:39:08 +10:00
Damien George 68e71eacb8 py/vm: Fix bug with stackless mode and unwinding of exceptions.
This patch fixes a regression introduced by
71a3d6ec3b

Previous to this patch the n_state variable was referring to that computed
at the very start of the mp_execute_bytecode function.  This patch fixes it
so that n_state is recomputed when the code_state changes.
2017-05-25 20:35:57 +10:00
Glenn Ruben Bakke aba5fcbf0f nrf5/main: Move initializaton of modmusic to the module itself. Upon init of the module, the hardware, pwm and ticker will be started. Could be moved back to main if pwm or ticker should be shared among more modules and have to be initialized more global. 2017-05-25 00:25:14 +02:00
Glenn Ruben Bakke d9813910da nrf5/modules/machine/timer: If timer is used in combination with SOFT_PWM (implicitly use of ticker.c) guard the Timer1 instance from being instantiated trough python timer module. Also disable implementation of the HAL IRQ handler which is for now explicitly implemented in ticker.c for Timer1. 2017-05-25 00:25:14 +02:00