Scott Shawcroft
f37ce1c595
atmel-samd: Turn off PulseIn interrupts on reset. Can hardfault otherwise.
2017-04-13 17:50:06 -07:00
Scott Shawcroft
f0e24bd812
atmel-samd: Account for pending ticks in PulseIn. Fixes #116 .
2017-04-13 14:47:34 -07:00
Scott Shawcroft
d1b15cf1a3
esp8266: Don't reset TX and RX lines. The pullup is required for
...
the Adafruit Huzzah Breakout because it has a diode to protect
against 5v logic which effectively blocks 1s and relies on the
pull up to produce them.
2017-04-13 14:15:06 -07:00
Scott Shawcroft
4a4f29b8f9
atmel-samd: Rework status LED implementation
...
* Track status pin use by user code separately so it can take over the pins and then give them back.
* Switch to hardware SPI for APA102 on Gemma and Trinket.
* Merge microcontroller/types.h into microcontroller/Pin.h to better match approach going forwards.
2017-04-12 15:24:50 -07:00
Scott Shawcroft
8505de1ced
atmel-samd: rename cplay_m0_flash to circuitplayground_express and update for new rev (F).
2017-04-11 17:59:02 -07:00
Scott Shawcroft
45dfaa835f
atmel-samd: Reset PulseIn correctly on soft reset.
2017-04-11 16:56:06 -07:00
Scott Shawcroft
1e8fc15a41
atmel-samd: Fix PulseIn duration math to handle case when current us time is after the last one but more than a ms has passed.
2017-04-11 16:55:42 -07:00
Scott Shawcroft
f28f8ba568
Split up nativeio.
...
This was done to allow greatly granularity when deciding what functionality
is built into each board's build. For example, this way pulseio can be
omitted to allow for something else such as touchio.
2017-04-10 13:32:19 -07:00
Scott Shawcroft
4810722064
esp8266: Change nativeio.I2C to use bitbangio under the hood rather than throwing an error.
2017-03-28 18:54:16 +01:00
Scott Shawcroft
3afa09b2fe
atmel-samd: Update Feather M0 Express USB pid.
2017-03-27 20:30:02 +01:00
Scott Shawcroft
f5caf86870
atmel-samd: Add message for when auto reset is off. Fixes #112
2017-03-27 20:12:30 +01:00
Scott Shawcroft
be1ed7aae4
Change to official Feather M0 Express branding.
2017-03-27 19:45:44 +01:00
Scott Shawcroft
ff208d7677
Add low-level OneWire support class.
...
This class focuses on the timing sensitive parts of the protocol.
Everything else will be done by Python code.
This also establishes that its OK to back a nativeio class with a
bitbang implementation when no hardware acceleration exists. When
it does, then bitbangio should be used to explicitly bitbang a
protocol.
2017-03-25 12:04:49 +00:00
Scott Shawcroft
7cb54864aa
Add PulseIn support which can be used to measure a series of pulse widths.
...
This is useful for infrared input and DHT sensors.
2017-03-24 10:30:15 +00:00
Scott Shawcroft
d200a62164
Add PulseOut which can pulse a PWMOut for IR remote transmission.
2017-03-10 19:17:54 +01:00
Scott Shawcroft
07ea2abcb0
esp8266: Turn off framebuf to get space.
2017-03-10 19:13:06 +01:00
Scott Shawcroft
bccfbe4e00
Fix duty_cycle constructor argument to PWMOut.
2017-03-10 18:55:17 +01:00
Scott Shawcroft
fcd60915e2
atmel-samd: Turn on stack checking so infinite recursion doesn't completely crash.
2017-03-09 16:09:13 +01:00
Scott Shawcroft
0f78eea5d8
Update the Python intersphinx reference to Python 3 https.
2017-03-07 12:59:34 +01:00
Scott Shawcroft
4aaa0ea008
shared-bindings: Do a pass on the docs and make sure keyword only arguments make sense and are documented correctly. Fixes #109
2017-03-07 12:58:57 +01:00
Scott Shawcroft
3891dde7ff
shared-bindings: Reenable struct_time. It was turned off when playing with LTO and never re-enabled.
2017-03-07 12:47:26 +01:00
Scott Shawcroft
7ecbc3a148
shared-bindings: Fix two more try_locks. Copy and paste failed me.
2017-02-28 12:31:27 +01:00
Scott Shawcroft
d598c2a919
atmel-samd: Add USB HID mouse and keyboard support.
2017-02-27 15:43:58 +01:00
Scott Shawcroft
062fac1d43
atmel-samd: Use link time optimization to reduce code size of builds which
...
share space with the file system.
"Express" builds with SPI flash crash the compiler for some reason so its
currently disabled for them.
2017-02-26 01:00:33 +01:00
Scott Shawcroft
3fd19c60cc
py: Fix recursion exception.
2017-02-24 17:47:25 +01:00
Scott Shawcroft
aef0586ee1
py: Fix varg helpers by adding vlist variant of mp_obj_new_exception_msg
2017-02-24 17:47:02 +01:00
Scott Shawcroft
48d7fca25e
atmel-samd: Fix linking by providing cpu info.
2017-02-24 17:45:33 +01:00
Scott Shawcroft
7dbe4e98a7
Make slice make_new match mp_make_new_fun_t exactly, check the input type and enable it for qemu tests.
2017-02-24 16:48:01 +01:00
Scott Shawcroft
75d6abe3bb
Correct name of mp_raise_NotImplementedError to make error name.
2017-02-24 16:46:38 +01:00
Scott Shawcroft
35071b3681
Make the build quieter by default.
2017-02-24 15:59:59 +01:00
Scott Shawcroft
baf3ff377e
Make more type structures const to save RAM.
2017-02-24 15:23:26 +01:00
Scott Shawcroft
e0ef7e3092
Add indices() support to slice.
2017-02-24 15:13:56 +01:00
Scott Shawcroft
12fa5b3a66
Switch exception throwing to mp_raise helpers. It saves a little code space each time to share the call.
2017-02-24 15:13:07 +01:00
Scott Shawcroft
efd429464e
atmel-samd: Switch to nano newlib and add size script to build.
2017-02-24 14:55:34 +01:00
Scott Shawcroft
75d0b02b3f
Throw an error when sleep time is negative.
2017-02-22 20:41:00 +01:00
Scott Shawcroft
4c05086661
Check that neopixel write is actually given a DigitalInOut.
2017-02-22 20:10:10 +01:00
Scott Shawcroft
fc718d9437
ESP8266: Stop supporting 400khz neopixels through old esp module API.
...
It still accepts the parameter for backwards compatibility and to
provide a good error when it can't work.
Using the `neopixel_write` module instead is recommended because its
available on all CircuitPython supported ports.
2017-02-22 12:59:04 +01:00
Scott Shawcroft
44e5d36086
ESP8266: Add reset note to webrepl init.
2017-02-21 11:50:32 +01:00
Scott Shawcroft
261a6ff0bb
atmel-samd: Fix build by correcting internal neopixel writes.
2017-02-19 17:39:34 +01:00
Scott Shawcroft
a5a41d7163
atmel-samd: Save a little space by tweaking error messages.
2017-02-19 17:24:15 +01:00
Scott Shawcroft
8584f5fece
atmel-samd: Remove support for UART REPL from Arduino Zero.
2017-02-19 17:23:31 +01:00
Scott Shawcroft
f0b62a2b0e
Save space by only supporting 800khz neopixels.
2017-02-19 17:22:42 +01:00
Scott Shawcroft
710b5d8aff
Two I2C fixes:
...
1) Bus error will be thrown on read/write errors with errno set. (Read didn't used to fail at all.)
2) try_lock correctly returns boolean whether lock was grabbed.
Fixes #87
2017-02-19 17:02:29 +01:00
Scott Shawcroft
e9659e61f8
Switch enum-like attributes to all caps and add print support for them. Make room for this functionality by adding a shared __enter__ function object. #76
2017-02-19 16:11:33 +01:00
Scott Shawcroft
c4ee6d5716
atmel-samd: Remove pin reference from AnalogOut error. Fixes #83
2017-02-19 14:38:24 +01:00
Scott Shawcroft
d67968e3c3
Add print support to Pin. #83 #76
2017-02-19 14:23:29 +01:00
Scott Shawcroft
39ac7240a8
Add CircuitPlayground, Trinket and Gemma to Travis build.
2017-02-19 14:11:55 +01:00
Scott Shawcroft
c81052a256
atmel-samd: Stop calibrating the crystal for Gemma and Trinket. We need the space for other code.
2017-02-19 14:11:24 +01:00
Scott Shawcroft
b7ded4c934
esp8266: Allow for MOSI or MISO only SPI. Fixes #65
2017-02-19 13:15:23 +01:00
Scott Shawcroft
3dda38c8ab
Fix pin free check to ignore None objects. Fixes #89
2017-02-19 12:59:31 +01:00