-
Notifications
You must be signed in to change notification settings - Fork 38
try to import bitbangio if busio SPI is not available #40
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
Conversation
@schelmo I'm unclear on the purpose of adding this. Hardware SPI is typically faster than |
@kattni i needed this on a trinket 5V with a WS2801 strip, where the Hardware SPI was already used by something else |
@schelmo The Trinket 5V does not run CircuitPython. Do you mean a Trinket M0? As well, is there a reason you're not using the Adafruit CircuitPython WS2801 library with your WS2801 strip? Can you post an example of code that uses this? I am trying to sort out testing these changes. |
@kattni bitbanging allows for dotstars on any pair of pins. To test, use a set of pins that doesn't work with busio. |
sorry it was some time ago. |
I tend to check which pins support it and then double check by inspecting
Just to make it clear, I did those REPL commands with no dotstars connected, my long strip is on-loan at the moment. |
I should be able to test this over the weekend. |
had time to look into it a bit more btw i dont need these anymore. if it is too much work, we can close the PR diff --git a/ports/atmel-samd/boards/trinket_m0/mpconfigboard.mk b/ports/atmel-samd/boards/trinket_m0/mpconfigboard.mk
index 5c942901a..7b04e3d5a 100644
--- a/ports/atmel-samd/boards/trinket_m0/mpconfigboard.mk
+++ b/ports/atmel-samd/boards/trinket_m0/mpconfigboard.mk
@@ -10,6 +10,10 @@ INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1
+CIRCUITPY_BITBANGIO = 1
+CIRCUITPY_USB_HID = 0
+CIRCUITPY_USB_MIDI = 0
+
SUPEROPT_GC = 0
CFLAGS_BOARD = --param max-inline-insns-auto=15``` |
@schelmo I appreciate that you took the time to make the contribution. It's great that this is here and documented, and anyone looking to do this in the future will have this available. However, the further we look into it, the more this feels like a very specific use case that likely wouldn't apply to more than a few situations. If you're ok with it, I think closing this PR would make sense. Consider leaving the branch in place for others if you're interested in doing so. |
yeah sure |
resubmitting #36 for reviewing (@siddacious)