Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix a problem with the addressrange example in memorymap #9639

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion shared-bindings/memorymap/AddressRange.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
//| # Pad control register is updated using an MP-safe atomic XOR
//| pad_ctrl ^= (d << 4)
//| pad_ctrl &= 0x00000030
//| pads_bank0[p*4+0x3004:p*4+0x3008] = pad_ctrl.to_bytes(4, "little")
//| pads_bank0[p*4+0x1004:p*4+0x1008] = pad_ctrl.to_bytes(4, "little")
//|
//| def rp2040_get_pad_drive(p):
//| pads_bank0 = memorymap.AddressRange(start=0x4001C000, length=0x4000)
Expand All @@ -51,6 +51,10 @@
//|
//| # print GPIO16 pad drive strength
//| print(rp2040_get_pad_drive(16))
//|
//| Note that the above example does **not** work on RP2350 because base
//| address and organization of the "pads0" registers changed compared
//| to the RP2040.
//| """
//|

Expand Down