Commit Graph

7388 Commits

Author SHA1 Message Date
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
Scott Shawcroft
1a3bd67833 nativeio.SPI: Remove extraneous constructor args because they are in configure. 2017-02-19 12:57:00 +01:00
Scott Shawcroft
f511c263a0 ESP8266: Make sure SPI write finishes before returning.
Fixes #62.
2017-02-15 17:25:41 +01:00
Scott Shawcroft
49287e91b1 ESP8266: Rework the execution flow to match the SAMD21.
* Support code.txt and variants.
* Add wait state for connection indicated by receiving a character.
* Add another wait state on every soft reset to give instruction for
  soft reset rather than entering REPL.

AMPY use remains the same. The wait states can be exited with CTRL-C
just like the REPL.

Fixes #70.
2017-02-15 17:00:09 +01:00
Scott Shawcroft
f2c787d0b4 Fix the keyboard exception in REPL by ignoring forced exit results when in REPL. Also, print the exception correctly. Fixes #57 2017-02-15 15:48:39 +01:00
Scott Shawcroft
b950709bea Fix tests that rely on sys.implementation.name to work with circutpython response. 2017-02-14 10:57:00 +01:00
Scott Shawcroft
18c299b13d Make mp_float_t conversions explicit to silence warnings of converting floats to doubles. 2017-02-14 10:55:54 +01:00
Scott Shawcroft
9ed3e11aec atmel-samd: Clean up I2C correctly when an initialization error occurs. Fixes #95. 2017-02-13 16:46:57 +01:00
Scott Shawcroft
26c61d43f4 Change sys.implementation to return circuitpython and the circuitpython version number that doesn't start with v. Fixes #86. 2017-02-13 16:23:46 +01:00
Scott Shawcroft
ae715a827b atmel-samd: Rework the clock configs to only be crystalless when needed by the hardware. 2017-02-10 05:09:17 -08:00
Scott Shawcroft
370d1dec88 SPI tweaks for SD Cards:
* Always init SPI to 250k to start for SD cards.
* Add ability to configure byte written during read.
* Add ability to read and write to portions of buffers like existing I2C API.
2017-02-10 05:09:17 -08:00
Scott Shawcroft
10fbe06757 Switch design guide to rST so that the table works. Also add details based on more feedback from @deshipu. Thanks! 2017-02-03 14:48:23 -08:00
Scott Shawcroft
f6cdfa9edf Update after feedback from @deshipu. Thanks 2017-02-03 10:16:41 -08:00
Scott Shawcroft
7ab7f41b46 Add a draft of a new design guide. This is meant to capture the goals of CircuitPython and the corresponding design decisions. 2017-02-02 15:15:27 -08:00
Scott Shawcroft
597777e80b atmel-samd: Update internal pins for Feather M0 Express Rev B 2017-02-02 12:12:05 -08:00
Scott Shawcroft
9f6da7b2fe Add more PWMOut examples and rename the duty constructor argument
to duty_cycle so that its consistent with the attribute.

Fixes #84
2017-02-01 15:07:31 -08:00
Scott Shawcroft
1da14b0eec atmel-samd: Switch Metro back to including bootloader space. 2017-02-01 13:16:48 -08:00
Scott Shawcroft
8569395b5d atmel-samd: Turn down the brightness of the status colors. 2017-02-01 13:15:46 -08:00
Scott Shawcroft
e3f9ee839a Add frequency changing support to PWMOut.
You can either set it once up front, or set variable_frequency on custruction to
indicate that the frequency must be able to change. This informs whether a timer
can be shared amongst pins.

This also adds persistent clock calibration on atmel-samd. Once the device has
synced its clock frequency over USB it will remember that config value until USB
is used again. This helps ensure the clock frequency is similar on and off USB.

Lastly, this also corrects time.sleep() when on USB by correcting the tick counter.
2017-01-30 15:02:01 -08:00
Scott Shawcroft
749d22b5e6 atmel-samd: stop overwriting the flash FS. 2017-01-19 14:26:57 -08:00
Scott Shawcroft
79024f3fb9 atmel-samd: Change new flash FS name to CIRCUITPY
Fixes #79
2017-01-19 11:47:06 -08:00
Scott Shawcroft
dad33e6ad0 atmel-samd: Reset the DAC on soft reset. Fixes #80. 2017-01-19 11:42:33 -08:00
Scott Shawcroft
f74e477966 atmel-samd: Fully reset the ADC state on reset to prevent a crash. 2017-01-19 11:26:41 -08:00
Scott Shawcroft
d29915ca3d atmel-samd: Fix two more SERCOM configs, PA07 and PA06. 2017-01-18 15:04:35 -08:00
Scott Shawcroft
76a2178bd7 atmel-samd: Fix PA00 and PA01 sercoms. New CircuitPlayground prototype pinout. 2017-01-18 14:51:36 -08:00
Scott Shawcroft
1a86968912 atmel-samd: Fix neopixel timing by forcing the NVM cache to be deterministicly timed. Otherwise, bit order changes code timing. Fixes #74 2017-01-17 19:27:48 -08:00
Scott Shawcroft
42926c6159 atmel-samd: Fix whitespace. 2017-01-17 19:26:28 -08:00