-
Notifications
You must be signed in to change notification settings - Fork 134
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
PCA9548A driver and I2C multiplexed master. #81
Conversation
6c388a3
to
67a8e6a
Compare
8669ec2
to
a46d999
Compare
a46d999
to
a1bc86e
Compare
a1bc86e
to
e2350dc
Compare
e2350dc
to
f7a8f1a
Compare
Ping? |
f7a8f1a
to
3430098
Compare
adf33d2
to
9f99c4c
Compare
Yes, it's done now and I politely ask for some review. Thanks to @chris-durand for help with the shorter template syntax! |
* Interface of an I2C Multiplexer. | ||
* | ||
* All I2C multiplexer driver should implement this interface. | ||
* |
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.
Please put all classes in this file into the proper doxygen group, modm_i2c_multiplexer
I believe. You can check the output via (cd modm/docs && doxygen doxyfile)
.
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.
Like so?
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.
Uh, sorry, the generator in :docs
uses module naming, so it would be modm_architecture_i2c_multiplexer
.
template < auto &object > | ||
using Ch6 = I2cMultiplexerChannel< object, Channel::Ch6 >; | ||
template < auto &object > | ||
using Ch7 = I2cMultiplexerChannel< object, Channel::Ch7 >; |
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.
Is there a way to automatically populate object with this
? So you can do using Ch0 = object.Ch0;
?
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.
No idea, probably @chris-durand comes up with a suggestion. I can live with that code.
modm::I2cMultiplexerChannel<multiplexer, channel>::start(modm::I2cTransaction *transaction, ConfigurationHandler handler) | ||
{ | ||
// If call to multiplexer failed, return without doing the actual transaction | ||
if (RF_CALL_BLOCKING(multiplexer.multiplexerDevice.setActiveChannel(static_cast<uint8_t>(channel))) == false) { |
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.
Yeah, I need to introduce stackful fibers, so async doesn't modify the function signature.
191dbb2
to
b3936a9
Compare
b3936a9
to
77ae899
Compare
@salkinium Everything good with that? |
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.
Thanks!
Fixes #80. Open for discussion.