Commit Graph

106 Commits

Author SHA1 Message Date
Scott Shawcroft bfd531281a
Fix default values on last line. 2019-01-15 10:15:55 -08:00
Scott Shawcroft 747f2cfe26
Add subclass support to displayio.
Also, swap make_news to accept a kwarg map and refine param checking.

Fixes #1237
2019-01-14 17:29:19 -08:00
Scott Shawcroft a14762a16c
Add support for rendering a shape.
Fixes #1171
2019-01-14 17:29:15 -08:00
Scott Shawcroft 62a8cc2825
Merge pull request #1453 from tannewt/text_on_pyportal
Enable the display on pyportal
2019-01-11 10:33:16 -08:00
Dan Halbert 50ee5ef24c merge translations; add bleio comments; fix minor sphinx issues in midi 2019-01-10 21:12:17 -05:00
Scott Shawcroft 6594937a65
Support rendering groups inside groups 2019-01-10 17:30:16 -08:00
Scott Shawcroft 3dd59c3d5f
Polish thanks to Dan's feedback 2019-01-10 11:00:40 -08:00
Scott Shawcroft b5e40f52c2
Add USB MIDI support for SAMD and nRF.
The API should be identical to using a UART for MIDI.

Fixes #672
2019-01-09 14:02:11 -08:00
Dan Halbert f66f55b4ed add CharacteristicBuffer; UART seems to work! 2019-01-07 22:46:20 -05:00
Dan Halbert 1dc3957e72 LocalPeripheral is now Peripheral; more work on basic GATTS support; UART not working yet 2018-12-30 22:33:49 -05:00
Dan Halbert ef39e72c7c free event handlers on reset; fix typo in Broadcaster 2018-12-29 13:55:10 -05:00
Dan Halbert 4d1f0ec07b Add Broadcaster. Reset correctly on reload. 2018-12-28 23:34:23 -05:00
Dan Halbert 4167bf5b24 wip: advertising works, but not connection 2018-12-27 00:04:04 -05:00
Dan Halbert a7a24096f4 bleio WIP: redo for more immutability; use sd_* routines for internal flash write 2018-12-07 16:52:47 -05:00
Dan Halbert f6c73b35f9
Merge pull request #1323 from notro/os_mkdir_a_b
shared-module/os: Fix os.mkdir('a/b')
2018-11-27 17:08:51 -05:00
Noralf Trønnes 28383afa11 shared-module/os: Fix os.mkdir('a/b')
This fixes commit a99f9427420d("'/' and '\' are also acceptable ends of the path now") which broke mkdir.
The problem is where the directory name is a single letter like this:
>>> os.mkdir('a')
>>> os.mkdir('a/b')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: [Errno 17] File exists
>>> os.mkdir('a/bb')
>>>

I wasn't smart enough to fix this in the oofatfs library, so I did it in the os shared module by
creating a path lookup function for the os methods that only deals with directories. I reverted
the library change introduced by the aforementioned commit.

This means that os.stat and os.rename can't handle trailing slashes. This is to avoid allowing
filenames with trailing slashes to pass through. In order to handle trailing slashes for these
it would be necessary to check if it really is a directory before stripping. I didn't do this
since the original issue was to make os.chdir tolerate trailing slashes.

There's an open MicroPython issue #2929 wrt. trailing slashes and mkdir.
2018-11-09 19:20:56 +01:00
Scott Shawcroft 168e23e466
Build refinement to handle warnings and quiet output 2018-11-09 00:11:43 -08:00
Scott Shawcroft 9d91111b1b
Move atmel-samd to tinyusb and support nRF flash.
This started while adding USB MIDI support (and descriptor support is
in this change.) When seeing that I'd have to implement the MIDI class
logic twice, once for atmel-samd and once for nrf, I decided to refactor
the USB stack so its shared across ports. This has led to a number of
changes that remove items from the ports folder and move them into
supervisor.

Furthermore, we had external SPI flash support for nrf pending so I
factored out the connection between the usb stack and the flash API as
well. This PR also includes the QSPI support for nRF.
2018-11-08 17:25:30 -08:00
Dan Halbert 64d457dad9 bring bleio PR up to date 2018-11-07 14:12:22 -05:00
caternuson 46f1a0719e add channels and bits_per_sample to audioio.WaveFile 2018-10-31 18:08:10 -07:00
Nick Moore b714f5d650 Add "dhcp" property to turn DHCP on and off 2018-10-25 11:29:27 +11:00
arturo182 b5e5805bb4 bleio: Remove redundant struct field 2018-10-21 15:59:46 +02:00
arturo182 17f13ecc2c nrf: Cleanup of the ble driver
Moved the functions to classes that they belong to.
2018-10-21 15:54:13 +02:00
arturo182 3bd65fbae5 nrf: Move the Peripheral class to bleio as Device
This was the last class from ubluepy and so that module is now gone.
The Device class offers both Peripheral and Central functionality.
See the inline docs for more info.
2018-10-21 15:50:45 +02:00
arturo182 bda734223e nrf: Move the Service class from ubluepy to the shared bleio module 2018-10-21 15:43:51 +02:00
arturo182 cc78249226 nrf: Move the Characteristic class from ubluepy to the shared bleio module 2018-10-21 15:43:48 +02:00
arturo182 fb422ccf5e bleio: Remove SAMD mention in include guard
Damn copy-paste!
2018-10-21 15:43:43 +02:00
arturo182 1c6bf9a150 bleio: Move the Scanner class to a shared module 2018-10-21 15:43:29 +02:00
arturo182 7390dc7dab bleio: Move ScanEntry to shared module and add a new AdvertisementData class 2018-10-21 15:43:24 +02:00
arturo182 345334aaf1 bleio: Add a new Address class
Use the new in the Adapter singleton.
2018-10-21 15:43:21 +02:00
Nick Moore 06894be294 timer ticks for DHCP state machine for wiznet 2018-10-16 23:10:18 +11:00
Nick Moore 45974978ef fixup 2018-10-16 23:09:55 +11:00
Nick Moore a15f3361aa add mechanism for timer ticks in NICs 2018-10-16 23:09:25 +11:00
Nick Moore 1f760bded8 header file cleanup for wiznet 2018-10-16 23:07:58 +11:00
Nick Moore a4a0cf826b fix doc comments, translations again 2018-10-11 17:02:29 +11:00
Nick Moore bb239052ea Split wiznet driver into shared-bindings vs shared-module 2018-10-11 15:05:25 +11:00
Nick Moore aab28748bb Merge remote-tracking branch 'origin/master' into circuitpython/nickzoic/703-wiznet-5500-native 2018-10-11 14:19:10 +11:00
Nick Moore 823ff779ca network module c api into shared-module 2018-10-11 14:02:18 +11:00
Scott Shawcroft 6da25c8893
Rename stop to stop_voice in case we want stop to stop everything later. 2018-10-09 13:28:00 -07:00
Nick Moore 9b36d33df1 move random mac address function into network module 2018-10-09 13:12:04 +11:00
Nick Moore 6e624b9c6a Split wiznet.WIZNET5K off into its own file 2018-10-09 13:05:58 +11:00
Scott Shawcroft 3c6812f2c1
Fix M0 math 2018-10-05 15:19:09 -07:00
Scott Shawcroft 8587d8edf0
Fix voice ending in the middle of a buffer. 2018-10-05 15:19:08 -07:00
Scott Shawcroft 76008ce304
Introduce audioio.Mixer which can mix multiple audio samples
to produce a single sample.

Only works with 16 bit samples on the M4.

Fixes #987
2018-10-05 15:12:23 -07:00
Nick Moore d33f6214f1 modify modnetwork and modusocket for circuitpython 2018-10-04 22:02:25 +10:00
Nick Moore 3c32d046bf Copy wiznet module across from MicroPython 2018-10-04 21:22:09 +10:00
Scott Shawcroft 75d497bcc8
More explicit init in Group 2018-09-13 10:42:12 -07:00
Scott Shawcroft f21cf15c38
Add OnDiskBitmap which loads pixel data straight from disk.
Also, renamed Sprite's palette to pixel_shader so it can be
anything that produces colors based on values (including color values).
Added a ColorConverter that converts RGB888 (found in bitmaps) to
RGB565 for the display.

Fixes #1182
2018-09-12 15:25:59 -07:00
Scott Shawcroft 1683eb913d
Minor tweaks based on feedback 2018-09-06 14:49:49 -07:00
Scott Shawcroft 121903b6ee
Tweaks based on feedback 2018-08-31 14:21:48 -07:00