-
Notifications
You must be signed in to change notification settings - Fork 951
[Board] Adafruit Trinket #333
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
[Board] Adafruit Trinket #333
Conversation
If you say it looks fine i would like to test it before you merge it. (as stated in the issue i didn't try to run any code on it cause i wasn't sure that it won't brick it) I get home at aprox. 18:00 GMT and try running the blinky example on it. |
One note: I would use the same instructions to put the code on it with The UF2 bootloader works quite well and quickly/safely on the various Adafruit boards that support it. |
It is also useful to compare your pin mappings to something like https://github.com/adafruit/ArduinoCore-samd/blob/master/variants/trinket_m0/variant.cpp |
I checked it with the file you mentioned and saw that i didn't provide the DotStart and USB-Host Pins - i am not sure if they should be added? The rest seems okay, there are some placeholder pins described which i also not know if they should be included. |
The dotStar requires a bitbanging-style SPI interface, so we do not have that yet. The USB-host pins you will need, in order to use the serial over USB something like this: https://github.com/tinygo-org/tinygo/blob/master/src/machine/board_itsybitsy-m0.go#L39-L43 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general this looks good but testing it on real hardware would be necessary to merge.
It's unlikely you'll really brick the device, certainly when you flash using the bootloader.
Split atsamd21 to atsamd21-e18/g18
Blinky is working and Serial is working - if you want you can merge it |
src/machine/board_trinket.go
Outdated
I2C0 = I2C{Bus: sam.SERCOM2_I2CM, | ||
SDA: SDA_PIN, | ||
SCL: SCL_PIN, | ||
PinMode: GPIO_SERCOM} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be GPIO_SERCOM_ALT
here, I think.
I think this PR is about ready to merge, from what I can tell. Only thing is, it greatly complicates merging my own PR #331 in either case there will be some conflicts to resolve, but I think my changes are fewer, so would better to merge it first, then resolve this one, and merge it. Any opinions on this? |
For me it is okay if you want to merge #331 first. |
It will probably require some additions to get it to compile with the I2S changes. Getting it to work with a separate mic is another story. As long as it compiles for now would be enough for me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quickly reviewed it again and LGTM (assuming it has been tested). Not merging because of #333 (comment).
@Munsio the I2S PR was merged. Can you please rebase |
If you rebase dev into your branch, you will discover the following when trying to build your example:
This is what I was referring to in #333 (comment) |
…nygo into feature/adafruit-trinket-board
Thank you very much for all the great work on this @Munsio now merging. Take a victory lap! |
* Add support for Adafruit Trinket-M0 board
Corresponding Issue for discussions: #332