Skip to content
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

Remove all vestiges of plilb.h from source #623

Open
EmbeddedMan opened this issue Oct 21, 2015 · 5 comments
Open

Remove all vestiges of plilb.h from source #623

EmbeddedMan opened this issue Oct 21, 2015 · 5 comments

Comments

@EmbeddedMan
Copy link
Member

There are a few variants that still include plib.h. Remove these includes.

@EmbeddedMan
Copy link
Member Author

Turns out that the quick240 board uses mSYSTEMLock() and mSYSTEMUnlock() from plib.h.
Turns out there are actually four boards that should be using these plib.h macros as they try to write to the OSCCON register to turn off the secondary oscillator.
So fixing this issue will require moving those macros (and the DmaSuspend() that they depend on) into our core libraries.

@EmbeddedMan
Copy link
Member Author

Turns out that there is a huge rabbit hole here. To replace the mSYSTEMUlock() macro from plib.h, we need to implement DmaSuspend(), which is part of plib.h, and which has different code for each of the three different types of DMA on PIC32. I'm not sure re-writing this section of the plib.h system is worth it at this point. It is unlikely that users will have DMA already turned on when the _board_init() function is called from Board_Data.c on boot time. So I'm just going to ignore DMA for this unlock sequence.

@majenkotech
Copy link
Member

When I finally get round to finishing my DMA abstraction layer I will add a function dma_suspend() and dma_resume() for you.

@EmbeddedMan
Copy link
Member Author

You are so awesome. Thanks Matt!

On Wed, Oct 21, 2015 at 8:40 AM, Matt Jenkins notifications@github.com
wrote:

When I finally get round to finishing my DMA abstraction layer I will add
a function dma_suspend() and dma_resume() for you.


Reply to this email directly or view it on GitHub
#623 (comment)
.

@EmbeddedMan
Copy link
Member Author

The original issue should now be fixed. No boards or libraries include plib.h anymore.

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

No branches or pull requests

2 participants