Roy Hooper
a4bbf35092
Merge branch 'master' into new-pixelbuf-api
2019-12-02 14:06:33 -05:00
Dan Halbert
d089f16656
'seconds'
2019-11-27 14:49:39 -05:00
Dan Halbert
dd6dfeb30a
Squeeze pyruler zh_Latn_pinyin
2019-11-27 14:47:35 -05:00
Dan Halbert
b32a9192df
make UART.write be blocking on SAMD; add timeout property
2019-11-27 13:05:29 -05:00
Roy Hooper
a9624fff25
add show
2019-11-26 21:28:41 -05:00
Roy Hooper
56720eae0a
remove unnecessary intermediate mp_obj_subscr wrapper
2019-11-26 18:39:08 -05:00
Scott Shawcroft
3fc58cee38
Merge remote-tracking branch 'adafruit/master' into support_extended_advertising
2019-11-26 13:12:43 -08:00
Jeff Epler
e188ae8b23
time: struct_time: allow construction like a namedtuple, too
...
Whenever there is more than one argument, delegate the operation to
namedtuple_make_new. This allows other circuitpython-compatible
idioms, like with keywords
time.struct_time(tm_year=2000, tm_mon=1, tm_mday=1, tm_hour=0,
tm_min=0, tm_sec=14, tm_wday=5, tm_yday=5, tm_isdst=-1)
with 9 positional arguments, etc.
The only vaguely plausible CPython behavior still not permitted in
CircuitPython that I found is constructing a timetuple from a length-9
list, a la
time.struct_time(list(time.localtime())
Even better, by getting rid of an error message, the build shrinks a
tiny bit.
2019-11-26 08:45:44 -06:00
Jeff Epler
8f24ea48fb
time: struct_time: allow construction from another struct_time
...
This doesn't cover ALL the cases that CPython permits for construction
of a struct_time, but it at least makes constructing from any namedtuple
work.
Closes : #2326
2019-11-26 08:45:40 -06:00
Roy Hooper
0ef9344c17
make pixelbuf iterable
2019-11-25 20:21:00 -05:00
Roy Hooper
d4ed258b74
remove unnecessary qstrs
2019-11-25 20:20:51 -05:00
Jeff Epler
5115fdaa6f
shared-bindings: I2SOut: Ensure object is deinitialised
...
(or deinitialized, for those of us on this side of the pond)
Otherwise, a sequence like
```
audio = audiobusio.I2SOut(bit_clock=board.D6, word_select=board.D9, data=board.D10)
sine_wave_sample = audiocore.RawSample(sine_wave)
audio.play(sine_wave_sample, loop=True)
del audio
```
could free the memory associated with audio without stopping the
related background task. Later, when fresh objects are allocated within
a now-freed memory region, they can get overwritten in the background
task, leading to a hard crash.
This presumably can affect multiple I2S implementations, but it was
reported against the nRF one.
2019-11-25 09:53:55 -06:00
Roy Hooper
a9baa441c9
disable -Wunused-parameter on subscr functions
2019-11-23 13:52:14 -05:00
Roy Hooper
6108fa3766
Merge branch 'master' into new-pixelbuf-api
2019-11-23 12:22:04 -05:00
Roy Hooper
c770ccd939
make ->subscr take an instance to pass when instance_subscr is called from subscr.
2019-11-23 12:09:26 -05:00
Scott Shawcroft
743bc829ab
Clean up debug changes
2019-11-21 16:39:57 -08:00
Scott Shawcroft
39f4046f70
Fix pairing when peripheral. Central untested.
2019-11-21 16:32:42 -08:00
Scott Shawcroft
98e55eb577
Only add module when printing exception.
2019-11-21 12:26:25 -08:00
Scott Shawcroft
521c7531bc
Improve printing to include _bleio. prefix for type.
2019-11-21 11:04:17 -08:00
Scott Shawcroft
5e857fdb67
Use BluetoothError in _bleio
...
This better differentiates errors than using OSError everywhere.
2019-11-20 14:02:15 -08:00
Scott Shawcroft
11c2c3443f
Add support for extended (>31 byte) BLE advertisements.
2019-11-19 13:55:58 -08:00
Hierophect
81223c76bd
revert error
2019-11-15 13:04:25 -05:00
Hierophect
2c6781f74d
move neopixel_in_use flag to shared-bindings
2019-11-15 12:59:52 -05:00
Hierophect
de5691acf5
Add never_reset and reset to pin common hal, adjust files
2019-11-15 12:47:00 -05:00
Dan Halbert
8584c1e824
Fix start_scan timeout default value
2019-11-13 21:34:20 -05:00
Dan Halbert
8cd2f87e99
Merge pull request #2236 from tannewt/bleio_tweaks
...
Refine _bleio
2019-11-04 22:27:54 -05:00
Scott Shawcroft
47e50e5659
Merge remote-tracking branch 'adafruit/master' into bleio_tweaks
2019-11-01 13:20:58 -07:00
Dan Halbert
43b8d5e8ab
Update I2C and SPI documentation
2019-10-29 09:58:44 -04:00
Dan Halbert
56ac41fabf
Merge pull request #2240 from theacodes/fix-2086
...
Track unadjusted PWM duty cycle to avoid accumulating conversion errors
2019-10-28 14:50:01 -04:00
Dan Halbert
cc13fc3433
Merge pull request #2247 from jepler/comment-doc-typos
...
Comment doc typos
2019-10-28 14:47:52 -04:00
Jeff Epler
c208586bf1
audioio: correct trivial typo
2019-10-27 16:42:18 -05:00
Jeff Epler
0657884fca
audiobus: correct trivial typo
2019-10-27 16:42:04 -05:00
Jeff Epler
978cec0316
pixelbuf: correct trivial typos
2019-10-27 16:41:56 -05:00
Thea Flowers
6782948751
Note behavior in documentation
2019-10-25 10:56:41 -07:00
Thea Flowers
4a55c48dbf
Improve documentation for rtc
.
...
- Add examples for `rtc.RTC.datetime`.
- Add type for `rtc.RTC.calibration`.
- Expand on use cases for `rtc.set_time_source`.
2019-10-23 15:48:34 -07:00
Scott Shawcroft
91c9d519ae
Refine comments and switch prefix_len to size_t
2019-10-22 23:09:56 -07:00
Scott Shawcroft
ae30a1e5aa
Refine _bleio
...
This PR refines the _bleio API. It was originally motivated by
the addition of a new CircuitPython service that enables reading
and modifying files on the device. Moving the BLE lifecycle outside
of the VM motivated a number of changes to remove heap allocations
in some APIs.
It also motivated unifying connection initiation to the Adapter class
rather than the Central and Peripheral classes which have been removed.
Adapter now handles the GAP portion of BLE including advertising, which
has moved but is largely unchanged, and scanning, which has been enhanced
to return an iterator of filtered results.
Once a connection is created (either by us (aka Central) or a remote
device (aka Peripheral)) it is represented by a new Connection class.
This class knows the current connection state and can discover and
instantiate remote Services along with their Characteristics and
Descriptors.
Relates to #586
2019-10-21 18:57:03 -07:00
Roy Hooper
2970680e6a
fix show and fix step > 1
2019-10-20 19:54:25 -04:00
Dan Halbert
eca73436c9
Merge remote-tracking branch 'adafruit/master' into cpu-voltage
2019-10-15 09:03:24 -04:00
Kamil Tomaszewski
150f9041e3
Fix unsafe floating point comparison
2019-10-14 09:13:35 +02:00
Kamil Tomaszewski
c67b2c1661
Return None if reference_voltage is 0.0
2019-10-14 08:22:14 +02:00
Dan Halbert
c1ab2486f9
return chip vcc value
2019-10-12 15:42:15 -04:00
Roy Hooper
dc8c27d129
make dotstar byteorder constants start with P. fix small bugs.
2019-10-06 22:44:00 -04:00
Roy Hooper
55c688cbeb
restructure to be subclassable
2019-10-05 15:53:53 -04:00
Roy Hooper
000ae6bf17
support subclasses
2019-10-05 13:47:40 -04:00
Roy Hooper
1051001495
Merge branch 'master' into new-pixelbuf-api
2019-10-03 19:06:55 -04:00
Scott Shawcroft
6ad860a963
Merge pull request #2101 from matthewnewberg/display_io_dither
...
Add random dithering to ColorConverter
2019-09-09 10:11:07 -07:00
Scott Shawcroft
d9e0641606
Set dither default to False and document it
2019-09-08 21:30:52 -07:00
Matthew Newberg
8e55232492
Use kwargs for dither in ColorConverter constructor
2019-09-06 16:23:24 -04:00
Matthew Newberg
b2fb5ac1c1
Fix comment on color converter
2019-09-06 16:11:15 -04:00
Matthew Newberg
4604a69498
Move dither parameter to ColorConverter constructor and parameter
2019-09-05 21:55:45 -04:00
Dan Halbert
fca440fb66
Merge pull request #2113 from tannewt/displayio_hidden
...
Add .hidden to TileGrid and Group
2019-09-04 15:48:00 -04:00
Scott Shawcroft
321b57a5d2
Merge pull request #2080 from sommersoft/mixer_voice
...
Add audiocore.MixerVoice
2019-09-04 12:46:59 -07:00
Radomir Dopieralski
5f6228b6f0
Fix transactions in _stage after displayio changes
...
Also, move the rendering setup code to shared-module from
shared-bindings.
In CP 5.0, displayio_display_core_set_region_to_update now starts
its own transaction, so it has to be moved outside of the transaction
started by the render call.
2019-09-04 16:41:58 +02:00
sommersoft
da912e8c74
doc cleanup
2019-09-03 22:44:43 -05:00
Scott Shawcroft
949f8761b8
Add .hidden to TileGrid and Group
...
This allows for one to preserve ordering within a Group while
hiding something temporarily.
Fixes #1688
2019-09-03 16:15:27 -07:00
sommersoft
b1c3d47413
Merge branch 'master' of https://github.com/adafruit/circuitpython into mixer_voice
2019-09-01 21:16:12 -05:00
Matthew Newberg
d87bfaf480
Add random dithering to ColorConverter
2019-08-31 22:07:09 -04:00
sommersoft
398e7ff6d3
doc update
2019-08-31 16:06:41 -05:00
sommersoft
f82c61732a
enable Mixer backwards compatibility (when audiomixer is available)
2019-08-31 16:06:16 -05:00
sommersoft
8120f5cdad
Merge branch 'master' of https://github.com/adafruit/circuitpython into mixer_voice
2019-08-29 22:14:53 -05:00
sommersoft
6a68d0b4d0
bring back 'mixer.play()' & 'mixer.stop_voice()'
2019-08-29 22:12:12 -05:00
sommersoft
e618441e18
eval the expression vs [un]defined
2019-08-29 22:09:45 -05:00
Dan Halbert
7a64af9280
rename bleio module to _bleio
2019-08-29 18:44:27 -04:00
Dan Halbert
b11b7916fd
address minor issues: typos, make translate, and sphinx
2019-08-29 17:58:21 -04:00
Dan Halbert
f17059b10b
another API rework: less abstraction leakage
2019-08-28 23:15:22 -04:00
Dan Halbert
19c59b41ed
bleio: API change to create and connect related objects simulatenously: no orphan bleio objects
2019-08-28 16:15:09 -04:00
Dan Halbert
a72bcab0fd
Merge remote-tracking branch 'adafruit/master' into bleio-api-revamp
2019-08-28 16:09:18 -04:00
Scott Shawcroft
966a48b23a
More size_t usage
2019-08-27 12:49:46 -07:00
Scott Shawcroft
d956b3b359
Merge remote-tracking branch 'adafruit/master' into remove_i2c_stop_kwarg
2019-08-27 11:23:30 -07:00
Scott Shawcroft
bea77c651a
Minor renames
2019-08-26 16:37:59 -07:00
Dan Halbert
76446f634b
BLE HID WIP: works everywhere except iOS; fixed a bunch of bugs; pretend bonding
2019-08-25 21:38:13 -04:00
sommersoft
750ffcc81a
docs: correct audiomixer refs
2019-08-25 14:57:29 -05:00
sommersoft
df5568d993
move Mixer & MixerVoice from 'audiocore' to 'audiomixer'
2019-08-24 23:36:18 -05:00
sommersoft
b54fd961cb
Merge branch 'master' of https://github.com/adafruit/circuitpython into mixer_voice
2019-08-24 17:14:05 -05:00
sommersoft
db32a79596
comment clean up
2019-08-24 16:21:30 -05:00
sommersoft
d02d474cac
fix MixerVoice 'get_playing'
2019-08-24 08:20:26 -05:00
sommersoft
93e557e167
docs: make MixerVoice.level a property
2019-08-24 07:57:55 -05:00
sommersoft
2c55b40a53
use a MixerVoice constructor
2019-08-24 07:56:12 -05:00
Scott Shawcroft
7324b70a7c
Rework based on Dan's review
2019-08-23 15:27:21 -07:00
Scott Shawcroft
5662b5813e
Use size_t and document buffers can be the same.
2019-08-23 12:13:11 -07:00
Scott Shawcroft
72e7ffa324
More cleanup
2019-08-22 16:16:09 -07:00
sommersoft
1ec4faee55
remove MixerVoice deinit & context managers
2019-08-22 17:59:19 -05:00
Scott Shawcroft
f2a1972ba8
Add refresh_time to use if busy_pin is not given
2019-08-22 14:23:33 -07:00
Scott Shawcroft
3a98de1236
Add reset() to display busses to detect whether it works
2019-08-22 14:23:33 -07:00
Scott Shawcroft
24b30965c4
Refresh ePaper displays once code.py is done running
2019-08-22 14:23:32 -07:00
Scott Shawcroft
36a23e0fe3
Rework refresh API and factor common display stuff out
...
NOT TESTED! Just compiles
Fixes #1691
2019-08-22 14:23:27 -07:00
Scott Shawcroft
c247e7df9c
Begin refresh rework.
2019-08-22 14:08:33 -07:00
Scott Shawcroft
70680d5b22
EPaper displays work mostly.
2019-08-22 14:08:33 -07:00
Scott Shawcroft
8fa8737465
Initial ePaper work
2019-08-22 14:08:32 -07:00
Scott Shawcroft
82d436d05e
Add writeto_then_readfrom to I2C API. Deprecate stop kwarg.
...
writeto_then_readfrom has been added to do a write -> no stop ->
repeated start -> read sequence. This is done to match the
capabilities of Blinka on Linux.
Code that uses stop=False will not work correctly on Blinka.
To fix, if stop=False then use writeto_then_readfrom otherwise use
writeto then readfrom_into.
First step in #2082
2019-08-22 12:34:46 -07:00
Dan Halbert
7cc15e56c8
make translate
2019-08-22 15:20:23 -04:00
Dave Astels
99a3da3b60
Get rid of the last bits of array dependancy
2019-08-21 15:24:39 -04:00
Dave Astels
d547d59cba
Merge remote-tracking branch 'adafruit/master' into displayio_fill_area
2019-08-21 15:02:51 -04:00
Dave Astels
8bbab01316
Remove unneeded lines
2019-08-21 13:57:52 -04:00
sommersoft
5cd04366fe
remove 'if float' pre-processor checks
2019-08-20 22:39:26 -05:00
Dave Astels
56aad056da
getting the buffer info should happen first (due to its check)
2019-08-20 17:00:24 -04:00
Dave Astels
eb0a8cc0bf
Move the get_buffer call earlier
2019-08-20 13:48:12 -04:00
Dave Astels
0fd886fa7f
Remove array cast
2019-08-20 13:45:58 -04:00
Dan Halbert
e00696de7f
merge from upstream and make translate
2019-08-20 13:06:23 -04:00