Not that P2_2, etc are "friendly" names only that map to a pin number and point into the arrays digital_pin_to_port[], digital_pin_to_bit_mask[], etc.
On a side note, It is discouraged to use these friendly names since they are not portable between all launchpads. Instead use pin numbers.
With that said, in order to use the pins currently exclusive to the LCD, you need to add them to the following arrays in pins_energia.h:
digital_pin_to_port[]
digital_pin_to_bit_mask[]
Add them to the end of the arrays. You will have to choose which pin goes at which position in the array. The position in the array determines the pin number you use in your Sketches for a particular pin.
e.g. if you were to add P2.2 to the end of the arrays it would look something like this:
const uint8_t digital_pin_to_port[] = {
NOT_A_PIN, /* 0 - pin count starts at 1 */
.....
P2, /* 21 - P2.4 */
P2, /* 22 - P2.3 */
P4, /* 23 - P4.0 */
P1, /* 24 - P1.2 */
P2, /* 25 - P2.6 */
P2, /* 26 - P2.2 */
};
const uint8_t digital_pin_to_bit_mask[] = {
NOT_A_PIN, /* 0 - pin count starts at 1 */
......
BV(4), /* 21 - P2.4 */
BV(3), /* 22 - P2.3 */
BV(0), /* 23 - P4.0 */
BV(2), /* 24 - P1.2 */
BV(6), /* 25 - P2.6 */
BV(2), /* 26 - P2.2 */
};
With this addition you can use P2.2 as pin 26 in your Sketch as GPIO.
void setup()
{
pinMode(26, OUTPUT);
digitalWrite(26, HIGH);
}
Be careful with modifying the core since it is controlled by Energia. An update to the core will undo all the changes.
Robert