This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSPM0G3507: MSPM0G3507

Part Number: MSPM0G3507
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Here is my code:


switch (DL_Interrupt_getPendingGroup(DL_INTERRUPT_GROUP_1)) {
case GPIO_SWITCHES_INT_IIDX:
{
/* If SW is high, turn the LED off */
if (input1==0 && input2==0) { //off
DL_GPIO_clearPins(GPIO_LEDS_PORT, GPIO_LEDS_USER_LED_1_PIN);
DL_GPIO_clearPins(GPIO_LEDS_PORT, GPIO_LEDS_USER_LED_2_PIN);
}
else if (input1==0 && input2==4096) { //on O1
DL_GPIO_clearPins(GPIO_LEDS_PORT, GPIO_LEDS_USER_LED_1_PIN);
DL_GPIO_setPins(GPIO_LEDS_PORT, GPIO_LEDS_USER_LED_2_PIN);
}
else if (input1==2048 && input2==0) { //on O2
DL_GPIO_setPins(GPIO_LEDS_PORT, GPIO_LEDS_USER_LED_1_PIN);
DL_GPIO_clearPins(GPIO_LEDS_PORT, GPIO_LEDS_USER_LED_2_PIN);

}
else if (input1==2048 && input2==4096) { //on O1+O2
DL_GPIO_setPins(GPIO_LEDS_PORT, GPIO_LEDS_USER_LED_1_PIN);
DL_GPIO_setPins(GPIO_LEDS_PORT, GPIO_LEDS_USER_LED_2_PIN);
}
}
break;

Here is my question:
in state 11 (input1==2048 && input2==4096)
I want to change the direction of the pin so he will become an input.
Could you share the relevant function with me?

Regards,

Daniel.

  • Hi Daniel,

    You can use SysConfig to find the required DriverLib functions to configure different peripherals. Here is setting up an input. DL_GPIO_initDigitalInputFeatures(...) for configuring all the possible settings like pull-up/down. DL_GPIO_initDigitalInput(IOMUX) quickly configuring the pin to be an input. You can copy and paste the functions from SysConfig into your application code and configure the pins during runtime.

    Regards,
    Luke