Commit Graph

339 Commits

Author SHA1 Message Date
brentru 1b7e213be4 fix terminalio not clearing on construct 2019-08-08 14:58:51 -04:00
Dan Halbert 243334da75 Merge remote-tracking branch 'adafruit/master' into ble-pairing 2019-08-05 23:06:24 -04:00
Scott Shawcroft 26f64dd8ec
Merge remote-tracking branch 'adafruit/4.1.x' into merge_in_410 2019-08-05 17:53:08 -07:00
Scott Shawcroft b675a27e16
Merge pull request #2000 from jepler/nrf-pwm-audio
Implement PWM audio out for the nrf port
2019-08-05 17:26:27 -07:00
Dan Halbert b67d04a5b1 Merge remote-tracking branch 'adafruit/master' into ble-pairing 2019-08-05 16:35:44 -04:00
sommersoft 065efb05b7 bring MixerVoice back to building state; update documentation 2019-08-03 11:20:06 -05:00
Radomir Dopieralski 9907e3fa28 Allow to specify pre-allocated buffer in audicore.WaveFile
It lets us re-use the same buffer for playing multiple files.
This also allows us to control the size of the buffer. Half of the
buffer will be used for the fist, and half for the second internal
buffer.
2019-08-03 14:15:19 +02:00
Dan Halbert 7ce3776b80 WIP: rework of Characteristic properties; enhance Descriptor; not tested 2019-08-02 17:57:31 -04:00
Radomir Dopieralski c1e5247d51 Add support for scaling to _stage
On high-resolution displays we can use 2x2 or even 3x3 pixels.
2019-08-02 22:55:55 +02:00
Dave Astels cd092df9d8 Merge remote-tracking branch 'adafruit/master' into displayio_fill_area 2019-07-31 18:46:41 -04:00
sommersoft 9939d0c4f4 Merge branch 'master' of https://github.com/adafruit/circuitpython into mixer_voice 2019-07-31 16:44:43 -05:00
Jeff Epler b0f7c7bc4c Merge remote-tracking branch 'origin/master' into nrf-pwm-audio 2019-07-31 16:32:54 -05:00
Dave Astels 1f9cb44fa3 Expose rotation with a property 2019-07-31 15:00:21 -04:00
Dan Halbert ee518b9141 Merge remote-tracking branch 'adafruit/master' into ble-pairing 2019-07-31 11:22:48 -04:00
Dan Halbert 28ca05ccdc allow discovery from central or peripheral 2019-07-27 13:22:15 -04:00
Jeff Epler 7b9d26cefe WavFile.h: include vfs_fat.h for pyb_file_obj_t definition
Without such a definition, this header is not self-contained, but
requires whoever included it to also include vfs_fat.h
2019-07-26 07:52:37 -05:00
Jeff Epler 54cde56ec5 audiopwmio: Add the shared files for this new module 2019-07-26 07:52:37 -05:00
Scott Shawcroft af8cfbedfb
Add knobs for SSD1322 and two fixes.
* Fix terminal clear after first successful code.py run.
* Fix transmitting too many bytes for column constraint with single
  byte bounds.
2019-07-25 15:41:12 -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
hathach c921f6637f update tinyusb lib to 0.5.x 2019-07-24 16:46:31 +07:00
Hierophect 58630a844a Add feature conditionals and clean up 2019-07-22 12:58:28 -04:00
Scott Shawcroft 1d1b8703b6
Review feedback including NO_BRIGHTNESS_COMMAND macro 2019-07-19 16:11:13 -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
Scott Shawcroft d9089f52ce
Fix it's -> its 2019-07-19 10:42:20 -07:00
Scott Shawcroft 4a6bdb6fe4
Track a dirty area for in-memory bitmaps
This fixes the bug that bitmap changes do not cause screen updates
and optimizes the refresh when the bitmap is simply shown on the
screen. If the bitmap is used in tiles, then changing it will
cause all TileGrids using it to do a full refresh.

Fixes #1981
2019-07-18 16:47:28 -07:00
Hierophect 43e8a4110f Add missing files for DigitalIO 2019-07-17 14:18:01 -04:00
Dan Halbert 364ee62d10 Address review comments. 2019-07-16 19:53:36 -04:00
Dan Halbert 6a001786a9 merge from master 2019-07-09 08:58:49 -04:00
Hierophect 040acc3a32 remove dependencies for stable build 2019-07-01 19:47:10 -04:00
Dan Halbert 140904ec84 getting Scanner to work 2019-06-22 22:10:15 -04:00
Dan Halbert 24ac1fdcab WIP: backup only; not compiled 2019-06-19 21:54:28 -04:00
Dan Halbert a1b5d800f3 Update copyrights; get ready for Central 2019-06-19 10:42:36 -04:00
Dan Halbert 35b9191857 Don't operate directly on bleio objects in shared-bindings: use common_hal
routines instead. Changes made but not yet tested.
2019-06-18 23:46:20 -04:00
Scott Shawcroft 13c3d06c6a
Merge pull request #1952 from tannewt/fixup_tilegrid_dirty
Fix TileGrid's dirty tracking when changing top left
2019-06-18 10:29:12 -07:00
Dan Halbert 1356819de1 Handle None for BLE name; fix ScanEntry bug; compile issue 2019-06-17 23:16:40 -04:00
Scott Shawcroft 4013bcde9e
Add baudrate to FourWire and shorten delay. 2019-06-17 17:48:05 -07:00
Scott Shawcroft 7490adf8e9
Use width for x. Thanks @deshipu 2019-06-17 16:23:38 -07:00
Scott Shawcroft da3d75f7b1
Fix TileGrid's dirty tracking when changing top left 2019-06-17 16:23:37 -07:00
Dan Halbert bed6d43a76 merge from upstream; WIP redo Address; no more AddressType 2019-06-13 21:55:07 -04:00
Scott Shawcroft 6f6dcafd90
Minor tweaks based on Dan's feedback 2019-06-13 00:34:19 -07:00
Scott Shawcroft a35d9b469d
Refactor deinit check to reduce code size. 2019-06-12 11:36:43 -07:00
Scott Shawcroft eb21fc3e31
Add partial display update support.
Different operations to the display tree have different costs. Be
aware of these costs when optimizing your code.
* Changing tiles indices in a TileGrid will update an area
covering them all.
* Changing a palette will refresh every object that references it.
* Moving a TileGrid will update both where it was and where it moved to.
* Adding something to a Group will refresh each individual area it
covers.
* Removing things from a Group will refresh one area that covers all
previous locations. (Not separate areas like add.)
* Setting a new top level Group will refresh the entire display.

Only TileGrid moves are optimized for overlap. All other overlaps
cause sending of duplicate pixels.

This also adds flip_x, flip_y and transpose_xy to TileGrid. They
change the direction of the pixels but not the location.

Fixes #1169. Fixes #1705. Fixes #1923.
2019-06-12 11:32:39 -07:00
Dan Halbert 4fc189b60c Merge latest 4.0.x fixes into master 2019-06-11 16:16:29 -04:00
Dan Halbert 62de2506e4 Include display objects in gc. 2019-06-06 17:49:32 -04:00
Carlos 671178c8c4 [shared-module/audioio/WaveFile.h] Change sample_rate from uint16_t to uint32_t so it matches the sample rate type parsed from the WAV header format, fix #1922 2019-06-04 21:31:30 -05:00
Dan Halbert 613e12f99f Replace Broadcaster with enhanced Peripheral 2019-06-03 20:40:05 -04:00
Scott Shawcroft 5d0791cafb
Fix off-by-one error
It caused the bottom and right edges to be one pixel short.
2019-05-31 15:50:55 -07:00
Scott Shawcroft 7a117f52ed
Make point 2 in areas exclusive and simplify full_coverage. 2019-05-22 15:00:47 -07:00
Scott Shawcroft 3fad7de8db
Rework the pixel computation to use areas
This changes the displayio pixel computation from per-pixel to
per-area. This is precursor work to updating portions of the screen
(#1169). It should provide mild speedups because bounds checks are
done once per area rather than once per pixel. Filling by area also
allows TileGrid to maintain a row-associative fill pattern even when
the display's refresh is orthogonal to it.
2019-05-21 17:41:06 -07:00
Scott Shawcroft 00c39805f1
Remove old comment 2019-05-15 14:17:09 -07:00
Scott Shawcroft 5608e273a0
Add index and remove to Group. 2019-05-15 11:33:16 -07:00
Scott Shawcroft 46164c6ec6
Merge pull request #1837 from nickzoic/circuitpython-nickzoic-1800-wiznet-socket
WIP: Circuitpython nickzoic 1800 wiznet socket
2019-05-10 11:31:18 -07:00
Nick Moore 0d08dde62e randomize tcp source port for adafruit/circuitpython#1800 2019-05-10 13:56:33 +10:00
Nick Moore af0bba0622 reset wiznet at network deinitialize adafruit/circuitpython#1800 2019-05-10 13:55:45 +10:00
Scott Shawcroft e64bbc41ec
Handle -scale to 0 correctly in Group
Fixes #1839
2019-05-09 11:38:30 -07:00
Nick Moore 264fc2b070 Make wiznet5k RST pin optional adafruit/circuitpython#1800 2019-05-07 18:41:53 +10:00
Nick Moore 24934a1e8a Clean up list of NICs on network deinit adafruit/circuitpython#1800 2019-05-07 18:20:08 +10:00
Nick Moore baa9c02c8b Add a kw-only argument "dhcp" to wiznet5k object 2019-05-02 16:05:33 +10:00
Nick Moore 09d0e99d5b assign variable socket number to DHCP 2019-05-02 16:05:33 +10:00
Nick Moore 09b83e96b3 Avoid socket #0 used by DHCP 2019-05-02 14:32:35 +10:00
Scott Shawcroft f548305c07
Merge pull request #1815 from dhalbert/stop-flicker
Turn off auto_brightness if brightness is set
2019-04-18 15:48:39 -07:00
Dan Halbert 0113e0970e add Display.__init__() args for brightness and auto_brightness 2019-04-18 15:59:16 -04:00
Scott Shawcroft c372567330
Fix off by one error in OnDiskBitmap
It resulted in the first row of pixels being pulled for out of bounds.

Fixes #1801
2019-04-17 15:17:11 -07:00
Scott Shawcroft 190bdf8117
Simplify type check in tick and init last 2019-04-16 10:44:09 -07:00
Scott Shawcroft 6132a05fd9
Include cleanup and style tweaks 2019-04-16 10:19:07 -07:00
Scott Shawcroft 0e03a321e4
Fully split gamepadshift from gamepad 2019-04-16 10:11:54 -07:00
Scott Shawcroft c927e6b938
Split GamePadShift from GamePad to save space on most boards. 2019-04-15 15:40:06 -07:00
Radomir Dopieralski eeef5359f9 Merge branch 'master' into gamepad-shift 2019-04-13 11:54:25 +02:00
Radomir Dopieralski 4dc286fa14 Reorganize the gamepad code 2019-04-12 20:43:29 +02:00
Radomir Dopieralski ae60968563 More refactoring 2019-04-12 20:43:29 +02:00
Radomir Dopieralski 7e89beeb31 Optimize the size of code for gamepad 2019-04-12 20:43:29 +02:00
Radomir Dopieralski 3469b1ec5d Add debouncing to GamePadShift 2019-04-12 20:43:29 +02:00
Radomir Dopieralski b485e45f4f Go back to simple bit-banging in GamePadShift, fix problems 2019-04-12 20:43:29 +02:00
Radomir Dopieralski a7925930fa Read one bit per system clock tick in GamePadShift 2019-04-12 20:43:29 +02:00
Radomir Dopieralski 6ff4e0ecb0 Add GamePadShift for handling shift-register-based buttons 2019-04-12 20:43:29 +02:00
Radomir Dopieralski d39e7e7dd5 Use displayio.Display directly 2019-04-12 12:46:28 +02:00
Scott Shawcroft 72992070c5
Fix boards with no shared busses. 2019-04-09 11:36:10 -07:00
Scott Shawcroft ac7822ba4c
Delete stale TODO 2019-04-08 17:37:30 -07:00
Scott Shawcroft de48e4b262
Merge remote-tracking branch 'adafruit/master' into fix_cpx_display 2019-04-08 17:15:08 -07:00
Scott Shawcroft 0f003ac5b8
Reorganize board busses into shared-bindings and shared-module. 2019-04-08 16:58:50 -07:00
Radomir Dopieralski 8323721232 Stop hard-coding SPI frequency in FourWire
Instead remember and use the frequency, polarity and phase that was
set when the bus was first created.
2019-04-06 15:15:29 +02:00
Scott Shawcroft 7686f93ef4
Fix crash when getting board.SPI outside the VM
If one of the default pins was already in use it would crash.

The internal API has been refined to allow us to get the value
without causing an init of the singleton.

Fixes #1753
2019-04-05 19:06:37 -07:00
Melissa LeBlanc-Williams 97baa7899f Added comment regarding parameter loop 2019-04-05 11:11:27 -07:00
Melissa LeBlanc-Williams 8f1fc6c07d Added option to easily treat SPI parameter data as commands 2019-04-04 23:15:00 -07:00
Scott Shawcroft 6fcda1dec4
Support multi-byte values with Bitmap
It also corrects the behavior of single byte values.

Fixes #1744
2019-04-04 12:50:35 -07:00
caternuson 5298119aa2 change direction of shift right 2019-04-03 09:21:34 -07:00
Melissa LeBlanc-Williams f1e4a2ffb9 Removed unnecessary bit-ANDing 2019-04-01 19:52:35 -07:00
Melissa LeBlanc-Williams 8b4ca24e56 Improved readability of Single Byte Bounds code 2019-03-31 14:17:54 -07:00
Melissa LeBlanc-Williams e254597c24 Merge branch 'master' of https://github.com/adafruit/circuitpython into ssd1351-fix 2019-03-28 17:27:59 -07:00
Scott Shawcroft 9ff54fdf72
Merge pull request #1685 from makermelissa/master
Added option to enable toggling CS between init commands
2019-03-28 09:45:01 -07:00
Melissa LeBlanc-Williams 8087cb41e5 Merge branch 'master' of https://github.com/adafruit/circuitpython into ssd1351-fix 2019-03-27 20:18:37 -07:00
Melissa LeBlanc-Williams 2e0268cb09 Simplified cs toggling into fourwire only 2019-03-27 20:17:22 -07:00
Melissa LeBlanc-Williams f3ec0514cd Simplified into fourwire only 2019-03-27 20:11:32 -07:00
Scott Shawcroft 9232ec50f1
Fix HID buffer lookup
The previous code assumed HID report ids were consecutive. This is
not true in the CircuitPython descriptor where report ids are fixed
for each report type.

Fixes #1617
2019-03-27 15:23:20 -07:00
Dan Halbert 374f210771 TileGrid: pixel_shader is not always a palette 2019-03-27 10:55:50 -04:00
Melissa LeBlanc-Williams f4cede4747 Removed parameter so CS is always toggled 2019-03-26 18:46:13 -07:00
Melissa LeBlanc-Williams b2ad16f5c8 Removed parameter so CS is always toggled 2019-03-26 18:34:07 -07:00
Melissa LeBlanc-Williams a54493b4ae Added small delay inside toggle for edge cases 2019-03-26 07:45:17 -07:00