Commit Graph

10362 Commits

Author SHA1 Message Date
Scott Shawcroft d239dbdc28 More fixes to pin pull thanks to jerryn:
* Correct atmel-samd pin pull state.
* Correct conversion from python pull objects to C enum.
2017-01-16 15:32:23 -08:00
Glenn Ruben Bakke 00a59ed8d6 nrf5/boards: Enable ssd1305 oled display to be default for pca10028 for now. 2017-01-16 23:39:50 +01:00
Glenn Ruben Bakke 733040e647 nrf5/drivers: Adding ssd1305 oled driver. This is very similar to ssd1306, so a merge will happen soon. 2017-01-16 23:37:52 +01:00
Glenn Ruben Bakke 40ee000680 nrf5/drivers: Adding ssd1305 oled driver. This is very similar to ssd1306, so a merge will happen soon. 2017-01-16 23:34:41 +01:00
Scott Shawcroft df96823dee Fix pull kwarg DigitalInOut.switch_to_input and add example use to docs.
Thanks to jerryn from the Adafruit Forum for finding the bug!
2017-01-16 10:35:46 -08:00
Damien George 96baaa68a4 tests: Update tests, and add new ones, for recent generator tweaks. 2017-01-17 00:17:44 +11:00
Damien George 239f920299 py/objgenerator: Don't raise RuntimeError if GeneratorExit ignored.
In this case it's allowed to be ignored.
2017-01-17 00:16:56 +11:00
Damien George 681994638b py/objgenerator: When throwing an object, don't make an exc instance.
Arguments to throw() for generators don't need to be exceptions.
2017-01-17 00:14:14 +11:00
Damien George aeb2655073 py/runtime: Fix handling of throw() when resuming generator.
If GeneratorExit is injected as a throw-value then that should lead to
the close() method being called, if it exists.  If close() does not exist
then throw() should not be called, and this patch fixes this.
2017-01-17 00:10:49 +11:00
Damien George 40863fce6f py/runtime: Refactor assert(0) to improve coverage. 2017-01-17 00:09:56 +11:00
Rami Ali 751e379533 tests: Improve frozen import test coverage. 2017-01-16 16:59:03 +11:00
Damien George d23834bc96 py/builtinimport: Remove unreachable code and change obj-import comment. 2017-01-16 16:41:43 +11:00
Damien George 63e291de70 py/builtinimport: Raise ValueError for bad relative import, per CPython. 2017-01-16 16:21:04 +11:00
Damien George 9317fee523 unix/coverage: Move coverage #if guard back to top of file. 2017-01-16 16:20:49 +11:00
Rami Ali 50e14ca619 tests/import: Improve builtinimport.c test coverage. 2017-01-16 15:59:33 +11:00
Rami Ali 8d01bd3a1c tests: Improve stream.c test coverage. 2017-01-16 15:57:10 +11:00
Glenn Ruben Bakke 6ab233a5ba nrf5/drivers: Updating ili9341 display object to use new framebuffer. 2017-01-15 22:47:30 +01:00
Glenn Ruben Bakke 535f44b8bf nrf5/drivers: Updating ili9341 driver to use new framebuffer, and removing the compressed param from the line update function. 2017-01-15 22:46:23 +01:00
Glenn Ruben Bakke 8603fc833f nrf5: Adding micropython mem_info() to be included in mpconfigport.h. 2017-01-15 22:42:49 +01:00
Glenn Ruben Bakke 5618be883b nrf5/drivers: Adding example in comment on how to use the ili9341 driver with nrf51/pca10028 board. 2017-01-15 20:32:24 +01:00
Glenn Ruben Bakke 0380d2e781 nrf5/examples: Adding a extra global variable to the game which breaks the game execution. 2017-01-15 19:59:09 +01:00
Glenn Ruben Bakke b0a730d482 nrf5/examples: Adding 2048 game using OLED SSD1306 128x64 display and analog joystick. 2017-01-15 19:47:13 +01:00
Glenn Ruben Bakke 73be85dd6d nrf52/boards: Increasing the stack and heap in pca10056 (nrf52840) target from 2k/32k to 40k/128k to debug some buffer problems when running large frozen python programs. 2017-01-15 19:39:57 +01:00
Glenn Ruben Bakke c6fc0a134c nrf51/boards: Increasing heap and stack size in the pca10028 board. 2017-01-15 19:37:53 +01:00
Glenn Ruben Bakke 7edea7848d nrf51/boards: Enable display driver and oled ssd1306 (also bringing in framebuffer and graphics module) into the pca10028 target. 2017-01-15 19:34:52 +01:00
Glenn Ruben Bakke 1bbbb9dcae nrf5: Enable display/framebuffer.c and graphic/draw.c into the build. 2017-01-15 19:32:59 +01:00
Glenn Ruben Bakke 13161d0eac nrf5/drivers: Adding defines to exclude implementation of draw.c module if not enabled. 2017-01-15 19:32:11 +01:00
Glenn Ruben Bakke b609ce85b5 nrf5: Adding configuration defines for the graphics module (draw) and enabling this by default if using oled ssd1306 display which has a compatible python object definition. 2017-01-15 19:31:22 +01:00
Glenn Ruben Bakke bfca15bdff nrf5/drivers: Adding draw module with circle, rectangle and text functions. Can be used by any display object which implements display callback functions. 2017-01-15 19:18:14 +01:00
Glenn Ruben Bakke 4c06455105 nrf5/drivers: Moving oled ssd1306 driver over to new framebuffer layout. Moving some of the draw algorithms into the object in order to optimize the speed on writing data from the framebuffer. 2017-01-15 19:06:48 +01:00
Glenn Ruben Bakke 2b383b4ede nrf5/hal: Removing stdio.h include in adce.c which were used for debugging. 2017-01-15 17:55:35 +01:00
Glenn Ruben Bakke c87716d715 nrf5/boards: Adding ADC pins in pins.csv file for pca10056 (nrf52840). 2017-01-15 17:53:30 +01:00
Glenn Ruben Bakke 496de3a839 nrf52/hal: Adding adce (saadc) implementation for nrf52 to sample values on a channel. 2017-01-15 17:51:49 +01:00
Glenn Ruben Bakke 63fc32e56f nrf5/adc: Adding all 8 instances to adc python module. Valid for both nrf51 and nrf52. 2017-01-15 17:28:41 +01:00
Glenn Ruben Bakke 56b3655f7e nrf5/drivers: Adding new structures to moddisplay. Adding a display_t structure to cast all other displays into, to retrieve function pointer table of a display object type. Also adding the function table structure which needs to be filled by any display object. 2017-01-15 16:21:27 +01:00
Glenn Ruben Bakke 46caefbeeb nrf5/drivers: Adding a new framebuffer implementation to replace the mono_fb. 2017-01-15 16:15:21 +01:00
Scott Shawcroft 78168bc984 Add more description of installing the library bundle. 2017-01-13 17:00:26 -08:00
Scott Shawcroft 35a5d44399 atmel-samd: Ensure pin state for first script run because we don't
know the post-bootloader state.

Also, color the status LED purple for ValueErrors which are used to
indicate a pin in use.
2017-01-13 15:39:50 -08:00
Scott Shawcroft 6c858c7a78 Travis is actually running trusty. xenial isn't supported yet. 2017-01-12 17:09:10 -08:00
Scott Shawcroft 0930f7a797 tests: Update ramdisk test to show more free space because our root directory is smaller than upstream's. 2017-01-12 14:56:17 -08:00
Scott Shawcroft f6cf8ae208 atmel-samd: Split UART pin names into two so that all names start
with a letter and are therefore valid Python.

Fixes #73.
2017-01-12 13:53:47 -08:00
Scott Shawcroft 9ece7c907d Add persistent VFS shares so that the devices can be used with USB
that is present across soft-reset.
2017-01-12 12:46:44 -08:00
Scott Shawcroft 0d408488c5 atmel-samd: Turn off FRAMEBUF because it takes a lot of space. 2017-01-12 12:46:43 -08:00
Scott Shawcroft cea5503ca0 Fixup warnings from merge about undefined macro values, switch to
VM keyboard exception and switch to FATFS reader.
2017-01-12 12:46:18 -08:00
Pavol Rusnak b82fc8dcef
stmhal: fix wrong usage of gcc -print-libgcc-file-name 2017-01-12 20:32:43 +01:00
Glenn Ruben Bakke a5bb966614 nrf5/boards: Updating pca10028 (nrf51) board config. Enable SPI machine module. Enable flow control on UART. Correcting SPI CLK, MISO and MOSI pin assignments. 2017-01-12 19:54:07 +01:00
Glenn Ruben Bakke 6c54ed9a09 nrf5/adc: Updating adc module and hal with a new interface. No need for keeping peripheral base address in structure when there is only one peripheral (nrf51). 2017-01-12 17:20:08 +01:00
Glenn Ruben Bakke 24abb69eec nrf5/rtc: Correcting RTC1 base error in rtc template. 2017-01-12 08:47:16 +01:00
Dave Hylands aa53496391 stmhal: Support PortG on STM32L476 and STM32L486. 2017-01-12 17:27:28 +11:00
Glenn Ruben Bakke 719bdcfed4 nrf5: Adding adc module to machine module. 2017-01-11 22:13:18 +01:00