Commit Graph

977 Commits

Author SHA1 Message Date
Radomir Dopieralski
caa3d3726f Stage: add support for viewport scrolling 2021-10-09 00:05:49 +02:00
Jeff Epler
14ec6b70cf
Merge pull request #5403 from blues/add-strm32l4t5-swan-support
stm32l4r5 Swan support
2021-10-07 11:00:59 -05:00
Radomir Dopieralski
57dee6406d _stage: Fix handling of scaled display in the stage library
The "scale" parameter wasn't exposed in the library, and there
were some problems in how it was handled.

This also fixes some types in the pixel-drawing functions.
2021-10-07 12:58:43 +02:00
Matthew McGowan
295cc18190 style(swan_r5): pre-commit whitespace style changes 2021-09-28 18:52:03 -07:00
Matthew McGowan
7b7b4997a4 docs(swan_r5): misc comments/formatting 2021-09-28 18:52:02 -07:00
Brandon Satrom
48f67d007e feat: add Blues Swan R5 support
complete pin mapping for Feather pins

stubbed out files needed for complilation. still to be modified

0 out all CPY modules in mpconfigboard.mk until we get the build running

add csv for pin generation for STM32L4R5

add F4R5 references in peripherals files

refactored out board files BECAUSE I AM AN IDIOT; add L4 series system clocks file from CubeMX

took a guess at the number of USB endpoint pairs to get the build done

guess was close, but wrong. It is 8

clean up peripheral DEFs

Fixes build error:
```
In file included from ../../py/mpstate.h:33,
                 from ../../py/mpstate.c:27:
../../py/misc.h: In function 'vstr_str':
../../py/misc.h:196:1: sorry, unimplemented: Thumb-1 hard-float VFP ABI
 static inline char *vstr_str(vstr_t *vstr) {
 ^~~~~~
```
Sleuthing steps:
* verify that the feather_stm32f4_express board builds correctly
* put a `#error` at the bottom of the `mpstate.c` file.
* build for the feather and swan boards, with V=2 to capture the build command for that file.
* use a differencing tool to inspect the differences between the two invocations
* inspecting the differences, I saw a missing `-mcpu=cortex-m4` I tested by adding that to the Swan build command. The file built fine (stopping at the hard error, but no other warnings.)

A grep through the sources revealed where this flag was being set for the stm ports.

With this commit, the build gets further, but does not complete. The next exciting episode in this unfolding coding saga is just a commit away!

working build with minimal set of modules for the Blues Swan r5

chore:change header copyright name to Blues Wireless Contributors

USB operational.  Fixed up clocks to be hardwired for LSE no HSE case. (Trying to combine HSE in there made the code much more complex, and I don't have a board to test it out on.)

USART working

adds support for `ENABLE_3V3` and `DISCHARGE_3V3` pins.  I am surprised that pin definitions are quite low-level and don't include default direction and state, so the code currently has to initialize `ENABLE_3V3` pin as output.  The LED takes over a second to discharge, so I wonder if the board startup code is not having the desired affect.

short circuit implementation of backup memory for the STM32L4

all the ports

remove company name from board name to be consistent with the Arduino board definition.

add default pins for I2C, SPI and UART, so that `board.I2C` et al. works as expected.  Confirmed I2C timing.

fix board name

fix incorrect pin definition. add test to allow manual check of each output pin

analog IO

code changes for WebUSB. Doesn't appear to work, will revisit later.

ensure that `sys.platform` is available

checkin missing file

feat: make room for a larger filesystem so the sensor tutorial will fit on the device.

fix:(stm32l4r5zi.csv): merged AF0-7 and AF8-15 into single lines and removed extraneous headers mixed in with the data.

fix(parse_af_csv.py): pin index in the csv is 0 not 1, and AF index made 1 larger

chore(Swan R5): update peripherals pins from `parse_af_csv.py` output

optimize flash sector access
2021-09-28 18:52:02 -07:00
microDev
3da86b0ac2
add initial esp32c3 support 2021-09-26 09:39:40 +05:30
Jeff Epler
10fdc80b9c
Merge pull request #5378 from jepler/esp32s2-paralleldisplay-i2s
Espressif: Use i2s peripheral for parallel LCD displays
2021-09-23 20:25:43 -05:00
Michael Thomson
94ca3f594e Enable CS "active-high" device support
Reference https://github.com/adafruit/Adafruit_CircuitPython_BusDevice/issues/71

Add a new parameter cs_active_value for devices that require CS to use "active high" logic.

Update mpconfigboard.mk to disable pyb_nano_v2 from core build as its flash is too small now.
2021-09-23 09:14:39 +01:00
Jeff Epler
a0cfceec28 Stub out the non-sequential parallel bus constructor
.. most boards can't support non-sequential pins, so share the
implementation of the error routine so we get an identical message.
2021-09-21 15:00:43 -05:00
Jeff Epler
72bfd39a17 keypad: Event: add timestamp.
this will probably need simplification before it fits on constrained
boards.
2021-09-16 21:08:05 -05:00
James Carr
56ecdee5a0
Correct the 24bit decoding in bitmaptools.readinto() 2021-09-13 19:50:35 +01:00
James Carr
145836e7e5
Make the x and y bounds checking functions static 2021-09-11 17:10:21 +01:00
James Carr
2bc260a102
Rework of changes to bounds checking of location in VectorShape, moving most of the code into shared-module. 2021-09-10 21:48:01 +01:00
James Carr
c6f2dae591
Remove unused varg part of Error calls. 2021-09-10 09:39:20 +01:00
James Carr
1f446916c3
Improve the bounds checking on the location (the x, y co-ordinates) of a
VectorShape object so that it is consistent no matter where it is set from:
 * the constructor
 * the x and y setters
 * the location setter
2021-09-10 09:39:12 +01:00
Scott Shawcroft
771b4c7464
Add two space saving knobs
* Reduce the number of supported HID reports of IDs per descriptor.
  This saves ~200 bytes in the default HID objects.
* (Not enabled) Compute QSTR attrs on init. This trades 1k RAM for
  flash. Flash is the default (1).
2021-08-31 13:02:34 -07:00
Jeff Epler
83120eb1b2 Actually fix building ports without parallel displays 2021-08-29 11:49:47 -05:00
Jeff Epler
7520feed1c Move ParallelBus to its own module 2021-08-29 07:33:54 -05:00
Dan Halbert
dd89ff244d
Merge pull request #5249 from dhalbert/usb_hid-gc-fix
Fix usb_hid_gc_collect()
2021-08-27 19:27:55 -04:00
Scott Shawcroft
b17216d9d4
Merge pull request #5199 from aramcon-badge/aramcon/quick-refresh
Adding quick refresh support
2021-08-27 08:54:44 -07:00
Dan Halbert
29ae444dc6 Fix usb_hid_gc_collect() 2021-08-27 11:36:56 -04:00
Amit Sides
98f026fbb4 Fixing comments for PR 2021-08-25 15:07:19 -07:00
microDev
8c2a16e65c
Merge pull request #5207 from lesamouraipourpre/pixel-luma
Remove the `pixel_luma` parameter from `compute_tricolor`
2021-08-24 12:28:10 +05:30
Dan Halbert
7587a521cb
Merge pull request #5145 from FoamyGuy/bitmaptools_paint_fill
Bitmaptools boundary_fill
2021-08-23 16:20:38 -04:00
Scott Shawcroft
6d49a9f0c5
Merge pull request #5205 from jepler/deprecate-vertical-scroll
Deprecate Display's constructor arg set_vertical_scroll
2021-08-23 12:52:12 -07:00
microDev
57b4d0176f
Merge pull request #5077 from microDev1/atexit
Add atexit module
2021-08-23 19:49:46 +05:30
Jeff Epler
379461df7d Deprecate Display's constructor arg set_vertical_scroll 2021-08-23 09:17:59 -05:00
foamyguy
80c7a15df7 fix dirty area initial points 2021-08-22 10:52:28 -05:00
James Carr
cba71ea157
Remove displayio_copy_coords. It is a duplicate of displayio_area_copy 2021-08-22 10:58:39 +01:00
foamyguy
0f478d59fe remove string import. use minimum sized dirty area 2021-08-21 16:15:59 -05:00
Amit Sides
1b6283a5ae Adding quick refresh support 2021-08-21 23:51:24 +03:00
foamyguy
aeeba3904b changed argument names and make replaced_color_value argument optional 2021-08-21 11:08:25 -05:00
James Carr
16a0306e29 Remove the pixel_luma parameter from displayio_colorconverter_compute_tricolor (Closes #5194)
Not tested, I don't currently have a three colour eInk screen to test with.
2021-08-21 16:32:36 +01:00
microDev
25437dcb33
Merge branch 'main' into atexit 2021-08-20 09:45:54 +05:30
Dan Halbert
5b0009cbc4
Merge pull request #5151 from dhalbert/usb_hid-changes
Support multiple reports per device in usb_hid
2021-08-17 17:14:28 -04:00
Dan Halbert
1bcf66ff8d Check buffer existence in tud callbacks (addresses #5020) 2021-08-17 15:34:48 -04:00
Jeff Epler
d67acb8a64 MP3Decoder: Fix playback stopping issue
Closes: #5164
2021-08-17 10:03:47 -05:00
Dan Halbert
38f42818e9 fix gc; update KEYBOARD report descriptor
The default KEYBOARD report descriptor had a signed/unsigned error,
and also could have allowed more keycodes. So I changed it, using the
very vanilla descriptor from a very plain extremely common commercial
keyboard, modifying it only have 5 LED's instead of 3, and added a
report ID.
2021-08-16 18:59:41 -04:00
microDev
bdf8bc58ed
allow exception raise inside atexit callback 2021-08-16 22:35:04 +05:30
microDev
1c4a6c3667
atexit module refinements
- add test for atexit module
- add callback to gc collection
- fix callback memory allocation
- execute callback on both code and repl exit
2021-08-16 21:37:32 +05:30
foamyguy
6f783060c2 ignore points outside of bitmap 2021-08-15 19:11:15 -05:00
Dan Halbert
f37e1d7bf5 squeeze a couple of boards 2021-08-14 17:36:05 -04:00
Dan Halbert
3dc2b4c2d3 at least original functionality with new API 2021-08-14 12:36:40 -04:00
Dan Halbert
4f8ff12afa wip 2021-08-14 12:36:40 -04:00
foamyguy
ec8b31e7b4 code format and translations 2021-08-13 10:13:38 -05:00
foamyguy
c1e164e1ff rename to boundary_fill and clean up comments 2021-08-13 09:52:51 -05:00
foamyguy
0bbb0f1d06 Merge branch 'adafruit_main' into bitmaptools_paint_fill 2021-08-13 09:49:24 -05:00
Scott Shawcroft
de796e2304
Move OneWire to onewireio from busio
This will allow finer grained inclusion in 8.0.0

Fixes #5135
2021-08-12 10:47:14 -07:00
Scott Shawcroft
ebf0901558
Merge pull request #5079 from dhalbert/debug-audio
Fix various RP2040 and SAMD audio issues
2021-08-11 11:19:53 -07:00