Commit Graph

774 Commits

Author SHA1 Message Date
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
c02602ace1
Enable strict-overflow diagnostic 2022-09-30 11:19:23 -05:00
Jeff Epler
afc1c0e3bb
Fix unused variable diagnostics, make it a fatal error 2022-09-30 11:19:22 -05:00
Jeff Epler
37620d4eb0
Fix several classes of compiler diagnostic & make fatal
* -Wno-nested-externs
 * -Wno-strict-prototypes
 * -Wno-double-promotion
 * -Wno-sign-compare
2022-09-30 11:19:22 -05:00
Jeff Epler
c6eef3931f
Enable warning for unused static functions 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
0912889106
raspberrypi: statically allocate storage for hostname 2022-09-30 10:05:11 -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
4de9487820
It turns out you CAN have too many GPIO 2022-09-29 20:10:33 -05:00
Jeff Epler
510bd11f58
Enable reading back value of cyw43 pin
Now, `led.value = not led.value` works as a way to toggle the LED state.

Closes: #6959
2022-09-29 11:06:11 -05:00
Jeff Epler
a3bcfd6911
Add pin_CYW1 for SMPS_MODE 2022-09-29 10:54:06 -05:00
Jeff Epler
72b06021c0
fix doc formatting 2022-09-29 10:27:13 -05:00
Jeff Epler
74cdf42ece
pico w: implement bind, listen, accept
this works with some simple tcp & udp echo service code
2022-09-29 10:02:20 -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
Jeff Epler
56f9f0d136
add tx power get/set 2022-09-29 10:02:19 -05:00
Jeff Epler
71a00157ba
Add hostname setting 2022-09-29 10:02:19 -05:00
Jeff Epler
c6d3163841
remove comment about something the Makefile does now 2022-09-29 10:02:18 -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
2dd6df9d93
better to explain why this file has no useful content 2022-09-28 15:19:06 -05:00
Jeff Epler
3d76aa00f5
implementations not needed 2022-09-28 14:38:13 -05:00
Jeff Epler
09d4fbc557
Remove FIXME
this was verbatim-copied from micropython
2022-09-28 14:38:13 -05:00
Jeff Epler
6189156a0b
Add missing NotImplementedErrors 2022-09-28 14:38:12 -05:00
Jeff Epler
edf1efd728
Add CYW43 guards to more things 2022-09-28 14:38:12 -05:00
Jeff Epler
e100981d90
revert CFLAGS change 2022-09-28 14:38:12 -05:00
Jeff Epler
4380292848
comment why not actually reset wifi 2022-09-28 14:38:11 -05:00
Jeff Epler
ff7731491e
Implement enough of socketpool to do ntp and non-https requests 2022-09-28 10:06:34 -05:00
Jeff Epler
a7a1bd7880
Implement DNS resolution
```
>>> s = socketpool.SocketPool(wifi.radio)
>>> s.getaddrinfo("google.com", 80)
[(0, 0, 0, '', ('142.250.81.206', 80))]
```
2022-09-28 10:06:33 -05:00
Jeff Epler
6c3cdceb45
Implement scan, connect, ping
My pings go out, and then they come back

```py
import os
import wifi
import ipaddress

wifi.radio.connect(os.getenv('WIFI_SSID'), os.getenv('WIFI_PASSWORD'))
ipv4 = ipaddress.ip_address("8.8.4.4")
print("Ping google.com: %f ms" % (wifi.radio.ping(ipv4)*1000))
```
2022-09-28 10:06:33 -05:00
Jeff Epler
346fff2e7c
cyw43 basic gpio support, hwaddr in boot_out 2022-09-28 10:06:33 -05:00
Jeff Epler
22b04aef22
Reindent a block 2022-09-28 10:05:53 -05:00
Jeff Epler
9caa65cf28
allow a board to override link.ld 2022-09-28 10:05:53 -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
Dan Halbert
de80db681f
Merge pull request #6915 from dhalbert/ringbuf-cleanup
ringbuf cleanup
2022-09-25 17:50:21 -04:00
Neradoc
5346b89b08 don't use @property in docs, just document as a property 2022-09-25 07:18:18 +02:00
Dan Halbert
ea15a9118a ringbuf cleanup 2022-09-21 10:03:05 -04:00
Dan Halbert
8a568d18b5
Merge pull request #6757 from latkinso42/adcdma
analogbufio
2022-09-16 08:32:24 -04:00
Dan Halbert
82694b7265 remove extraneous copyrights 2022-09-15 20:31:08 -04:00
Dan Halbert
60f43b1703 allow preserving pin state during deep sleep 2022-09-15 17:35:14 -04:00
Lee Atkinson
f279a2dbb2
Merge branch 'adafruit:main' into adcdma 2022-09-08 11:46:01 -04:00
Dan Halbert
58b00467c4
Merge pull request #6878 from dhalbert/weak-board-defs
Use MP_WEAK for default board.c routines
2022-09-08 10:47:08 -04:00
Dan Halbert
4cb69a51d5 Use MP_WEAK for default board.c routines 2022-09-08 07:36:50 -04:00
latkinso42
c1f57c6ceb Pushing for resolution 2022-09-07 18:53:35 -04:00
latkinso42
25078a24a3 Attempt to fix Build-Docs and Pre-Commit 2022-09-06 18:58:57 -04:00
Pontus Oldberg
c043c437f7 Merge branch 'main' of https://github.com/PontusO/circuitpython 2022-09-06 09:37:25 +02:00
Pontus Oldberg
9a937e6ea3 Added challenger_rp2040_wifi_ble board. 2022-09-06 09:37:21 +02:00