Commit Graph

107 Commits

Author SHA1 Message Date
Scott Shawcroft
e62db5adcd
Fix native property setting from subclass 2023-10-24 16:20:51 -07:00
Dan Halbert
c0a4abc03c Fix merge bugs; remove shared/tinyusb/* 2023-10-19 16:02:42 -04:00
Scott Shawcroft
544553c542
Fix cyw43 (pico w) builds 2023-10-16 10:43:30 -07:00
Dan Halbert
06765ccfa6 RP2040 now builds 2023-10-05 14:49:49 -04:00
Dan Halbert
76ff01452b Trinket M0 comes up; still very much wip 2023-09-28 16:22:10 -04:00
Dan Halbert
4d175ab41a convert to MP_DEFINED_CONST_OBJ_TYPE() 2023-09-19 21:09:29 -04:00
Dan Halbert
2c0fa0f7dc initial merge from v1.20.0; just satisifying conflicts 2023-09-19 11:10:12 -04:00
Dan Halbert
d582407b06 pre-commit fixes 2023-08-14 00:59:22 -04:00
Dan Halbert
2171e67c1b merge latest adafruit/main 2023-08-13 19:43:54 -04:00
Dan Halbert
0d2c3c3f08 wip: continuing compilation fixes; mp_obj_alloc everywhere 2023-08-07 20:45:57 -04:00
Jeff Epler
e06f836e95
add may_exec to parameter list 2023-08-07 16:28:35 -05:00
Jeff Epler
8c45abbd89
pass correct may_exec buffer length 2023-08-05 14:23:26 -05:00
Jeff Epler
6083de017a
fix method name in docstr 2023-07-27 20:09:13 -05:00
Jeff Epler
92e2134009
rp2: StateMachine: Allow loading programs at fixed offsets 2023-07-27 15:47:04 -05:00
Jeff Epler
5780d9a3d2
rp2: Add StateMachine.may_exec
and also sanity-check the init instructions, thanks to the newly
factored-out checker.

Closes: #8221
2023-07-27 15:47:01 -05:00
Scott Shawcroft
0aa71ed6e6
Tweak the picodvi docs and arg checking 2023-05-01 11:30:04 -07:00
Scott Shawcroft
b08714bb8f
Take in framebuffer resolution, not output res
Fixes #7911
2023-04-28 17:13:17 -07:00
Dan Halbert
b9c7cd4028
describe instance more precisely 2023-04-24 12:58:40 -04:00
David Glaude
6aa3e7d8a6
This is about picodvi not rgbmatrix
There might be another way or other place where the documentation does not match the code.
But this is the most obvious, that's why I found it.
2023-04-23 10:58:02 +02:00
Scott Shawcroft
13bb801211
Fix docs and windows 2023-04-19 15:42:02 -07:00
Scott Shawcroft
66edcf5d03
Add PicoDVI support
PicoDVI in CP support 640x480 and 800x480 on Feather DVI, Pico and
Pico W. 1 and 2 bit grayscale are full resolution. 8 and 16 bit
color are half resolution.

Memory layout is modified to give the top most 4k of ram to the
second core. Its MPU is used to prevent flash access after startup.

The port saved word is moved to a watchdog scratch register so that
it doesn't get overwritten by other things in RAM.

Right align status bar and scroll area. This normally gives a few
pixels of padding on the left hand side and improves the odds it is
readable in a case. Fixes #7562

Fixes c stack checking. The length was correct but the top was being
set to the current stack pointer instead of the correct top.
Fixes #7643

This makes Bitmap subscr raise IndexError instead of ValueError
when the index arguments are wrong.
2023-04-19 15:14:02 -07:00
hathach
8c1095b268
Merge branch 'main' into add-codespell 2023-03-23 14:09:57 +07:00
hathach
fecc1bdedb
fix typos (partial) detected by codepell 2023-03-18 22:17:02 +07:00
kreasteve
208c081c95 bugfix_#7706 2023-03-16 11:10:57 +01:00
kreasteve
d7fb21ec76 Revert "bugfix"
This reverts commit 4f1627f68e.
2023-03-16 11:02:41 +01:00
kreasteve
4f1627f68e bugfix 2023-03-16 10:56:22 +01:00
MicroDev
d9d94eacca
run updated pre-commit 2023-02-01 13:38:41 +05:30
Scott Shawcroft
aa2ba4d88b
Have start and end kwargs respect element size
The comment says it is `buffer[start:end]` but it assumed elements
were a single byte long. Now it correctly does multibyte elements
from array.array.

Fixes #4988
2023-01-11 15:36:41 -08:00
Dan Halbert
a974402542 Improve type validation errors messages, especially for pins 2023-01-10 15:02:55 -05:00
Jeff Epler
d49af4d784
make wording a bit clearer 2022-12-13 08:11:47 -06:00
Jeff Epler
09f6919c93
Add ability to read VOLTAGE_MONITOR on Pico W
Because this must be treated like an in-use pin for all other purposes,
unfortunately a special case must be added in shared-bindings.

Multiple AnalogIn objects for VOLTAGE_MONITOR can be created (because
in use tracking isn't working) but this causes no harm.

Testing performed: Read the monitor, then imported wifi. When the
pin state was insufficiently restored, the second step would fail
with debug messages about do_ioctl timeout.

```
import analogio, board
a = analogio.AnalogIn(board.VOLTAGE_MONITOR)
print(a.value)
import wifi
```

Closes: #7020
2022-11-08 09:37:15 -06:00
Jeff Epler
0c5fd55c16
picow: Turn off wifi co-processor regulator when entering deep sleep
This reduces power consumption during true deep sleep.

In my measurements with ppk2 and a program that _irrevocably_ entered
deep sleep (no time alarm or pin alarm), power usage as measured on a
ppk2 decreased from ~10mA to ~1mA.
2022-10-13 20:10:10 -05:00
Neradoc
3a6382d1ea cyw43.CywPin should be the class, not a string 2022-10-07 02:11:05 +02:00
Jeff Epler
40c2de833d
doc improvements 2022-10-01 10:09:33 -05:00
Jeff Epler
d3e85d165e
Set cyw43 power management as needed, default to disabled
.. the value actually needs to be enforced each time the STA or AP
is enabled, because internally there's a call to cyw43_wifi_pm with the
library's defaut power management value, not ours.

Add a getter, though it only returns our idea of what the power
management register is set to, it doesn't read out from the actual
hardware, sadly.
2022-10-01 08:20:34 -05:00
Jeff Epler
943b992bfc
Improve cyw43.set_power_management documentation
.. and provide 4 preset values
2022-10-01 07:52:08 -05:00
Dan Halbert
bced76887e
Merge pull request #6973 from jepler/rp2040-fix-warnings
Rp2040 fix warnings
2022-09-30 16:21:31 -04:00
Jeff Epler
afc1c0e3bb
Fix unused variable diagnostics, make it a fatal error 2022-09-30 11:19:22 -05:00
Jeff Epler
2c9c6fc80e
Remove unused static functions 2022-09-30 11:19:21 -05:00
Jeff Epler
907c5d387f
Tweak black_bindings
Originally, black_bindings found each contiguous "//|" block and sent
it to black independently. This was slower than it needed to be.

Instead, swap the comment prefix: when running black, take off
"//|" prefixes and put "##|" prefixes on all un-prefixed lines.
Then, after black is run, do the opposite operation

This more than doubles the overall speed of "pre-commit run --all",
from 3m20s to 55s CPU time on my local machine (32.5s to under 10s
"elapsed" time)

It also causes a small amount of churn in the bindings, because
black now sees enough context to know whether one 'def' follows another
or ends the 'def's in a 'class'. In the latter case, it adds an extra
newline, which becomes a "//|" line.

I'm less sure why a trailing comma was omitted before down in
rp2pio/StateMachine.c but let's roll with it.
2022-09-30 11:18:13 -05:00
Jeff Epler
84c7ac4a81
Make cyw43.set_power_management() be a function as intended 2022-09-30 07:56:59 -05:00
Jeff Epler
3281e14be1
fix reference to board module 2022-09-29 21:37:34 -05:00
Jeff Epler
72b06021c0
fix doc formatting 2022-09-29 10:27:13 -05:00
Jeff Epler
12ea04ca70
Add cyw43.set_power_management 2022-09-29 10:02:20 -05:00
Jeff Epler
91f1266db5
Document CywPin 2022-09-29 10:02:19 -05:00
Dan Halbert
db065a299f
Merge pull request #6933 from jepler/🥧🐮
Implement a useful subset of `wifi` and `socketpool` modules on 🥧🐮
2022-09-28 18:09:24 -04:00
Jeff Epler
346fff2e7c
cyw43 basic gpio support, hwaddr in boot_out 2022-09-28 10:06:33 -05:00
Jeff Epler
b2cc8d2aad
run black_bindings across all bindings 2022-09-27 15:21:42 -05:00
Jeff Epler
4e96667d50
Manual fix for oddball cases 2022-09-27 15:19:32 -05:00
Neradoc
5346b89b08 don't use @property in docs, just document as a property 2022-09-25 07:18:18 +02:00