-
Notifications
You must be signed in to change notification settings - Fork 0
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
Suggestion about DMA interface #16
Comments
Hey @tdunning! Sorry about the long response time. Feel free to add the methods you detail here as is, they seem like a logical addition which would allow flexibility to users. That said I still am unsure of exporting the dmaChannel type since this package is not quite the ideal place to be pulling DMA logic from. Eventually when we do put the DMA logic in its final resting place (probably tinygo |
Delay isn't a problem. I will see when I can make time to package my updates in the near future. Do you have suggestions about how to run tests on hardware dependent software? |
We don't do hardware dependent tests in TinyGo yet other than the TinyGo HCI service, which is implemented in the tinygo main repo. |
TinyHCI is located here: https://github.com/tinygo-org/tinyhci |
I have been using a fork of the DMA code here and find it works well.
The exception is that my application involves reading from two chained PWM counters in A B A B A order. To do this, I am chaining one DMA channel to another. To decrease the size of the control blocks, I am using the aliases of the DMA control registers which is pretty awkward in the current API.
To help with his, I have added the following code that allows me to get any alias of any register from a DMA channel as a
volatile.Register32
. This lets me use the bit banging capabilities of a register to easily manipulate these values. I also have a related function that gives me the address of each register as auint32
using a parallel API which is important for chaining. I think that this additional function is pretty much orthogonal to the other stuff you have in the package.I can package this as a proper pull request, but I am unsure how you guys are running tests on code that is hardware dependent. Advice would be appreciated.
The text was updated successfully, but these errors were encountered: