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

twi: add support for USCB_1 module on devices that support it #398

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

alfh
Copy link

@alfh alfh commented Jun 29, 2014

This is an initial pull request, I think a full review and some discussions needs to take place before this can be merged, but I want to get the "process" started.

There are some major restructuring, plus I have made some changes to how the "UCBxCTL1" and "UCBxCTL0" are initialized, therefore you will see some commented out lines related to those, to make you extra aware of those changes.

The include part in Wire.cpp I also need some help on, a bit unsure how it shold be, as you can see, I have just commented it out now, but it works in my example.

You can also see that I've removed some hardware serial from usci_isr_handler.*, it does not seem to be needed, but I have not tested this, I've just seen that it compiles. If you want to do that change, maybe it should be a separate pull request ?

alfh added 6 commits June 29, 2014 11:03
By just uncommenting the "//#define USE_USCI_B1 1" line, you are able
to use the USCI_B1 module, instead of USCI_B0.

There are also some general I2C improvements, like following the order
suggested in MSP430 Family Guide on how to init I2C. And avoiding
setting stuff in "two_readFrom" and "twi_writeTo" that has already
been set in the "init" method.

There is still need for improvements before the code can be merged.
Ideally, I want to be able to use both modules B0 and B1 from my
sketch, so the Wire/twi needs to support having both modules in
use at the same time.
@alfh
Copy link
Author

alfh commented Jun 29, 2014

Note that I've ripped out a part previously part of this change, and made pull request #397 for that, since it is not unique to the "USCB_1" module.

@alfh
Copy link
Author

alfh commented Mar 29, 2015

I've made a simpler pull request, #590, which allows one to choose which module to use, but does not allow one to use both modules at the same time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants