-
Notifications
You must be signed in to change notification settings - Fork 55
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
[mega65] Add DMA hardware registers and DMA examples #347
Conversation
This prevents it from being optimized out, albeit the underlying reason is still unknown.
Remove C23 guard
|
||
// Configure DMA job; see The MEGA65 Book, Appendix O. | ||
dma::DMAJob<2, DMAList_F018A> dma; | ||
dma.options[0] = DST_ADDR_BITS_OPT; |
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.
Here an initializer list would have been nice, but it doesn't seem to be supported by the compiler. That is dma.options = {DST_ADDR_BITS_OPT, 0xff};
mos-platform/mega65/dma.hpp
Outdated
// C++ support for MEGA65 DMA operations. | ||
// | ||
|
||
#pragma once |
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.
Prefer include guards for nit-picky compiler-person reasons.
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.
fixed.
The following adds support for the DMA controller on the MEGA65.
_dmagic.h
C headerThere is still an issue with DMA fill/copy routines likely due to code being optimized away. Will try to solve this on Discord.https://github.com/user-attachments/assets/8b6207fb-d81e-4daa-86e5-a050f1df026e