-
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
Add Documentation for PruManager #4
base: BBAI-demo
Are you sure you want to change the base?
Conversation
include/PruManager.h
Outdated
@@ -17,6 +17,12 @@ | |||
#include <vector> | |||
#include "Mmap.h" | |||
|
|||
/** | |||
* \brief Support for interaction with PRU via | |||
* (rproc+mmap) and/or (uio+libprussdrv) |
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 is the description of the base class, so it should not contain any references to the children classes, as there may be more added in the future that you currently don't know about.
public: | ||
/** |
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.
I would expect all the documentation for the methods to be in the base class. If any child class has specific exceptions, those can be documented in the children class. (e.g.: PruManagerUio
does not support pruNum >= 2
, that should be documented in the child class as an exception).
This is assuming Doxygen presents it all in a nice format.
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.
Okay then I am leaving the base class' pruNum parameter empty as it is child class dependent.
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.
I'd rather have it in the base class instead, so that children classes know what the specs are. Then if they have exceptions, they should document it appropriately.
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.
Okay, added in 7c0e7b9
include/PruManager.h
Outdated
PruManagerRprocMmap(unsigned int pruNum, int v); | ||
/** | ||
* performs echo stop > state |
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.
performs echo stop > state
is an implementation detail. You can leave that in the .cpp
file, but there is no need for the user to know this. With regard to what mentioned above of putting the description in the base class, the stop()
method does not need to be documented in this child class, as the only difference is in the implementation details.
include/PruManager.h
Outdated
void stop(); | ||
/** | ||
* checks whether to use McASP IRQ or non McASP IRQ PRU code and then calls |
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.
What about
Loads the firmware and starts the PRU. It uses the one of the firmwares built with Bela.
@param useMcaspIrq if `true`, uses `pru_rtaudio_irq.p` , if `false` uses `pru_rtaudio.p`
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.
done
include/PruManager.h
Outdated
int start(bool useMcaspIrq); | ||
/** | ||
* Load the firmware and start the PRU | ||
* @param path path to the appropriate PRU firmware `.out` file |
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.
when moving this description to the base class, keep it generic "path to a PRU firmware file that is suitable to be loaded by the child class's underlying driver".
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.
then in the child class you can specify what the appropriate format is (i.e.: a binary of the firmware for Uio
and an ELF .out
suitable for rproc for the other one)
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.
okay sure, done
include/PruManager.h
Outdated
int start(const std::string& path); | ||
/** | ||
* accesses the DATA RAM0 and DATA RAM1<br> |
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.
"Obtain a pointer to the PRU's own DATA RAM"
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.
done
include/PruManager.h
Outdated
void* getOwnMemory(); | ||
/** | ||
* accesses the general purpose memory RAM (signified RAM2) shared between PRU0 and PRU1 |
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.
"Obtain a pointer to the PRUSS shared RAM"
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.
done
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.
tried to make all changes suggested so far
public: | ||
/** |
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.
Okay then I am leaving the base class' pruNum parameter empty as it is child class dependent.
include/PruManager.h
Outdated
void stop(); | ||
/** | ||
* checks whether to use McASP IRQ or non McASP IRQ PRU code and then calls |
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.
done
include/PruManager.h
Outdated
int start(bool useMcaspIrq); | ||
/** | ||
* Load the firmware and start the PRU | ||
* @param path path to the appropriate PRU firmware `.out` file |
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.
okay sure, done
include/PruManager.h
Outdated
int start(const std::string& path); | ||
/** | ||
* accesses the DATA RAM0 and DATA RAM1<br> |
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.
done
include/PruManager.h
Outdated
void* getOwnMemory(); | ||
/** | ||
* accesses the general purpose memory RAM (signified RAM2) shared between PRU0 and PRU1 |
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.
done
Add Doxygen supported Documentation for PruManager Implementation