Conversation
| } | ||
| cfg.address = i2cAddress; // this seems unused anyhow | ||
| i2cAddress = address; | ||
| i2cHandle.Init(cfg); |
There was a problem hiding this comment.
yes! this is the main bit missing to get Trill to work!
There was a problem hiding this comment.
@giuliomoro add this fix to open a PR for review to E-S?
|
thanks and apologies for missing the earlier notifications. @virvel your fix of course looks great (silly me). I wonder what happens when you instantiate more than one device. Is it going to behave OK? |
great! no worries :) not sure about additional devices. could you make a pull request of this to electro-smith/libDaisy? maybe that was not your intention in the first place, but it would be nice to have it there. :) |
|
@virvel Sure, I'd be happy to make a PR there if you can confirm this works. I haven't had a chance to test it myself. |
|
@giuliomoro It works using a single I2C device connected at least. I've been using the trill craft a lot with the daisy seed. :) I think @dromer has been using it successfully as well. |
|
@virvel not actively, mostly just did a couple tests since I have some Trill sensors that I'd like to use with libDaisy (hoping in combo with Heavy in the future). This initialization fix at least allowed to using it as a PoC, but I think it would still need some work to properly integrate with libDaisy. |
|
What more work do you think is needed? The library itself is fully featured, but I understand that the example could have a bit more meat in it. Is there some libDaisy convention that I am missing ? |
|
Shouldn't the device config and init not follow the libDaisy conventions for this class of peripheral device? https://github.com/electro-smith/libDaisy/blob/master/src/dev/tlv493d.h#L35-L71 |
|
Right, that's all done here https://github.com/giuliomoro/libDaisy/blob/64c08470c079693cd9e2ab59cf2b85a5cff4727c/src/dev/trill/I2c.h |
|
I rationalised the commits, rebased and it's now a PR electro-smith#657 |
|
I guess what I mean is that the interface with libDaisy should follow the common OOP approach, where the rest of the Trill implementation is more functional. Does that make sense? |
|
turns out things have changed upstream so the rebase fails CI ... let's have further discussion there. |
Added missing initialization of I2CHandle. Should be working now. :)