energia / Energia

Fork of Arduino for the Texas Instruments LaunchPad's
http://energia.nu
Other
794 stars 672 forks source link

Improve Support for LaunchPad MSP430F5529 #285

Closed RobLewis closed 8 years ago

RobLewis commented 10 years ago

According to its quickstart guide, some of the pin assignments on the Booster Pack connectors are different from other MSP430s (e.g., the I2C).

measley commented 10 years ago

Yes that's right, the 5529 is featuring a more robust pin mapping so that its easier to interact with multiple BoosterPacks. This is following that standards that are posted on ti.com. It's better to use these updated pin assignments for future proofing.

astuder commented 10 years ago

For I2C I suggest to add setModule() to the TwoWire class, compatible with the implementation for Tiva/Stellaris. https://github.com/energia/Energia/blob/master/hardware/lm4f/libraries/Wire/Wire.h

rei-vilo commented 10 years ago

Same request for Serial1 on P3_4 P3_3 and SPI1 on P4_3 P4_2 P4_1 P4_0.

Now, wouldn't be easier to have Wire1 instead of setModule(1)?

That's the way taken with SPI0, SPI1, SPI2 = SPI (default) and SPI3 for the Stellaris LaunchPad on pending commit #256 answering issues #246 and #255.

rei-vilo commented 10 years ago

Also to be considered:

astuder commented 10 years ago

Re Wire1/SPI0-2: Is this referring to static, pre-initialized instances of the respective classes? If so, I'd be concerned about wasted memory when not in use. Defining the module as parameter of the constructor would make more sense.

RobLewis commented 10 years ago

I don't know if this is the best place to note this, but in a couple of the libraries I've had to edit the

if defined(…)

statement to add the F5529 to the list of supported parts. The ones I'm using are for the BMP085 barometry sensor and the DHT22 humidity sensor.