Radomir Dopieralski
f4981677b0
Add a gamepad
module for handling buttons in the background. ( #295 )
...
The `GamePad` singleton monitors buttons in the background to make sure a button press is never missed and debouncing happens consistently.
2017-10-03 13:35:57 -07:00
Dan Halbert
c478c10923
Do not allow a *io object to be used after deinit().
...
Fixes #278 , #277 , #276 , #275 .
2017-10-03 12:07:17 -07:00
Radomir Dopieralski
c2bb9e2eb5
Add board file for the hacked Trinket M0 Haxpress ( #303 )
...
Add a hacked Tinket M0 Haxpress board definition
Based on https://daveastels.com/2017/09/01/trinket-m0-express-hack/
2017-10-03 11:24:48 -07:00
Dan Halbert
7f74412882
Make touch more sensitive. Add .raw_value and .threshold attributes.
2017-10-02 11:15:51 -07:00
Dan Halbert
b2dcc5bb6c
reset pins on PDMIn deinit(). Fixes #275 .
2017-09-29 08:54:05 -07:00
Jerry Needell
3ad01ddb04
Add Ananlog Pin aliases to trinket_m0 pins.c
2017-09-19 21:36:06 -07:00
Dan Halbert
75c3be37ac
Re-initialize ADC before every AnalogIn read. ( #255 )
...
`microcontroller.cpu.temperature` uses different ADC settings, and caused
AnalogIn to give wrong answers. AnalogIn can no longer assume it's the
only user of the ADC.
2017-09-16 13:06:23 -04:00
Asher Lieber
5aa8922038
add set_rgb_status_brightness ( #246 )
...
Add set_rgb_status_brightness() via `samd.rgb_status_brightness`.
Fixes #162 .
2017-09-12 12:09:22 -07:00
Dan Halbert
acbca44512
Ctrl-C was causing a soft-reset in REPL.
...
Also allow an immediate ctrl-c in `input()`.
2017-09-06 14:47:23 -07:00
Scott Shawcroft
c0159c5e80
atmel-samd: Ensure MTB is off in case we ran a debug build before
...
a non-debug build.
2017-09-06 11:56:41 -07:00
Scott Shawcroft
6d9d683443
atmel-samd: Enable 8-bit audio recording support even though it'll be
...
quiet. Also update the examples.
Fixes #226
2017-09-05 16:37:02 -07:00
Dan Halbert
a0d0b27faf
Fix issue #207 , esp8266 file operations problems ( #222 )
...
The frozen module `_boot.py` was not being loaded on restart
because `pyexec_frozen_module()` did not know about the new `.frozen`
pseudo-directory. Updated lower-level routine to look in the right place.
Also made ".frozen" and related values be `#define`s.
2017-09-01 16:12:26 -04:00
Scott Shawcroft
e2f39a8d93
atmel-samd: Remember SPI baudrate.
...
This prevents the SERCOM from blipping the data line on each
transaction and therefore fixes #219 .
2017-09-01 12:44:52 -07:00
Scott Shawcroft
17ec02a77d
atmel-samd: Add SPI pin names to the Trinket. Fixes #213 ( #217 )
2017-08-31 15:05:43 -04:00
Dan Halbert
59faa05a10
Add ".frozen" to end of sys.path, so that internal frozen modules are visible on boot.
2017-08-31 11:38:00 -07:00
Dan Halbert
fdb97eda09
Add microcontroller.cpu.temperature, for use as a simple sensor on minimal boards. ( #211 )
...
* Add microcontroller.cpu, the sole instance of microcontroller.Processor.
microcontroller.cpu.frequency is the clock frequency, in Hz.
microcontroller.cpu.temperature is the reading from the internal temperature sensor, in Celsius. None if not available.
* Squeeze firmware size by using -finline-limit. Otherwise non-Express builds were slightly too big.
* Update submodules.
* Fix documentation glitches
2017-08-31 13:48:30 -04:00
Dan Halbert
c679c80c71
Modernize module and class static dicts; update freetouch
2017-08-27 15:02:50 -04:00
Dan Halbert
ef61b5ecb5
Initial merge of micropython v1.9.2 into circuitpython 2.0.0 (in development) master.
...
cpx build compiles and loads and works in repl; test suite not run yet
esp8266 not tested yet
2017-08-25 22:17:07 -04:00
Scott Shawcroft
266be30777
atmel-samd: Introduce a nvm module for non-volatile byte-level memory access. ( #203 )
...
* atmel-samd: Introduce a nvm module for non-volatile byte-level memory access.
This allows for persisting small configuration values even when the file system
is read-only from CircuitPython.
Fixes #160
* Review feedback:
* Add tests.
* Fix non-zero index.
* Fix len()
2017-08-25 16:00:27 -04:00
Dan Halbert
74cfdeb316
Added ability to freeze multiple directories; freeze neopixel library in cpx build ( #199 )
...
Reworked frozen module support: clean up makefiles and handle multiple directories.
Modules to freeze are included as git submodules.
Add neopixel to circuitplayground express build.
Fixes #56
2017-08-23 11:05:59 -07:00
Scott Shawcroft
45a31b1c2a
Fix ADC input def for PB07. ( #195 )
...
Fixes #194
2017-08-22 15:19:05 -04:00
Scott Shawcroft
fab634e3ee
Turn on Rosie CI testing to test new builds on real hardware.
...
This introduces a skip_if module that can be used by tests to
determine when they should be skipped due to the environment.
Some tests have been split in order to have finer grained skip
control.
2017-08-11 17:16:13 -07:00
Scott Shawcroft
42156484ae
shared-bindings/atmel-samd: Fix and improve trigger duration timing on PulseIn.resume.
2017-08-10 11:55:34 -07:00
Scott Shawcroft
509d5223ea
atmel-samd: Fix crash when fs mount fails and fix mounting internal flash. It was broken by the update to 1.9.1. Related to #82
2017-08-07 15:56:10 -07:00
Dan Halbert
5d509ecace
Allow max stack checking to be used with -flto build by determining top
...
of stack in a different way.
2017-08-05 17:48:16 -07:00
Dan Halbert
91d4cdb476
Increase heap size at the expense of stack size, from 16k to 16k+4k.
2017-08-05 17:47:00 -07:00
Scott Shawcroft
13cb4aa89d
atmel-samd: Add support for a second flash chip so either may be used.
2017-08-03 13:44:31 -07:00
Scott Shawcroft
8f3c5ebdc8
atmel-samd: Clear the error bit after the known buffer overflow and be explicit about dst increase.
2017-08-03 13:44:31 -07:00
Scott Shawcroft
557ceded00
atmel-samd: Introduce audiobusio.PDMIn for recording audio from PDM
...
microphones.
2017-07-28 12:12:38 -07:00
Dan Halbert
f91493c97e
Measure and report maximum stack usage. ( #175 )
...
Add max stack usage tracking, visible via debug module ustack.
Add separate cpp flag for enabling modules: MICROPY_DEBUG_MODULES
2017-07-23 15:32:05 -04:00
Dan Halbert
0d2c1bf2bb
Fix problems that prevented use of internal frozen modules:
...
1. Allow -Wlto-type-mismatch to be just a warning when building with frozen modules.
2. Fix extern decls that triggered -Wnested-externs when building with frozen modules.
3. Pass the correct value of -mlongint-impl to $(MPY_TOOL). New file mpconfigport.mk to do this.
2017-07-16 16:00:41 -07:00
Scott Shawcroft
c82b84e0a9
atmel-samd: Fix potential buffer overflow in UART.c by recalculating
...
the buffer end rather than naively adding 1. It could have needed to
wrap around. Thanks @dhalbert for spotting the bug.
Fixes #132
2017-07-13 16:21:12 -07:00
Scott Shawcroft
3660023046
atmel-samd: Update README and add pinout tables that map MCU names
...
to names in the board module and explain pin capabilities.
Fixes #149
2017-07-13 16:05:24 -07:00
Scott Shawcroft
1e04e8ea1c
atmel-samd: Reboot to bootloader when a 1200 baud serial connection is
...
closed. This is how Arduino triggers the bootloader.
2017-07-12 11:58:22 -07:00
Scott Shawcroft
09b80b10d1
atmel-samd: Add Trinket Rev D support.
2017-07-12 11:55:50 -07:00
Scott Shawcroft
94346d97ba
atmel-samd: Add TX/RX and SCL/SDA pins names for Gemma M0.
2017-07-12 11:55:50 -07:00
Scott Shawcroft
e02e423510
atmel-samd: Switch streams to non-blocking mode. Fixes #159 .
2017-07-12 11:55:50 -07:00
Scott Shawcroft
ffc37faadc
atmel-samd: Update Gemma M0 USB device name.
2017-07-12 11:55:49 -07:00
Scott Shawcroft
309daaf5fc
atmel-samd: Update Gemma M0 for release revision.
2017-07-12 11:55:49 -07:00
Scott Shawcroft
97df799e2c
atmel-samd: Add IR_TX and IR_RX pin names for REMOTEOUT and REMOTEIN to the CircuitPlayground Express pins to match the silkscreen.
2017-07-12 11:55:49 -07:00
Dan Halbert
2cd62b46cd
Fix USB Busy error for kbd hid. Made kbd USB report descriptor be
...
COMPILER_WORD_ALIGNED as done in #118 for mouse. Added COMPILER_WORD_ALIGNED
to other UDC_DESC_STORAGE declarations that might have the same issue in
the future.
2017-07-12 11:55:49 -07:00
Scott Shawcroft
f878bc4efc
atmel-samd: Fix AudioOut buffer playback by supporting bytes_per_sample.
...
Thanks to @ntoll for finding this bug!
2017-07-12 11:55:49 -07:00
Scott Shawcroft
725d715a1b
shared-bindings: Introduce storage.remount() so you can set root as
...
writeable and prevent USB from editing it.
2017-06-28 16:18:13 -07:00
Scott Shawcroft
1e16e813e8
atmel-samd: Update sys.path with correct root path.
2017-06-28 14:53:01 -07:00
Scott Shawcroft
05f0681966
atmel-samd: update boot output location for new mount point.
2017-06-28 14:51:46 -07:00
Scott Shawcroft
d6a24afd71
Change vfs mount ordering such that the root is always last in the
...
linked list. Its also the only one statically allocated and made
available over USB.
2017-06-28 14:46:49 -07:00
Scott Shawcroft
5ddbf26b62
atmel-samd: Update sys.path to match that the internal/onboard
...
flash is now at / rather than /flash.
2017-06-28 12:52:29 -07:00
Scott Shawcroft
a0058e6712
Introduce a random module that is a subset of CPython's random. It
...
also initializes in the same way where it takes from a true random
source when available through os.urandom(). After initializing, it
produces deterministic results until the seed is set.
This replaces urandom!
Fixes #139 .
2017-06-27 17:37:24 -07:00
Scott Shawcroft
778e975936
Split uos module into os and storage.
...
os is a subset of CPython's os. storage contains additional
file system mounting functionality based on UNIX's mount
management.
Fixes #140
2017-06-27 15:17:30 -07:00
Scott Shawcroft
e87a61ffb4
atmel-samd: Fix running off of the new VFS filesystem including
...
an issue at startup leading to safe mode and mass storage support
not working.
2017-06-26 14:04:22 -07:00