Skip to content

fix CPB SPI pin definitions#3583

Closed
jerryneedell wants to merge 62 commits into
adafruit:6.0.xfrom
jerryneedell:jerryn_cpb
Closed

fix CPB SPI pin definitions#3583
jerryneedell wants to merge 62 commits into
adafruit:6.0.xfrom
jerryneedell:jerryn_cpb

Conversation

@jerryneedell

Copy link
Copy Markdown
Collaborator

fixes #3582

tested on CPB with mini-tft featherwing.

astrobokonon and others added 30 commits September 19, 2020 13:38
ap_rssi is a bound method, which I'm not keen on, but it works
still need to figure out the bound method business
Forgot to make it a property!
When allocations were freed in a different order from the reverse of how they were allocated (leaving holes), the heap would get into an inconsistent state, eventually resulting in crashes.

free_memory() relies on having allocations in order, but allocate_memory() did not guarantee that: It reused the first allocation with a NULL ptr without ensuring that it was between low_address and high_address. When it belongs to a hole in the allocated memory, such an allocation is not really free for reuse, because free_memory() still needs its length.

Instead, explicitly mark allocations available for reuse with a special (invalid) value in the length field. Only allocations that lie between low_address and high_address are marked that way.
This requires recovering the pointer of the allocation, which could be done by adding up neighbor lengths, but the simpler way is to stop NULLing it out in the first place and instead mark an allocation as freed by the client by setting the lowest bit of the length (which is always zero in a valid length).
Signed-off-by: Jensen <jensechu@gmail.com>
…rcuitpython into color-converter-transparency
microdev1 and others added 8 commits October 20, 2020 09:23
396979a breaks building on macOS: `nproc` is a Linux thing, use a cross-platform alternative.
This leads to smaller code size at the expense of slower linking.

We can turn partitioning back on with GCC10 because it produces smaller code.
Fix missing `nproc` on macOS
Update port status in readme
displayio: Pass transparent_color to ColorConverter
@ladyada

ladyada commented Oct 21, 2020

Copy link
Copy Markdown
Member

you dont by chance have a tft gizmo or eink gizmo?

@jerryneedell

Copy link
Copy Markdown
Collaborator Author

you dont by chance have a tft gizmo or eink gizmo?

I have a tft-gizmo

@ladyada

ladyada commented Oct 21, 2020

Copy link
Copy Markdown
Member

could you test with that too?cause thats what we use for SPI interfacing!

@jerryneedell

Copy link
Copy Markdown
Collaborator Author

could you test with that too?cause thats what we use for SPI interfacing!

sure -- will do.

@jerryneedell

Copy link
Copy Markdown
Collaborator Author

@ladyada
yikes! this will be a problem

the tft-GiZMO uses A3 for the backlight and uses SDA for MOSI ???

        self, *, spi=None, cs=board.RX, dc=board.TX, backlight=board.A3, rotation=180
    ):
        displayio.release_displays()
        if spi is None:
            import busio  # pylint: disable=import-outside-toplevel

            spi = busio.SPI(board.SCL, MOSI=board.SDA)

@jerryneedell

Copy link
Copy Markdown
Collaborator Author

@ladyada
yikes! this will be a problem

the tft-GiZMO uses A3 for the backlight and uses SDA for MOSI ???

        self, *, spi=None, cs=board.RX, dc=board.TX, backlight=board.A3, rotation=180
    ):
        displayio.release_displays()
        if spi is None:
            import busio  # pylint: disable=import-outside-toplevel

            spi = busio.SPI(board.SCL, MOSI=board.SDA)

ah -- but since it does not call board.SPI() it should be OK

@ladyada

ladyada commented Oct 21, 2020

Copy link
Copy Markdown
Member

yeah we 'recycle' the I2C pins - to keep pin compatibilitiy with CPX!

@jerryneedell

jerryneedell commented Oct 21, 2020

Copy link
Copy Markdown
Collaborator Author

Tested on CPB with TFT gizmo -- no problems.

ladyada
ladyada previously approved these changes Oct 21, 2020
@jerryneedell

Copy link
Copy Markdown
Collaborator Author

FYI -- this came up in a forum question about using a mini-tft with the CPB. https://forums.adafruit.com/viewtopic.php?f=58&t=170634

@jerryneedell

Copy link
Copy Markdown
Collaborator Author

@jepler I assume this CI failure is the same as ones that have been occurring for the past few days. Anything I need to do about it?

@tannewt tannewt changed the base branch from main to 6.0.x October 21, 2020 19:52
@tannewt tannewt dismissed ladyada’s stale review October 21, 2020 19:52

The base branch was changed.

@tannewt tannewt changed the base branch from 6.0.x to main October 21, 2020 19:53
@tannewt

tannewt commented Oct 21, 2020

Copy link
Copy Markdown
Member

@jerryneedell Would you mind rebasing this onto 6.0.x? That way it'll be fixed for 6.0.0

@jerryneedell

Copy link
Copy Markdown
Collaborator Author

@jerryneedell Would you mind rebasing this onto 6.0.x? That way it'll be fixed for 6.0.0

Sure -- How do I do that?

@jerryneedell jerryneedell changed the base branch from main to 6.0.x October 21, 2020 20:48
@jerryneedell

Copy link
Copy Markdown
Collaborator Author

@jerryneedell Would you mind rebasing this onto 6.0.x? That way it'll be fixed for 6.0.0

Sure -- How do I do that?

OK -- I think I did that correctly. If not, let me know.

@jerryneedell

Copy link
Copy Markdown
Collaborator Author

But why does it now have all these other changes associated with it?

@jerryneedell

Copy link
Copy Markdown
Collaborator Author

PR is corrupted -- closing and will resubmit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CPB default SPI pins incorrect