Commit Graph

1973 Commits

Author SHA1 Message Date
Dan Halbert
b67d04a5b1 Merge remote-tracking branch 'adafruit/master' into ble-pairing 2019-08-05 16:35:44 -04:00
Jeff Epler
77bc1ba03e nrf: PWMAudioOut: Remove the need to wait in "pause"
The original formulation was because I saw the need to avoid a transition
from playing to stopped exactly when a resume was taking place.  However,
@tannewt was concerned about this pause causing trouble, because it could
be relatively lengthy (several ms even in a typical case).

After reflection, I've convinced myself that updating the registers
in this order in resume avoids a window where a "stopped" event can
be missed as long as the shortcut is updated first.

Testing re-performed: pause/resume testing of looped RawSample and
WaveFile audio sources.
2019-08-03 08:19:25 -05:00
Jeff Epler
4bae29b925 nrf: enable link-time optimization
Testing performed: installed freshly built .uf2 on a Particle Xenon.
Checked that circuitpython still starts.
Checked that the size of all .uf2 files for nrf builds are plausible.

Aside from memory savings, the performance of Python code (pystone)
increased by about +14%.

However, this adds about 12-16 seconds to each nrf build.

Timings & Sizes (build system: i5-3320M, -j5 parallelism on 4 threads):

Before:
$ make -j5 BOARD=particle_xenon
765004 bytes free in flash out of 1048576 bytes ( 1024.0 kb ).
232076 bytes free in ram for stack out of 245760 bytes ( 240.0 kb ).
68.54user 11.83system 0:34.34elapsed 234%CPU
pystones before: 570

After:
$ make -j5 BOARD=particle_xenon
804284 bytes free in flash out of 1048576 bytes ( 1024.0 kb ).
232072 bytes free in ram for stack out of 245760 bytes ( 240.0 kb ).
71.06user 11.77system 0:46.91elapsed 176%CPU
pystones after: 650

Timings on travis:

Before:
Build feather_nrf52840_express for pl took 55.79s and succeeded
Build feather_nrf52840_express for zh_Latn_pinyin took 3.18s and succeeded

After:
Build feather_nrf52840_express for pl took 62.72s and succeeded
Build feather_nrf52840_express for zh_Latn_pinyin took 19.10s

Closes: #1396
2019-08-02 20:59:47 -05:00
Dan Halbert
7ce3776b80 WIP: rework of Characteristic properties; enhance Descriptor; not tested 2019-08-02 17:57:31 -04:00
Jeff Epler
28b7cbfca6 nrf: Mark interrupt vectors as used 2019-08-02 07:53:35 -05:00
jepler
34e2bab96a nrf: Implement RUNMODE_BOOTLOADER and RUNMODE_SAFE_MODE 2019-08-01 18:53:07 -05:00
Jeff Epler
76f65ac694 Implement play/pause
.. and also incidentally fix a problem where a RawSample could only
be looped 131070 times.
2019-07-31 20:02:56 -05:00
Scott Shawcroft
eee759455a
Merge pull request #2018 from keith-packard/snekboard
Add board support for keithp.com SnekBoard
2019-07-31 16:38:51 -07:00
Jeff Epler
b0f7c7bc4c Merge remote-tracking branch 'origin/master' into nrf-pwm-audio 2019-07-31 16:32:54 -05:00
Dan Halbert
ee518b9141 Merge remote-tracking branch 'adafruit/master' into ble-pairing 2019-07-31 11:22:48 -04:00
Dan Halbert
91d791afd0 cleanup adapter.address; add uniquish suffix to BLE device name 2019-07-31 00:30:24 -04:00
Scott Shawcroft
366fdcce18
Merge pull request #2011 from tannewt/ssd1322
Add knobs for SSD1322 and two displayio fixes.
2019-07-30 14:15:37 -07:00
Scott Shawcroft
9dd56b1566
Merge branch 'master' into snekboard 2019-07-30 14:12:08 -07:00
Dan Halbert
83129b8c63 BLE: peripheral client pairing (not yet bonding); fix time doc formatting 2019-07-30 14:26:26 -04:00
wallarug
ecfffac3a8
Delete samd51x19-bootloader-external-flash-crystalless.ld 2019-07-30 19:48:35 +10:00
wallarug
ff6ae1aefb
Update mpconfigboard.mk to use standard linker file 2019-07-30 19:13:33 +10:00
Jeff Epler
b72352949b PWM audio: Rename AudioOut -> PWMAudioOut, _audioio_ -> _audiopwmio_ 2019-07-29 18:39:00 -04:00
Keith Packard
c6e4ddc88a boards/snekboard: Delete SPI object reference
Snekboard does not expose any pins for SPI to the user, so delete
the SPI object reference as that won't work.

Signed-off-by: Keith Packard <keithp@keithp.com>
2019-07-29 13:45:52 -07:00
Keith Packard
9a37c8a4b3 boards/snekboard: Add pin aliases for UART and I2C
Allow users to use TX/RX and SDA/SCL names.

Signed-off-by: Keith Packard <keithp@keithp.com>
2019-07-29 13:45:06 -07:00
Keith Packard
4387ecfdfb Update snekboard PID to official value
Snekboard has been assigned the following PIDs:

	PID 0x004D  # bootloader
	PID 0x804D  # arduino
	PID 0x804E  # circuitpython

Signed-off-by: Keith Packard <keithp@keithp.com>
2019-07-29 13:15:18 -07:00
Keith Packard
326df70ac2 Fix snekboard names
Manufacturer -- keithp.com
Product -- snekboard

Signed-off-by: Keith Packard <keithp@keithp.com>
2019-07-29 13:15:18 -07:00
Keith Packard
56f710f64f Add board support for keithp.com SnekBoard
This is another SAMDG2118A design with built-in 9V motor controllers
that are designed to be used with Lego PowerFunctions devices.

Signed-off-by: Keith Packard <keithp@keithp.com>
2019-07-29 13:14:37 -07:00
wallarug
dc1eb73ee7
Merge branch 'master' into wallarug-robohat 2019-07-29 21:53:49 +10:00
wallarug
8974c7e843
Added BUTTON to pins.c 2019-07-29 16:37:53 +10:00
wallarug
9e0bea405d
Added BUTTON to pins.c 2019-07-29 16:37:21 +10:00
wallarug
4d30efdc2a
Updated pins.c for GROVE. 2019-07-29 16:29:48 +10:00
wallarug
8838e25cb2
Update pins.c 2019-07-29 16:28:35 +10:00
sommersoft
8eab946c5b
Merge pull request #2003 from C47D/travis_check_new_boards
Add check to travis to make sure new boards are built, fix #1886
2019-07-28 22:41:59 -05:00
Dan Halbert
28ca05ccdc allow discovery from central or peripheral 2019-07-27 13:22:15 -04:00
wallarug
0f30070d58 updated naming schema to match other boards 2019-07-27 17:44:42 +10:00
wallarug
b06fa48735 updated a few files 2019-07-27 16:59:07 +10:00
wallarug
9c57f52d1e updated pins.c for robohat 2019-07-27 16:56:03 +10:00
wallarug
24e84adc6d further robohat cleanups 2019-07-27 16:38:47 +10:00
wallarug
e2b83e2dd9 minor changes robohat d21 2019-07-27 16:36:13 +10:00
wallarug
36008de2ed added custom ld file for samd51 no crystal, ext flash 2019-07-27 16:29:30 +10:00
wallarug
eda3423e35 updated to v1.7 board (samd51) 2019-07-27 16:27:41 +10:00
Jeff Epler
a183425e00 ports/nrf: Implement audioio.AudioOut using PWM
This implements AudioOut, with known caveats:
 * pause/resume are not yet implemented (this is just a bug)
 * at best, the sample fidelity is 8 bits (this is a hardware limitation)

Testing performed:

My test system is a Particle Xenon with a PAM8302 op-amp
https://www.adafruit.com/product/2130 and 8-ohm speaker.  There's no
analog filtering between the Xenon's PWM pin and the "A+" input of
the amplifier; the "A-" pin is disconnected.  It is powered from
VUSB.

I used pin D4, which is *NOT* listed as a low-speed-only pin, but
the code does NOT switch the pin to high drive.  This is related to
an open issue for general inability to set drive level for pins
being used by a "special function" on nrf:
https://github.com/adafruit/circuitpython/issues/1270

Nothing about the code I've written should limit the usable pins.

All samples I played were 16-bit, generally monophonic at 11025Hz
and 22050Hz from the Debian LibreOffice package.
2019-07-26 07:57:11 -05:00
Jeff Epler
2bc704fe07 ports/nrf: factor out routines for allocating, freeing pwm channels 2019-07-26 07:52:37 -05:00
Scott Shawcroft
c61c874a6d
Reduce feather_m0_supersized build size
Make it match feather_m0_express
2019-07-26 00:31:41 -07:00
Scott Shawcroft
a87094e01f
Turn off GC opt to save space on Trinket Haxpress 2019-07-25 22:56:46 -07:00
Scott Shawcroft
4e7de436b4
Update constructors of boards with displays 2019-07-25 22:48:11 -07:00
Scott Shawcroft
d99d3bd471
Merge pull request #2010 from jepler/audiocore
audiocore: Factor from audioio
2019-07-25 13:52:30 -07:00
Jeff Epler
6b44e40ee8 audiocore: Factor from audioio
When nrf pwm audio is introduced, it will be called `audiopwmio`.  To
enable code sharing with the existing (dac-based) `audioio`, factor
the sample and mixer types to `audiocore`.

INCOMPATIBLE CHANGE: Now, `Mixer`, `RawSample` and `WaveFile` must
be imported from `audiocore`, not `audioio`.
2019-07-25 06:44:26 -05:00
Scott Shawcroft
8ec2d6ce49
Merge pull request #2007 from hierophect/F4xx-port-setup
Add STM32 Discovery F412ZG and F411RE support
2019-07-24 18:49:48 -07:00
Hierophect
295afaaf6c Update SystemCoreClock macro 2019-07-24 16:31:25 -04:00
Hierophect
a63df51893 Requested changes, general cleanup 2019-07-24 14:21:27 -04:00
hathach
c921f6637f update tinyusb lib to 0.5.x 2019-07-24 16:46:31 +07:00
Hierophect
5cfde7b6ea Switch to submodule for cube files 2019-07-23 14:37:30 -04:00
Hierophect
9c1487cff6 Python doc generator fixes 2019-07-23 13:48:59 -04:00
Dan Halbert
82ab998cd5
Merge pull request #1998 from tannewt/monocolor
Add support for grayscale displays
2019-07-22 22:30:28 -04:00
Scott Shawcroft
7cb2aa2d62
Merge pull request #1986 from AnthonyDiGirolamo/patch-1
Update Arch Linux ARM compiler installation instructions
2019-07-22 19:29:53 -07:00
Hierophect
58630a844a Add feature conditionals and clean up 2019-07-22 12:58:28 -04:00
Tavish Naruka
e4d92a3aad
Fix incorrect preprocessor define NRFX_TIMER3/4
Should be NRF_TIMER3 and NRF_TIMER4
2019-07-22 20:07:05 +05:30
Scott Shawcroft
1d1b8703b6
Review feedback including NO_BRIGHTNESS_COMMAND macro 2019-07-19 16:11:13 -07:00
Scott Shawcroft
b9b9ef227f
Turn off bitbanging on Hallowing to save code space. 2019-07-19 16:10:33 -07:00
Scott Shawcroft
cdfc169ab6
Correct typo in line meant to turn off frequencyio on M0 which saves 2k code space. 2019-07-19 16:10:32 -07:00
Scott Shawcroft
6797ec6ed3
Add support for grayscale displays that are < 8 bit depth.
This also improves Palette so it stores the original RGB888 colors.

Lastly, it adds I2CDisplay as a display bus to talk over I2C. Particularly
useful for the SSD1306.

Fixes #1828. Fixes #1956
2019-07-19 16:06:11 -07:00
Hierophect
10b9ca5a92 pin selection cleanup, tinyUSB update 2019-07-19 15:09:45 -04:00
Scott Shawcroft
a98bfa628e
Merge pull request #2002 from ntavish/blip_improvements
Blip improvements
2019-07-19 10:52:08 -07:00
Tavish Naruka
724ce4acba enable libraries needed by BlipBoy Shield 2019-07-19 18:48:08 +05:30
Hierophect
734012aa8b Makefile cleanup 2019-07-18 17:55:57 -04:00
Hierophect
755b86e38b Deinit-capable USB on 411 2019-07-18 17:17:46 -04:00
Hierophect
43e8a4110f Add missing files for DigitalIO 2019-07-17 14:18:01 -04:00
Hierophect
45e73c414a fix gitignore 2019-07-17 14:14:03 -04:00
Hierophect
c588cc6db0 first pass of DigitalIO 2019-07-17 14:07:33 -04:00
Dan Halbert
364ee62d10 Address review comments. 2019-07-16 19:53:36 -04:00
Dan Halbert
1cf8a3e8d8 Merge remote-tracking branch 'adafruit/master' into ble-scanner 2019-07-11 18:42:16 -04:00
Hierophect
f31a0d9cf5 Serial REPL support 2019-07-11 13:41:10 -04:00
siddacious
d12e1a8d74
Merge pull request #1990 from kattni/pyruler
Adding PyRuler to CircuitPython.
2019-07-10 12:28:43 -07:00
Hierophect
a0e6975b9d Add some usb reference material, non functional 2019-07-10 14:26:57 -04:00
Kattni Rembor
582acdaa0a Requested changes. 2019-07-09 16:12:24 -04:00
Kattni Rembor
d905958db1 Adding PyRuler to CircuitPython. 2019-07-09 16:02:39 -04:00
Scott Shawcroft
6fad383367
Merge pull request #1925 from C47D/rgb_status
Initial support for RGB led as Status indicator, fixes #1382
2019-07-09 10:31:34 -07:00
Hierophect
7742a97c22 Add STM32F412-DISCO support, cleanup 2019-07-09 13:03:22 -04:00
Scott Shawcroft
f0cf9a4e75
Merge pull request #1988 from jandjstudios/datum
Add support for boards in the datum series.
2019-07-09 09:33:13 -07:00
Dan Halbert
6a001786a9 merge from master 2019-07-09 08:58:49 -04:00
Dan Halbert
118b26b335 UARTClient now works both directions 2019-07-09 00:21:46 -04:00
Scott Shawcroft
f4a64a2e80
Merge pull request #1989 from rce1086/master
Added conditional compilation around selection of TX pad candidates
2019-07-08 14:07:04 -07:00
Carl Elkins
64507207da Added conditional compilation around selection of TX pad candidates
Original code was correct for SAMD21
New code for SAMD51 only permits pad-0 for TX
2019-07-08 02:08:39 +01:00
Dan Halbert
09ddff8df1 WIP: Need descriptors for Central CCCD discovery; not done yet 2019-07-07 00:07:47 -04:00
jandjstudios
46b7575550 Initial commit to support boards in the datum series. 2019-07-06 13:41:03 -07:00
Scott Shawcroft
5610e05b8c
Fix up nrf so that it is initialized properly. Also, do not reset
it's pins.
2019-07-06 12:48:16 -07:00
iot49
4c72a3991e updated samd and esp8266 ports 2019-07-05 10:01:51 -07:00
Anthony DiGirolamo
55f15e3c05
Update Arch Linux ARM compiler installation instructions
- Add copy-pasteable Arch Linux `arm-none-eabi-gcc` install line similar to Ubuntu example
- Add `arm-none-eabi-newlib` as a required package for Arch
- Reformat Ubuntu and Arch install code-blocks to catch the eye for the impatient

Arch Linux changed their packaging for [arm-none-eabi-gcc](https://www.archlinux.org/packages/community/x86_64/arm-none-eabi-gcc/) by creating [arm-none-eabi-newlib](https://www.archlinux.org/packages/community/any/arm-none-eabi-newlib/) as an optional package. Without it users will get errors about missing header files like:

```
In file included from asf4/samd51/include/samd51j19a.h:49,
                 from asf4/samd51/include/sam.h:38,
                 from ./mpconfigport.h:31,
                 from ../../py/mpconfig.h:45,
                 from ../../py/emitnx64.c:3:
/usr/lib/gcc/arm-none-eabi/9.1.0/include/stdint.h:9:16: fatal error: stdint.h: No such file or directory
    9 | # include_next <stdint.h>
      |                ^~~~~~~~~~
compilation terminated.
```
2019-07-04 11:14:50 -07:00
iot49
6e5d70fa19 changed type of receiver_buffer_size to uint16_t 2019-07-03 12:02:01 -07:00
Dan Halbert
bf8a35b2f8 WIP: CharacteristicBuffer for Central; not working: need to set remote Characteristic Service 2019-07-02 22:34:54 -04:00
Hierophect
040acc3a32 remove dependencies for stable build 2019-07-01 19:47:10 -04:00
Radomir Dopieralski
e45eac5016 Switch the terminal font for ugame10
I designed this really tiny, minimalist font for use on very small
displays. On uGame it lets one see the whole text that CircuitPython
prints on boot. The characters are 4x6 pixels each, and they are
optimized for legibility (large x-height, right angles, blocky shapes).

It might make sense to also use that font in other boards.
2019-07-01 23:05:07 +02:00
Dan Halbert
6ea01ea9b0 Central is connecting; characteristics can be read and written 2019-06-29 00:20:06 -04:00
Hierophect
94a2eff05c remove build, fix link issues) 2019-06-28 19:22:23 -04:00
Hierophect
04a9bc0d35 case changes 2019-06-28 16:45:07 -04:00
Hierophect
b93f93f174 name change but actually 2019-06-28 16:34:27 -04:00
Hierophect
caed59ec64 name change 2019-06-28 16:21:13 -04:00
Hierophect
16ba035ba7 first commit, very crude 2019-06-28 15:36:08 -04:00
Scott Shawcroft
0cce7fcaa3
Merge remote-tracking branch 'adafruit/4.0.x' into merge_in_402 2019-06-27 14:06:26 -07:00
Scott Shawcroft
fe507db45f
Shrink pIRkey build down.
Rollback HID to save string space and remove board mapping for
default buses that don't exist.
2019-06-26 16:49:23 -07:00
Scott Shawcroft
d3adfde22a
Merge pull request #1968 from adafruit/4.0.x
Merge in nrf neopixel fix
2019-06-25 11:35:58 -07:00
Dan Halbert
140904ec84 getting Scanner to work 2019-06-22 22:10:15 -04:00
Dan Halbert
4881e1ff55 WIP: Central compiles; now will test 2019-06-21 18:04:04 -04:00
Dan Halbert
23bd861c9a nrf: fix neopixel_write pwm buf size calc 2019-06-20 18:02:14 -04:00