Closed RobLewis closed 8 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.
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
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.
Also to be considered:
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.
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
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.
According to its quickstart guide, some of the pin assignments on the Booster Pack connectors are different from other MSP430s (e.g., the I2C).