Commit Graph

8785 Commits

Author SHA1 Message Date
Dan Halbert
22bbb6ab86 Don't include examples directories in frozen libraries 2017-12-20 09:00:45 -08:00
Dan Halbert
7f8972b842
Merge pull request #489 from adafruit/test_2.x
Add root .readthedocs.yml config
2017-12-19 13:11:22 -05:00
Scott Shawcroft
e3df0104b0 Add root readthedocs.yml file. 2017-12-19 09:24:12 -08:00
Kattni
aca4b60d28
Merge pull request #486 from dhalbert/2.x_lis3dh_3.0.0
update CPX frozen Adafruit_CircuitPython_LIS3DH to library version 3.0.0
2017-12-15 13:42:09 -05:00
Dan Halbert
054cac3e4b update CPX frozen Adafruit_CircuitPython_LIS3DH to library version 3.0.0 2017-12-15 13:25:46 -05:00
Dan Halbert
0c0a09aeb6 Speed up AnalogIn.value. 2017-12-15 09:56:39 -08:00
Kattni
6d603e462d
Merge pull request #483 from dhalbert/2.x
bring CPX frozen modules up to date
2017-12-14 18:38:05 -05:00
Dan Halbert
a37cc171e8 bring CPX frozen modules up to date 2017-12-14 17:43:59 -05:00
Dan Halbert
f2ad1a3679 Write version info to boot_out.txt. 2017-12-14 09:59:40 -08:00
Dan Halbert
43650b6896 Fix PDMIn MEMS microphone support (#479)
Changes:

    * New faster filter loop, by @ladyada. New filter coefficients as well.
    * Turn on microphone clock when PDMIn object is created, and run it all the time, so the user code doesn't have to wait for microphone startup, which can be 10ms or even 100ms.
    * Wait for microphone startup when PDMIn is first created, based on new optional parameter microphone_startup in seconds (takes a float).
    * record() returns number of samples actually recorded, so you can see if it's not keeping up.
    * Fix buffer overflow errors when buffer size was not a multiple of 16 or something like that.
    * Tweak a few peripheral settings.
    * Minimum sampling frequency is now 16kHZ or so, because 8kHz runs microphone at only 0.5MHz, which is too slow for many mics.

Note: I tried 128x oversampling instead of 64x, but the code cannot keep up at 24kHz or above sampling. 128x would reduce the high-frequency noise by 6db.
2017-12-13 10:12:49 -08:00
Dan Halbert
3c49f53eac
Merge pull request #474 from tannewt/mcu_reset
Introduce reset mechanics to microcontroller.
2017-12-05 19:20:26 -05:00
Scott Shawcroft
a91e1cb682 Fix a couple spelling errors. 2017-12-05 16:04:47 -08:00
Scott Shawcroft
b4d3699047 Introduce reset mechanics to microcontroller.
This allows one to configure how a subsequent reset will behave and
also trigger a reset.

Fixes #350 and fixes #173
2017-12-05 14:50:58 -08:00
Dan Halbert
78db6c32cd
Merge pull request #473 from dhalbert/2.x_esp8266_bidi_spi
add SPI.write_readinto() to esp8266 port
2017-12-05 16:41:09 -05:00
Dan Halbert
2900ed22e7 add SPI.write_readinto() to esp8266 port 2017-12-05 16:03:22 -05:00
Dan Halbert
e75fd0e166 add SPI.write_readinto() - bidirectional SPI 2017-12-05 11:17:16 -08:00
Dan Halbert
9ac6890d20 update CPX frozen modules to latest versions 2017-12-03 20:31:01 -08:00
Stewart
a41272dcd3 atmel-samd: Added missing adalogger pins (#461)
- Added D4 and moved associated SD_CS so that they are paired within list
- Added D7 and SD_CD which is the SD Card Detect pin
- Added D8 and GREEN_LED
- Added RED_LED associated with D13
- Added Setup information regarding arm complier packages
2017-11-26 21:08:27 -08:00
Dan Halbert
26862f8a52
Merge pull request #453 from pewpew-game/stage
Fix display orientation for _stage module
2017-11-21 17:19:02 -05:00
Radomir Dopieralski
1276ce59c3 Fix display orientation for _stage module
Initially this library assumed the display is rotated by 90 degrees, so
the x and y were swapped. I'm now handling the display rotation in the
driver, with the hardware display settings, so the library should use
a sane order of x and y. This way it will work with any display
orientation.
2017-11-21 23:12:55 +01:00
Limor "Ladyada" Fried
27d5f27831 Add ItsyBitsy M0 support with 1MB flash support (#445) 2017-11-17 09:25:36 -08:00
Dan Halbert
065a319100 Update info about erasing CIRCUITPY to include flash erasers for non-… (#427)
Update info about erasing CIRCUITPY to include flash erasers for non-Express boards.
2017-11-14 07:58:26 -08:00
Dan Halbert
d183b66e52
Merge pull request #419 from tannewt/2.x_usb_pids
atmel-samd: Update Feather M0 Express USB PID in 2.x
2017-11-07 20:55:24 -05:00
Scott Shawcroft
aa817de7f0 atmel-samd: Update Feather M0 Express USB PID
This makes it different from the bootloaders and Arduino.

Fixes #324.
2017-11-07 14:32:58 -08:00
Radomir Dopieralski
216fcedfbb Add a _stage module (#398)
This is a C module with some low-level functions required for the
CircuitPython "stage" library. It provides support for fast
rendering of tile grids and sprites on SPI-based RGB displays.
2017-11-07 10:05:25 -08:00
Dan Halbert
d9a19c4c65
Merge pull request #413 from dhalbert/fix_round
Fix round().
2017-11-06 21:39:02 -05:00
Dan Halbert
ddc8570137 Fix round(). Don't split a statement with a #pragma. It breaks the compiled output. 2017-11-06 20:09:23 -05:00
jerryneedell
3c1486a5c7 esp8266 enable framebuf (#408)
enable framebuf for ESP8266
2017-11-06 11:00:03 -08:00
Dan Halbert
4869599f89
Merge pull request #404 from pewpew-game/fix-spi-empty-read-write
Allow empty reads and writes for busio.SPI
2017-11-03 12:40:15 -04:00
Radomir Dopieralski
78f6c2232c Allow empty reads and writes for busio.SPI
This is mostly for convenience, so that user code doesn't
need to add additional checks.

Also, bring the bitbangio into compatibility with busio wrt. empty
buffers.
2017-11-03 17:33:37 +01:00
Radomir Dopieralski
c066e4da8b Add board definition for the uGame handheld console
This is a board definition for the uGame project:
https://hackaday.io/project/27629-game

uGame is a small handheld game console programmable with
CircuitPython. The hardware part of the project is pretty
much stable by now.
2017-11-01 15:22:04 -07:00
Dan Halbert
f738996164 Allow writing buffer of length zero to I2C device; it can be used to poll for existence. 2017-10-30 18:32:36 -07:00
Scott Shawcroft
bd7abcda97 shared-bindings: Check that I2C and SPI reads and writes are given a buffer of at least 1. (#370)
Fixes #358
2017-10-25 17:28:23 -04:00
Dave Astels
e08241de41 Supersized Feather M0 Express for 2.x (replace the 2Mbyte SPI flash with an 8Mbyte chip) (#355)
Add supersized (8Mbyte SPI flash) FeatherM0Express support
2017-10-22 20:56:10 -07:00
Radomir Dopieralski
9bcc1057ca Gracefully reset the gamepad module (#356)
If a soft reset happens while the gamepad module is scanning for button
presses, there is a moment when the pins get de-initialized, but the
gamepad module is still trying to read them, which ends in a crash.
We can avoid it by disabling scanning on reset.
2017-10-21 22:39:20 -04:00
Dan Halbert
a1409d1432 redo time.monotonic() to avoid double precision 2017-10-17 10:02:16 -07:00
Dan Halbert
4f4ddf00dc Set DRVSTR on output pins to strong (more current capability). 2017-10-16 22:13:09 -07:00
jerryneedell
c6a15f76ad esp8266: add neopixel_write - remove neopixel.py (#339)
For ESP8266, remove frozen module neopixel.py and add neopixel_write to mpconfigport.h. Use  [Adafruit_CircuitPython_Neopixel/neopixel.py](https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel) instead.
2017-10-16 18:29:42 -07:00
Dan Halbert
e2ce87e250 Merge pull request #336 from tannewt/2.x
esp8266: Correct SPI functionality when write_value is provided.
2017-10-16 18:43:28 -04:00
Dan Halbert
2148211314 Merge pull request #337 from tannewt/fix_pin_reset
esp8266: Actually disable pins when reset on reload.
2017-10-16 18:42:22 -04:00
Scott Shawcroft
c216c2876f esp8266: Actually disable pins when reset on reload. 2017-10-16 15:13:09 -07:00
Scott Shawcroft
6c7d35c40c esp8266: Correct SPI functionality when write_value is provided.
It used to introduce extra clocks to the bus rather than changing the
value output.

This fixes SD cards.
2017-10-16 14:54:23 -07:00
Dan Halbert
5f6df7f54a More io capability on non-Express boards, so call *_reset() routines
appropriately to match board capabilities.
2017-10-16 12:51:55 -07:00
Dan Halbert
1709fbb65a Turn on pulseio now that there's room.
https://github.com/adafruit/circuitpython/issues/325#issuecomment-336733842
2017-10-16 12:51:55 -07:00
Dan Halbert
274fff4226 Use internal libm for all atmel-samd boards. 2017-10-16 12:20:33 -07:00
Dan Halbert
dbd3f15168 1. Use lib/libm for small (non-Express builds) to gain back a lot of flash space.
2. Add flag INTERNAL_LIBM to mpconfigboard.mk files to signal using lib/libm.
3. Fix floating-point warnings in lib/libm
4. Turn off -finline-limit, no longer needed due to 1.
5. Add explicit flags for SPI_FLASH_FILESYSTEM and INTERNAL_FLASH_FILESYSTEM
to mpconfigboard.mk files, so they don't need to know the name of the .c file
that implements those. Makefile takes care of checking the flags and including
the right files.
2017-10-16 12:20:33 -07:00
Dan Halbert
8f3be0a037 Reinit ADC completely on each call to AnalogIn.value. 2017-10-15 16:59:23 -07:00
Dan Halbert
cfd1809b2b Suppress A0 (PA02) as a TouchIn-capable pin on CPX. 2017-10-15 16:57:37 -07:00
Dan Halbert
922006dd59 Don't create a new filesystem if we restart in safe mode. (#319) 2017-10-12 14:35:39 -04:00
Dan Halbert
ef65ee78c5 Freeze libraries needed by adafruit_circuitplayground library into firmware.
This saves a lot of RAM. Fixes #287.
Also fixed compilation of frozen_mpy.c to use supplied make rule rather than
builtin rule (supplied rule suppresses printing out the gcc command line).
2017-10-08 10:54:46 -06:00